Patchwork D11440: dirstate: use `reset_state` in `rebuild` instead of `dropfile`

login
register
mail settings
Submitter phabricator
Date Sept. 16, 2021, 2:46 p.m.
Message ID <differential-rev-PHID-DREV-ksgtrtif25timaw4boeu-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49756/
State Superseded
Headers show

Comments

phabricator - Sept. 16, 2021, 2:46 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  As `dirstatemap.dropfile` is on its way out.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11440

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -814,8 +814,8 @@ 
                 )
             self._updatedfiles.add(f)
         for f in to_drop:
-            if self._map.dropfile(f):
-                self._updatedfiles.add(f)
+            self._map.reset_state(f)
+            self._updatedfiles.add(f)
 
         self._dirty = True