Patchwork [5,of,5,v3] changegroup3: enable on 'lfs' repo requirements

login
register
mail settings
Submitter Remi Chaintron
Date Nov. 23, 2016, 4:19 p.m.
Message ID <ee76def8400e7003daca.1479917957@iphonesleepsort.dhcp.thefacebook.com>
Download mbox | patch
Permalink /patch/17722/
State Superseded
Headers show

Comments

Remi Chaintron - Nov. 23, 2016, 4:19 p.m.
# HG changeset patch
# User Remi Chaintron <remi@fb.com>
# Date 1479916365 0
#      Wed Nov 23 15:52:45 2016 +0000
# Branch stable
# Node ID ee76def8400e7003daca04dd0985af77cc925348
# Parent  1d0b60b267fabedc683bd53a880abc0b8e75badb
changegroup3: enable on 'lfs' repo requirements

`changegroup3` is required by the `lfs` extension in order to send flags for
revlog objects over the wire.

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
+        'lfs' 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
+        'lfs' 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', 'lfs'))
     _basesupported = supportedformats | set(('store', 'fncache', 'shared',
                                              'dotencode'))
     openerreqs = set(('revlogv1', 'generaldelta', 'treemanifest', 'manifestv2'))