bundle2: graduate bundle2.stream option from experimental to server section
authorAnton Shestakov <av6@dwimlabs.net>
Mon, 17 Sep 2018 16:52:34 +0800
changeset 50437 1b5880352314e323b73debc9bbd7c92ba27f4863
parent 50436 7d9b1b50cad5e03180f595c6da59bd8bfb68437e
child 50438 4bd6e444c76fb3064a0106cabe5620d9132f0c3a
push id955
push usergszorc@mozilla.com
push dateThu, 20 Sep 2018 19:36:20 +0000
bundle2: graduate bundle2.stream option from experimental to server section Differential Revision: https://phab.mercurial-scm.org/D4679
mercurial/bundle2.py
mercurial/configitems.py
mercurial/help/config.txt
tests/test-clone-uncompressed.t
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -1527,17 +1527,17 @@ def getrepocaps(repo, allowpushback=Fals
         caps['checkheads'] = ('related',)
     if 'phases' in repo.ui.configlist('devel', 'legacy.exchange'):
         caps.pop('phases')
 
     # Don't advertise stream clone support in server mode if not configured.
     if role == 'server':
         streamsupported = repo.ui.configbool('server', 'uncompressed',
                                              untrusted=True)
-        featuresupported = repo.ui.configbool('experimental', 'bundle2.stream')
+        featuresupported = repo.ui.configbool('server', 'bundle2.stream')
 
         if not streamsupported or not featuresupported:
             caps.pop('stream')
     # Else always advertise support on client, because payload support
     # should always be advertised.
 
     return caps
 
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -451,19 +451,16 @@ coreconfigitem('experimental', 'bundle2-
     default=True,
 )
 coreconfigitem('experimental', 'bundle2-output-capture',
     default=False,
 )
 coreconfigitem('experimental', 'bundle2.pushback',
     default=False,
 )
-coreconfigitem('experimental', 'bundle2.stream',
-    default=False,
-)
 coreconfigitem('experimental', 'bundle2lazylocking',
     default=False,
 )
 coreconfigitem('experimental', 'bundlecomplevel',
     default=None,
 )
 coreconfigitem('experimental', 'bundlecomplevel.bzip2',
     default=None,
@@ -968,16 +965,20 @@ coreconfigitem('server', 'bundle1gd.pull
     default=None,
 )
 coreconfigitem('server', 'bundle1.push',
     default=None,
 )
 coreconfigitem('server', 'bundle1gd.push',
     default=None,
 )
+coreconfigitem('server', 'bundle2.stream',
+    default=False,
+    alias=[('experimental', 'bundle2.stream')]
+)
 coreconfigitem('server', 'compressionengines',
     default=list,
 )
 coreconfigitem('server', 'concurrent-push-mode',
     default='strict',
 )
 coreconfigitem('server', 'disablefullbundle',
     default=False,
--- a/mercurial/help/config.txt
+++ b/mercurial/help/config.txt
@@ -1922,16 +1922,20 @@ Controls generic server settings.
     Like ``bundle1.pull`` but only used if the repository is using the
     *generaldelta* storage format. (default: True)
 
     Large repositories using the *generaldelta* storage format should
     consider setting this option because converting *generaldelta*
     repositories to the exchange format required by the bundle1 data
     format can consume a lot of CPU.
 
+``bundle2.stream``
+    Whether to allow clients to pull using the bundle2 streaming protocol.
+    (default: False)
+
 ``zliblevel``
     Integer between ``-1`` and ``9`` that controls the zlib compression level
     for wire protocol commands that send zlib compressed output (notably the
     commands that send repository history data).
 
     The default (``-1``) uses the default zlib compression level, which is
     likely equivalent to ``6``. ``0`` means no compression. ``9`` means
     maximum compression.
--- a/tests/test-clone-uncompressed.t
+++ b/tests/test-clone-uncompressed.t
@@ -1,15 +1,15 @@
 #require serve no-reposimplestore no-chg
 
 #testcases stream-legacy stream-bundle2
 
 #if stream-bundle2
   $ cat << EOF >> $HGRCPATH
-  > [experimental]
+  > [server]
   > bundle2.stream = yes
   > EOF
 #endif
 
 Initialize repository
 the status call is to check for issue5130
 
   $ hg init server