Patchwork D5607: shallowutil: slice off a byte instead of subscripting

login
register
mail settings
Submitter phabricator
Date Jan. 16, 2019, 5:21 p.m.
Message ID <33cb3e0f9639519026eed47b9c567445@localhost.localdomain>
Download mbox | patch
Permalink /patch/37825/
State Not Applicable
Headers show

Comments

phabricator - Jan. 16, 2019, 5:21 p.m.
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




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

Patch

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