mercurial/templater.py
changeset 35680 077ee15b8493
parent 35588 dadbf213a765
child 35744 8685192a8733
--- a/mercurial/templater.py	Fri Jul 14 19:59:10 2017 +0200
+++ b/mercurial/templater.py	Tue Jan 16 21:42:42 2018 +0900
@@ -184,6 +184,8 @@
             return parsed, n + 1
 
         parseres, pos = p.parse(tokenize(tmpl, n + 1, stop, '}'))
+        if not tmpl.endswith('}', n + 1, pos):
+            raise error.ParseError(_("invalid token"), pos)
         parsed.append(parseres)
 
     if quote: