# HG changeset patch # User Pierre-Yves David # Date 1670940119 -3600 # Node ID 6cdcab3ae3fa597c4c7eaf9de1853cdac3daa2f2 # Parent 46883d91e2b0107ca11074e1faec5b3385c8f25a dirstate: use `dirstate.change_files` to scope the change in `revert` This is the way. diff -r 46883d91e2b0 -r 6cdcab3ae3fa mercurial/cmdutil.py --- a/mercurial/cmdutil.py Wed Jan 25 12:46:22 2023 +0100 +++ b/mercurial/cmdutil.py Tue Dec 13 15:01:59 2022 +0100 @@ -3392,7 +3392,7 @@ names = {} uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) - with repo.wlock(): + with repo.wlock(), repo.dirstate.changing_files(repo): ## filling of the `names` mapping # walk dirstate to fill `names`