Mercurial > hg
changeset 5783:28d9f8cd02f2
Move aliases section in help below synopsis (issue362)
This should avoid confusion why e.g. "hg help co" shows help
for "hg update" instead.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Wed, 02 Jan 2008 20:22:10 +0100 |
parents | 7eb1146b72ec |
children | d17e57592909 |
files | mercurial/commands.py tests/test-help.out |
diffstat | 2 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Jan 01 23:12:48 2008 +0100 +++ b/mercurial/commands.py Wed Jan 02 20:22:10 2008 +0100 @@ -1214,7 +1214,11 @@ 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 @@ 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]))
--- a/tests/test-help.out Tue Jan 01 23:12:48 2008 +0100 +++ b/tests/test-help.out Wed Jan 02 20:22:10 2008 +0100 @@ -211,6 +211,8 @@ 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 @@ I = ignored (not shown by default) = the previous added file was copied from here -aliases: st - options: -A --all show status of all files