D11135: dirstate: rename `update_file_reference` to `update_file_p1`

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Mon Jul 19 10:42:21 UTC 2021


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This is a bit clearer on the intended usage of the function. (but still not great)

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py
  mercurial/scmutil.py

CHANGE DETAILS

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -1487,13 +1487,13 @@
     s = newctx.status(oldctx, match=match)
 
     for f in s.modified:
-        ds.update_file_reference(f, p1_tracked=True)
+        ds.update_file_p1(f, p1_tracked=True)
 
     for f in s.added:
-        ds.update_file_reference(f, p1_tracked=False)
+        ds.update_file_p1(f, p1_tracked=False)
 
     for f in s.removed:
-        ds.update_file_reference(f, p1_tracked=True)
+        ds.update_file_p1(f, p1_tracked=True)
 
     # Merge old parent and old working dir copies
     oldcopies = copiesmod.pathcopies(newctx, oldctx, match)
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -500,7 +500,7 @@
             return True
 
     @requires_parents_change
-    def update_file_reference(
+    def update_file_p1(
         self,
         filename,
         p1_tracked,



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


More information about the Mercurial-devel mailing list