# HG changeset patch # User Boris Feld # Date 1531527043 -7200 # Node ID 89d93dd1a22238cb1ac8462522c283f251f65fa9 # Parent 2cdb82e8fb44346cdf8e9a27377a64642d0b212f store: assert the fncache have been loaded if dirty This should catch fncache corruption as the one that existed in `perffncachewrite`. diff -r 2cdb82e8fb44 -r 89d93dd1a222 mercurial/store.py --- 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: