mercurial/templater.py
changeset 32154 52e222eef646
parent 32037 e5eab0fe69ee
child 32684 af854b1b36f8
--- a/mercurial/templater.py	Fri May 05 01:26:13 2017 +0530
+++ b/mercurial/templater.py	Fri May 05 01:26:49 2017 +0530
@@ -53,6 +53,7 @@
     """Parse a template expression into a stream of tokens, which must end
     with term if specified"""
     pos = start
+    program = pycompat.bytestr(program)
     while pos < end:
         c = program[pos]
         if c.isspace(): # skip inter-token whitespace