Patchwork D11026: revert: use `set_untracked` instead of `drop` when applicable

login
register
mail settings
Submitter phabricator
Date July 8, 2021, 6:08 p.m.
Message ID <differential-rev-PHID-DREV-lzwrjgx26irsf4u4ivkh-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49343/
State Superseded
Headers show

Comments

phabricator - July 8, 2021, 6:08 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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
@@ -3569,12 +3569,12 @@ 
             )
             if choice == 0:
                 prntstatusmsg(b'forget', f)
-                repo.dirstate.drop(f)
+                repo.dirstate.set_untracked(f)
             else:
                 excluded_files.append(f)
         else:
             prntstatusmsg(b'forget', f)
-            repo.dirstate.drop(f)
+            repo.dirstate.set_untracked(f)
     for f in actions[b'remove'][0]:
         audit_path(f)
         if interactive: