diff mercurial/help.py @ 9536:f04d17912441

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>
author Mads Kiilerich <mads@kiilerich.com>
date Sat, 03 Oct 2009 18:31:20 +0200
parents bb7e2cdd4854
children c904e76e3834
line wrap: on
line diff
--- a/mercurial/help.py	Sat Oct 03 23:38:10 2009 +0200
+++ b/mercurial/help.py	Sat Oct 03 18:31:20 2009 +0200
@@ -393,6 +393,9 @@
                 number.
     :tags:      List of strings. Any tags associated with the
                 changeset.
+    :latesttag: String. Most recent global tag in the ancestors of this
+                changeset.
+    :latesttagdistance: Integer. Longest path to the latest tag.
 
     The "date" keyword does not produce human-readable output. If you
     want to use a date in your output, you can use a filter to process