Merge algorithms
Eli Zaretskii
eliz at gnu.org
Fri Sep 17 09:17:50 BST 2010
> From: "Stephen J. Turnbull" <stephen at xemacs.org>
> Cc: John Arbash Meinel <john at arbash-meinel.com>,
> mbp at canonical.com,
> bazaar at lists.canonical.com
> Date: Fri, 17 Sep 2010 15:21:42 +0900
>
> mainline ChangeLog Your ChangeLog
>
> LOG-1 LOG-2 # textual conflict!
> LOG-0 LOG-0
> ... old logs ... ... old logs ...
>
> Both files have changed at the same place. If you used context or
> unified diffs and patch here, what would happen is that the "LOG-0"
> context just below your patch would conflict with the "LOG-1" context
> at the top of the mainline ChangeLog, patch would find "fuzz 0", and
> refuse to apply the patch.
Well, granted, I understand the technical reasons for this behavior.
I just don't see why merge punts so easily in this case.
The existing merge algorithms already employ quite a bit of heuristics
in similar cases. For example, weave silently prefers the target
branch's version where other algorithms just declare a conflict, and
there are other kinds of heuristics described on the LCA pages
mentioned in this thread. I'm saying that the special case of
ChangeLog files might be solvable by similarly simple heuristics.
More information about the bazaar
mailing list