comparison mercurial/patch.py @ 40282:e4f82db071a4

py3: fix test-diff-color.t Differential Revision: https://phab.mercurial-scm.org/D5095
author Mark Thomas <mbthomas@fb.com>
date Sun, 14 Oct 2018 09:24:36 +0000
parents 5a2bf7f941fa
children 876494fd967d
comparison
equal deleted inserted replaced
40281:29b0e9cd02f4 40282:e4f82db071a4
2478 endofline = token[len(chomp):] 2478 endofline = token[len(chomp):]
2479 token = chomp.rstrip() # detect spaces at the end 2479 token = chomp.rstrip() # detect spaces at the end
2480 endspaces = chomp[len(token):] 2480 endspaces = chomp[len(token):]
2481 # scan tabs 2481 # scan tabs
2482 for maybetab in tabsplitter.findall(token): 2482 for maybetab in tabsplitter.findall(token):
2483 if '\t' == maybetab[0]: 2483 if b'\t' == maybetab[0:1]:
2484 currentlabel = 'diff.tab' 2484 currentlabel = 'diff.tab'
2485 else: 2485 else:
2486 if changed: 2486 if changed:
2487 currentlabel = label + '.changed' 2487 currentlabel = label + '.changed'
2488 else: 2488 else: