# HG changeset patch # User Thomas Arendsen Hein # Date 1131635788 -3600 # Node ID b4ed825282fe506197cdbb6b39f6c7a056b52a66 # Parent c85e5bbfd141ca56e840ebaf4499faa2c6ccf839 Catch the exception raised with 'hg help '. Example: 'hg help a' diff -r c85e5bbfd141 -r b4ed825282fe mercurial/commands.py --- a/mercurial/commands.py Wed Nov 09 13:42:16 2005 -0800 +++ b/mercurial/commands.py Thu Nov 10 16:16:28 2005 +0100 @@ -2640,6 +2640,9 @@ u.debug(inst, "\n") u.warn(_("%s: invalid arguments\n") % cmd) help_(u, cmd) + except AmbiguousCommand, inst: + u.warn(_("hg: command '%s' is ambiguous.\n") % inst.args[0]) + help_(u, 'shortlist') except UnknownCommand, inst: u.warn(_("hg: unknown command '%s'\n") % inst.args[0]) help_(u, 'shortlist')