exchange: expand usage of getchangegroupraw
The 'getchangegroupraw' is very simple (two lines) so we inline it in its only
caller. This exposes the 'outgoing' object of the part generator function, allowing
us to add information on the number of changesets contained in the part in a
later changeset. Such information is useful for progress bar.
--- a/mercurial/exchange.py Sun Jun 07 15:47:07 2015 -0700
+++ b/mercurial/exchange.py Sun Jun 07 15:49:17 2015 -0700
@@ -1294,10 +1294,10 @@
if not cgversions:
raise ValueError(_('no common changegroup version'))
version = getcgkwargs['version'] = max(cgversions)
- cg = changegroup.getchangegroupraw(repo, source, heads=heads,
- common=common,
- bundlecaps=bundlecaps,
- **getcgkwargs)
+ outgoing = changegroup.computeoutgoing(repo, heads, common)
+ cg = changegroup.getlocalchangegroupraw(repo, source, outgoing,
+ bundlecaps=bundlecaps,
+ **getcgkwargs)
if cg:
part = bundler.newpart('changegroup', data=cg)