Show More
@@ -214,7 +214,7 b' class bundlerepository(localrepo.localre' | |||||
214 | # dict with the mapping 'filename' -> position in the bundle |
|
214 | # dict with the mapping 'filename' -> position in the bundle | |
215 | self.bundlefilespos = {} |
|
215 | self.bundlefilespos = {} | |
216 |
|
216 | |||
217 |
@ |
|
217 | @localrepo.unfilteredpropertycache | |
218 | def changelog(self): |
|
218 | def changelog(self): | |
219 | # consume the header if it exists |
|
219 | # consume the header if it exists | |
220 | self.bundle.changelogheader() |
|
220 | self.bundle.changelogheader() | |
@@ -222,7 +222,7 b' class bundlerepository(localrepo.localre' | |||||
222 | self.manstart = self.bundle.tell() |
|
222 | self.manstart = self.bundle.tell() | |
223 | return c |
|
223 | return c | |
224 |
|
224 | |||
225 |
@ |
|
225 | @localrepo.unfilteredpropertycache | |
226 | def manifest(self): |
|
226 | def manifest(self): | |
227 | self.bundle.seek(self.manstart) |
|
227 | self.bundle.seek(self.manstart) | |
228 | # consume the header if it exists |
|
228 | # consume the header if it exists | |
@@ -231,12 +231,12 b' class bundlerepository(localrepo.localre' | |||||
231 | self.filestart = self.bundle.tell() |
|
231 | self.filestart = self.bundle.tell() | |
232 | return m |
|
232 | return m | |
233 |
|
233 | |||
234 |
@ |
|
234 | @localrepo.unfilteredpropertycache | |
235 | def manstart(self): |
|
235 | def manstart(self): | |
236 | self.changelog |
|
236 | self.changelog | |
237 | return self.manstart |
|
237 | return self.manstart | |
238 |
|
238 | |||
239 |
@ |
|
239 | @localrepo.unfilteredpropertycache | |
240 | def filestart(self): |
|
240 | def filestart(self): | |
241 | self.manifest |
|
241 | self.manifest | |
242 | return self.filestart |
|
242 | return self.filestart |
@@ -18,7 +18,18 b' import weakref, errno, os, time, inspect' | |||||
18 | propertycache = util.propertycache |
|
18 | propertycache = util.propertycache | |
19 | filecache = scmutil.filecache |
|
19 | filecache = scmutil.filecache | |
20 |
|
20 | |||
21 |
class |
|
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 | """filecache for files in the store""" |
|
33 | """filecache for files in the store""" | |
23 | def join(self, obj, fname): |
|
34 | def join(self, obj, fname): | |
24 | return obj.sjoin(fname) |
|
35 | return obj.sjoin(fname) | |
@@ -292,11 +303,11 b' class localrepository(object):' | |||||
292 | Intended to be ovewritten by filtered repo.""" |
|
303 | Intended to be ovewritten by filtered repo.""" | |
293 | return self |
|
304 | return self | |
294 |
|
305 | |||
295 | @filecache('bookmarks') |
|
306 | @repofilecache('bookmarks') | |
296 | def _bookmarks(self): |
|
307 | def _bookmarks(self): | |
297 | return bookmarks.bmstore(self) |
|
308 | return bookmarks.bmstore(self) | |
298 |
|
309 | |||
299 | @filecache('bookmarks.current') |
|
310 | @repofilecache('bookmarks.current') | |
300 | def _bookmarkcurrent(self): |
|
311 | def _bookmarkcurrent(self): | |
301 | return bookmarks.readcurrent(self) |
|
312 | return bookmarks.readcurrent(self) | |
302 |
|
313 | |||
@@ -355,7 +366,7 b' class localrepository(object):' | |||||
355 | def manifest(self): |
|
366 | def manifest(self): | |
356 | return manifest.manifest(self.sopener) |
|
367 | return manifest.manifest(self.sopener) | |
357 |
|
368 | |||
358 | @filecache('dirstate') |
|
369 | @repofilecache('dirstate') | |
359 | def dirstate(self): |
|
370 | def dirstate(self): | |
360 | warned = [0] |
|
371 | warned = [0] | |
361 | def validate(node): |
|
372 | def validate(node): |
General Comments 0
You need to be logged in to leave comments.
Login now