three-way conflict markers

Pierre Asselin pa at panix.com
Fri Jan 16 20:09:44 CST 2009


Mads Kiilerich <mads at kiilerich.com> wrote:
> Pierre Asselin wrote, On 01/16/2009 04:09 AM:
> > Is there a reason the filemerge tool omits the base file content
> > in its conflict markers ?  

> Yes. As it is now, in case almost the same change has been made in both 
> parents then all shared leading and ending lines are considered safe and 
> moved outside the conflict markers. The result is a simple conflict 
> marker that only shows the difference between the two parents. If the 
> base version was shown too it would in some cases cause the conflict 
> region to be much larger.

I see.  Hmmm, that must be fixable.  I'll have to think.

I figure I will need the ancestor more often than not, so I have
to override simplemerge with "diff3 -m" (suitably wrapped).  The
conflicts are larger as you say, but it gets worse:  even if
*exactly* the same change has been made in both parents, diff3
reports a conflict.  More precisely, it has *one* option to control
*two* behaviors, "show all three files in conflicts" and "show
matching changes as conflicts".


> A patch experimentally doing what you ask for is attached. But with two 
> different ways of doing the merge the user must also be able to choose 
> among them - and then it is no longer a simple merge ...

Agreed.  It should be a config option with a command-line override.

Thanks.  Is there a PATH variable to make hg use modified copies
of these two .py files without clobbering the installation ?  If
I patch the installed files my distro will clobber them back at the
next upgrade.  I could clone the hg-stable and install from sources
from now on, but I was hoping to start a little slower.


-- 
pa at panix dot com



More information about the Mercurial mailing list