Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/patch.py @ 36230:eb91ffdaaece
py3: slice over bytes to prevent getting ascii values
Differential Revision: https://phab.mercurial-scm.org/D2271
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 14 Feb 2018 17:44:54 +0530 |
parents | a5cf79755eff |
children | 6ea0b78ddcac |
comparison
equal
deleted
inserted
replaced
36229:80301c90a2dc | 36230:eb91ffdaaece |
---|---|
1448 self.delta = True | 1448 self.delta = True |
1449 break | 1449 break |
1450 dec = [] | 1450 dec = [] |
1451 line = getline(lr, self.hunk) | 1451 line = getline(lr, self.hunk) |
1452 while len(line) > 1: | 1452 while len(line) > 1: |
1453 l = line[0] | 1453 l = line[0:1] |
1454 if l <= 'Z' and l >= 'A': | 1454 if l <= 'Z' and l >= 'A': |
1455 l = ord(l) - ord('A') + 1 | 1455 l = ord(l) - ord('A') + 1 |
1456 else: | 1456 else: |
1457 l = ord(l) - ord('a') + 27 | 1457 l = ord(l) - ord('a') + 27 |
1458 try: | 1458 try: |