comparison 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
comparison
equal deleted inserted replaced
9535:75d290db2df6 9536:f04d17912441
391 :parents: List of strings. The parents of the changeset. 391 :parents: List of strings. The parents of the changeset.
392 :rev: Integer. The repository-local changeset revision 392 :rev: Integer. The repository-local changeset revision
393 number. 393 number.
394 :tags: List of strings. Any tags associated with the 394 :tags: List of strings. Any tags associated with the
395 changeset. 395 changeset.
396 :latesttag: String. Most recent global tag in the ancestors of this
397 changeset.
398 :latesttagdistance: Integer. Longest path to the latest tag.
396 399
397 The "date" keyword does not produce human-readable output. If you 400 The "date" keyword does not produce human-readable output. If you
398 want to use a date in your output, you can use a filter to process 401 want to use a date in your output, you can use a filter to process
399 it. Filters are functions which return a string based on the input 402 it. Filters are functions which return a string based on the input
400 variable. You can also use a chain of filters to get the desired 403 variable. You can also use a chain of filters to get the desired