comparison mercurial/patch.py @ 36675: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 c6061cadb400
children c6a61298ac32
comparison
equal deleted inserted replaced
36674:7bc33d677c0c 36675:463df2986814
1850 context = None 1850 context = None
1851 lr = linereader(fp) 1851 lr = linereader(fp)
1852 1852
1853 for x in iter(lr.readline, ''): 1853 for x in iter(lr.readline, ''):
1854 if state == BFILE and ( 1854 if state == BFILE and (
1855 (not context and x[0] == '@') 1855 (not context and x.startswith('@'))
1856 or (context is not False and x.startswith('***************')) 1856 or (context is not False and x.startswith('***************'))
1857 or x.startswith('GIT binary patch')): 1857 or x.startswith('GIT binary patch')):
1858 gp = None 1858 gp = None
1859 if (gitpatches and 1859 if (gitpatches and
1860 gitpatches[-1].ispatching(afile, bfile)): 1860 gitpatches[-1].ispatching(afile, bfile)):