##// END OF EJS Templates
scmutil: allow access to filecache descriptor on class...
Martijn Pieters -
r29373:36fbd72c default
parent child Browse files
Show More
@@ -66,6 +66,8 b' class repofilecache(scmutil.filecache):'
66 """
66 """
67
67
68 def __get__(self, repo, type=None):
68 def __get__(self, repo, type=None):
69 if repo is None:
70 return self
69 return super(repofilecache, self).__get__(repo.unfiltered(), type)
71 return super(repofilecache, self).__get__(repo.unfiltered(), type)
70 def __set__(self, repo, value):
72 def __set__(self, repo, value):
71 return super(repofilecache, self).__set__(repo.unfiltered(), value)
73 return super(repofilecache, self).__set__(repo.unfiltered(), value)
@@ -1205,6 +1205,9 b' class filecache(object):'
1205 return self
1205 return self
1206
1206
1207 def __get__(self, obj, type=None):
1207 def __get__(self, obj, type=None):
1208 # if accessed on the class, return the descriptor itself.
1209 if obj is None:
1210 return self
1208 # do we need to check if the file changed?
1211 # do we need to check if the file changed?
1209 if self.name in obj.__dict__:
1212 if self.name in obj.__dict__:
1210 assert self.name in obj._filecache, self.name
1213 assert self.name in obj._filecache, self.name
General Comments 0
You need to be logged in to leave comments. Login now