mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
invalidate the branch cache when sanity check fails
This commit is contained in:
parent
badf39617f
commit
2bc50de330
@ -304,10 +304,11 @@ class localrepository(repo.repository):
|
|||||||
for l in f:
|
for l in f:
|
||||||
node, label = l.rstrip().split(" ", 1)
|
node, label = l.rstrip().split(" ", 1)
|
||||||
self.branchcache[label] = bin(node)
|
self.branchcache[label] = bin(node)
|
||||||
|
else: # invalidate the cache
|
||||||
|
last, lrev = nullid, -1
|
||||||
f.close()
|
f.close()
|
||||||
except IOError:
|
except IOError:
|
||||||
last, lrev = nullid, -1
|
last, lrev = nullid, -1
|
||||||
lrev = self.changelog.rev(last)
|
|
||||||
|
|
||||||
tip = self.changelog.count() - 1
|
tip = self.changelog.count() - 1
|
||||||
if lrev != tip:
|
if lrev != tip:
|
||||||
|
Loading…
Reference in New Issue
Block a user