Mercurial > hg > mercurial-source
diff mercurial/templater.py @ 32629:f0d719e513fc
templatekw: clarify the result of {latesttag} when no tag exists
My initial expectation was that the list would be empty, and therefore
detectable with {if()}. The map for {latesttag()} is populated with real values
in this case (except {tag}), so it probably doesn't make any sense to change
this to an empty list.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 09 Apr 2017 00:10:54 -0400 (2017-04-09) |
parents | e6eb86b154c5 |
children | a0f2d83f8083 |
line wrap: on
line diff
--- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -719,7 +719,9 @@ @templatefunc('latesttag([pattern])') def latesttag(context, mapping, args): """The global tags matching the given pattern on the - most recent globally tagged ancestor of this changeset.""" + most recent globally tagged ancestor of this changeset. + If no such tags exist, the "{tag}" template resolves to + the string "null".""" if len(args) > 1: # i18n: "latesttag" is a keyword raise error.ParseError(_("latesttag expects at most one argument"))