[Updated] D11418: dirstate: remove some usage of `_drop`

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Thu Sep 16 08:02:57 UTC 2021


Closed by commit rHGc0157aca5bf5: dirstate: remove some usage of `_drop` (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D11418?vs=30248&id=30256

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

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

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
@@ -496,13 +496,13 @@
         entry = self._map.get(filename)
         if entry is None:
             return False
-        elif entry.added:
-            self._drop(filename)
-            return True
         else:
             self._dirty = True
             self._updatedfiles.add(filename)
-            self._map.set_untracked(filename)
+            if entry.added:
+                self._map.dropfile(filename)
+            else:
+                self._map.set_untracked(filename)
             return True
 
     @requires_no_parents_change



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/20210916/2e3747f4/attachment-0002.html>


More information about the Mercurial-patches mailing list