mercurial/localrepo.py
changeset 9673 863ba2ea1f0b
parent 9671 9471d9a900b4
child 9674 603b23c6967b
--- 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: