# HG changeset patch # User Pierre-Yves David # Date 1670945370 -3600 # Node ID 7e71d878c708dbd02b6e6c8c6295dd398ffaa1fc # Parent 06619266679d489301b2c4ff8babab91959e1334 dirstate: use `dirstate.change_files` to scope the change in `remove` This is the way. diff -r 06619266679d -r 7e71d878c708 mercurial/commands.py --- 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)