changeset 48023:bac82c2ce858

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
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 15 Sep 2021 18:38:24 +0200
parents 938a7769050c
children 1370d695c258
files mercurial/dirstate.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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: