invalidate the branch cache when sanity check fails

This commit is contained in:
Benoit Boissinot 2006-10-18 09:26:23 +02:00
parent badf39617f
commit 2bc50de330

View File

@ -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: