Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 33015:f66be4caeaab
py3: use "%d" % val for int rather than pycompat.bytestr
Earlier I used pycompat.bytestr() to convert integers to bytes, but we can do
b"%d" % val to convert that int to bytes. b'' is already added by the
transformer.
Thanks to Yuya for suggesting this.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 22 Jun 2017 01:29:07 +0530 |
parents | f5f4c72de71a |
children | 3e102a8dd52c |
line wrap: on
line diff
--- a/mercurial/commands.py Fri Jun 23 10:59:05 2017 -0700 +++ b/mercurial/commands.py Thu Jun 22 01:29:07 2017 +0530 @@ -2774,8 +2774,7 @@ ('+'.join([hexfunc(p.node()) for p in parents]), changed)] if num: output.append("%s%s" % - ('+'.join([pycompat.bytestr(p.rev()) for p in parents]), - changed)) + ('+'.join(["%d" % p.rev() for p in parents]), changed)) else: if default or id: output = [hexfunc(ctx.node())]