dirstate: remove some usage of `_drop`
This is a step toward being able to remove the `_drop` method on `dirstate`.
Differential Revision: https://phab.mercurial-scm.org/D11418
--- a/mercurial/dirstate.py Thu Sep 02 02:44:12 2021 +0200
+++ b/mercurial/dirstate.py Thu Sep 02 02:48:56 2021 +0200
@@ -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