Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
5782:7eb1146b72ec | 5783:28d9f8cd02f2 |
---|---|
1212 if with_version: | 1212 if with_version: |
1213 version_(ui) | 1213 version_(ui) |
1214 ui.write('\n') | 1214 ui.write('\n') |
1215 aliases, i = cmdutil.findcmd(ui, name, table) | 1215 aliases, i = cmdutil.findcmd(ui, name, table) |
1216 # synopsis | 1216 # synopsis |
1217 ui.write("%s\n\n" % i[2]) | 1217 ui.write("%s\n" % i[2]) |
1218 | |
1219 # aliases | |
1220 if not ui.quiet and len(aliases) > 1: | |
1221 ui.write(_("\naliases: %s\n") % ', '.join(aliases[1:])) | |
1218 | 1222 |
1219 # description | 1223 # description |
1220 doc = i[0].__doc__ | 1224 doc = i[0].__doc__ |
1221 if not doc: | 1225 if not doc: |
1222 doc = _("(No help text available)") | 1226 doc = _("(No help text available)") |
1223 if ui.quiet: | 1227 if ui.quiet: |
1224 doc = doc.splitlines(0)[0] | 1228 doc = doc.splitlines(0)[0] |
1225 ui.write("%s\n" % doc.rstrip()) | 1229 ui.write("\n%s\n" % doc.rstrip()) |
1226 | 1230 |
1227 if not ui.quiet: | 1231 if not ui.quiet: |
1228 # aliases | |
1229 if len(aliases) > 1: | |
1230 ui.write(_("\naliases: %s\n") % ', '.join(aliases[1:])) | |
1231 | |
1232 # options | 1232 # options |
1233 if i[1]: | 1233 if i[1]: |
1234 option_lists.append((_("options:\n"), i[1])) | 1234 option_lists.append((_("options:\n"), i[1])) |
1235 | 1235 |
1236 addglobalopts(False) | 1236 addglobalopts(False) |