Mercurial > hg
diff mercurial/wireproto.py @ 21141:d8dd19e09ed4
bundle2: advertise bundle2 caps in server capabilities
We can now retrieve them from the server during push. The capabilities are
encoded the same way as in `replycaps` part (with an extra layer of urlquoting
to escape separators).
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 17 Apr 2014 01:49:20 -0400 |
parents | 438803e4bd97 |
children | 7a20fe8dc080 |
line wrap: on
line diff
--- a/mercurial/wireproto.py Thu Apr 17 01:50:28 2014 -0400 +++ b/mercurial/wireproto.py Thu Apr 17 01:49:20 2014 -0400 @@ -586,7 +586,8 @@ else: caps.append('streamreqs=%s' % ','.join(requiredformats)) if repo.ui.configbool('server', 'bundle2', False): - caps.append('bundle2') + capsblob = bundle2.encodecaps(repo.bundle2caps) + caps.append('bundle2=' + urllib.quote(capsblob)) caps.append('unbundle=%s' % ','.join(changegroupmod.bundlepriority)) caps.append('httpheader=1024') return caps