changeset 47693:46c318b9b9a4

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
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 15 Jul 2021 04:34:51 +0200
parents e5fb14a07866
children 1c06ef8f5ea5
files mercurial/dirstate.py mercurial/scmutil.py
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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)