# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2018-02-14 12:14:54 # Node ID eb91ffdaaece6596fef9391a203f03442f39446b # Parent 80301c90a2dc2eca8089873d4057f4e62056a166 py3: slice over bytes to prevent getting ascii values Differential Revision: https://phab.mercurial-scm.org/D2271 diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -1450,7 +1450,7 @@ class binhunk(object): dec = [] line = getline(lr, self.hunk) while len(line) > 1: - l = line[0] + l = line[0:1] if l <= 'Z' and l >= 'A': l = ord(l) - ord('A') + 1 else: