changeset 47751:d25eb277e925

mq: replace `drop` call with newer API Differential Revision: https://phab.mercurial-scm.org/D11193
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 18 Jul 2021 22:32:55 +0200
parents 13e2ce796dcd
children 5bcd305389c7
files hgext/mq.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Mon Jul 19 09:15:37 2021 +0200
+++ b/hgext/mq.py	Sun Jul 18 22:32:55 2021 +0200
@@ -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()