Mercurial > hg-stable
changeset 32204:055cca8e167b
py3: use %d to format integers into bytestrings
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 05 May 2017 01:41:54 +0530 |
parents | 52e222eef646 |
children | 6c0ae9683437 |
files | hgext/blackbox.py mercurial/cmdutil.py |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/blackbox.py Fri May 05 01:26:49 2017 +0530 +++ b/hgext/blackbox.py Fri May 05 01:41:54 2017 +0530 @@ -173,7 +173,7 @@ ui._bbinlog = True date = util.datestr(None, '%Y/%m/%d %H:%M:%S') user = util.getuser() - pid = str(util.getpid()) + pid = '%d' % util.getpid() formattedmsg = msg[0] % msg[1:] rev = '(unknown)' changed = ''
--- a/mercurial/cmdutil.py Fri May 05 01:26:49 2017 +0530 +++ b/mercurial/cmdutil.py Fri May 05 01:41:54 2017 +0530 @@ -1361,7 +1361,7 @@ if rev is None: jrev = jnode = 'null' else: - jrev = str(rev) + jrev = '%d' % rev jnode = '"%s"' % hex(ctx.node()) j = encoding.jsonescape @@ -1608,7 +1608,7 @@ if rev in results: ui.status(_("found revision %s from %s\n") % (rev, util.datestr(results[rev]))) - return str(rev) + return '%d' % rev raise error.Abort(_("revision matching date not found"))