[Request] [+ ] D11439: dirstate: use `reset_state` to drop file in `update_file_p1`

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Thu Sep 16 14:45:49 UTC 2021


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The `dropfile` function is on its way out.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -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:



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210916/27fb1b48/attachment.html>


More information about the Mercurial-patches mailing list