# HG changeset patch # User Wei, Elson # Date 2013-08-07 01:59:45 # Node ID b9b7dc267e9f0b9f65e32781a64d4ddd8734eee9 # Parent 49a068b8fb0cbba467346492c668a854f683d314 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. diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -39,6 +39,8 @@ class unfilteredpropertycache(propertyca """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):