Mercurial > hg > mercurial-crew-with-dirclash
changeset 3443:e6045fc3cd50
Improve branch cache sanity check for mq
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 18 Oct 2006 02:08:33 -0500 |
parents | 798bcde0c9c2 |
children | 3505fcd5a231 |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -299,7 +299,8 @@ class localrepository(repo.repository): f = self.opener("branches.cache") last, lrev = f.readline().rstrip().split(" ", 1) last, lrev = bin(last), int(lrev) - if self.changelog.node(lrev) == last: # sanity check + if (lrev < self.changelog.count() and + self.changelog.node(lrev) == last): # sanity check for l in f: node, label = l.rstrip().split(" ", 1) self.branchcache[label] = bin(node)