mercurial/dirstatemap.py
changeset 48128 a8ff00ad290b
parent 48127 ced8cf9c4905
child 48129 a39192fc7c56
--- a/mercurial/dirstatemap.py	Fri Oct 01 19:14:09 2021 +0200
+++ b/mercurial/dirstatemap.py	Fri Oct 01 23:13:44 2021 +0200
@@ -101,6 +101,12 @@
     def _refresh_entry(self, f, entry):
         """record updated state of an entry"""
 
+    def _insert_entry(self, f, entry):
+        """add a new dirstate entry (or replace an unrelated one)
+
+        The fact it is actually new is the responsability of the caller
+        """
+
     ### method to manipulate the entries
 
     def set_untracked(self, f):
@@ -403,6 +409,9 @@
         if not entry.any_tracked:
             self._map.pop(f, None)
 
+    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()
@@ -784,6 +793,9 @@
             else:
                 self._map.addfile(f, entry)
 
+        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]