Mercurial > hg-stable
changeset 17714:5210e5a556d9
clfilter: do not use branchmap cache if there are filtered changesets
If there are filtered changesets the cache is not valid. We'll have to cache
branchmap for filtered state too, but for now recomputing the branchmap is
enough.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Mon, 03 Sep 2012 14:34:19 +0200 |
parents | 2c6382772db0 |
children | 21c503480986 |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Mon Oct 08 09:55:41 2012 -0700 +++ b/mercurial/localrepo.py Mon Sep 03 14:34:19 2012 +0200 @@ -627,8 +627,15 @@ def branchmap(self): '''returns a dictionary {branch: [branchheads]}''' - self.updatebranchcache() - return self._branchcache + if self.changelog.filteredrevs: + # some changeset are excluded we can't use the cache + branchmap = {} + self._updatebranchcache(branchmap, (self[r] for r in self)) + return branchmap + else: + self.updatebranchcache() + return self._branchcache + def _branchtip(self, heads): '''return the tipmost branch head in heads'''