mercurial/localrepo.py
changeset 40423 597bb5a6867f
parent 40390 7e3b6c4f01a2
child 40424 7caf632e30c3
equal deleted inserted replaced
40415:dce0e0f78f0f 40423:597bb5a6867f
    89     """All filecache usage on repo are done for logic that should be unfiltered
    89     """All filecache usage on repo are done for logic that should be unfiltered
    90     """
    90     """
    91     def __get__(self, repo, type=None):
    91     def __get__(self, repo, type=None):
    92         if repo is None:
    92         if repo is None:
    93             return self
    93             return self
    94         return super(_basefilecache, self).__get__(repo.unfiltered(), type)
    94         # inlined the fast path as the cost of function call matters
       
    95         unfi = repo.unfiltered()
       
    96         try:
       
    97             return unfi.__dict__[self.sname]
       
    98         except KeyError:
       
    99             pass
       
   100         return super(_basefilecache, self).__get__(unfi, type)
    95     def __set__(self, repo, value):
   101     def __set__(self, repo, value):
    96         return super(_basefilecache, self).__set__(repo.unfiltered(), value)
   102         return super(_basefilecache, self).__set__(repo.unfiltered(), value)
    97     def __delete__(self, repo):
   103     def __delete__(self, repo):
    98         return super(_basefilecache, self).__delete__(repo.unfiltered())
   104         return super(_basefilecache, self).__delete__(repo.unfiltered())
    99 
   105