show: also catch AmbiguousCommand
authorGregory Szorc <gregory.szorc@gmail.com>
Mon, 03 Jul 2017 21:18:32 -0700
changeset 33210 b93df142485e
parent 33209 9718725dc02a
child 33211 f48422ab81aa
show: also catch AmbiguousCommand cmdutil.findcmd() can raise this as well. While we'll almost certainly never encounter this in the wild, guard against it regardless.
hgext/show.py
--- a/hgext/show.py	Mon Jul 03 21:12:04 2017 -0700
+++ b/hgext/show.py	Mon Jul 03 21:18:32 2017 -0700
@@ -233,7 +233,7 @@
     try:
         cmdutil.findcmd('rebase', commands.table)
         haverebase = True
-    except error.UnknownCommand:
+    except (error.AmbiguousCommand, error.UnknownCommand):
         haverebase = False
 
     # TODO use templating.