##// END OF EJS Templates
getbundle: add a ``cg`` boolean argument to control changegroup inclusion...
Pierre-Yves David -
r21989:bdb6d97f default
parent child Browse files
Show More
@@ -726,9 +726,13 b' def getbundle(repo, source, heads=None, '
726 726 The implementation is at a very early stage and will get massive rework
727 727 when the API of bundle is refined.
728 728 """
729 # build changegroup bundle here.
730 cg = changegroup.getbundle(repo, source, heads=heads,
731 common=common, bundlecaps=bundlecaps)
729 cg = None
730 if kwargs.get('cg', True):
731 # build changegroup bundle here.
732 cg = changegroup.getbundle(repo, source, heads=heads,
733 common=common, bundlecaps=bundlecaps)
734 elif 'HG2X' not in bundlecaps:
735 raise ValueError(_('request for bundle10 must include changegroup'))
732 736 if bundlecaps is None or 'HG2X' not in bundlecaps:
733 737 if kwargs:
734 738 raise ValueError(_('unsupported getbundle arguments: %s')
@@ -182,7 +182,9 b' class localrepository(object):'
182 182
183 183 bundle2caps = {'HG2X': (),
184 184 'b2x:listkeys': (),
185 'b2x:pushkey': ()}
185 'b2x:pushkey': (),
186 'b2x:changegroup': (),
187 }
186 188
187 189 # a list of (ui, featureset) functions.
188 190 # only functions defined in module of enabled extensions are invoked
@@ -203,7 +203,8 b' def unescapearg(escaped):'
203 203 gboptsmap = {'heads': 'nodes',
204 204 'common': 'nodes',
205 205 'bundlecaps': 'csv',
206 'listkeys': 'csv'}
206 'listkeys': 'csv',
207 'cg': 'boolean'}
207 208
208 209 # client side
209 210
General Comments 0
You need to be logged in to leave comments. Login now