Patchwork D2271: py3: slice over bytes to prevent getting ascii values

login
register
mail settings
Submitter phabricator
Date Feb. 14, 2018, 1:43 p.m.
Message ID <26fe40fe983513706f2e2a32cdee93f5@localhost.localdomain>
Download mbox | patch
Permalink /patch/27925/
State Not Applicable
Headers show

Comments

phabricator - Feb. 14, 2018, 1:43 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGeb91ffdaaece: py3: slice over bytes to prevent getting ascii values (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2271?vs=5711&id=5724

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

AFFECTED FILES
  mercurial/patch.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -1450,7 +1450,7 @@ 
         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: