# HG changeset patch # User Benoit Boissinot # Date 1161156383 -7200 # Node ID 27ebe4efe98ea1d6da1d6714ca55cfeae4f3bc4e # Parent c8686e3f0291fb77553b053a422c0d84337aef57 invalidate the branch cache when sanity check fails diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -304,10 +304,11 @@ class localrepository(repo.repository): for l in f: node, label = l.rstrip().split(" ", 1) self.branchcache[label] = bin(node) + else: # invalidate the cache + last, lrev = nullid, -1 f.close() except IOError: last, lrev = nullid, -1 - lrev = self.changelog.rev(last) tip = self.changelog.count() - 1 if lrev != tip: