1240 displayer = cmdutil.show_changeset(ui, repo, opts) |
1240 displayer = cmdutil.show_changeset(ui, repo, opts) |
1241 for n in heads: |
1241 for n in heads: |
1242 displayer.show(changenode=n) |
1242 displayer.show(changenode=n) |
1243 |
1243 |
1244 def help_(ui, name=None, with_version=False): |
1244 def help_(ui, name=None, with_version=False): |
1245 """show help for a command, extension, or list of commands |
1245 """show help for a given topic or a help overview |
1246 |
1246 |
1247 With no arguments, print a list of commands and short help. |
1247 With no arguments, print a list of commands and short help. |
1248 |
1248 |
1249 Given a command name, print help for that command. |
1249 Given a topic, extension, or command name, print help for that topic.""" |
1250 |
|
1251 Given an extension name, print help for that extension, and the |
|
1252 commands it provides.""" |
|
1253 option_lists = [] |
1250 option_lists = [] |
1254 |
1251 |
1255 def addglobalopts(aliases): |
1252 def addglobalopts(aliases): |
1256 if ui.verbose: |
1253 if ui.verbose: |
1257 option_lists.append((_("global options:"), globalopts)) |
1254 option_lists.append((_("global options:"), globalopts)) |
1432 default |
1429 default |
1433 and _(" (default: %s)") % default |
1430 and _(" (default: %s)") % default |
1434 or ""))) |
1431 or ""))) |
1435 |
1432 |
1436 if not name: |
1433 if not name: |
1437 ui.write(_("\nspecial help topics:\n\n")) |
1434 ui.write(_("\nadditional help topics:\n\n")) |
1438 topics = [] |
1435 topics = [] |
1439 for names, header, doc in help.helptable: |
1436 for names, header, doc in help.helptable: |
1440 names = [(-len(name), name) for name in names] |
1437 names = [(-len(name), name) for name in names] |
1441 names.sort() |
1438 names.sort() |
1442 topics.append((names[0][1], header)) |
1439 topics.append((names[0][1], header)) |
3128 "heads": |
3125 "heads": |
3129 (heads, |
3126 (heads, |
3130 [('r', 'rev', '', _('show only heads which are descendants of rev')), |
3127 [('r', 'rev', '', _('show only heads which are descendants of rev')), |
3131 ] + templateopts, |
3128 ] + templateopts, |
3132 _('hg heads [-r REV] [REV]...')), |
3129 _('hg heads [-r REV] [REV]...')), |
3133 "help": (help_, [], _('hg help [COMMAND]')), |
3130 "help": (help_, [], _('hg help [TOPIC]')), |
3134 "identify|id": |
3131 "identify|id": |
3135 (identify, |
3132 (identify, |
3136 [('r', 'rev', '', _('identify the specified rev')), |
3133 [('r', 'rev', '', _('identify the specified rev')), |
3137 ('n', 'num', None, _('show local revision number')), |
3134 ('n', 'num', None, _('show local revision number')), |
3138 ('i', 'id', None, _('show global revision id')), |
3135 ('i', 'id', None, _('show global revision id')), |