cmdutil: templating keywords latesttag and latesttagdistance
This can be used for referring to revisions in a reasonable
meaningful, stable and monotonically increasing way, suitable for
releases or builds directly from a repository.
The latest tag is found by searching through untagged ancestors and
finding the latest tagged ancestor based on tag date. The distance is
found from the length of the longest path to the tagged revision.
For example:
hg log -l1 --template '{latesttag}+{latesttagdistance}\n'
can return
1.3.1+197
This is mostly work by Gilles Moris <gilles.moris@free.fr>