changeset 36996:1bf555cb680e

py3: use "%d" % int instead of str(int) We need to use bytes internally. Differential Revision: https://phab.mercurial-scm.org/D2895
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 04 Mar 2018 22:35:29 +0530
parents d5d42c170f4d
children 44467a4d472f
files mercurial/commands.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Mon Mar 19 00:06:10 2018 +0530
+++ b/mercurial/commands.py	Sun Mar 04 22:35:29 2018 +0530
@@ -1133,7 +1133,7 @@
         fm.startitem()
         fm.write('branch', '%s', tag, label=label)
         rev = ctx.rev()
-        padsize = max(31 - len(str(rev)) - encoding.colwidth(tag), 0)
+        padsize = max(31 - len("%d" % rev) - encoding.colwidth(tag), 0)
         fmt = ' ' * padsize + ' %d:%s'
         fm.condwrite(not ui.quiet, 'rev node', fmt, rev, hexfunc(ctx.node()),
                      label='log.changeset changeset.%s' % ctx.phasestr())