# HG changeset patch # User Pierre-Yves David # Date 2014-04-17 20:01:58 # Node ID 2a246e737f9209ef08f28fb250f09484c2a67eff # Parent 4676135ac555747b06c3b96aa2583f342e2da02e bundle2: move bundle2 config option to section "experimental" We highlight the fact that this is experimental by moving it to an "experimental" section, and we match the config name with the server capability name `bundle2-exp`. diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -305,7 +305,7 @@ class localrepository(object): def _restrictcapabilities(self, caps): # bundle2 is not ready for prime time, drop it unless explicitly # required by the tests (or some brave tester) - if self.ui.configbool('server', 'bundle2', False): + if self.ui.configbool('experimental', 'bundle2-exp', False): caps = set(caps) capsblob = bundle2.encodecaps(self.bundle2caps) caps.add('bundle2-exp=' + urllib.quote(capsblob)) diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py --- a/mercurial/wireproto.py +++ b/mercurial/wireproto.py @@ -585,7 +585,7 @@ def _capabilities(repo, proto): # otherwise, add 'streamreqs' detailing our local revlog format else: caps.append('streamreqs=%s' % ','.join(requiredformats)) - if repo.ui.configbool('server', 'bundle2', False): + if self.ui.configbool('experimental', 'bundle2-exp', False): capsblob = bundle2.encodecaps(repo.bundle2caps) caps.append('bundle2-exp=' + urllib.quote(capsblob)) caps.append('unbundle=%s' % ','.join(changegroupmod.bundlepriority)) diff --git a/tests/test-bundle2.t b/tests/test-bundle2.t --- a/tests/test-bundle2.t +++ b/tests/test-bundle2.t @@ -174,8 +174,8 @@ Create an extension to test bundle2 API $ cat >> $HGRCPATH << EOF > [extensions] > bundle2=$TESTTMP/bundle2.py - > [server] - > bundle2=True + > [experimental] + > bundle2-exp=True > [ui] > ssh=python "$TESTDIR/dummyssh" > [web]