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

login
register
mail settings
Submitter phabricator
Date July 19, 2021, 10:42 a.m.
Message ID <differential-rev-PHID-DREV-krqzlzsf76btiyj6jlzs-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49451/
State Superseded
Headers show

Comments

phabricator - July 19, 2021, 10:42 a.m.
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




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

Patch

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,