##// END OF EJS Templates
templatekw: move shownames() helper to be sorted alphabetically...
Yuya Nishihara -
r27893:b42b2e86 default
parent child Browse files
Show More
@@ -413,6 +413,14 b' def showmanifest(**args):'
413 413 args.update({'rev': repo.manifest.rev(mnode), 'node': hex(mnode)})
414 414 return templ('manifest', **args)
415 415
416 def shownames(namespace, **args):
417 """helper method to generate a template keyword for a namespace"""
418 ctx = args['ctx']
419 repo = ctx.repo()
420 ns = repo.names[namespace]
421 names = ns.names(repo, ctx.node())
422 return showlist(ns.templatename, names, plural=namespace, **args)
423
416 424 def shownode(repo, ctx, templ, **args):
417 425 """:node: String. The changeset identification hash, as a 40 hexadecimal
418 426 digit string.
@@ -489,14 +497,6 b' def showsubrepos(**args):'
489 497 subrepos.append(sub) # removed in ctx
490 498 return showlist('subrepo', sorted(subrepos), **args)
491 499
492 def shownames(namespace, **args):
493 """helper method to generate a template keyword for a namespace"""
494 ctx = args['ctx']
495 repo = ctx.repo()
496 ns = repo.names[namespace]
497 names = ns.names(repo, ctx.node())
498 return showlist(ns.templatename, names, plural=namespace, **args)
499
500 500 # don't remove "showtags" definition, even though namespaces will put
501 501 # a helper function for "tags" keyword into "keywords" map automatically,
502 502 # because online help text is built without namespaces initialization
General Comments 0
You need to be logged in to leave comments. Login now