##// END OF EJS Templates
getbundle: have a single getchangegroupraw call site...
Pierre-Yves David -
r25503:1b7853a1 default
parent child Browse files
Show More
@@ -1288,19 +1288,16 b' def _getbundlechangegrouppart(bundler, r'
1288 # build changegroup bundle here.
1288 # build changegroup bundle here.
1289 version = None
1289 version = None
1290 cgversions = b2caps.get('changegroup')
1290 cgversions = b2caps.get('changegroup')
1291 if not cgversions: # 3.1 and 3.2 ship with an empty value
1291 getcgkwargs = {}
1292 cg = changegroup.getchangegroupraw(repo, source, heads=heads,
1292 if cgversions: # 3.1 and 3.2 ship with an empty value
1293 common=common,
1294 bundlecaps=bundlecaps)
1295 else:
1296 cgversions = [v for v in cgversions if v in changegroup.packermap]
1293 cgversions = [v for v in cgversions if v in changegroup.packermap]
1297 if not cgversions:
1294 if not cgversions:
1298 raise ValueError(_('no common changegroup version'))
1295 raise ValueError(_('no common changegroup version'))
1299 version = max(cgversions)
1296 version = getcgkwargs['version'] = max(cgversions)
1300 cg = changegroup.getchangegroupraw(repo, source, heads=heads,
1297 cg = changegroup.getchangegroupraw(repo, source, heads=heads,
1301 common=common,
1298 common=common,
1302 bundlecaps=bundlecaps,
1299 bundlecaps=bundlecaps,
1303 version=version)
1300 **getcgkwargs)
1304
1301
1305 if cg:
1302 if cg:
1306 part = bundler.newpart('changegroup', data=cg)
1303 part = bundler.newpart('changegroup', data=cg)
General Comments 0
You need to be logged in to leave comments. Login now