--- a/mercurial/context.py Tue Feb 28 00:01:41 2023 +0100
+++ b/mercurial/context.py Tue Feb 28 15:25:47 2023 +0100
@@ -36,6 +36,7 @@
sparse,
subrepo,
subrepoutil,
+ testing,
util,
)
from .utils import (
@@ -1854,6 +1855,8 @@
def _poststatusfixup(self, status, fixup):
"""update dirstate for files that are actually clean"""
+ ui = self._repo.ui
+ testing.wait_on_cfg(self._repo.ui, b'status.pre-dirstate-write-file')
poststatus = self._repo.postdsstatus()
if fixup or poststatus or self._repo.dirstate._dirty:
try:
@@ -1890,9 +1893,7 @@
# consistency, because .hg/dirstate was
# already changed simultaneously after last
# caching (see also issue5584 for detail)
- self._repo.ui.debug(
- b'skip updating dirstate: identity mismatch\n'
- )
+ ui.debug(b'skip updating dirstate: identity mismatch\n')
except error.LockError:
pass
finally: