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

login
register
mail settings
Submitter phabricator
Date Feb. 14, 2018, 12:37 p.m.
Message ID <differential-rev-PHID-DREV-iorxid2geiz2ohywdis5-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27906/
State Superseded
Headers show

Comments

phabricator - Feb. 14, 2018, 12:37 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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: