# HG changeset patch # User Yuya Nishihara # Date 2017-09-09 10:01:18 # Node ID e473f482b9b39038e754cc847c7ca5ccea92c2d5 # Parent 6c7aaf59b21eea6bb50653b026ac47b0620e8e36 templater: use helper function to get name of non-iterable keyword diff --git a/mercurial/templater.py b/mercurial/templater.py --- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -423,8 +423,9 @@ def runmap(context, mapping, data): try: diter = iter(d) except TypeError: - if func is runsymbol: - raise error.ParseError(_("keyword '%s' is not iterable") % data) + sym = findsymbolicname((func, data)) + if sym: + raise error.ParseError(_("keyword '%s' is not iterable") % sym) else: raise error.ParseError(_("%r is not iterable") % d)