Patchwork D11188: amend: use `update_file` instead of `drop`

login
register
mail settings
Submitter phabricator
Date July 19, 2021, 3:44 p.m.
Message ID <differential-rev-PHID-DREV-o5ign6cbt5spgni4g7wm-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49507/
State Superseded
Headers show

Comments

phabricator - July 19, 2021, 3:44 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This is the newer, more semantic API.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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
@@ -3004,7 +3004,7 @@ 
             # to "removed" in the dirstate.
             removedfiles = set(wctx.removed()) & filestoamend
             for f in removedfiles:
-                dirstate.drop(f)
+                dirstate.update_file(f, p1_tracked=False, wc_tracked=False)
 
         mapping = {old.node(): (newid,)}
         obsmetadata = None