Patchwork [2,of,2] bundle2: add debug info about the number of stream params

login
register
mail settings
Submitter Siddharth Agarwal
Date June 27, 2017, 9:38 p.m.
Message ID <d3c71b4e989d6db9e654.1498599523@devvm31800.prn1.facebook.com>
Download mbox | patch
Permalink /patch/21787/
State Accepted
Headers show

Comments

Siddharth Agarwal - June 27, 2017, 9:38 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1498599480 25200
#      Tue Jun 27 14:38:00 2017 -0700
# Node ID d3c71b4e989d6db9e65469c930755a38b4994ae7
# Parent  8b59a6d6f77927cc7b40b282056278829ca398b3
bundle2: add debug info about the number of stream params

Seems like the %i was never substituted.
Pierre-Yves David - June 27, 2017, 10:32 p.m.
These both looks good to me, (last one is funny).

On 06/27/2017 11:38 PM, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0@fb.com>
> # Date 1498599480 25200
> #      Tue Jun 27 14:38:00 2017 -0700
> # Node ID d3c71b4e989d6db9e65469c930755a38b4994ae7
> # Parent  8b59a6d6f77927cc7b40b282056278829ca398b3
> bundle2: add debug info about the number of stream params
> 
> Seems like the %i was never substituted.
> 
> diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
> --- a/mercurial/bundle2.py
> +++ b/mercurial/bundle2.py
> @@ -349,7 +349,7 @@ def processbundle(repo, unbundler, trans
>       if repo.ui.debugflag:
>           msg = ['bundle2-input-bundle:']
>           if unbundler.params:
> -            msg.append(' %i params')
> +            msg.append(' %i params' % len(unbundler.params))
>           if op.gettransaction is None or op.gettransaction is _notransaction:
>               msg.append(' no-transaction')
>           else:
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -349,7 +349,7 @@  def processbundle(repo, unbundler, trans
     if repo.ui.debugflag:
         msg = ['bundle2-input-bundle:']
         if unbundler.params:
-            msg.append(' %i params')
+            msg.append(' %i params' % len(unbundler.params))
         if op.gettransaction is None or op.gettransaction is _notransaction:
             msg.append(' no-transaction')
         else: