mercurial/dirstate.py
changeset 47591 3d8b639bfbaa
parent 47590 c5190adc17d5
child 47592 0f5c203eb5ab
--- a/mercurial/dirstate.py	Wed Jul 07 19:32:22 2021 +0200
+++ b/mercurial/dirstate.py	Thu Jul 08 10:05:23 2021 +0200
@@ -572,10 +572,14 @@
 
     def drop(self, f):
         '''Drop a file from the dirstate'''
-        if self._map.dropfile(f):
+        self._drop(f)
+
+    def _drop(self, filename):
+        """internal function to drop a file from the dirstate"""
+        if self._map.dropfile(filename):
             self._dirty = True
-            self._updatedfiles.add(f)
-            self._map.copymap.pop(f, None)
+            self._updatedfiles.add(filename)
+            self._map.copymap.pop(filename, None)
 
     def _discoverpath(self, path, normed, ignoremissing, exists, storemap):
         if exists is None:
@@ -689,7 +693,7 @@
         for f in to_lookup:
             self.normallookup(f)
         for f in to_drop:
-            self.drop(f)
+            self._drop(f)
 
         self._dirty = True