The long road to Subversion

The issues we have had with Subversion have not been trivial to resolve. It was this e-mail on the svn-dev mailing list which helped us enormously. We have a very large code base which is organised as modules and modules are combined in various combinations to create products. We really didn't like externals and found it very hard to see how Subversion could be used to pull together the bits we need for a product from the repository. It was svn switch which came to the rescue. By creating a file tree for a product which contained empty directories for the required modules we could check out the product code and then run a script to switch the empty directories to the modules we require. And this is what I have just completed for one suite of our products.

The check out process is straightforward, check out the product and run the switch script. Commits and updates recurse through the switch, which is what we required.

The only remaining issue is branching and merging. We intend to use svnmerge.py and it won't do anything if there are switched directories in the file tree. At first I thought that might be a bug, but, having thought it through I realised that it is because it cannot work with switched folders. I suppose it could stop at the switch point, but below that level the URLs change so the merge makes no sense. That means that the switch script has a -u option to unswitch so that the non-shared modules can be merged.

Fri, 2006-10-06 11:58
( categories: )