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

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Thu Sep 16 14:44:21 UTC 2021


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

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)



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


More information about the Mercurial-devel mailing list