getbundle: add data about the number of changesets bundled
authorPierre-Yves David <pierre-yves.david@fb.com>
Sun, 07 Jun 2015 15:52:57 -0700
changeset 25516 1e37bd83dc66
parent 25515 e8075329c5fb
child 25517 513c31d8652f
getbundle: add data about the number of changesets bundled We use an advisory parameters to carry the number of changesets bundled. This will be used for progress output.
mercurial/exchange.py
--- a/mercurial/exchange.py	Wed Jun 10 14:38:09 2015 -0500
+++ b/mercurial/exchange.py	Sun Jun 07 15:52:57 2015 -0700
@@ -1303,6 +1303,7 @@
         part = bundler.newpart('changegroup', data=cg)
         if version is not None:
             part.addparam('version', version)
+        part.addparam('nbchanges', str(len(outgoing.missing)), mandatory=False)
 
 @getbundle2partsgenerator('listkeys')
 def _getbundlelistkeysparts(bundler, repo, source, bundlecaps=None,