clfilter: do not use tags cache if there are filtered changesets
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Mon, 03 Sep 2012 14:35:05 +0200
changeset 17715 21c503480986
parent 17714 5210e5a556d9
child 17716 1adba7ff4d26
clfilter: do not use tags cache if there are filtered changesets If there are filtered changesets the cache is not valid. We'll have to cache tags for filtered state too, but for now recomputing the tags is enough.
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Mon Sep 03 14:34:19 2012 +0200
+++ b/mercurial/localrepo.py	Mon Sep 03 14:35:05 2012 +0200
@@ -516,7 +516,11 @@
     def tags(self):
         '''return a mapping of tag to node'''
         t = {}
-        for k, v in self._tagscache.tags.iteritems():
+        if self.changelog.filteredrevs:
+            tags, tt = self._findtags()
+        else:
+            tags = self._tagscache.tags
+        for k, v in tags.iteritems():
             try:
                 # ignore tags to unknown nodes
                 self.changelog.rev(v)