Mercurial > hg
changeset 28334:9dc340f51e06
templater: make date() use helper function to evaluate argument
A date argument should never be a generator, but using evalfuncarg() should
be good for consistency.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 14 Feb 2016 13:36:50 +0900 |
parents | 41373244f4e5 |
children | 515018f64c41 |
files | mercurial/templater.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/templater.py Sun Feb 14 00:27:09 2016 +0900 +++ b/mercurial/templater.py Sun Feb 14 13:36:50 2016 +0900 @@ -329,7 +329,7 @@ # i18n: "date" is a keyword raise error.ParseError(_("date expects one or two arguments")) - date = args[0][0](context, mapping, args[0][1]) + date = evalfuncarg(context, mapping, args[0]) fmt = None if len(args) == 2: fmt = stringify(args[1][0](context, mapping, args[1][1]))