diff 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
line wrap: on
line diff
--- a/mercurial/patch.py	Mon Feb 26 16:23:12 2018 +0530
+++ b/mercurial/patch.py	Mon Feb 26 17:25:46 2018 +0530
@@ -2518,7 +2518,7 @@
                                 yield (t, l)
                         else:
                             for token in tabsplitter.findall(stripline):
-                                if '\t' == token[0]:
+                                if token.startswith('\t'):
                                     yield (token, 'diff.tab')
                                 else:
                                     yield (token, label)