D5607: shallowutil: slice off a byte instead of subscripting

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Wed Jan 16 12:21:48 EST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd08c816a11d3: shallowutil: slice off a byte instead of subscripting (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5607?vs=13267&id=13287

REVISION DETAIL
  https://phab.mercurial-scm.org/D5607

AFFECTED FILES
  hgext/remotefilelog/shallowutil.py

CHANGE DETAILS

diff --git a/hgext/remotefilelog/shallowutil.py b/hgext/remotefilelog/shallowutil.py
--- a/hgext/remotefilelog/shallowutil.py
+++ b/hgext/remotefilelog/shallowutil.py
@@ -121,7 +121,7 @@
     offset = 0
     buflen = len(metabuf)
     while buflen - offset >= 3:
-        key = metabuf[offset]
+        key = metabuf[offset:offset + 1]
         offset += 1
         metalen = struct.unpack_from('!H', metabuf, offset)[0]
         offset += 2



To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel


More information about the Mercurial-devel mailing list