Mercurial > hg
changeset 9673:863ba2ea1f0b
localrepo/branchcache: rebuild the "charset-aware" branchcache when needed
It's simpler and the two cache weren't always in sync otherwise:
localrepo.branchcache would not be updated after calling branchmap()
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sat, 31 Oct 2009 00:20:28 +0100 |
parents | 5bbf4f130684 |
children | 603b23c6967b |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 1 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Fri Oct 30 15:43:01 2009 +0200 +++ b/mercurial/localrepo.py Sat Oct 31 00:20:28 2009 +0100 @@ -320,10 +320,7 @@ return partial def lbranchmap(self): - tip = self.changelog.tip() - if self.branchcache is not None and self._branchcachetip == tip: - return self.branchcache - + self.branchcache = {} partial = self.branchmap() # the branch cache is stored on disk as UTF-8, but in the local @@ -339,10 +336,6 @@ oldtip = self._branchcachetip self._branchcachetip = tip - if self.branchcache is None: - self.branchcache = {} # avoid recursion in changectx - else: - self.branchcache.clear() # keep using the same dict if oldtip is None or oldtip not in self.changelog.nodemap: partial, last, lrev = self._readbranchcache() else: