##// END OF EJS Templates
templatekw: add {changes}, {distance} and {tag} to the {latesttag} keyword
Matt Harbison -
r26486:8a732c32 default
parent child Browse files
Show More
@@ -344,11 +344,7 b' def showlatesttag(**args):'
344 """:latesttag: List of strings. The global tags on the most recent globally
344 """:latesttag: List of strings. The global tags on the most recent globally
345 tagged ancestor of this changeset.
345 tagged ancestor of this changeset.
346 """
346 """
347 repo, ctx = args['repo'], args['ctx']
347 return showlatesttags(None, **args)
348 cache = args['cache']
349 latesttags = getlatesttags(repo, ctx, cache)[2]
350
351 return showlist('latesttag', latesttags, separator=':', **args)
352
348
353 def showlatesttags(pattern, **args):
349 def showlatesttags(pattern, **args):
354 """helper method for the latesttag keyword and function"""
350 """helper method for the latesttag keyword and function"""
@@ -2690,6 +2690,19 b' Merged tag overrides:'
2690 1: t1+0
2690 1: t1+0
2691 0: null+1
2691 0: null+1
2692
2692
2693 $ hg log --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n"
2694 10: t5+5,5
2695 9: t5+4,4
2696 8: t5+3,3
2697 7: t5+2,2
2698 6: t5+1,1
2699 5: t5+0,0
2700 4: at3+1,1 t3+1,1
2701 3: at3+0,0 t3+0,0
2702 2: t2+0,0
2703 1: t1+0,0
2704 0: null+1,1
2705
2693 $ hg log --template "{rev}: {latesttag('re:^t[13]$') % '{tag}, C: {changes}, D: {distance}'}\n"
2706 $ hg log --template "{rev}: {latesttag('re:^t[13]$') % '{tag}, C: {changes}, D: {distance}'}\n"
2694 10: t3, C: 8, D: 7
2707 10: t3, C: 8, D: 7
2695 9: t3, C: 7, D: 6
2708 9: t3, C: 7, D: 6
General Comments 0
You need to be logged in to leave comments. Login now