dirstate: directly call the dirstatemap in `set_untracked`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 20 Aug 2021 11:23:41 +0200
changeset 47912 1c797757f5bb
parent 47911 08f16b3331df
child 47913 cdad6560e832
dirstate: directly call the dirstatemap in `set_untracked` This function is only called in two places: the deprecated "remove" method and in the new `set_untracked` method. So we simply inline the appropriate content in `set_untracked`, paving the way to dropping the deprecated code and its associated function. Differential Revision: https://phab.mercurial-scm.org/D11313
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Thu Aug 19 17:42:55 2021 +0200
+++ b/mercurial/dirstate.py	Fri Aug 20 11:23:41 2021 +0200
@@ -500,7 +500,9 @@
             self._drop(filename)
             return True
         else:
-            self._remove(filename)
+            self._dirty = True
+            self._updatedfiles.add(filename)
+            self._map.removefile(filename, in_merge=self.in_merge)
             return True
 
     @requires_no_parents_change