equal
deleted
inserted
replaced
3263 if not ui.verbose: |
3263 if not ui.verbose: |
3264 if not full: |
3264 if not full: |
3265 rst.append(_('\nuse "hg help %s" to show the full help text\n') |
3265 rst.append(_('\nuse "hg help %s" to show the full help text\n') |
3266 % name) |
3266 % name) |
3267 elif not ui.quiet: |
3267 elif not ui.quiet: |
3268 rst.append(_('\nuse "hg -v help %s" to show more info\n') |
3268 omitted = _('use "hg -v help %s" to show more complete' |
3269 % name) |
3269 ' help and the global options') % name |
|
3270 notomitted = _('use "hg -v help %s" to show' |
|
3271 ' the global options') % name |
|
3272 help.indicateomitted(rst, omitted, notomitted) |
|
3273 |
3270 return rst |
3274 return rst |
3271 |
3275 |
3272 |
3276 |
3273 def helplist(select=None): |
3277 def helplist(select=None): |
3274 # list of commands |
3278 # list of commands |
3367 if not doc: |
3371 if not doc: |
3368 rst.append(" %s\n" % _("(no help text available)")) |
3372 rst.append(" %s\n" % _("(no help text available)")) |
3369 if util.safehasattr(doc, '__call__'): |
3373 if util.safehasattr(doc, '__call__'): |
3370 rst += [" %s\n" % l for l in doc().splitlines()] |
3374 rst += [" %s\n" % l for l in doc().splitlines()] |
3371 |
3375 |
|
3376 if not ui.verbose: |
|
3377 omitted = (_('use "hg help -v %s" to show more complete help') % |
|
3378 name) |
|
3379 help.indicateomitted(rst, omitted) |
|
3380 |
3372 try: |
3381 try: |
3373 cmdutil.findcmd(name, table) |
3382 cmdutil.findcmd(name, table) |
3374 rst.append(_('\nuse "hg help -c %s" to see help for ' |
3383 rst.append(_('\nuse "hg help -c %s" to see help for ' |
3375 'the %s command\n') % (name, name)) |
3384 'the %s command\n') % (name, name)) |
3376 except error.UnknownCommand: |
3385 except error.UnknownCommand: |
3393 head, tail = doc.split('\n', 1) |
3402 head, tail = doc.split('\n', 1) |
3394 rst = [_('%s extension - %s\n\n') % (name.split('.')[-1], head)] |
3403 rst = [_('%s extension - %s\n\n') % (name.split('.')[-1], head)] |
3395 if tail: |
3404 if tail: |
3396 rst.extend(tail.splitlines(True)) |
3405 rst.extend(tail.splitlines(True)) |
3397 rst.append('\n') |
3406 rst.append('\n') |
|
3407 |
|
3408 if not ui.verbose: |
|
3409 omitted = (_('use "hg help -v %s" to show more complete help') % |
|
3410 name) |
|
3411 help.indicateomitted(rst, omitted) |
3398 |
3412 |
3399 if mod: |
3413 if mod: |
3400 try: |
3414 try: |
3401 ct = mod.cmdtable |
3415 ct = mod.cmdtable |
3402 except AttributeError: |
3416 except AttributeError: |
3457 if not ui.quiet: |
3471 if not ui.quiet: |
3458 rst = [_("Mercurial Distributed SCM\n"), '\n'] |
3472 rst = [_("Mercurial Distributed SCM\n"), '\n'] |
3459 rst.extend(helplist()) |
3473 rst.extend(helplist()) |
3460 |
3474 |
3461 keep = ui.verbose and ['verbose'] or [] |
3475 keep = ui.verbose and ['verbose'] or [] |
3462 formatted, pruned = minirst.format(''.join(rst), textwidth, keep=keep) |
3476 text = ''.join(rst) |
|
3477 formatted, pruned = minirst.format(text, textwidth, keep=keep) |
|
3478 if 'verbose' in pruned: |
|
3479 keep.append('omitted') |
|
3480 else: |
|
3481 keep.append('notomitted') |
|
3482 formatted, pruned = minirst.format(text, textwidth, keep=keep) |
3463 ui.write(formatted) |
3483 ui.write(formatted) |
3464 |
3484 |
3465 |
3485 |
3466 @command('identify|id', |
3486 @command('identify|id', |
3467 [('r', 'rev', '', |
3487 [('r', 'rev', '', |