Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 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 |
comparison
equal
deleted
inserted
replaced
17714:5210e5a556d9 | 17715:21c503480986 |
---|---|
514 return cache | 514 return cache |
515 | 515 |
516 def tags(self): | 516 def tags(self): |
517 '''return a mapping of tag to node''' | 517 '''return a mapping of tag to node''' |
518 t = {} | 518 t = {} |
519 for k, v in self._tagscache.tags.iteritems(): | 519 if self.changelog.filteredrevs: |
520 tags, tt = self._findtags() | |
521 else: | |
522 tags = self._tagscache.tags | |
523 for k, v in tags.iteritems(): | |
520 try: | 524 try: |
521 # ignore tags to unknown nodes | 525 # ignore tags to unknown nodes |
522 self.changelog.rev(v) | 526 self.changelog.rev(v) |
523 t[k] = v | 527 t[k] = v |
524 except (error.LookupError, ValueError): | 528 except (error.LookupError, ValueError): |