Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/localrepo.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 | 3e86261bf110 |
children | 3c8811efdddc |
comparison
equal
deleted
inserted
replaced
30217:e478f11e4182 | 30218:1767723f71cf |
---|---|
504 c.readpending('00changelog.i.a') | 504 c.readpending('00changelog.i.a') |
505 return c | 505 return c |
506 | 506 |
507 @storecache('00manifest.i') | 507 @storecache('00manifest.i') |
508 def manifest(self): | 508 def manifest(self): |
509 return self._constructmanifest() | |
510 | |
511 def _constructmanifest(self): | |
512 # This is a temporary function while we migrate from manifest to | |
513 # manifestlog. It allows bundlerepo and unionrepo to intercept the | |
514 # manifest creation. | |
509 return manifest.manifest(self.svfs) | 515 return manifest.manifest(self.svfs) |
510 | 516 |
511 @property | 517 @property |
512 def manifestlog(self): | 518 def manifestlog(self): |
513 return manifest.manifestlog(self.svfs, self) | 519 return manifest.manifestlog(self.svfs, self) |