Patchwork [3,of,8] py3: use '%d' to format diffstat sum

login
register
mail settings
Submitter Yuya Nishihara
Date March 1, 2018, 2:17 p.m.
Message ID <7002f11e42c57d80e3e0.1519913830@mimosa>
Download mbox | patch
Permalink /patch/28550/
State Accepted
Headers show

Comments

Yuya Nishihara - March 1, 2018, 2:17 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1519904593 18000
#      Thu Mar 01 06:43:13 2018 -0500
# Node ID 7002f11e42c57d80e3e001b48e956d0f9a94b758
# Parent  4c40aaa3fe1cdee62898dcd43840a070b76eb79b
py3: use '%d' to format diffstat sum

Patch

diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
--- a/mercurial/templatekw.py
+++ b/mercurial/templatekw.py
@@ -433,7 +433,7 @@  def showdiffstat(repo, ctx, templ, **arg
     """
     stats = patch.diffstatdata(util.iterlines(ctx.diff(noprefix=False)))
     maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats)
-    return '%s: +%s/-%s' % (len(stats), adds, removes)
+    return '%d: +%d/-%d' % (len(stats), adds, removes)
 
 @templatekeyword('envvars')
 def showenvvars(ui, **args):