[PATCH 2 of 2] py3: fix the way we produce bytes list in store.py

Pulkit Goyal 7895pulkit at gmail.com
Wed Feb 8 12:53:46 EST 2017


# 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

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))


More information about the Mercurial-devel mailing list