diff mercurial/repo.py @ 7637:1d54e2f6c0b7

error: move repo errors rename NoCapability to CapabilityError
author Matt Mackall <mpm@selenic.com>
date Mon, 12 Jan 2009 10:42:31 -0600
parents cfeeac24fc1e
children 4a4c7f6a5912
line wrap: on
line diff
--- a/mercurial/repo.py	Sun Jan 11 23:04:24 2009 -0600
+++ b/mercurial/repo.py	Mon Jan 12 10:42:31 2009 -0600
@@ -8,12 +8,6 @@
 
 from i18n import _
 
-class RepoError(Exception):
-    pass
-
-class NoCapability(RepoError):
-    pass
-
 class repository(object):
     def capable(self, name):
         '''tell whether repo supports named capability.
@@ -31,9 +25,9 @@
     def requirecap(self, name, purpose):
         '''raise an exception if the given capability is not present'''
         if not self.capable(name):
-            raise NoCapability(_('cannot %s; remote repository does not '
-                                 'support the %r capability') %
-                               (purpose, name))
+            raise error.CapabilityError(
+                _('cannot %s; remote repository does not '
+                  'support the %r capability') % (purpose, name))
 
     def local(self):
         return False