On Sat, 2017-10-14 at 14:58 +0900, Yuya Nishihara wrote: > On Fri, 13 Oct 2017 20:00:32 +0200, Boris Feld wrote: > > On Thu, 2017-10-12 at 22:51 +0900, Yuya Nishihara wrote: > > > 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. > > > > I thought that keywords defined in map-cmdline.default were not > > available in user-defined templates, I need to check that. > > map-cmdline.default is not, but defaulttempl is. You need to %include > a > map file to share some bits. > > > One thing that I would like is for the default obsfate templatekw > > to be > > verbosity dependent, both in changing the fields that are shown (no > > date except in verbose mode) and the content of the fields > > themselves > > (if current user is the only one that touched a changeset and not > > in > > verbose mode, don't show users). > > > > Is it possible to have this verbosity dependent logic with > > templates? > > Maybe we can add {verbosity} keyword which returns > ''/quiet/verbose/debug.
I think that a good idea. Could we queue obsfate in the current state and I will send a series that defines verbosity keyword and update obsfate templatekw to use it? _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel