Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 6654:2713e42dcf4e
help: helptable is an ordered collection
The helptable is used for helptopics listed in the manual
page, so the order of topics should not be random.
Convert it from a dictionary into a tuple of tuples.
Also reorder helptable entries to keep previous manual
page order.
author | Johannes Stezenbach <js@sig21.net> |
---|---|
date | Tue, 03 Jun 2008 21:03:51 +0200 |
parents | a78d8edaeedd |
children | 7ca74741259f |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Jun 03 20:56:54 2008 +0200 +++ b/mercurial/commands.py Tue Jun 03 21:03:51 2008 +0200 @@ -1321,16 +1321,16 @@ def helptopic(name): v = None - for i in help.helptable: + for i, d in help.helptable: l = i.split('|') if name in l: v = i header = l[-1] + doc = d if not v: raise cmdutil.UnknownCommand(name) # description - doc = help.helptable[v] if not doc: doc = _("(No help text available)") if callable(doc): @@ -1404,7 +1404,7 @@ if ui.verbose: ui.write(_("\nspecial help topics:\n")) topics = [] - for i in help.helptable: + for i, d in help.helptable: l = i.split('|') topics.append((", ".join(l[:-1]), l[-1])) topics_len = max([len(s[0]) for s in topics])