diff mercurial/revlog.py @ 31356:ef6888172437

revlog: extract first byte of revlog with a slice so it's portable
author Augie Fackler <augie@google.com>
date Sun, 12 Mar 2017 00:49:49 -0500
parents 08b34c3a6f74
children c233cbda5b1e
line wrap: on
line diff
--- a/mercurial/revlog.py	Sun Mar 12 00:46:59 2017 -0500
+++ b/mercurial/revlog.py	Sun Mar 12 00:49:49 2017 -0500
@@ -1521,7 +1521,7 @@
         #
         # According to `hg perfrevlogchunks`, this is ~0.5% faster for zlib
         # compressed chunks. And this matters for changelog and manifest reads.
-        t = data[0]
+        t = data[0:1]
 
         if t == 'x':
             try: