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

Remi Chaintron remi at fb.com
Thu Oct 27 11:04:02 EDT 2016


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


More information about the Mercurial-devel mailing list