[Updated] D8615: merge: move an inspection of the dirstate from record to calculate phase

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Tue Jun 9 10:10:38 UTC 2020


Closed by commit rHG818b4f19ef23: merge: move an inspection of the dirstate from record to calculate phase (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8615?vs=21559&id=21580

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8615/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8615

AFFECTED FILES
  mercurial/merge.py
  mercurial/mergestate.py

CHANGE DETAILS

diff --git a/mercurial/mergestate.py b/mercurial/mergestate.py
--- a/mercurial/mergestate.py
+++ b/mercurial/mergestate.py
@@ -769,8 +769,7 @@
 
     # resolve path conflicts
     for f, args, msg in actions.get(ACTION_PATH_CONFLICT_RESOLVE, []):
-        (f0,) = args
-        origf0 = repo.dirstate.copied(f0) or f0
+        (f0, origf0) = args
         repo.dirstate.add(f)
         repo.dirstate.copy(origf0, f)
         if f0 == origf0:
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -460,9 +460,10 @@
         if p not in deletedfiles:
             ctxname = bytes(wctx).rstrip(b'+')
             pnew = util.safename(p, ctxname, wctx, set(actions.keys()))
+            porig = wctx[p].copysource() or p
             actions[pnew] = (
                 mergestatemod.ACTION_PATH_CONFLICT_RESOLVE,
-                (p,),
+                (p, porig),
                 b'local path conflict',
             )
             actions[p] = (
@@ -1280,7 +1281,7 @@
     # resolve path conflicts (must come before getting)
     for f, args, msg in actions[mergestatemod.ACTION_PATH_CONFLICT_RESOLVE]:
         repo.ui.debug(b" %s: %s -> pr\n" % (f, msg))
-        (f0,) = args
+        (f0, origf0) = args
         if wctx[f0].lexists():
             repo.ui.note(_(b"moving %s to %s\n") % (f0, f))
             wctx[f].audit()



To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200609/780eaf5c/attachment-0002.html>


More information about the Mercurial-patches mailing list