Mercurial > public > mercurial-scm > hg-stable
diff mercurial/templater.py @ 44597: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 | 5be909dbe385 |
children | e2ec36167151 |
line wrap: on
line diff
--- a/mercurial/templater.py Fri Mar 20 23:30:23 2020 -0400 +++ b/mercurial/templater.py Sun Mar 15 15:12:44 2020 +0900 @@ -45,6 +45,9 @@ hybriditem represents a scalar printable value, also supports % operator. +revslist + represents a list of revision numbers. + mappinggenerator, mappinglist represents mappings (i.e. a list of dicts), which may have default output format.