dirstatemap: use common code for set_possibly_dirty
Same logic before this make sure both implementation use the same logic for this.
Differential Revision: https://phab.mercurial-scm.org/D11575
--- a/mercurial/dirstatemap.py Fri Oct 01 23:24:01 2021 +0200
+++ b/mercurial/dirstatemap.py Fri Oct 01 23:42:24 2021 +0200
@@ -109,6 +109,12 @@
### 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_tracked(self, filename):
new = False
entry = self.get(filename)
@@ -443,10 +449,6 @@
def _insert_entry(self, f, entry):
self._map[f] = entry
- def set_possibly_dirty(self, filename):
- """record that the current state of the file on disk is unknown"""
- self[filename].set_possibly_dirty()
-
def set_clean(self, filename, mode, size, mtime):
"""mark a file as back to a clean state"""
entry = self[filename]
@@ -799,12 +801,6 @@
def _insert_entry(self, f, entry):
self._map.addfile(f, entry)
- 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._map.set_dirstate_item(filename, entry)
-
def set_clean(self, filename, mode, size, mtime):
"""mark a file as back to a clean state"""
entry = self[filename]