HomePhabricator

templates: define a {onelinesummary} keyword

Authored by martinvonz.

Description

templates: define a {onelinesummary} keyword

It is sometimes useful to be able to use the configured
command-template.oneline-summary in higher-level templates. For
example, I would like to use it in an internal template that lists
commits in a "review unit" (kind of a pull request). This patch adds
support for that.

We may want to define a way of formatting a context using a
command-specific override (from
command-templates.oneline-summary.<command>), but that will have to
be a template function instead. I don't plan to do that, but I'm
mentioning it now in case reviewers would prefer that we use a no-arg
function (i.e. {onelinesummary()}) already today to prepare for
that.

Differential Revision: https://phab.mercurial-scm.org/D9314

Details

Committed
martinvonzThu, Nov 12, 5:07 PM
Differential Revision
D9314: templates: define a {onelinesummary} keyword
Parents
rHGa96456205061: relnotes: document new [command-templates] section
Branches
Unknown
Tags
Unknown