Mercurial > public > mercurial-scm > hg-stable
diff mercurial/templater.py @ 34088:f55769e41803
py3: use bytes[n:n + 1] to get bytes in templater._parsetemplate()
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 03 Sep 2017 17:37:17 +0900 |
parents | c35c0f54f420 |
children | 7bbc4e113e5f |
line wrap: on
line diff
--- a/mercurial/templater.py Sun Sep 03 17:14:53 2017 +0900 +++ b/mercurial/templater.py Sun Sep 03 17:37:17 2017 +0900 @@ -169,7 +169,7 @@ parsed.append(('string', parser.unescapestr(tmpl[pos:stop]))) pos = stop break - c = tmpl[n] + c = tmpl[n:n + 1] bs = (n - pos) - len(tmpl[pos:n].rstrip('\\')) if bs % 2 == 1: # escaped (e.g. '\{', '\\\{', but not '\\{')