[PATCH 2 of 8 py3] bundles: turn nbchanges int into a bytestr using pycompat.bytestr
Augie Fackler
raf at durin42.com
Sat Sep 16 11:10:36 EDT 2017
> On Sep 16, 2017, at 7:54 AM, Yuya Nishihara <yuya at tcha.org> wrote:
>
> On Fri, 15 Sep 2017 19:14:05 -0400, Augie Fackler wrote:
>> # HG changeset patch
>> # User Augie Fackler <raf at durin42.com>
>> # Date 1505515116 14400
>> # Fri Sep 15 18:38:36 2017 -0400
>> # Node ID 43b1c3ab1d6a4af1ea86f4e9d676d52740782895
>> # Parent 662bbd6d96952985eff807f424dd128663724672
>> bundles: turn nbchanges int into a bytestr using pycompat.bytestr
>>
>> Fixes some python 3 failures.
>>
>> diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
>> --- a/mercurial/bundle2.py
>> +++ b/mercurial/bundle2.py
>> @@ -1448,7 +1448,7 @@ def _addpartsfromopts(ui, repo, bundler,
>> part = bundler.newpart('changegroup', data=cg.getchunks())
>> part.addparam('version', cg.version)
>> if 'clcount' in cg.extras:
>> - part.addparam('nbchanges', str(cg.extras['clcount']),
>> + part.addparam('nbchanges', pycompat.bytestr(cg.extras['clcount']),
>
> '%d' is preferred.
Some day I’ll remember. Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170916/b97de0ef/attachment.html>
More information about the Mercurial-devel
mailing list