[PATCH 2 of 4 STABLE] manifest: make manifestlog a storecache
Yuya Nishihara
yuya at tcha.org
Sat Oct 22 05:09:57 EDT 2016
On Tue, 18 Oct 2016 17:50:15 -0700, Durham Goode wrote:
> # HG changeset patch
> # User Durham Goode <durham at fb.com>
> # Date 1476837219 25200
> # Tue Oct 18 17:33:39 2016 -0700
> # Branch stable
> # Node ID ed607426a3ff4deda8c7f2de8b86d5b6ca976d67
> # Parent f4e70498d617737c47371a86c2177146c7b789fe
> manifest: make manifestlog a storecache
> --- a/mercurial/localrepo.py
> +++ b/mercurial/localrepo.py
> @@ -504,9 +504,9 @@ class localrepository(object):
> c.readpending('00changelog.i.a')
> return c
>
> - @storecache('00manifest.i')
> + @property
> def manifest(self):
> - return self._constructmanifest()
> + return self.manifestlog._oldmanifest
>
> def _constructmanifest(self):
> # This is a temporary function while we migrate from manifest to
> @@ -514,7 +514,7 @@ class localrepository(object):
> # manifest creation.
> return manifest.manifest(self.svfs)
>
> - @property
> + @storecache('00manifest.i')
> def manifestlog(self):
> return manifest.manifestlog(self.svfs, self)
Can we remove manifestlog._repo to cut reference cycle?
More information about the Mercurial-devel
mailing list