diff -r 37cccad55410 -r 953839de96ab mercurial/bundle2.py --- a/mercurial/bundle2.py Sun Jul 17 15:10:30 2016 -0700 +++ b/mercurial/bundle2.py Sun Jul 17 15:13:51 2016 -0700 @@ -1294,6 +1294,9 @@ bundle.setcompression(compression) part = bundle.newpart('changegroup', data=cg.getchunks()) part.addparam('version', cg.version) + if 'clcount' in cg.extras: + part.addparam('nbchanges', str(cg.extras['clcount']), + mandatory=False) chunkiter = bundle.getchunks() else: # compression argument is only for the bundle2 case