dirstate: use `reset_state` to drop file in `update_file_p1`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 15 Sep 2021 18:38:24 +0200
changeset 47999 bac82c2ce858
parent 47998 938a7769050c
child 48000 1370d695c258
dirstate: use `reset_state` to drop file in `update_file_p1` The `dropfile` function is on its way out. Differential Revision: https://phab.mercurial-scm.org/D11439
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Wed Sep 15 18:36:59 2021 +0200
+++ b/mercurial/dirstate.py	Wed Sep 15 18:38:24 2021 +0200
@@ -556,7 +556,8 @@
             possibly_dirty = True
         elif not (p1_tracked or wc_tracked):
             # the file is no longer relevant to anyone
-            if self._map.dropfile(filename):
+            if self._map.get(filename) is not None:
+                self._map.reset_state(filename)
                 self._dirty = True
                 self._updatedfiles.add(filename)
         elif (not p1_tracked) and wc_tracked: