Mercurial > hg-stable
diff mercurial/localrepo.py @ 19635:b9b7dc267e9f
localrepo: get value from the unfiltered caches should check if the attribute existed.
If the attribute existed already, it should be returned by getattr().
Otherwise, it will be evaluated again.
author | Wei, Elson <elson.wei@gmail.com> |
---|---|
date | Wed, 07 Aug 2013 09:59:45 +0800 |
parents | 00140039bd8f |
children | 36f48c7d5944 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Fri Jul 19 02:09:13 2013 +0400 +++ b/mercurial/localrepo.py Wed Aug 07 09:59:45 2013 +0800 @@ -39,6 +39,8 @@ """propertycache that apply to unfiltered repo only""" def __get__(self, repo, type=None): + if hasunfilteredcache(repo, self.name): + return getattr(repo.unfiltered(), self.name) return super(unfilteredpropertycache, self).__get__(repo.unfiltered()) class filteredpropertycache(propertycache):