[Commented On] D12459: dirstatemap: move `set_possibly_dirty` out of the common methods

baymax (Baymax, Your Personal Patch-care Companion) phabricator at mercurial-scm.org
Tue Apr 12 14:58:03 UTC 2022


baymax added a comment.
baymax updated this revision to Diff 33033.


  ✅ refresh by Heptapod after a successful CI run (🐙 💚)

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D12459?vs=32931&id=33033

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D12459/new/

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

AFFECTED FILES
  mercurial/dirstatemap.py

CHANGE DETAILS

diff --git a/mercurial/dirstatemap.py b/mercurial/dirstatemap.py
--- a/mercurial/dirstatemap.py
+++ b/mercurial/dirstatemap.py
@@ -110,12 +110,6 @@
 
     ### method to manipulate the entries
 
-    def set_possibly_dirty(self, filename):
-        """record that the current state of the file on disk is unknown"""
-        entry = self[filename]
-        entry.set_possibly_dirty()
-        self._refresh_entry(filename, entry)
-
     def set_untracked(self, f):
         """Mark a file as no longer tracked in the dirstate map"""
         entry = self.get(f)
@@ -531,6 +525,12 @@
         self._refresh_entry(filename, entry)
         self.copymap.pop(filename, None)
 
+    def set_possibly_dirty(self, filename):
+        """record that the current state of the file on disk is unknown"""
+        entry = self[filename]
+        entry.set_possibly_dirty()
+        self._refresh_entry(filename, entry)
+
     def _refresh_entry(self, f, entry):
         if not entry.any_tracked:
             self._map.pop(f, None)
@@ -715,6 +715,9 @@
         def set_clean(self, filename, mode, size, mtime):
             self._map.set_clean(filename, mode, size, mtime)
 
+        def set_possibly_dirty(self, f):
+            self._map.set_possibly_dirty(f)
+
         def reset_state(
             self,
             filename,



To: Alphare, #hg-reviewers, marmoute
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220412/96385b0e/attachment-0002.html>


More information about the Mercurial-patches mailing list