[PATCH 3 of 5] templatekw: introduce showlatesttags() to handle {latesttag} keywords

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sun Oct 4 19:13:56 CDT 2015



On 10/04/2015 02:47 PM, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1440472020 14400
> #      Mon Aug 24 23:07:00 2015 -0400
> # Node ID 18044dbb9f7ea8f3d015fed7c49f3ad24d8027ac
> # Parent  1df0499bb7e527cab3a15114a549e40842abee37
> templatekw: introduce showlatesttags() to handle {latesttag} keywords
>
> The keywords {changes}, {distance} and {tag} will be available on a future
> template method that will allow pattern matching against tag names.  For
> consistency, these should be available on the existing {latesttag} keyword as
> well.
>
> I debated whether or not to add {tag} instead of just continuing with the
> existing {latesttag}.  But it seems clearer not to have the same name for two
> distinct things (a list in the LHS of %, and an individual tag value on the
> right).
>
> The value of latesttags[0] is the date of commit for the cset to which the tag
> is applied (i.e. not the date the tag was applied), and therefore isn't made
> visible because it doesn't seem interesting.  It appears that this is merely an
> internal implementation detail for sorting csets in a stable manner when there
> are different branches.

This piece of information should probably be in the code as an inline 
comment (can be a followup)

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list