diff -r 84346894def8 -r 9a1ea6587557 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Mon Jan 12 11:28:30 2009 -0600 +++ b/mercurial/cmdutil.py Mon Jan 12 11:39:38 2009 -0600 @@ -8,16 +8,11 @@ from node import hex, nullid, nullrev, short from i18n import _ import os, sys, bisect, stat -import mdiff, bdiff, util, templater, templatefilters, patch, errno +import mdiff, bdiff, util, templater, templatefilters, patch, errno, error import match as _match revrangesep = ':' -class UnknownCommand(Exception): - """Exception raised if command is not in the command table.""" -class AmbiguousCommand(Exception): - """Exception raised if command shortcut matches more than one command.""" - def findpossible(cmd, table, strict=False): """ Return cmd -> (aliases, command table entry) @@ -57,12 +52,12 @@ if len(choice) > 1: clist = choice.keys() clist.sort() - raise AmbiguousCommand(cmd, clist) + raise error.AmbiguousCommand(cmd, clist) if choice: return choice.values()[0] - raise UnknownCommand(cmd) + raise error.UnknownCommand(cmd) def bail_if_changed(repo): if repo.dirstate.parents()[1] != nullid: