Mercurial > hg
changeset 39616:5a2bf7f941fa
py3: slice through bytes to prevent getting ascii value
I still don't know why python-dev thought it was a nice idea to do this.
Differential Revision: https://phab.mercurial-scm.org/D4589
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Fri, 14 Sep 2018 23:59:41 +0300 |
parents | a658f97c1ce4 |
children | c8e371ee65a4 |
files | mercurial/patch.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/patch.py Thu Sep 13 16:22:53 2018 -0400 +++ b/mercurial/patch.py Fri Sep 14 23:59:41 2018 +0300 @@ -2431,9 +2431,9 @@ a = '' b = '' for line in hunklines: - if line[0] == '-': + if line[0:1] == '-': a += line[1:] - elif line[0] == '+': + elif line[0:1] == '+': b += line[1:] else: raise error.ProgrammingError('unexpected hunk line: %s' % line)