hgext/alias.py
changeset 7643 9a1ea6587557
parent 7213 b4c035057d34
child 8477 a0104303f400
--- a/hgext/alias.py	Mon Jan 12 11:28:30 2009 -0600
+++ b/hgext/alias.py	Mon Jan 12 11:39:38 2009 -0600
@@ -9,9 +9,8 @@
 mycmd = cmd --args
 '''
 
-from mercurial.cmdutil import findcmd, UnknownCommand, AmbiguousCommand
-from mercurial import commands
 from mercurial.i18n import _
+from mercurial import commands, cmdutil, error
 
 cmdtable = {}
 
@@ -43,16 +42,16 @@
             return
 
         try:
-            self._cmd = findcmd(self._target, commands.table, False)[1]
+            self._cmd = cmdutil.findcmd(self._target, commands.table, False)[1]
             if self._cmd == self:
                 raise RecursiveCommand()
             if self._target in commands.norepo.split(' '):
                 commands.norepo += ' %s' % self._name
             return
-        except UnknownCommand:
+        except error.UnknownCommand:
             msg = _('*** [alias] %s: command %s is unknown') % \
                   (self._name, self._target)
-        except AmbiguousCommand:
+        except error.AmbiguousCommand:
             msg = _('*** [alias] %s: command %s is ambiguous') % \
                   (self._name, self._target)
         except RecursiveCommand: