##// END OF EJS Templates
clfilter: ensure that filecache on localrepo is unfiltered...
Pierre-Yves David -
r18014:a39fe76c default
parent child Browse files
Show More
@@ -214,7 +214,7 b' class bundlerepository(localrepo.localre'
214 214 # dict with the mapping 'filename' -> position in the bundle
215 215 self.bundlefilespos = {}
216 216
217 @util.propertycache
217 @localrepo.unfilteredpropertycache
218 218 def changelog(self):
219 219 # consume the header if it exists
220 220 self.bundle.changelogheader()
@@ -222,7 +222,7 b' class bundlerepository(localrepo.localre'
222 222 self.manstart = self.bundle.tell()
223 223 return c
224 224
225 @util.propertycache
225 @localrepo.unfilteredpropertycache
226 226 def manifest(self):
227 227 self.bundle.seek(self.manstart)
228 228 # consume the header if it exists
@@ -231,12 +231,12 b' class bundlerepository(localrepo.localre'
231 231 self.filestart = self.bundle.tell()
232 232 return m
233 233
234 @util.propertycache
234 @localrepo.unfilteredpropertycache
235 235 def manstart(self):
236 236 self.changelog
237 237 return self.manstart
238 238
239 @util.propertycache
239 @localrepo.unfilteredpropertycache
240 240 def filestart(self):
241 241 self.manifest
242 242 return self.filestart
@@ -18,7 +18,18 b' import weakref, errno, os, time, inspect'
18 18 propertycache = util.propertycache
19 19 filecache = scmutil.filecache
20 20
21 class storecache(filecache):
21 class repofilecache(filecache):
22 """All filecache usage on repo are done for logic that should be unfiltered
23 """
24
25 def __get__(self, repo, type=None):
26 return super(repofilecache, self).__get__(repo.unfiltered(), type)
27 def __set__(self, repo, value):
28 return super(repofilecache, self).__set__(repo.unfiltered(), value)
29 def __delete__(self, repo):
30 return super(repofilecache, self).__delete__(repo.unfiltered())
31
32 class storecache(repofilecache):
22 33 """filecache for files in the store"""
23 34 def join(self, obj, fname):
24 35 return obj.sjoin(fname)
@@ -292,11 +303,11 b' class localrepository(object):'
292 303 Intended to be ovewritten by filtered repo."""
293 304 return self
294 305
295 @filecache('bookmarks')
306 @repofilecache('bookmarks')
296 307 def _bookmarks(self):
297 308 return bookmarks.bmstore(self)
298 309
299 @filecache('bookmarks.current')
310 @repofilecache('bookmarks.current')
300 311 def _bookmarkcurrent(self):
301 312 return bookmarks.readcurrent(self)
302 313
@@ -355,7 +366,7 b' class localrepository(object):'
355 366 def manifest(self):
356 367 return manifest.manifest(self.sopener)
357 368
358 @filecache('dirstate')
369 @repofilecache('dirstate')
359 370 def dirstate(self):
360 371 warned = [0]
361 372 def validate(node):
General Comments 0
You need to be logged in to leave comments. Login now