Mercurial > public > mercurial-scm > hg
comparison mercurial/bundlerepo.py @ 18014:a39fe76c4c65
clfilter: ensure that filecache on localrepo is unfiltered
All filecache usage on repo is for logic that should be unfiltered. The
caches should be common to all filtered instances, and computation must
be done unfiltered. A dedicated storecache subclass is created for
this purpose.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Mon, 08 Oct 2012 19:34:04 +0200 |
parents | 03e552aaae67 |
children | 6db318a15a12 |
comparison
equal
deleted
inserted
replaced
18013:98c867ac1330 | 18014:a39fe76c4c65 |
---|---|
212 self.bundle = changegroup.readbundle(f, bundlename) | 212 self.bundle = changegroup.readbundle(f, bundlename) |
213 | 213 |
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 @util.propertycache | 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() |
221 c = bundlechangelog(self.sopener, self.bundle) | 221 c = bundlechangelog(self.sopener, self.bundle) |
222 self.manstart = self.bundle.tell() | 222 self.manstart = self.bundle.tell() |
223 return c | 223 return c |
224 | 224 |
225 @util.propertycache | 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 |
229 self.bundle.manifestheader() | 229 self.bundle.manifestheader() |
230 m = bundlemanifest(self.sopener, self.bundle, self.changelog.rev) | 230 m = bundlemanifest(self.sopener, self.bundle, self.changelog.rev) |
231 self.filestart = self.bundle.tell() | 231 self.filestart = self.bundle.tell() |
232 return m | 232 return m |
233 | 233 |
234 @util.propertycache | 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 @util.propertycache | 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 |
243 | 243 |
244 def url(self): | 244 def url(self): |