comparison mercurial/patch.py @ 36447:588048a6a8d3

py3: slice over bytes or use .startswith() to prevent getting ascii values Differential Revision: https://phab.mercurial-scm.org/D2457
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 26 Feb 2018 17:25:46 +0530
parents 2831d918e1b4
children c6061cadb400
comparison
equal deleted inserted replaced
36446:3d58037c6ec0 36447:588048a6a8d3
2516 lines[matches[i]].rstrip(), 2516 lines[matches[i]].rstrip(),
2517 label): 2517 label):
2518 yield (t, l) 2518 yield (t, l)
2519 else: 2519 else:
2520 for token in tabsplitter.findall(stripline): 2520 for token in tabsplitter.findall(stripline):
2521 if '\t' == token[0]: 2521 if token.startswith('\t'):
2522 yield (token, 'diff.tab') 2522 yield (token, 'diff.tab')
2523 else: 2523 else:
2524 yield (token, label) 2524 yield (token, label)
2525 else: 2525 else:
2526 yield (stripline, label) 2526 yield (stripline, label)