changeset 42679:181e52f2b62f stable 5.1.2

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.
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 20 Sep 2019 23:31:03 +0700
parents 085295f82845
children d3b7d308a8f0 af2b5562fcaf
files mercurial/merge.py
diffstat 1 files changed, 1 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Wed Sep 18 17:53:10 2019 +0700
+++ b/mercurial/merge.py	Fri Sep 20 23:31:03 2019 +0700
@@ -2249,23 +2249,17 @@
                    mergeancestor=mergeancestor, labels=labels)
 
 
-    potherp1 = False
     if keepconflictparent and stats.unresolvedcount:
         pother = ctx.node()
     else:
         pother = nullid
         parents = ctx.parents()
         if keepparent and len(parents) == 2 and pctx in parents:
-            if pctx == parents[1]:
-                potherp1 = True
             parents.remove(pctx)
             pother = parents[0].node()
 
     with repo.dirstate.parentchange():
-        if potherp1:
-            repo.setparents(pother, repo['.'].node())
-        else:
-            repo.setparents(repo['.'].node(), pother)
+        repo.setparents(repo['.'].node(), pother)
         repo.dirstate.write(repo.currenttransaction())
         # fix up dirstate for copies and renames
         copies.duplicatecopies(repo, repo[None], ctx.rev(), pctx.rev())