diff hgext/bookmarks.py @ 9145:6b03f93b8ff3

localrepo: factor _findtags() out of tags() (issue548). This makes in-memory caching the sole responsibility of localrepo, eliminating some localrepo code that was duplicated in mq and bookmarks.
author Greg Ward <greg-hg@gerg.ca>
date Thu, 16 Jul 2009 10:39:41 -0400
parents 6d0b5d76e76d
children 82de0bb056d7
line wrap: on
line diff
--- a/hgext/bookmarks.py	Thu Jul 16 10:39:41 2009 -0400
+++ b/hgext/bookmarks.py	Thu Jul 16 10:39:41 2009 -0400
@@ -293,14 +293,11 @@
                 write(self, marks)
             return result
 
-        def tags(self):
+        def _findtags(self):
             """Merge bookmarks with normal tags"""
-            if self.tagscache:
-                return self.tagscache
-
-            tagscache = super(bookmark_repo, self).tags()
-            tagscache.update(parse(self))
-            return tagscache
+            (tags, tagtypes) = super(bookmark_repo, self)._findtags()
+            tags.update(parse(self))
+            return (tags, tagtypes)
 
     repo.__class__ = bookmark_repo