##// END OF EJS Templates
templatekw: introduce showlatesttags() to handle {latesttag} keywords...
Matt Harbison -
r26484:93c80e7e default
parent child Browse files
Show More
@@ -350,6 +350,26 b' def showlatesttag(**args):'
350
350
351 return showlist('latesttag', latesttags, separator=':', **args)
351 return showlist('latesttag', latesttags, separator=':', **args)
352
352
353 def showlatesttags(pattern, **args):
354 """helper method for the latesttag keyword and function"""
355 repo, ctx = args['repo'], args['ctx']
356 cache = args['cache']
357 latesttags = getlatesttags(repo, ctx, cache, pattern)
358
359 # latesttag[0] is an implementation detail for sorting csets on different
360 # branches in a stable manner- it is the date the tagged cset was created,
361 # not the date the tag was created. Therefore it isn't made visible here.
362 makemap = lambda v: {
363 'changes': _showchangessincetag,
364 'distance': latesttags[1],
365 'latesttag': v, # BC with {latesttag % '{latesttag}'}
366 'tag': v
367 }
368
369 tags = latesttags[2]
370 f = _showlist('latesttag', tags, separator=':', **args)
371 return _hybrid(f, tags, makemap, lambda x: x['latesttag'])
372
353 def showlatesttagdistance(repo, ctx, templ, cache, **args):
373 def showlatesttagdistance(repo, ctx, templ, cache, **args):
354 """:latesttagdistance: Integer. Longest path to the latest tag."""
374 """:latesttagdistance: Integer. Longest path to the latest tag."""
355 return getlatesttags(repo, ctx, cache)[1]
375 return getlatesttags(repo, ctx, cache)[1]
General Comments 0
You need to be logged in to leave comments. Login now