changeset 49107:079aaf996eca

dirstatemap: move `set_possibly_dirty` out of the common methods There exists now a dedicated Rust implementation Differential Revision: https://phab.mercurial-scm.org/D12505
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 28 Mar 2022 18:10:19 +0200
parents c1a3fdedc492
children 119c7e2b4248
files mercurial/dirstatemap.py
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstatemap.py	Mon Mar 28 18:09:01 2022 +0200
+++ b/mercurial/dirstatemap.py	Mon Mar 28 18:10:19 2022 +0200
@@ -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,