Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
21140:4aeb8da68090 | 21141:d8dd19e09ed4 |
---|---|
584 caps.append('stream') | 584 caps.append('stream') |
585 # otherwise, add 'streamreqs' detailing our local revlog format | 585 # otherwise, add 'streamreqs' detailing our local revlog format |
586 else: | 586 else: |
587 caps.append('streamreqs=%s' % ','.join(requiredformats)) | 587 caps.append('streamreqs=%s' % ','.join(requiredformats)) |
588 if repo.ui.configbool('server', 'bundle2', False): | 588 if repo.ui.configbool('server', 'bundle2', False): |
589 caps.append('bundle2') | 589 capsblob = bundle2.encodecaps(repo.bundle2caps) |
590 caps.append('bundle2=' + urllib.quote(capsblob)) | |
590 caps.append('unbundle=%s' % ','.join(changegroupmod.bundlepriority)) | 591 caps.append('unbundle=%s' % ','.join(changegroupmod.bundlepriority)) |
591 caps.append('httpheader=1024') | 592 caps.append('httpheader=1024') |
592 return caps | 593 return caps |
593 | 594 |
594 # If you are writing an extension and consider wrapping this function. Wrap | 595 # If you are writing an extension and consider wrapping this function. Wrap |