diff mercurial/commands.py @ 7643:9a1ea6587557

error: move UnknownCommand and AmbiguousCommand
author Matt Mackall <mpm@selenic.com>
date Mon, 12 Jan 2009 11:39:38 -0600
parents 1d54e2f6c0b7
children cce37dab7ad6
line wrap: on
line diff
--- a/mercurial/commands.py	Mon Jan 12 11:28:30 2009 -0600
+++ b/mercurial/commands.py	Mon Jan 12 11:39:38 2009 -0600
@@ -1321,7 +1321,7 @@
 
         try:
             aliases, i = cmdutil.findcmd(name, table, False)
-        except cmdutil.AmbiguousCommand, inst:
+        except error.AmbiguousCommand, inst:
             select = lambda c: c.lstrip('^').startswith(inst.args[0])
             helplist(_('list of commands:\n\n'), select)
             return
@@ -1410,7 +1410,7 @@
             if name in names:
                 break
         else:
-            raise cmdutil.UnknownCommand(name)
+            raise error.UnknownCommand(name)
 
         # description
         if not doc:
@@ -1425,7 +1425,7 @@
         try:
             mod = extensions.find(name)
         except KeyError:
-            raise cmdutil.UnknownCommand(name)
+            raise error.UnknownCommand(name)
 
         doc = gettext(mod.__doc__) or _('no help text available')
         doc = doc.splitlines(0)
@@ -1450,7 +1450,7 @@
                 f(name)
                 i = None
                 break
-            except cmdutil.UnknownCommand, inst:
+            except error.UnknownCommand, inst:
                 i = inst
         if i:
             raise i