##// END OF EJS Templates
bundle: fix up lazy reads
Brendan Cully -
r5263:8040f2e4 default
parent child Browse files
Show More
@@ -199,12 +199,20 b' class bundlerepository(localrepo.localre'
199 def __getattr__(self, name):
199 def __getattr__(self, name):
200 if name == 'changelog':
200 if name == 'changelog':
201 self.changelog = bundlechangelog(self.sopener, self.bundlefile)
201 self.changelog = bundlechangelog(self.sopener, self.bundlefile)
202 self.manstart = self.bundlefile.tell()
202 return self.changelog
203 return self.changelog
203 if name == 'manifest':
204 if name == 'manifest':
205 self.bundlefile.seek(self.manstart)
204 self.manifest = bundlemanifest(self.sopener, self.bundlefile,
206 self.manifest = bundlemanifest(self.sopener, self.bundlefile,
205 self.changelog.rev)
207 self.changelog.rev)
206 self.filestart = self.bundlefile.tell()
208 self.filestart = self.bundlefile.tell()
207 return self.manifest
209 return self.manifest
210 if name == 'manstart':
211 self.changelog
212 return self.manstart
213 if name == 'filestart':
214 self.manifest
215 return self.filestart
208 return localrepo.localrepository.__getattr__(self, name)
216 return localrepo.localrepository.__getattr__(self, name)
209
217
210 def url(self):
218 def url(self):
@@ -215,7 +223,6 b' class bundlerepository(localrepo.localre'
215
223
216 def file(self, f):
224 def file(self, f):
217 if not self.bundlefilespos:
225 if not self.bundlefilespos:
218 self.manifest
219 self.bundlefile.seek(self.filestart)
226 self.bundlefile.seek(self.filestart)
220 while 1:
227 while 1:
221 chunk = changegroup.getchunk(self.bundlefile)
228 chunk = changegroup.getchunk(self.bundlefile)
General Comments 0
You need to be logged in to leave comments. Login now