Patchwork getbundle: add data about the number of changesets bundled

login
register
mail settings
Submitter Augie Fackler
Date June 10, 2015, 5:35 p.m.
Message ID <e4efca7ae885505ddb8c.1433957732@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/9583/
State Superseded
Commit 1e37bd83dc66ede31b14f4175bd8f379cf69f185
Headers show

Comments

Augie Fackler - June 10, 2015, 5:35 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@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.
Augie Fackler - June 10, 2015, 5:37 p.m.
On Wed, Jun 10, 2015 at 1:35 PM, Augie Fackler <raf@durin42.com> wrote:
> +        part.addparam('nbc', str(len(outgoing.missing)), mandatory=False)


It took me a while to figure out what nbc meant by inspection. Could
we make it something longer and more self-documenting? numchanges or
similar?

Patch

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,