diff mercurial/store.py @ 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 8ac0c9cd4c48
children e7aa113b14f7
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: