[PATCH 2 of 3] py3: use pycompat.bytestr() instead of str()

Yuya Nishihara yuya at tcha.org
Sun Jun 11 03:37:32 UTC 2017


On Sat, 10 Jun 2017 13:51:54 +0530, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit at gmail.com>
> # Date 1496863306 -19800
> #      Thu Jun 08 00:51:46 2017 +0530
> # Node ID 36150d28b8a1d517c531542476329b47c18f49c2
> # Parent  297af7b6e217a340420566daf960dad2dbe5d0a1
> py3: use pycompat.bytestr() instead of str()
> 
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -2883,12 +2883,13 @@
>                    ('+'.join([hexfunc(p.node()) for p in parents]), changed)]
>              if num:
>                  output.append("%s%s" %
> -                  ('+'.join([str(p.rev()) for p in parents]), changed))
> +                  ('+'.join([pycompat.bytestr(p.rev()) for p in parents]),
> +                                                                    changed))

Perhaps '%d' % p.rev() can be used instead.



More information about the Mercurial-devel mailing list