mercurial/commands.py
changeset 9537 460e410c39be
parent 9508 e2fd9b62349b
child 9540 cad36e496640
equal deleted inserted replaced
9536:f04d17912441 9537:460e410c39be
  1617 
  1617 
  1618     if not name:
  1618     if not name:
  1619         ui.write(_("\nadditional help topics:\n\n"))
  1619         ui.write(_("\nadditional help topics:\n\n"))
  1620         topics = []
  1620         topics = []
  1621         for names, header, doc in help.helptable:
  1621         for names, header, doc in help.helptable:
  1622             names = [(-len(name), name) for name in names]
  1622             topics.append((sorted(names, key=len, reverse=True)[0], header))
  1623             names.sort()
       
  1624             topics.append((names[0][1], header))
       
  1625         topics_len = max([len(s[0]) for s in topics])
  1623         topics_len = max([len(s[0]) for s in topics])
  1626         for t, desc in topics:
  1624         for t, desc in topics:
  1627             ui.write(" %-*s  %s\n" % (topics_len, t, desc))
  1625             ui.write(" %-*s  %s\n" % (topics_len, t, desc))
  1628 
  1626 
  1629     if opt_output:
  1627     if opt_output: