Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 1536:b4ed825282fe
Catch the exception raised with 'hg help <somethingambiguous>'.
Example: 'hg help a'
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Thu, 10 Nov 2005 16:16:28 +0100 |
parents | c85e5bbfd141 |
children | 482b4efdf013 |
comparison
equal
deleted
inserted
replaced
1525:c85e5bbfd141 | 1536:b4ed825282fe |
---|---|
2638 if len(tb) > 2: # no | 2638 if len(tb) > 2: # no |
2639 raise | 2639 raise |
2640 u.debug(inst, "\n") | 2640 u.debug(inst, "\n") |
2641 u.warn(_("%s: invalid arguments\n") % cmd) | 2641 u.warn(_("%s: invalid arguments\n") % cmd) |
2642 help_(u, cmd) | 2642 help_(u, cmd) |
2643 except AmbiguousCommand, inst: | |
2644 u.warn(_("hg: command '%s' is ambiguous.\n") % inst.args[0]) | |
2645 help_(u, 'shortlist') | |
2643 except UnknownCommand, inst: | 2646 except UnknownCommand, inst: |
2644 u.warn(_("hg: unknown command '%s'\n") % inst.args[0]) | 2647 u.warn(_("hg: unknown command '%s'\n") % inst.args[0]) |
2645 help_(u, 'shortlist') | 2648 help_(u, 'shortlist') |
2646 except SystemExit: | 2649 except SystemExit: |
2647 # don't catch this in the catch-all below | 2650 # don't catch this in the catch-all below |