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

Yuya Nishihara yuya at tcha.org
Thu Mar 1 09:17:10 EST 2018


# HG changeset patch
# User Yuya Nishihara <yuya at 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

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):


More information about the Mercurial-devel mailing list