Mercurial > public > mercurial-scm > hg
diff mercurial/templateutil.py @ 38449:bc8d925342f0
templater: extend filter() to accept template expression for emptiness test
This utilizes the pass-by-name nature of template arguments.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 14 Jun 2018 23:10:14 +0900 |
parents | dae829b4de78 |
children | 382b055cc358 |
line wrap: on
line diff
--- a/mercurial/templateutil.py Thu Jun 14 22:33:26 2018 +0900 +++ b/mercurial/templateutil.py Thu Jun 14 23:10:14 2018 +0900 @@ -415,6 +415,7 @@ raise error.ParseError(_('not comparable')) def filter(self, context, mapping, select): + # implement if necessary; we'll need a wrapped type for a mapping dict raise error.ParseError(_('not filterable without template')) def join(self, context, mapping, sep):