3-way merge and smart merge

Vadim Gelfer vadim.gelfer at gmail.com
Sat May 20 14:29:02 CDT 2006


On 5/20/06, Bram Cohen <bram at bitconjurer.org> wrote:

> Thank you for that example Vadim.

you are welcome. if it can help, i will generate more examples and put
them in tarball for you with any information that you can use. let me
know what is good.

> I don't think either of these is strongly preferable to the
> other in terms of a conflict to show to the user - you simply have to guess.

yes.

> Are there any cases in your example set where one algorithm does a clean
> merge and the other shows a conflict? Those are the most interesting cases.

no. both 3-way and edgemerge always have same conflict/no conflict
answer in my tests. conflicts were sometimes different.

> It appears that there's very little implicit undo and implicit
> cherry-picking in the example set you're using.

i think so. linux kernel merges are almost always clean because that
is what linus wants. other project has more merges with conflicts, but
only 6 developers. developers did not make any attempt to avoid
conflicts though.

> This is a big problem with analyzing merge
> algorithms based on past data - people are using 3-way merge, so they
> avoid the cases which 3-way can get wrong.

also problem with talking to people about smart merge. if you draw
directed graph with little "a", "b", "c" nodes, they switch off, not
try to understand. if you show example with "real code" where 3-way
gives bad result or conflict and smart merge wins, much better. we
need library of good examples for developers and users.



More information about the Mercurial mailing list