[PATCH 06 of 10] manifest: add bundlemanifestlog support

Martin von Zweigbergk martinvonz at google.com
Thu Nov 10 17:49:34 EST 2016


On Wed, Nov 9, 2016 at 11:31 AM, Durham Goode <durham at fb.com> wrote:
> # HG changeset patch
> # User Durham Goode <durham at fb.com>
> # Date 1478684308 28800
> #      Wed Nov 09 01:38:28 2016 -0800
> # Node ID 04ec4875fac7d14c91e82525cc40b8e7084e673a
> # Parent  604c120a5f8643b424f397d4db539675f00627e4
> manifest: add bundlemanifestlog support
>
> As part of deprecating manifest.manifest we need to make bundlerepo support
> manifestlog.
>
> diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py
> --- a/mercurial/bundlerepo.py
> +++ b/mercurial/bundlerepo.py
> @@ -187,9 +187,14 @@ class bundlechangelog(bundlerevlog, chan
>          finally:
>              self.filteredrevs = oldfilter
>
> -class bundlemanifest(bundlerevlog, manifest.manifest):
> +class bundlemanifestlog(manifest.manifestlog):

Used where?

> +    def __init__(self, opener, repo, bundle, linkmapper):
> +        manifest.manifestlog.__init__(self, opener, repo)
> +        self._revlog = bundlemanifest(opener, bundle, linkmapper)
> +
> +class bundlemanifest(bundlerevlog, manifest.manifestrevlog):
>      def __init__(self, opener, bundle, linkmapper, dirlogstarts=None, dir=''):
> -        manifest.manifest.__init__(self, opener, dir=dir)
> +        manifest.manifestrevlog.__init__(self, opener, dir=dir)
>          bundlerevlog.__init__(self, opener, self.indexfile, bundle,
>                                linkmapper)
>          if dirlogstarts is None:
> @@ -207,7 +212,7 @@ class bundlemanifest(bundlerevlog, manif
>          if node in self.fulltextcache:
>              result = self.fulltextcache[node].tostring()
>          else:
> -            result = manifest.manifest.revision(self, nodeorrev)
> +            result = manifest.manifestrevlog.revision(self, nodeorrev)
>          return result
>
>      def dirlog(self, d):


More information about the Mercurial-devel mailing list