Patchwork D11431: dirstate: replace the use of _normallookup in `setparents`

login
register
mail settings
Submitter phabricator
Date Sept. 16, 2021, 2:44 p.m.
Message ID <differential-rev-PHID-DREV-uruvmatpyhjej6toslin-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49746/
State Superseded
Headers show

Comments

phabricator - Sept. 16, 2021, 2:44 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  normal lookup is a complicated function that we want to get rid of.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -401,7 +401,12 @@ 
                     source = self._map.copymap.get(f)
                     if source:
                         copies[f] = source
-                    self._normallookup(f)
+                    self._map.reset_state(
+                        f,
+                        wc_tracked=True,
+                        p1_tracked=True,
+                        possibly_dirty=True,
+                    )
                 # Also fix up otherparent markers
                 elif s.from_p2:
                     source = self._map.copymap.get(f)