changeset 47697:c9e412712e0c

mq: use `update_file_p1` instead of `remove` when adjusting dirstate This is the new API. Differential Revision: https://phab.mercurial-scm.org/D11139
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 17 Jul 2021 00:15:31 +0200
parents ff481c238496
children 9fa1085fbd63
files hgext/mq.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Mon Jul 19 04:43:28 2021 +0200
+++ b/hgext/mq.py	Sat Jul 17 00:15:31 2021 +0200
@@ -1099,7 +1099,7 @@
                         removed.append(f)
                 with repo.dirstate.parentchange():
                     for f in removed:
-                        repo.dirstate.remove(f)
+                        repo.dirstate.update_file_p1(f, p1_tracked=True)
                     for f in merged:
                         repo.dirstate.merge(f)
                     p1 = repo.dirstate.p1()
@@ -2038,7 +2038,7 @@
                         for f in list(repo.dirstate.copies()):
                             repo.dirstate.copy(None, f)
                     for f in r:
-                        repo.dirstate.remove(f)
+                        repo.dirstate.update_file_p1(f, p1_tracked=True)
                     # if the patch excludes a modified file, mark that
                     # file with mtime=0 so status can see it.
                     mm = []