changeset 50087:b979cdde99e6

dirstate: use `dirstate.change_files` to scope the change in `addremove` This is the way.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 13 Dec 2022 15:07:32 +0100
parents 5deac4eaa7d1
children 06619266679d
files mercurial/commands.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Dec 13 12:57:38 2022 +0100
+++ b/mercurial/commands.py	Tue Dec 13 15:07:32 2022 +0100
@@ -331,7 +331,7 @@
     opts = pycompat.byteskwargs(opts)
     if not opts.get(b'similarity'):
         opts[b'similarity'] = b'100'
-    with repo.wlock():
+    with repo.wlock(), repo.dirstate.changing_files(repo):
         matcher = scmutil.match(repo[None], pats, opts)
         relative = scmutil.anypats(pats, opts)
         uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=relative)