changeset 38696:89d93dd1a222

store: assert the fncache have been loaded if dirty This should catch fncache corruption as the one that existed in `perffncachewrite`.
author Boris Feld <boris.feld@octobus.net>
date Sat, 14 Jul 2018 02:10:43 +0200
parents 2cdb82e8fb44
children 3c569172848d
files mercurial/store.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/store.py	Sat Jul 14 02:09:47 2018 +0200
+++ b/mercurial/store.py	Sat Jul 14 02:10:43 2018 +0200
@@ -449,6 +449,7 @@
 
     def write(self, tr):
         if self._dirty:
+            assert self.entries is not None
             tr.addbackup('fncache')
             fp = self.vfs('fncache', mode='wb', atomictemp=True)
             if self.entries: