Will work on adding allowing merge tools to partially resolve conflicts

Martin von Zweigbergk martinvonz at google.com
Mon Nov 29 23:29:36 UTC 2021


Hi,

Just a heads up that I will work on teaching the merge machinery to call
external merge tools to let them partially resolve a merge. That will
require a different protocol for interacting with the merge tool. We're
going to pass the merge tool 3 inputs and expect 3 possibly modified
outputs, instead of just a single output the way existing merge tools work.
That way they can leave conflicts in a conflict-marker-agnostic way. Let me
illustrate with an
example. Let's say you have this input:

base:
a
b
c
d

left:
a2
b
c
d2

right:
a3
b
c
d3

The tool now has some intelligence and decides that the conflict in the
first line should be resolved with a4, but it doesn't know how to resolve
the conflict in the last line. It then produces three outputs:

base:
a4
b
c
d

left:
a4
b
c
d2

right:
a4
b
c
d3

The goal is to be able to write a language-aware merge tool that resolves
whatever conflicts it can and leaves the rest for a regular merge tool
(such as `meld` or `:merge3`).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20211129/19aa3e4e/attachment.html>


More information about the Mercurial-devel mailing list