diff mercurial/context.py @ 47356:04d1f17f49e7

dirstate-v2: Write .hg/dirstate back to disk on directory cache changes Differential Revision: https://phab.mercurial-scm.org/D10827
author Simon Sapin <simon.sapin@octobus.net>
date Mon, 31 May 2021 18:35:44 +0200
parents b338d831d18c
children 0cef28b121a4
line wrap: on
line diff
--- a/mercurial/context.py	Fri May 28 11:48:59 2021 +0200
+++ b/mercurial/context.py	Mon May 31 18:35:44 2021 +0200
@@ -1840,7 +1840,7 @@
     def _poststatusfixup(self, status, fixup):
         """update dirstate for files that are actually clean"""
         poststatus = self._repo.postdsstatus()
-        if fixup or poststatus:
+        if fixup or poststatus or self._repo.dirstate._dirty:
             try:
                 oldid = self._repo.dirstate.identity()