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
--- 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)