Show More
@@ -234,6 +234,15 b' class bundlephasecache(phases.phasecache' | |||
|
234 | 234 | self.invalidate() |
|
235 | 235 | self.dirty = True |
|
236 | 236 | |
|
237 | def _getfilestarts(bundle): | |
|
238 | bundlefilespos = {} | |
|
239 | for chunkdata in iter(bundle.filelogheader, {}): | |
|
240 | fname = chunkdata['filename'] | |
|
241 | bundlefilespos[fname] = bundle.tell() | |
|
242 | for chunk in iter(lambda: bundle.deltachunk(None), {}): | |
|
243 | pass | |
|
244 | return bundlefilespos | |
|
245 | ||
|
237 | 246 | class bundlerepository(localrepo.localrepository): |
|
238 | 247 | def __init__(self, ui, path, bundlename): |
|
239 | 248 | def _writetempbundle(read, suffix, header=''): |
@@ -349,13 +358,7 b' class bundlerepository(localrepo.localre' | |||
|
349 | 358 | def file(self, f): |
|
350 | 359 | if not self.bundlefilespos: |
|
351 | 360 | self.bundle.seek(self.filestart) |
|
352 | for chunkdata in iter(self.bundle.filelogheader, {}): | |
|
353 | fname = chunkdata['filename'] | |
|
354 | self.bundlefilespos[fname] = self.bundle.tell() | |
|
355 | while True: | |
|
356 | c = self.bundle.deltachunk(None) | |
|
357 | if not c: | |
|
358 | break | |
|
361 | self.bundlefilespos = _getfilestarts(self.bundle) | |
|
359 | 362 | |
|
360 | 363 | if f in self.bundlefilespos: |
|
361 | 364 | self.bundle.seek(self.bundlefilespos[f]) |
General Comments 0
You need to be logged in to leave comments.
Login now