--- a/mercurial/dirstatemap.py Fri Oct 01 23:42:24 2021 +0200
+++ b/mercurial/dirstatemap.py Fri Oct 01 23:49:40 2021 +0200
@@ -115,6 +115,15 @@
entry.set_possibly_dirty()
self._refresh_entry(filename, entry)
+ def set_clean(self, filename, mode, size, mtime):
+ """mark a file as back to a clean state"""
+ entry = self[filename]
+ mtime = mtime & rangemask
+ size = size & rangemask
+ entry.set_clean(mode, size, mtime)
+ self._refresh_entry(filename, entry)
+ self.copymap.pop(filename, None)
+
def set_tracked(self, filename):
new = False
entry = self.get(filename)
@@ -449,14 +458,6 @@
def _insert_entry(self, f, entry):
self._map[f] = entry
- def set_clean(self, filename, mode, size, mtime):
- """mark a file as back to a clean state"""
- entry = self[filename]
- mtime = mtime & rangemask
- size = size & rangemask
- entry.set_clean(mode, size, mtime)
- self.copymap.pop(filename, None)
-
def reset_state(
self,
filename,
@@ -801,15 +802,6 @@
def _insert_entry(self, f, entry):
self._map.addfile(f, entry)
- def set_clean(self, filename, mode, size, mtime):
- """mark a file as back to a clean state"""
- entry = self[filename]
- mtime = mtime & rangemask
- size = size & rangemask
- entry.set_clean(mode, size, mtime)
- self._map.set_dirstate_item(filename, entry)
- self._map.copymap().pop(filename, None)
-
def __setitem__(self, key, value):
assert isinstance(value, DirstateItem)
self._map.set_dirstate_item(key, value)