[PATCH 0 of 1] rebase: fix for issue1561

Christian Boos cboos at neuf.fr
Mon Nov 9 16:52:32 CST 2009


Hello,

Here's the fix for issue1561, "unnecessary merge conflicts in rebase",
resent after taking the feedback from Martin Geisler into account,
with all relevant tests passing and a better changeset message.


That issue draw my attention again as Matt recently closed it as being
superceded by issue1327, but wrongly so, as I found out.

Instead, the problem here was that rebase needs to "force" the
ancestor that will be used by merge.update for all rebased changesets
but the first, so that this "ancestor" is actually the parent of the
changeset being rebased.

This was done in rebasemerge, but in a somewhat fragile way, and that
"newancestor" correction was actually only performed once, while
merge.update needed that information multiple times.

I'm sure a better fix would be to pass explicitly that ancestor to
merge.update, but I don't think such a change would be appropriate in
the current time frame (and I have not looked how difficult that would
be). So for 1.4, I think it's better to keep the current
ancestor.ancestor monkey patching approach, but simply make it work.

-- Christian


More information about the Mercurial-devel mailing list