mercurial/localrepo.py
branchstable
changeset 10547 bae9bb09166b
parent 10522 b07d487009b2
child 10651 5f091fc1bab7
child 10698 e930017f9e2a
--- a/mercurial/localrepo.py	Thu Feb 25 14:35:21 2010 +0100
+++ b/mercurial/localrepo.py	Sun Feb 21 20:59:27 2010 +0100
@@ -622,16 +622,19 @@
         finally:
             release(lock, wlock)
 
-    def invalidate(self):
-        for a in "changelog manifest".split():
-            if a in self.__dict__:
-                delattr(self, a)
+    def invalidatecaches(self):
         self._tags = None
         self._tagtypes = None
         self.nodetagscache = None
         self._branchcache = None # in UTF-8
         self._branchcachetip = None
 
+    def invalidate(self):
+        for a in "changelog manifest".split():
+            if a in self.__dict__:
+                delattr(self, a)
+        self.invalidatecaches()
+
     def _lock(self, lockname, wait, releasefn, acquirefn, desc):
         try:
             l = lock.lock(lockname, 0, releasefn, desc=desc)
@@ -957,7 +960,7 @@
         # head, refresh the tag cache, then immediately add a new head.
         # But I think doing it this way is necessary for the "instant
         # tag cache retrieval" case to work.
-        tags_.findglobaltags(self.ui, self, {}, {})
+        self.invalidatecaches()
 
     def walk(self, match, node=None):
         '''