We use “Subversion”:http://subversion.tigris.org for “version control”:http://en.wikipedia.org/wiki/Revision_control at “work”:http://creativecommons.org. We try to version control everything: code, content, graphics, site configuration. “Everything”:http://cctools.svn.sourceforge.net. This does wonders for our sanity, but we can do more. Recently (n < 6 months)) we’ve started doing something we should have done from Day 1: develop in one tree, deploy in another. In our case we’re developing in the trunk, and there’s a long-lived branch cleverly named production. This is great, with one little problem: cherry-picking revisions to merge in Subversion is a pain in the ass.
Last week I was looking at the “upcoming features”:http://subversion.tigris.org/roadmap.html in Subversion 1.5. “Asheesh”:http://asheesh.org/note/ had pointed out the “merge tracking”:http://subversion.tigris.org/merge-tracking/ feature, which sounded lovely. And it probably will be. The thing I discovered, though, is that you can get it today in the form of “svnmerge”:http://www.orcaware.com/svn/wiki/Svnmerge.py.
svnmerge allows you to track what revisions you’ve merged from a branch (or trunk), block certain revisions (features you might not want to deploy just yet), and performs the merges for you when that time arrives (including generating a nice commit message containing all the log messages you’re merging; handy). I spent an hour yesterday and an hour today getting the merges recorded for the packages I’m currently working on, and it already feels better. No more wondering if I remembered to merge something; just svnmerge avail and see if anything shows up.
Sure, it’ll be great to get this feature into the core application (and an interactive mode ala “darcs”:http://darcs.net would be slick, too), but to paraphrase Scarlett O’Hara, “with god as my witness, I will never svn merge again”.