views:

159

answers:

1

In our company, we are working on a product composed of different C/C++ modules. Ideally, each tier and module should be developed by separately by different teams and tested independently. Currently, we have separate each module into it's own branch:\

The modules are:

\hid
  \branches
  \tags
  \trunk
\api
  \branches
  \tags
  \trunk
\ui
  \branches
  \tags
  \trunk

Separately, the product release is build by combining the modules and compiled regularly using a CI system.

\productX
  \branches
    \5.0
      \hid-4.0 (svn:externs \hid\branches\4.0)
      \api-3.0 (svn:externs \api\branches\3.0)
      \ui-5.0  (svn:externs \ui\branches\5.0)
  \tags
  \trunk

The main problem we are having is with the behavior of 'svn tag' in association with externs. The current externs are referencing the HEAD -- because we would like to build the latest version regularly to ensure all modules works together. However, once a build is successful and we proceed to make a release, it would be nice if there was an easy way to automatically tag everything -- including the version used in the extern. As it stands today, we have to create tags for the modules and then update the externs to these tags, then tag the product, and finally swap it back to the trunk after.

Is there a cleaner way to do this? Feel free to also comment on the current structure.

Thanks.

+3  A: 

I think it would be better to have your externals definitions refer to tags of the modules, rather than their trunks. This way you’re only pulling in known milestones of the modules, and nothing will need to change when you tag the core product.

This is in keeping with the best practice (suggested in the SVN documentation) of only using explicit revisions (rather than HEAD) in svn:externals.

Michael Hackner
Thanks Michael. Your comments reflect what I have read (a lot!) about the SVN svn:externs practices. We are doing mostly what has been suggested:* most times, the product is referring to the branches of the modules* before a release, we create a tag for each module* next, we update the externs to point to these tags* finally, we tag the product* and then we change externs back to the branches againThis works, but is very tedious and error prone. I was hoping there is a a better way...
Charles