dirstate: use `dirstate.change_files` to scope the change in `revert`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 13 Dec 2022 15:01:59 +0100
changeset 50038 6cdcab3ae3fa
parent 50037 46883d91e2b0
child 50039 7b289a70c2c8
dirstate: use `dirstate.change_files` to scope the change in `revert` This is the way.
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`