[PATCH 05 of 11 V2] templatekw: introduce obsfate keyword

Yuya Nishihara yuya at tcha.org
Thu Oct 12 09:51:21 EDT 2017


On Thu, 12 Oct 2017 15:29:31 +0200, Boris Feld wrote:
> On Wed, 2017-10-11 at 22:24 +0900, Yuya Nishihara wrote:
> > Ugh, there's templatekw.defaulttempl which provides the default
> > template
> > fragments to all stock/user templates. Maybe we can (ab)use it to
> > define
> > the default '{obsfate}' template.
> > 
> > I'm so sorry I didn't mention it before. It totally slipped my mind.
> 
> I saw templatekw.defaulttempl when working in this series but it felt
> like a big hack.
> 
> I tried to limit the number of places where obsfate is defined, this
> series already adds two obsfate definitions/implementations, the
> changeset_printer and lobsfate in the default mapfile. I thought adding
> a third one in defaulttempl would complicate the potential update of
> obsfate output format.
> 
> I'm not an expert in the template engine, what benefits do you see in
> putting the obsfate definition in templatekw.defaulttempl?

That's more close to the end goal, right? We started off with a couple of
building blocks to define {obsfate} in user template, because we don't want
a monolithic {obsfate} keyword.

It would be nice if we could add "obsfate" to map-cmdline.default, which
is the right way to define log templates, but IIRC you said you also wanted
to reuse it in any user templates. So using defaulttempl seemed less bad.


More information about the Mercurial-devel mailing list