Mercurial > hg-stable
changeset 24696:553dc2b094d9
bundle2: advertise bundle2 by default
That way, any new server will be ready to accept bundle2 payload. The decision
for the client to use it is still off by default so this is not turning bundle2
everywhere.
We introduce a new kill switch for this in case stuff goes wrong.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 10 Apr 2015 15:41:33 -0400 |
parents | 419528cb05b6 |
children | 52ff737c63d2 |
files | mercurial/localrepo.py mercurial/wireproto.py tests/test-hgweb-commands.t |
diffstat | 3 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sat Feb 07 12:57:40 2015 -0500 +++ b/mercurial/localrepo.py Fri Apr 10 15:41:33 2015 -0400 @@ -312,9 +312,7 @@ self._revbranchcache.write() 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('experimental', 'bundle2-exp', False): + if self.ui.configbool('experimental', 'bundle2-advertise', True): caps = set(caps) capsblob = bundle2.encodecaps(bundle2.getrepocaps(self)) caps.add('bundle2=' + urllib.quote(capsblob))
--- a/mercurial/wireproto.py Sat Feb 07 12:57:40 2015 -0500 +++ b/mercurial/wireproto.py Fri Apr 10 15:41:33 2015 -0400 @@ -615,7 +615,7 @@ # otherwise, add 'streamreqs' detailing our local revlog format else: caps.append('streamreqs=%s' % ','.join(requiredformats)) - if repo.ui.configbool('experimental', 'bundle2-exp', False): + if repo.ui.configbool('experimental', 'bundle2-advertise', True): capsblob = bundle2.encodecaps(bundle2.getrepocaps(repo)) caps.append('bundle2=' + urllib.quote(capsblob)) caps.append('unbundle=%s' % ','.join(changegroupmod.bundlepriority))
--- a/tests/test-hgweb-commands.t Sat Feb 07 12:57:40 2015 -0500 +++ b/tests/test-hgweb-commands.t Fri Apr 10 15:41:33 2015 -0400 @@ -1872,7 +1872,7 @@ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=capabilities'; echo 200 Script output follows - lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 + lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 heads @@ -2052,7 +2052,7 @@ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=capabilities'; echo 200 Script output follows - lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream-preferred stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 + lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream-preferred stream bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 heads