Mercurial > hg-stable
changeset 36575:14bbb54a9c5b
py3: fix type of string literals in templater.tokenize()
# skip-blame because just b'' prefixes
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 01 Mar 2018 16:56:38 -0500 |
parents | ab7f86a748e6 |
children | 7840d8bd0558 |
files | mercurial/templater.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/templater.py Thu Mar 01 16:52:17 2018 -0500 +++ b/mercurial/templater.py Thu Mar 01 16:56:38 2018 -0500 @@ -98,8 +98,8 @@ pos += 1 yield ('integer', program[s:pos], s) pos -= 1 - elif (c == '\\' and program[pos:pos + 2] in (r"\'", r'\"') - or c == 'r' and program[pos:pos + 3] in (r"r\'", r'r\"')): + elif (c == '\\' and program[pos:pos + 2] in (br"\'", br'\"') + or c == 'r' and program[pos:pos + 3] in (br"r\'", br'r\"')): # handle escaped quoted strings for compatibility with 2.9.2-3.4, # where some of nested templates were preprocessed as strings and # then compiled. therefore, \"...\" was allowed. (issue4733)