Mercurial > hg
diff tests/test-command-template.out @ 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 | b24290c72a1d |
children | 2c7ea49d2512 8ebb34b0f6f7 |
line wrap: on
line diff
--- a/tests/test-command-template.out Sat Oct 03 23:38:10 2009 +0200 +++ b/tests/test-command-template.out Sat Oct 03 18:31:20 2009 +0200 @@ -672,4 +672,55 @@ 1e4e1b8f71e05681d422154f5421e385fec3454f # error on syntax abort: t:3: unmatched quotes +# latesttag +adding file +adding head1 +adding head2 +created new head +# No tag set +5: null+5 +4: null+4 +3: null+3 +2: null+3 +1: null+2 +0: null+1 +# one common tag: longuest path wins +6: t1+4 +5: t1+3 +4: t1+2 +3: t1+1 +2: t1+1 +1: t1+0 +0: null+1 +# one ancestor tag: more recent wins +7: t2+3 +6: t2+2 +5: t2+1 +4: t1+2 +3: t1+1 +2: t2+0 +1: t1+0 +0: null+1 +# two branch tags: more recent wins +8: t3+5 +7: t3+4 +6: t3+3 +5: t3+2 +4: t3+1 +3: t3+0 +2: t2+0 +1: t1+0 +0: null+1 +# merged tag overrides +10: t5+5 +9: t5+4 +8: t5+3 +7: t5+2 +6: t5+1 +5: t5+0 +4: at3:t3+1 +3: at3:t3+0 +2: t2+0 +1: t1+0 +0: null+1 # done