Mercurial > hg
changeset 5263:8040f2e4cad0
bundle: fix up lazy reads
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Mon, 27 Aug 2007 17:08:53 -0700 |
parents | a35756389ef4 |
children | 0fc16031bb45 |
files | mercurial/bundlerepo.py |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/bundlerepo.py Mon Aug 27 15:48:21 2007 -0700 +++ b/mercurial/bundlerepo.py Mon Aug 27 17:08:53 2007 -0700 @@ -199,12 +199,20 @@ def __getattr__(self, name): if name == 'changelog': self.changelog = bundlechangelog(self.sopener, self.bundlefile) + self.manstart = self.bundlefile.tell() return self.changelog if name == 'manifest': + self.bundlefile.seek(self.manstart) self.manifest = bundlemanifest(self.sopener, self.bundlefile, self.changelog.rev) self.filestart = self.bundlefile.tell() return self.manifest + if name == 'manstart': + self.changelog + return self.manstart + if name == 'filestart': + self.manifest + return self.filestart return localrepo.localrepository.__getattr__(self, name) def url(self): @@ -215,7 +223,6 @@ def file(self, f): if not self.bundlefilespos: - self.manifest self.bundlefile.seek(self.filestart) while 1: chunk = changegroup.getchunk(self.bundlefile)