[RFC] A better way to help users understand and resolve confclits

Guilhem Bichot guilhem at sun.com
Wed Aug 26 14:26:45 BST 2009


Hello,

Aaron Bentley a écrit, Le 25.08.2009 21:34:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Guilhem Bichot wrote:
>> So I need to see the diff associated with the revision which deleted "1"
>> (to see if "1" was put in some other file). Either through "bzr
>> gannotate" or "bzr qlog FILE", usually.
>>
>> This is even more pressing when using --weave where there is no BASE
>> section.
> 
> There is a command to generate such diffs in bzrtools: conflict-diff.
> It will synthesize a BASE if none is present.

Thanks for the tip - I just tried it.
In MySQL we have tens of branches of MySQL code (different versions, 
different teams); the merge flow is so that we often see criss-cross merges.
In such criss-cross merges, --merge3 gave 200 conflicts sometimes, just 
because it picks a single LCA which is very old due to the criss-cross 
situation.
In those merges, "bzr merge --weave" yields roughly 5-20 times less 
conflicts than --merge3", thanks to excellent improvements done by John 
Arbash Meinel in June/July 2008. So we use --weave.
The only drawback of --weave is that its text conflict sections look like:
<<<<TREE
xxxx
====
yyyy
 >>>>MERGE-SOURCE,
so, no BASE section, unlike "bzr merge --merge3 --show-base".
The absence of such section makes resolving more difficult in my 
experience (because I don't see the evolution of code).

To try "bzr conflict-diff", I took a sample file in a sample MySQL 
criss-cross merge.
--merge3 + extmerge (using kdiff3) gives 10 conflicts in the file; 
--weave gives only 2 conflicts, which is correct.
I ran "bzr merge --weave", then "bzr conflict-diff" for the file; the 
problem is that the BASE which this generates (actually a diff between 
BASE and OTHER, from which I can create a BASE file), is identical to 
the BASE generated by "bzr merge --merge3". So this BASE does not help 
here, as it takes me back to all problems of 3-way traditional file 
merges in criss-cross merges: many conflicts (10 here, in "bzr 
extmerge"), wrong automatic resolution, etc, as in 
http://wiki.vestasys.org/MergingFuture/Food4Thought/TrickyCases).

That is, if I use "bzr conflict-diff", I lose all benefits of --weave.

Alas...

-- 
Mr. Guilhem Bichot <guilhem at sun.com>
Sun Microsystems / MySQL, Lead Software Engineer
Bordeaux, France
www.sun.com / www.mysql.com



More information about the bazaar mailing list