Zooko has written a clever article comparing Darcs’s merge strategy with Subversion’s. The essence of the article is a case where two edits to the same file in different branches cause Subversion to automatically do a merge that introduces a bug, while Darcs gets the merge right.
Out of curiosity, I tried Zooko’s test case with BitKeeper and Mercurial. BK got the merge right (as I expected), while Mercurial punted and dropped me into a manual merge tool.
Automatic merging is one of those horrible tar pits that absorb huge amounts of time. The benefit when it works well is that you rarely need to care about merges. Unfortunately, merge algorithms are always difficult to reason about, so it’s easy to construct merge algorithms that appear to work well, but frequently yield incorrect results.
The approach that people seem to hold out hope for is Codeville’s weave-based precise merge, but I doubt that a dozen people actually understand it.
Leave a Reply