D11022: revert: use `set_untracked` when performing a revert

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Thu Jul 8 07:35:30 UTC 2021


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

REVISION SUMMARY
  This is the new shinny API.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/cmdutil.py

CHANGE DETAILS

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -3554,7 +3554,7 @@
             repo.wvfs.unlinkpath(f, rmdir=rmdir)
         except OSError:
             pass
-        repo.dirstate.remove(f)
+        repo.dirstate.set_untracked(f)
 
     def prntstatusmsg(action, f):
         exact = names[f]
@@ -3592,7 +3592,7 @@
     for f in actions[b'drop'][0]:
         audit_path(f)
         prntstatusmsg(b'drop', f)
-        repo.dirstate.remove(f)
+        repo.dirstate.set_untracked(f)
 
     normal = None
     if node == parent:



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


More information about the Mercurial-devel mailing list