comparison mercurial/wireproto.py @ 21989:bdb6d97f0a04

getbundle: add a ``cg`` boolean argument to control changegroup inclusion The ``getbundle`` function was initially design to return a changegroup bundle. However, bundle2 allows transmitting a wide range of data. Some bundle2 requests may not include a changegroup at all. Before this changeset, the client would request a changegroup for ``heads=[nullid]`` and receive an empty changegroup. We introduce an official boolean parameter, ``cg``, that can be set to false to disable changegroup generation on getbundle. A new bundle2 capability is introduced to let the client know.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Sat, 31 May 2014 16:48:29 -0700
parents 12cd3827b860
children 269688a398c4
comparison
equal deleted inserted replaced
21988:12cd3827b860 21989:bdb6d97f0a04
201 # :csv: list of comma-separated values 201 # :csv: list of comma-separated values
202 # :plain: string with no transformation needed. 202 # :plain: string with no transformation needed.
203 gboptsmap = {'heads': 'nodes', 203 gboptsmap = {'heads': 'nodes',
204 'common': 'nodes', 204 'common': 'nodes',
205 'bundlecaps': 'csv', 205 'bundlecaps': 'csv',
206 'listkeys': 'csv'} 206 'listkeys': 'csv',
207 'cg': 'boolean'}
207 208
208 # client side 209 # client side
209 210
210 class wirepeer(peer.peerrepository): 211 class wirepeer(peer.peerrepository):
211 212