Commit bb110f4a authored by Anton Shestakov's avatar Anton Shestakov

merge: back out changeset a4ca0610c754 (parents order when grafting a merge)

Turns out it's not enough to just swap parents, because when we do, there are
unexpected bad side effects, such as a tracked file becoming untracked. These
side effects need more code to be handled properly, but it's not written yet.
Let's back this feature out from stable for now and some day implement it on
default instead.

branch : stable
parent 085295f82845
......@@ -2249,23 +2249,17 @@ def graft(repo, ctx, pctx, labels=None, keepparent=False,
mergeancestor=mergeancestor, labels=labels)
potherp1 = False
if keepconflictparent and stats.unresolvedcount:
pother = ctx.node()
pother = nullid
parents = ctx.parents()
if keepparent and len(parents) == 2 and pctx in parents:
if pctx == parents[1]:
potherp1 = True
pother = parents[0].node()
with repo.dirstate.parentchange():
if potherp1:
repo.setparents(pother, repo['.'].node())
repo.setparents(repo['.'].node(), pother)
repo.setparents(repo['.'].node(), pother)
# fix up dirstate for copies and renames
copies.duplicatecopies(repo, repo[None], ctx.rev(), pctx.rev())
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment