mercurial/dirstatemap.py
changeset 48065 2ac0e6b23222
parent 48063 76f1c76186a1
child 48066 98c0408324e6
--- a/mercurial/dirstatemap.py	Thu Sep 23 15:29:38 2021 +0200
+++ b/mercurial/dirstatemap.py	Thu Sep 23 15:36:43 2021 +0200
@@ -606,7 +606,7 @@
             self.copymap.pop(filename, None)
 
             if not (p1_tracked or p2_tracked or wc_tracked):
-                self.dropfile(filename)
+                self._rustmap.drop_item_and_copy_source(filename)
             elif merged:
                 # XXX might be merged and removed ?
                 entry = self.get(filename)
@@ -684,8 +684,7 @@
                 return False
             else:
                 if entry.added:
-                    self._rustmap.copymap().pop(f, None)
-                    self._rustmap.dropfile(f)
+                    self._rustmap.drop_item_and_copy_source(f)
                 else:
                     self._rustmap.removefile(f, in_merge=True)
                 return True
@@ -693,10 +692,6 @@
         def removefile(self, *args, **kwargs):
             return self._rustmap.removefile(*args, **kwargs)
 
-        def dropfile(self, f, *args, **kwargs):
-            self._rustmap.copymap().pop(f, None)
-            self._rustmap.dropfile(f, *args, **kwargs)
-
         def clearambiguoustimes(self, *args, **kwargs):
             return self._rustmap.clearambiguoustimes(*args, **kwargs)