# HG changeset patch # User Pierre-Yves David # Date 1433717357 25200 # Node ID 60f4e7022ffe03f409a8e7e01273f7ae70d66531 # Parent 1b7853a1f04ee3720b4790331a26dd0414d9ad9d 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. diff -r 1b7853a1f04e -r 60f4e7022ffe mercurial/exchange.py --- 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)