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

login
register
mail settings
Submitter phabricator
Date July 8, 2021, 7:35 a.m.
Message ID <differential-rev-PHID-DREV-2rvw5jmh4uogruiu4lfz-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49335/
State Superseded
Headers show

Comments

phabricator - July 8, 2021, 7:35 a.m.
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




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

Patch

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: