Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 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 | 45d034c79ece |
children | 180a3eee4b75 |
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]))