changeset 50089:7e71d878c708

dirstate: use `dirstate.change_files` to scope the change in `remove` This is the way.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 13 Dec 2022 16:29:30 +0100
parents 06619266679d
children 5c9462adc4b9
files mercurial/commands.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Dec 13 16:27:57 2022 +0100
+++ b/mercurial/commands.py	Tue Dec 13 16:29:30 2022 +0100
@@ -5947,7 +5947,7 @@
     if not pats and not after:
         raise error.InputError(_(b'no files specified'))
 
-    with repo.wlock():
+    with repo.wlock(), repo.dirstate.changing_files(repo):
         m = scmutil.match(repo[None], pats, opts)
         subrepos = opts.get(b'subrepos')
         uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True)