[PATCH 2 of 2] store: assert the fncache have been loaded if dirty
Boris Feld
boris.feld at octobus.net
Mon Jul 16 03:27:41 EDT 2018
# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1531527043 -7200
# Sat Jul 14 02:10:43 2018 +0200
# Node ID 23df6fc7289615078ea30e796d8ccb906a194eea
# Parent fa319c92bed5fc495d62122697ee32a8fe2be8c4
# EXP-Topic perffncachewrite
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 23df6fc72896
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:
More information about the Mercurial-devel
mailing list