# HG changeset patch # User Boris Feld # Date 2018-07-14 00:10:43 # 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 --git a/mercurial/store.py b/mercurial/store.py --- a/mercurial/store.py +++ b/mercurial/store.py @@ -449,6 +449,7 @@ class fncache(object): 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: