comparison mercurial/bundlerepo.py @ 30218:1767723f71cf stable

manifest: move manifest creation to a helper function A future patch will be moving manifest creation to be inside manifestlog as part of improving our cache guarantees. bundlerepo and unionrepo currently rely on being able to hook into manifest creation, so let's temporarily move the actual manifest creation to a helper function for them to intercept. In the future manifest.manifest() will disappear entirely and this can disappear.
author Durham Goode <durham@fb.com>
date Tue, 18 Oct 2016 17:32:51 -0700
parents 1619efcde9a4
children 31de088945cd
comparison
equal deleted inserted replaced
30217:e478f11e4182 30218:1767723f71cf
341 self.bundle.changelogheader() 341 self.bundle.changelogheader()
342 c = bundlechangelog(self.svfs, self.bundle) 342 c = bundlechangelog(self.svfs, self.bundle)
343 self.manstart = self.bundle.tell() 343 self.manstart = self.bundle.tell()
344 return c 344 return c
345 345
346 @localrepo.unfilteredpropertycache 346 def _constructmanifest(self):
347 def manifest(self):
348 self.bundle.seek(self.manstart) 347 self.bundle.seek(self.manstart)
349 # consume the header if it exists 348 # consume the header if it exists
350 self.bundle.manifestheader() 349 self.bundle.manifestheader()
351 linkmapper = self.unfiltered().changelog.rev 350 linkmapper = self.unfiltered().changelog.rev
352 m = bundlemanifest(self.svfs, self.bundle, linkmapper) 351 m = bundlemanifest(self.svfs, self.bundle, linkmapper)