mercurial/bundlerepo.py
changeset 35011 a2dfc723b6b5
parent 34293 0fe62d8bdd50
child 35047 32d079f37207
equal deleted inserted replaced
35010:b81ad5b78a81 35011:a2dfc723b6b5
   350         linkmapper = self.unfiltered().changelog.rev
   350         linkmapper = self.unfiltered().changelog.rev
   351         m = bundlemanifest(self.svfs, self.bundle, linkmapper)
   351         m = bundlemanifest(self.svfs, self.bundle, linkmapper)
   352         self.filestart = self.bundle.tell()
   352         self.filestart = self.bundle.tell()
   353         return m
   353         return m
   354 
   354 
       
   355     def _consumemanifest(self):
       
   356         """Consumes the manifest portion of the bundle, setting filestart so the
       
   357         file portion can be read."""
       
   358         self.bundle.seek(self.manstart)
       
   359         self.bundle.manifestheader()
       
   360         for delta in self.bundle.deltaiter():
       
   361             pass
       
   362         self.filestart = self.bundle.tell()
       
   363 
   355     @localrepo.unfilteredpropertycache
   364     @localrepo.unfilteredpropertycache
   356     def manstart(self):
   365     def manstart(self):
   357         self.changelog
   366         self.changelog
   358         return self.manstart
   367         return self.manstart
   359 
   368 
   360     @localrepo.unfilteredpropertycache
   369     @localrepo.unfilteredpropertycache
   361     def filestart(self):
   370     def filestart(self):
   362         self.manifestlog
   371         self.manifestlog
       
   372 
       
   373         # If filestart was not set by self.manifestlog, that means the
       
   374         # manifestlog implementation did not consume the manifests from the
       
   375         # changegroup (ex: it might be consuming trees from a separate bundle2
       
   376         # part instead). So we need to manually consume it.
       
   377         if 'filestart' not in self.__dict__:
       
   378             self._consumemanifest()
       
   379 
   363         return self.filestart
   380         return self.filestart
   364 
   381 
   365     def url(self):
   382     def url(self):
   366         return self._url
   383         return self._url
   367 
   384