Comments
Patch
@@ -724,6 +724,9 @@ def calculateupdates(repo, wctx, mctx, a
"Calculate the actions needed to merge mctx into wctx using ancestors"
ancestor = ancestors[0]
+ if len(ancestors) > 1:
+ ancestor = wctx.ancestor(mctx)
+ assert ancestor in ancestors
actions = manifestmerge(repo, wctx, mctx,
ancestor,
@@ -924,7 +927,8 @@ def update(repo, node, branchmerge, forc
p2 = repo[node]
if pas[0] is None:
- pas = [p1.ancestor(p2)]
+ ancs = repo.changelog.commonancestors(p1.node(), p2.node())
+ pas = [repo[anc] for anc in (sorted(ancs) or [nullid])]
fp1, fp2, xp1, xp2 = p1.node(), p2.node(), str(p1), str(p2)