[PATCH 6 of 6] changeset_templater: render template specified by templatespec tuple
Yuya Nishihara
yuya at tcha.org
Fri Jun 16 16:41:01 UTC 2017
On Fri, 16 Jun 2017 09:59:14 -0600, Gregory Szorc wrote:
> Your changes look great and I'll rebase my work. But now I wonder if we'll conflict with each other going forward. Here's what I was doing:
>
> * allow changeset_templater to be constructed from a templater instance (show already has one loaded from a map file)
That's probably okay, but I think "show" shouldn't create a formatter when
changeset_templater is needed. Creating formatter (or changeset_templater)
may have a side effect such as printing a document header.
> * allows specifying a prefix for template names so multiple *changeset keys can be defined in the same map file
Yeah, I was thinking about that. The current API isn't the best for "show",
but perhaps that can be doable by passing result of
lookuptemplate(ui, 'showwork', opts['template']) to changeset_templater.
> My goal is to get show using the full map file based templater so other templates in the file can be referenced so there isn't a lot of duplication and long templates. I also wanted to facilitate variations of the changeset templates within the same map file.
>
> You are the domain expert here, so if I beat you to a patchbomb, I'd encourage others to wait for Yuya's series, as it will probably be better.
Anyway, templater patches will be reviewed by me. ;)
More information about the Mercurial-devel
mailing list