revlog: extract first byte of revlog with a slice so it's portable
authorAugie Fackler <augie@google.com>
Sun, 12 Mar 2017 00:49:49 -0500
changeset 31356 ef6888172437
parent 31355 77270ec0cdd9
child 31357 c233cbda5b1e
revlog: extract first byte of revlog with a slice so it's portable
mercurial/revlog.py
--- 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: