comparison mercurial/localrepo.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 a2ca9dcb4b77
children c1ca47204590
comparison
equal deleted inserted replaced
21988:12cd3827b860 21989:bdb6d97f0a04
180 requirements = ['revlogv1'] 180 requirements = ['revlogv1']
181 filtername = None 181 filtername = None
182 182
183 bundle2caps = {'HG2X': (), 183 bundle2caps = {'HG2X': (),
184 'b2x:listkeys': (), 184 'b2x:listkeys': (),
185 'b2x:pushkey': ()} 185 'b2x:pushkey': (),
186 'b2x:changegroup': (),
187 }
186 188
187 # a list of (ui, featureset) functions. 189 # a list of (ui, featureset) functions.
188 # only functions defined in module of enabled extensions are invoked 190 # only functions defined in module of enabled extensions are invoked
189 featuresetupfuncs = set() 191 featuresetupfuncs = set()
190 192