comparison mercurial/commands.py @ 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 66e64681e0a8
children 66c0ff381cfc
comparison
equal deleted inserted replaced
36995:d5d42c170f4d 36996:1bf555cb680e
1131 label = 'branches.current' 1131 label = 'branches.current'
1132 1132
1133 fm.startitem() 1133 fm.startitem()
1134 fm.write('branch', '%s', tag, label=label) 1134 fm.write('branch', '%s', tag, label=label)
1135 rev = ctx.rev() 1135 rev = ctx.rev()
1136 padsize = max(31 - len(str(rev)) - encoding.colwidth(tag), 0) 1136 padsize = max(31 - len("%d" % rev) - encoding.colwidth(tag), 0)
1137 fmt = ' ' * padsize + ' %d:%s' 1137 fmt = ' ' * padsize + ' %d:%s'
1138 fm.condwrite(not ui.quiet, 'rev node', fmt, rev, hexfunc(ctx.node()), 1138 fm.condwrite(not ui.quiet, 'rev node', fmt, rev, hexfunc(ctx.node()),
1139 label='log.changeset changeset.%s' % ctx.phasestr()) 1139 label='log.changeset changeset.%s' % ctx.phasestr())
1140 fm.context(ctx=ctx) 1140 fm.context(ctx=ctx)
1141 fm.data(active=isactive, closed=not isopen, current=current) 1141 fm.data(active=isactive, closed=not isopen, current=current)