Patchwork D11193: mq: replace `drop` call with newer API

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

Comments

phabricator - July 19, 2021, 3:45 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/D11193

AFFECTED FILES
  hgext/mq.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -1842,7 +1842,9 @@ 
                 with repo.dirstate.parentchange():
                     for f in a:
                         repo.wvfs.unlinkpath(f, ignoremissing=True)
-                        repo.dirstate.drop(f)
+                        repo.dirstate.update_file(
+                            f, p1_tracked=False, wc_tracked=False
+                        )
                     for f in m + r:
                         fctx = ctx[f]
                         repo.wwrite(f, fctx.data(), fctx.flags())
@@ -2044,7 +2046,7 @@ 
                     for f in mm:
                         repo.dirstate.update_file_p1(f, p1_tracked=True)
                     for f in forget:
-                        repo.dirstate.drop(f)
+                        repo.dirstate.update_file_p1(f, p1_tracked=False)
 
                     user = ph.user or ctx.user()