comparison mercurial/hgweb/webcommands.py @ 37510:876d54f800cf

hgweb: wrap {labels} by hybridlist() This one is a simple list of strings, which can support map operation.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 01 Apr 2018 22:20:44 +0900
parents 448f7ec247e2
children aac97d043e6d
comparison
equal deleted inserted replaced
37509:cb7b275c0cd0 37510:876d54f800cf
763 end = min(count, start + web.maxchanges) 763 end = min(count, start + web.maxchanges)
764 764
765 desc = web.config("web", "description") 765 desc = web.config("web", "description")
766 if not desc: 766 if not desc:
767 desc = 'unknown' 767 desc = 'unknown'
768 labels = web.configlist('web', 'labels')
768 769
769 return web.sendtemplate( 770 return web.sendtemplate(
770 'summary', 771 'summary',
771 desc=desc, 772 desc=desc,
772 owner=get_contact(web.config) or 'unknown', 773 owner=get_contact(web.config) or 'unknown',
777 shortlog=templateutil.mappinggenerator(changelist, 778 shortlog=templateutil.mappinggenerator(changelist,
778 name='shortlogentry'), 779 name='shortlogentry'),
779 node=tip.hex(), 780 node=tip.hex(),
780 symrev='tip', 781 symrev='tip',
781 archives=web.archivelist('tip'), 782 archives=web.archivelist('tip'),
782 labels=web.configlist('web', 'labels')) 783 labels=templateutil.hybridlist(labels, name='label'))
783 784
784 @webcommand('filediff') 785 @webcommand('filediff')
785 def filediff(web): 786 def filediff(web):
786 """ 787 """
787 /diff/{revision}/{path} 788 /diff/{revision}/{path}