amend: use `update_file` instead of `drop`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 19 Jul 2021 09:07:08 +0200
changeset 47746 56297381af90
parent 47745 06d57a91441e
child 47747 452e7048293d
amend: use `update_file` instead of `drop` This is the newer, more semantic API. Differential Revision: https://phab.mercurial-scm.org/D11188
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Mon Jul 19 03:16:40 2021 +0200
+++ b/mercurial/cmdutil.py	Mon Jul 19 09:07:08 2021 +0200
@@ -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