Mercurial > hg
diff mercurial/templatefuncs.py @ 44589:fc1fa3a07af6
templater: introduce wrapper for smartset (API)
I want to add a template function which takes a revset as an argument:
{somefunc(..., revset(...))}
^^^^^^^^^^^
evaluates to a revslist
This wrapper will provide a method to get an underlying smartset. It should
also be good for performance since count(revset(...)) will no longer have to
fully consume the smartset for example, but that isn't the point of this
change.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 15 Mar 2020 15:12:44 +0900 |
parents | fa246ada356b |
children | 1f81f680912f |
line wrap: on
line diff
--- a/mercurial/templatefuncs.py Fri Mar 20 23:30:23 2020 -0400 +++ b/mercurial/templatefuncs.py Sun Mar 15 15:12:44 2020 +0900 @@ -668,7 +668,7 @@ else: revs = query(raw) revsetcache[raw] = revs - return templatekw.showrevslist(context, mapping, b"revision", revs) + return templateutil.revslist(repo, revs, name=b'revision') @templatefunc(b'rstdoc(text, style)')