# HG changeset patch # User Pierre-Yves David # Date 2021-08-20 09:23:41 # Node ID 1c797757f5bb09a48901c28b1e4e3d7a469e5090 # Parent 08f16b3331dffc9f3d2b33f70d94e7e57fecd8bd 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 diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -500,7 +500,9 @@ class dirstate(object): 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