dirstate: rename `update_file_reference` to `update_file_p1`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 15 Jul 2021 04:34:51 +0200
changeset 47693 46c318b9b9a4
parent 47692 e5fb14a07866
child 47694 1c06ef8f5ea5
dirstate: rename `update_file_reference` to `update_file_p1` This is a bit clearer on the intended usage of the function. (but still not great) Differential Revision: https://phab.mercurial-scm.org/D11135
mercurial/dirstate.py
mercurial/scmutil.py
--- a/mercurial/dirstate.py	Mon Jul 19 07:23:55 2021 +0200
+++ b/mercurial/dirstate.py	Thu Jul 15 04:34:51 2021 +0200
@@ -500,7 +500,7 @@
             return True
 
     @requires_parents_change
-    def update_file_reference(
+    def update_file_p1(
         self,
         filename,
         p1_tracked,
--- a/mercurial/scmutil.py	Mon Jul 19 07:23:55 2021 +0200
+++ b/mercurial/scmutil.py	Thu Jul 15 04:34:51 2021 +0200
@@ -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)