# HG changeset patch # User Wei, Elson # Date 1375840785 -28800 # 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 -r 49a068b8fb0c -r b9b7dc267e9f mercurial/localrepo.py --- 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):