[PATCH 2 of 2] py3: fix the way we produce bytes list in store.py
Augie Fackler
raf at durin42.com
Thu Feb 9 21:50:39 EST 2017
On Wed, Feb 08, 2017 at 11:23:46PM +0530, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit at gmail.com>
> # Date 1486490137 -19800
> # Tue Feb 07 23:25:37 2017 +0530
> # Node ID 47e72d467dd8da66092ca6b6a91235d8432e2dc1
> # Parent 61c589c75ebbce625d7056297e122863b68acce9
> py3: fix the way we produce bytes list in store.py
Queued these, thanks.
>
> bytes(range(127)) does not produce a list whereas we need a list. This patch
> fixes that.
>
> diff -r 61c589c75ebb -r 47e72d467dd8 mercurial/store.py
> --- a/mercurial/store.py Tue Feb 07 22:47:24 2017 +0530
> +++ b/mercurial/store.py Tue Feb 07 23:25:37 2017 +0530
> @@ -101,7 +101,7 @@
> e = '_'
> if pycompat.ispy3:
> xchr = lambda x: bytes([x])
> - asciistr = bytes(xrange(127))
> + asciistr = [bytes(a) for a in range(127)]
> else:
> xchr = chr
> asciistr = map(chr, xrange(127))
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list