# HG changeset patch # User Pierre-Yves David # Date 1676500100 -3600 # Node ID c5ef535e274e2d0afeb8872ffb9a9d95f39f5047 # Parent e2b89b6d4cdd0bbb3c0f81c42c2c75736184d6ab status: fix post status writing With dirstate-v2, the status process itself might update internal states. So we make sure this get written on disk diff -r e2b89b6d4cdd -r c5ef535e274e mercurial/context.py --- a/mercurial/context.py Thu Dec 15 02:54:06 2022 +0100 +++ b/mercurial/context.py Wed Feb 15 23:28:20 2023 +0100 @@ -1875,12 +1875,16 @@ normal = dirstate.set_clean for f, pdf in fixup: normal(f, pdf) - # write changes out explicitly, because nesting - # wlock at runtime may prevent 'wlock.release()' - # after this block from doing so for subsequent - # changing files - tr = self._repo.currenttransaction() - self._repo.dirstate.write(tr) + # write changes out explicitly, because nesting + # wlock at runtime may prevent 'wlock.release()' + # after this block from doing so for subsequent + # changing files + # + # (This is outside of the (if fixup) block because the + # status operation itself might have updated some cache + # information before.) + tr = self._repo.currenttransaction() + self._repo.dirstate.write(tr) if poststatus: for ps in poststatus: