Patchwork D7800: movedirstate: get copies from dirstate before setting parents

login
register
mail settings
Submitter phabricator
Date Jan. 9, 2020, 2:25 p.m.
Message ID <2286058376d66bca9783ce26c02142a8@localhost.localdomain>
Download mbox | patch
Permalink /patch/44227/
State Not Applicable
Headers show

Comments

phabricator - Jan. 9, 2020, 2:25 p.m.
Closed by commit rHG0750cbffdb3b: movedirstate: get copies from dirstate before setting parents (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/D7800?vs=19065&id=19122

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

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

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -1431,8 +1431,8 @@ 
     """
     oldctx = repo[b'.']
     ds = repo.dirstate
+    copies = dict(ds.copies())
     ds.setparents(newctx.node(), nullid)
-    copies = dict(ds.copies())
     s = newctx.status(oldctx, match=match)
     for f in s.modified:
         if ds[f] == b'r':