[PATCH] getbundle: add data about the number of changesets bundled

Augie Fackler raf at durin42.com
Wed Jun 10 12:35:32 CDT 2015


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1433717577 25200
#      Sun Jun 07 15:52:57 2015 -0700
# Node ID e4efca7ae885505ddb8c10219fc11441db17e9f5
# Parent  5b1bcecd0028079328a7aaecc8a1192176eaaa78
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.

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -1272,6 +1272,7 @@ def _getbundlechangegrouppart(bundler, r
         part = bundler.newpart('changegroup', data=cg)
         if version is not None:
             part.addparam('version', version)
+        part.addparam('nbc', str(len(outgoing.missing)), mandatory=False)
 
 @getbundle2partsgenerator('listkeys')
 def _getbundlelistkeysparts(bundler, repo, source, bundlecaps=None,


More information about the Mercurial-devel mailing list