# HG changeset patch # User Pierre-Yves David # Date 1397763197 14400 # Node ID 0c5088be66af96404126699ba0bc33d339df40ba # Parent 7a20fe8dc08067cbd18f21f5d389e46ce5fafba9 bundle2: rename server capability to bundle2-exp For the same reason, we advertise this bundle2 implementation and format as experimental. This will leave room for field testing in 3.0 but won't conflict with a stable implementation in 3.1. diff -r 7a20fe8dc080 -r 0c5088be66af mercurial/exchange.py --- a/mercurial/exchange.py Thu Apr 17 15:27:54 2014 -0400 +++ b/mercurial/exchange.py Thu Apr 17 15:33:17 2014 -0400 @@ -132,7 +132,7 @@ pushop.repo.prepushoutgoinghooks(pushop.repo, pushop.remote, pushop.outgoing) - if pushop.remote.capable('bundle2'): + if pushop.remote.capable('bundle2-exp'): _pushbundle2(pushop) else: _pushchangeset(pushop) @@ -207,7 +207,7 @@ The only currently supported type of data is changegroup but this will evolve in the future.""" # Send known head to the server for race detection. - capsblob = urllib.unquote(pushop.remote.capable('bundle2')) + capsblob = urllib.unquote(pushop.remote.capable('bundle2-exp')) caps = bundle2.decodecaps(capsblob) bundler = bundle2.bundle20(pushop.ui, caps) # create reply capability @@ -515,7 +515,7 @@ lock = pullop.repo.lock() try: _pulldiscovery(pullop) - if pullop.remote.capable('bundle2'): + if pullop.remote.capable('bundle2-exp'): _pullbundle2(pullop) if 'changegroup' in pullop.todosteps: _pullchangeset(pullop) diff -r 7a20fe8dc080 -r 0c5088be66af mercurial/localrepo.py --- a/mercurial/localrepo.py Thu Apr 17 15:27:54 2014 -0400 +++ b/mercurial/localrepo.py Thu Apr 17 15:33:17 2014 -0400 @@ -308,7 +308,7 @@ if self.ui.configbool('server', 'bundle2', False): caps = set(caps) capsblob = bundle2.encodecaps(self.bundle2caps) - caps.add('bundle2=' + urllib.quote(capsblob)) + caps.add('bundle2-exp=' + urllib.quote(capsblob)) return caps def _applyrequirements(self, requirements): diff -r 7a20fe8dc080 -r 0c5088be66af mercurial/wireproto.py --- a/mercurial/wireproto.py Thu Apr 17 15:27:54 2014 -0400 +++ b/mercurial/wireproto.py Thu Apr 17 15:33:17 2014 -0400 @@ -587,7 +587,7 @@ caps.append('streamreqs=%s' % ','.join(requiredformats)) if repo.ui.configbool('server', 'bundle2', False): capsblob = bundle2.encodecaps(repo.bundle2caps) - caps.append('bundle2=' + urllib.quote(capsblob)) + caps.append('bundle2-exp=' + urllib.quote(capsblob)) caps.append('unbundle=%s' % ','.join(changegroupmod.bundlepriority)) caps.append('httpheader=1024') return caps