##// END OF EJS Templates
getbundle: send highest changegroup format supported by both side...
Pierre-Yves David -
r23179:6bb9533f default
parent child Browse files
Show More
@@ -1186,11 +1186,26 b' def _getbundlechangegrouppart(bundler, r'
1186 cg = None
1186 cg = None
1187 if kwargs.get('cg', True):
1187 if kwargs.get('cg', True):
1188 # build changegroup bundle here.
1188 # build changegroup bundle here.
1189 cg = changegroup.getchangegroupraw(repo, source, heads=heads,
1189 version = None
1190 common=common, bundlecaps=bundlecaps)
1190 cgversions = b2caps.get('b2x:changegroup')
1191 if cgversions is None:
1192 cg = changegroup.getchangegroupraw(repo, source, heads=heads,
1193 common=common,
1194 bundlecaps=bundlecaps)
1195 else:
1196 cgversions = [v for v in cgversions if v in changegroup.packermap]
1197 if not cgversions:
1198 raise ValueError(_('no common changegroup version'))
1199 version = max(cgversions)
1200 cg = changegroup.getchangegroupraw(repo, source, heads=heads,
1201 common=common,
1202 bundlecaps=bundlecaps,
1203 version=version)
1191
1204
1192 if cg:
1205 if cg:
1193 bundler.newpart('b2x:changegroup', data=cg)
1206 part = bundler.newpart('b2x:changegroup', data=cg)
1207 if version is not None:
1208 part.addparam('version', version)
1194
1209
1195 @getbundle2partsgenerator('listkeys')
1210 @getbundle2partsgenerator('listkeys')
1196 def _getbundlelistkeysparts(bundler, repo, source, bundlecaps=None,
1211 def _getbundlelistkeysparts(bundler, repo, source, bundlecaps=None,
General Comments 0
You need to be logged in to leave comments. Login now