Move aliases section in help below synopsis (issue362)

This should avoid confusion why e.g. "hg help co" shows help
for "hg update" instead.
This commit is contained in:
Thomas Arendsen Hein 2008-01-02 20:22:10 +01:00
parent 2c5d3eddb4
commit 35cbed7baa
2 changed files with 8 additions and 8 deletions

View File

@ -1214,7 +1214,11 @@ def help_(ui, name=None, with_version=False):
ui.write('\n')
aliases, i = cmdutil.findcmd(ui, name, table)
# synopsis
ui.write("%s\n\n" % i[2])
ui.write("%s\n" % i[2])
# aliases
if not ui.quiet and len(aliases) > 1:
ui.write(_("\naliases: %s\n") % ', '.join(aliases[1:]))
# description
doc = i[0].__doc__
@ -1222,13 +1226,9 @@ def help_(ui, name=None, with_version=False):
doc = _("(No help text available)")
if ui.quiet:
doc = doc.splitlines(0)[0]
ui.write("%s\n" % doc.rstrip())
ui.write("\n%s\n" % doc.rstrip())
if not ui.quiet:
# aliases
if len(aliases) > 1:
ui.write(_("\naliases: %s\n") % ', '.join(aliases[1:]))
# options
if i[1]:
option_lists.append((_("options:\n"), i[1]))

View File

@ -211,6 +211,8 @@ options:
use "hg -v help diff" to show global options
hg status [OPTION]... [FILE]...
aliases: st
show changed files in the working directory
Show status of files in the repository. If names are given, only
@ -235,8 +237,6 @@ show changed files in the working directory
I = ignored (not shown by default)
= the previous added file was copied from here
aliases: st
options:
-A --all show status of all files