[PATCH 7 of 8] py3: pass the memoryview object into bytes() to get the value

Pulkit Goyal 7895pulkit at gmail.com
Mon Jun 26 15:55:28 EDT 2017


# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1498501669 -19800
#      Mon Jun 26 23:57:49 2017 +0530
# Node ID e53b2097c1368e99088dc573225dd02b05dc5b0f
# Parent  576285090908583dac2a55826f0614f532bd19b1
py3: pass the memoryview object into bytes() to get the value

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -1818,7 +1818,7 @@
         # Obtain data on the raw chunks in the revlog.
         segment = r._getsegmentforrevs(rev, rev)[1]
         if segment:
-            chunktype = segment[0]
+            chunktype = bytes(segment[0:1])
         else:
             chunktype = 'empty'
 


More information about the Mercurial-devel mailing list