comparison mercurial/commands.py @ 17322:7124f984dc8d stable

help: use the first topic name from helptable, not the longest alias This makes the 'additional help topics' list consistent with the output from keyword search (for instance subrepo/subrepos). The sorting by longest name was introduced in 3f6a4f1de43f. There might have been a good reason for it back then, but now it seems like a better idea to place the preferred name first in the list in helptable.
author Mads Kiilerich <mads@kiilerich.com>
date Wed, 01 Aug 2012 14:59:15 +0200
parents 2e0805f59736
children e560ecb755fe
comparison
equal deleted inserted replaced
17321:f3fd9d6802b7 17322:7124f984dc8d
3295 rst.extend(exts) 3295 rst.extend(exts)
3296 3296
3297 rst.append(_("\nadditional help topics:\n\n")) 3297 rst.append(_("\nadditional help topics:\n\n"))
3298 topics = [] 3298 topics = []
3299 for names, header, doc in help.helptable: 3299 for names, header, doc in help.helptable:
3300 topics.append((sorted(names, key=len, reverse=True)[0], header)) 3300 topics.append((names[0], header))
3301 for t, desc in topics: 3301 for t, desc in topics:
3302 rst.append(" :%s: %s\n" % (t, desc)) 3302 rst.append(" :%s: %s\n" % (t, desc))
3303 3303
3304 optlist = [] 3304 optlist = []
3305 if not ui.quiet: 3305 if not ui.quiet: