[PATCH 4 of 6] changegroup3: enable on repo requirements

Augie Fackler raf at durin42.com
Wed Nov 9 17:15:01 UTC 2016


On Thu, Oct 27, 2016 at 04:04:02PM +0100, Remi Chaintron wrote:
> # HG changeset patch
> # User Remi Chaintron <remi at fb.com>
> # Date 1477579974 -3600
> #      Thu Oct 27 15:52:54 2016 +0100
> # Branch stable
> # Node ID fb19b40dd647dad449e861dc4865e5c584c83e0e
> # Parent  f0825d5947cb38fe35c3f383ea68fee4e744deb4
> changegroup3: enable on repo requirements
>
> `changegroup3` is required by the `lfs` extension in order to send flags for
> revlog objects over the wire.
>
> diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
> --- a/mercurial/changegroup.py
> +++ b/mercurial/changegroup.py
> @@ -879,14 +879,16 @@
>  # Changegroup versions that can be applied to the repo
>  def supportedincomingversions(repo):
>      versions = allsupportedversions(repo.ui)
> -    if 'treemanifest' in repo.requirements:
> +    if ('treemanifest' in repo.requirements or
> +        'changegroup3' in repo.requirements):

Shouldn't this requirement name be 'lfs' rather than changegroup3?

>          versions.add('03')
>      return versions
>
>  # Changegroup versions that can be created from the repo
>  def supportedoutgoingversions(repo):
>      versions = allsupportedversions(repo.ui)
> -    if 'treemanifest' in repo.requirements:
> +    if ('treemanifest' in repo.requirements or
> +        'changegroup3' in repo.requirements):
>          # Versions 01 and 02 support only flat manifests and it's just too
>          # expensive to convert between the flat manifest and tree manifest on
>          # the fly. Since tree manifests are hashed differently, all of history
> diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
> --- a/mercurial/localrepo.py
> +++ b/mercurial/localrepo.py
> @@ -238,7 +238,7 @@
>  class localrepository(object):
>
>      supportedformats = set(('revlogv1', 'generaldelta', 'treemanifest',
> -                            'manifestv2'))
> +                            'manifestv2', 'changegroup3'))
>      _basesupported = supportedformats | set(('store', 'fncache', 'shared',
>                                               'dotencode'))
>      openerreqs = set(('revlogv1', 'generaldelta', 'treemanifest', 'manifestv2'))
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list