comparison mercurial/templatekw.py @ 23611:d69a7fc68ad5

templatekw: remove unneeded showtags Now that we have the machinery of namespaces in-place, we use that instead of hand-rolling our own template function. Note, this can only be used for tags because both branches and bookmarks have special case logic for 'default' and the current bookmark (which is something outside the namespace api for now).
author Sean Farley <sean.michael.farley@gmail.com>
date Mon, 15 Dec 2014 09:40:02 -0800
parents 40fcf6c05217
children b56400eeefaf
comparison
equal deleted inserted replaced
23610:9266d1dd6a6e 23611:d69a7fc68ad5
372 for sub in psubstate: 372 for sub in psubstate:
373 if sub not in substate: 373 if sub not in substate:
374 subrepos.append(sub) # removed in ctx 374 subrepos.append(sub) # removed in ctx
375 return showlist('subrepo', sorted(subrepos), **args) 375 return showlist('subrepo', sorted(subrepos), **args)
376 376
377 def showtags(**args):
378 """:tags: List of strings. Any tags associated with the changeset."""
379 return showlist('tag', args['ctx'].tags(), **args)
380
381 def shownames(namespace, **args): 377 def shownames(namespace, **args):
382 """helper method to generate a template keyword for a namespace""" 378 """helper method to generate a template keyword for a namespace"""
383 ctx = args['ctx'] 379 ctx = args['ctx']
384 repo = ctx._repo 380 repo = ctx._repo
385 names = repo.names.names(repo, namespace, ctx.node()) 381 names = repo.names.names(repo, namespace, ctx.node())
422 'p2node': showp2node, 418 'p2node': showp2node,
423 'phase': showphase, 419 'phase': showphase,
424 'phaseidx': showphaseidx, 420 'phaseidx': showphaseidx,
425 'rev': showrev, 421 'rev': showrev,
426 'subrepos': showsubrepos, 422 'subrepos': showsubrepos,
427 'tags': showtags,
428 } 423 }
429 424
430 def _showparents(**args): 425 def _showparents(**args):
431 """:parents: List of strings. The parents of the changeset in "rev:node" 426 """:parents: List of strings. The parents of the changeset in "rev:node"
432 format. If the changeset has only one "natural" parent (the predecessor 427 format. If the changeset has only one "natural" parent (the predecessor