# HG changeset patch # User Yuya Nishihara # Date 2016-02-14 04:36:50 # Node ID 9dc340f51e06e84a33cf0e481068491c254c4a9b # Parent 41373244f4e519953635b4b4444ad6e50c7cce4f 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. diff --git a/mercurial/templater.py b/mercurial/templater.py --- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -329,7 +329,7 @@ def date(context, mapping, args): # 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]))