Patchwork [4,of,6] changegroup3: enable on repo requirements

login
register
mail settings
Submitter Remi Chaintron
Date Oct. 27, 2016, 3:04 p.m.
Message ID <fb19b40dd647dad449e8.1477580642@remi-mbp2.dhcp.thefacebook.com>
Download mbox | patch
Permalink /patch/17205/
State Deferred
Headers show

Comments

Remi Chaintron - Oct. 27, 2016, 3:04 p.m.
# HG changeset patch
# User Remi Chaintron <remi@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.
Augie Fackler - Nov. 9, 2016, 5:15 p.m.
On Thu, Oct 27, 2016 at 04:04:02PM +0100, Remi Chaintron wrote:
> # HG changeset patch
> # User Remi Chaintron <remi@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@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Remi Chaintron - Nov. 16, 2016, 2 p.m.
On 11/9/16, 5:15 PM, "Augie Fackler" <raf@durin42.com> wrote:

    On Thu, Oct 27, 2016 at 04:04:02PM +0100, Remi Chaintron wrote:
    > # HG changeset patch

    > # User Remi Chaintron <remi@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?

Will change to ‘lfs’.
    
    >          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@mercurial-scm.org

    > https://urldefense.proofpoint.com/v2/url?u=https-3A__www.mercurial-2Dscm.org_mailman_listinfo_mercurial-2Ddevel&d=DQIBAg&c=5VD0RTtNlTh3ycd41b3MUw&r=RjAECLzUoKvzn49UTozsUg&m=0DBdlpKUieibCn94cpFHQc0lEp1brvzHAq97pQ4CE1c&s=5iAe3wqlaMJZyLFtkjURgdPInxopFCep8I_DgpadZAk&e=

Patch

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):
         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'))