SVNmerge - automatic branch management

Version control plays a major part in any developers toolset, when SVN first appeared on the scene it was hailed as the next generation version control system. But don’t they all we’ve seen the same happen with SVK, Git etc.

What SVN offered which particularly attracted me was ‘cheap’ tagging and branching, and this is something that I’ve used more and more as my development requirements have expanded.

At work in particular we often find ourselves in a situation where we are maintaining the production site (trunk), whilst developing new functionality or site designs in their own branch.

More often than not these development branches can exist for a significant amount of time and as time passes the trunk and the development branch get more and more out of sync.

This sort of thing generally makes me pretty edgy and therefore wherever possible I try and
pull any changes from the trunk in to the development branch.

This is fairly straightforward using the svn merge command, the main stumbling block that people
often forget to use the commit message to accurately detail the revisions being merged

Working in a team of developers this is the crux of the matter, when developer #2 comes to merge they’re not sure whats happened previously and could potentially merge the same revisions or worse and this is where version hell comes in to play. Often resulting in alot of chin stroking, head scratching and finally teeth pulling as you start doing a manual merge.

One of the main stumbling blocks of SVN is its lack of internal version history between branches to identify what has already been merged. SVK already does this, and it looks as though SVN 1.5 is going to come with this functionality.

So from now on remember those commit messages, life is good, you switch to a different version control system or wait for SVN 1.5.

After a bit of digging yesterday I came across a third party tool in subversion’s contrib named svnmerge. Its aim is to automatically deal with branch management allowing for tracking changes to remove yet another head ache from developers

An excellent overview of SVN Merge exists at: http://www.orcaware.com/svn/wiki/Svnmerge.py in addition to Ken Kinder’s great SVN merge tutorial


About this entry