mercurial/hgweb/webcommands.py
changeset 38213 c3df415037cd
parent 38212 0b932b43868f
child 38214 2aa0217bb655
equal deleted inserted replaced
38212:0b932b43868f 38213:c3df415037cd
  1415                 other.append((cmd, doc))
  1415                 other.append((cmd, doc))
  1416 
  1416 
  1417         early.sort()
  1417         early.sort()
  1418         other.sort()
  1418         other.sort()
  1419 
  1419 
  1420         def earlycommands(**map):
  1420         def earlycommands(context):
  1421             for c, doc in early:
  1421             for c, doc in early:
  1422                 yield {'topic': c, 'summary': doc}
  1422                 yield {'topic': c, 'summary': doc}
  1423 
  1423 
  1424         def othercommands(**map):
  1424         def othercommands(context):
  1425             for c, doc in other:
  1425             for c, doc in other:
  1426                 yield {'topic': c, 'summary': doc}
  1426                 yield {'topic': c, 'summary': doc}
  1427 
  1427 
  1428         return web.sendtemplate(
  1428         return web.sendtemplate(
  1429             'helptopics',
  1429             'helptopics',
  1430             topics=templateutil.mappinggenerator(topics),
  1430             topics=templateutil.mappinggenerator(topics),
  1431             earlycommands=earlycommands,
  1431             earlycommands=templateutil.mappinggenerator(earlycommands),
  1432             othercommands=othercommands,
  1432             othercommands=templateutil.mappinggenerator(othercommands),
  1433             title='Index')
  1433             title='Index')
  1434 
  1434 
  1435     # Render an index of sub-topics.
  1435     # Render an index of sub-topics.
  1436     if topicname in helpmod.subtopics:
  1436     if topicname in helpmod.subtopics:
  1437         topics = []
  1437         topics = []