Mercurial > hg
changeset 34203:3a5d8e2996f8
exchange: use '%d' % x instead of str(x) to encode ints
Recommended by Yuya instead of using pycompat.bytestr() in this case.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Tue, 22 Aug 2017 21:21:13 -0400 |
parents | d47749807464 |
children | bab82c43c065 |
files | mercurial/exchange.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/exchange.py Fri Sep 15 19:44:32 2017 -0400 +++ b/mercurial/exchange.py Tue Aug 22 21:21:13 2017 -0400 @@ -791,8 +791,8 @@ part = bundler.newpart('pushkey') part.addparam('namespace', enc('phases')) part.addparam('key', enc(newremotehead.hex())) - part.addparam('old', enc(str(phases.draft))) - part.addparam('new', enc(str(phases.public))) + part.addparam('old', enc('%d' % phases.draft)) + part.addparam('new', enc('%d' % phases.public)) part2node.append((part.id, newremotehead)) pushop.pkfailcb[part.id] = handlefailure