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

login
register
mail settings
Submitter phabricator
Date Jan. 8, 2020, 4:30 p.m.
Message ID <c62f1f889fe756149dfb349646df9ae2@localhost.localdomain>
Download mbox | patch
Permalink /patch/44176/
State Not Applicable
Headers show

Comments

phabricator - Jan. 8, 2020, 4:30 p.m.
martinvonz updated this revision to Diff 19065.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7800?vs=19052&id=19065

BRANCH
  default

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
@@ -1426,8 +1426,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':