revert: use `set_untracked` when performing a revert
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 08 Jul 2021 04:47:36 +0200
changeset 47602 8f0c3533e28c
parent 47601 4dca29b00405
child 47603 7c64688e554d
revert: use `set_untracked` when performing a revert This is the new shiny API. Differential Revision: https://phab.mercurial-scm.org/D11022
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Thu Jul 08 04:26:30 2021 +0200
+++ b/mercurial/cmdutil.py	Thu Jul 08 04:47:36 2021 +0200
@@ -3549,7 +3549,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]
@@ -3587,7 +3587,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: