Comments
Patch
@@ -310,13 +310,11 @@ class localrepository(object):
def _writecaches(self):
if self._revbranchcache:
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))
return caps
@@ -613,11 +613,11 @@ def _capabilities(repo, proto):
if not requiredformats - set(('revlogv1',)):
caps.append('stream')
# 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))
caps.append('httpheader=1024')
return caps
@@ -1870,11 +1870,11 @@ raw graph
capabilities
$ "$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
$ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=heads'
200 Script output follows
@@ -2050,11 +2050,11 @@ Graph json escape of multibyte character
capabilities
$ "$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
ERRORS ENCOUNTERED