changeset 36646:463df2986814

py3: fix slicing of bytes in patch.iterhunks()
author Yuya Nishihara <yuya@tcha.org>
date Sat, 03 Mar 2018 14:21:47 -0500
parents 7bc33d677c0c
children 052351e3e1cd
files mercurial/patch.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/patch.py	Sat Mar 03 09:35:59 2018 -0500
+++ b/mercurial/patch.py	Sat Mar 03 14:21:47 2018 -0500
@@ -1852,7 +1852,7 @@
 
     for x in iter(lr.readline, ''):
         if state == BFILE and (
-            (not context and x[0] == '@')
+            (not context and x.startswith('@'))
             or (context is not False and x.startswith('***************'))
             or x.startswith('GIT binary patch')):
             gp = None