Page MenuHomePhabricator

templates: define a {onelinesummary} keyword
ClosedPublic

Authored by martinvonz on Thu, Nov 12, 5:32 PM.

Details

Summary

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 usea no-arg
function (i.e. {onelinesummary()}) already today to prepare for
that.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Thu, Nov 12, 5:32 PM
martinvonz edited the summary of this revision. (Show Details)Mon, Nov 16, 12:35 PM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.