Mercurial > hg
changeset 17715:21c503480986
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.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Mon, 03 Sep 2012 14:35:05 +0200 |
parents | 5210e5a556d9 |
children | 1adba7ff4d26 |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)