[Commented On] D11011: dirstate: introduce an internal `_remove` method

baymax (Baymax, Your Personal Patch-care Companion) phabricator at mercurial-scm.org
Thu Jul 15 15:17:02 UTC 2021


baymax added a comment.
baymax updated this revision to Diff 29242.


  ✅ refresh by Heptapod after a successful CI run (🐙 💚)

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D11011?vs=29146&id=29242

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D11011/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D11011

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -555,10 +555,14 @@
         self._map.copymap.pop(filename, None)
 
     def remove(self, f):
-        '''Mark a file removed.'''
+        '''Mark a file removed'''
+        self._remove(f)
+
+    def _remove(self, filename):
+        """internal function to mark a file removed"""
         self._dirty = True
-        self._updatedfiles.add(f)
-        self._map.removefile(f, in_merge=self.in_merge)
+        self._updatedfiles.add(filename)
+        self._map.removefile(filename, in_merge=self.in_merge)
 
     def merge(self, f):
         '''Mark a file merged.'''



To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210715/2266f73a/attachment-0002.html>


More information about the Mercurial-patches mailing list