AccuRev and Merging Bliss
Normally, I do not post to my blog from work, but I just had an AccuRev is awesome moment I needed to share. Under the previous software product, sold by a very large company which provides operating systems for most of world's desktops, merging was a horrible experience. This unnamed "safe" product for "source" code would often duplicate merged blocks, leading to code which looks right, but fails to compile. The most horrible situation you can imagine in this older, "visual" product is a double merge. You make code changes, combine with another branch and then have to combine with a third branch. This almost never worked in the old days, leading to a development process which tried to prevent such situations from occurring.
Then the clouds parted and the glorious sun which is AccuRev beamed down on us. To set the scene, we loaded our 100,000 or so source files from the old system into AccuRev some two months ago. Since then we have converted to Visual Studio 2005 and shifted toward a continuous integration system. Suffice it to say there have been lots of systemic changes to our codebase. Meanwhile, development continued in the old source control world and we wrote scripts which aided in conversion. Periodically, I would load updates from the old system into AccuRev and ensure consistency. Now two months later the last of the changes are being loaded into place, and a wonderful event occurred.
I have a file, call it foo.c, with changes from the old system. I loaded it into AccuRev and ran a keep on it, conceptually similar to checkin, but in a private workspace. I compared it to the previous revision and used "Merge From" in the "Browse Versions". In the old world, this would be a migraine-inducing experience, but in AccuRev the two versions folded together in a few seconds. When the merge was complete and the "Browse Versions" window displayed again I found that a developer had just promoted their own changes to the file while I was merging. In the old world, on a Friday, I would have given up and gone for a beer leaving the problem for the weekend. Never having faced the situation in AccuRev, I turned up the music and readied myself for disappointment. I selected the new revision and chose "Merge From." The resulting file was perfectly merged, all of the changes were correctly select and the resulting file is perfect.
Honestly, it took me longer to write this post than it did to load, back merge and forward merge this heavily altered source file. Even after carefully reviewing all fifty-eight perfectly combined changes.
Just in case it isn't clear...AccuRev is the single best piece of SCM software I have ever used. An excellent combination of easy to use and powerful.
[No, I do not work for AccuRev. I really do work for DeLorme as a Software Architect. I do, however, totally love this SCM system.]