[PATCH 6 of 6] Disable premerge by default

Matt Mackall mpm at selenic.com
Wed Sep 17 22:24:50 UTC 2008


On Wed, 2008-09-17 at 21:06 +0200, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <mads at kiilerich.com>
> # Date 1221678330 -7200
> # Node ID cbcfa087b5f8708b5d794f5ae1f4202e643b97bc
> # Parent  daa237db419ccf4f75bc541c7b019d2bba8cdf8b
> Disable premerge by default
> Premerge silently merges file content if possible.

..and that's good.

>  The result is in some cases
> not what the user wants.

Putting aside for the moment that our simplemerge code is apparently
broken, mismerges will happen. Turning off premerge won't help this, it
will just make merging more annoying (and therefore LESS reliable). Most
merge tools use more or less the same merge algorithm that simplemerge
is supposed to be using and if a properly working simplemerge doesn't
flag a conflict for user interaction, kdiff3 won't either.

So in the common case (no conflicts), we'll be firing off a big GUI tool
to ask the user to do basically nothing, then quit. And users will
likely do the wrong thing when that tool pops up to show them real
conflicts because they'll be so used to immediately quitting.

And the longer term result will be that people merge less often because
it's a nuisance, and instead do merges only when they have to, by which
time they're now extremely difficult and error-prone.

>  Having it enabled by default isn't safe and isn't
> mercurial-ish.

It certainly is Mercurial-ish. Doing automatic premerge with a
simplemerge-like tool has been the default since day one. The only thing
that's changed is we don't call an external tool to do it.

And it's also perfectly safe provided you check in your code before
merging. You might get the wrong merge result, but that danger can't be
eliminated.

The right answer is to figure out what's wrong with simplemerge.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list