changeset 609:aafbf0d40dc2

svnwrap: use SubversionConnectionException instead of mercurial.util.Abort This makes svnwrap independent of Mercurial.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 14 May 2010 14:21:25 +0200
parents d1de8bb6e11f
children 300b917d23c5
files hgsubversion/svnwrap/svn_swig_wrapper.py
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnwrap/svn_swig_wrapper.py
+++ b/hgsubversion/svnwrap/svn_swig_wrapper.py
@@ -14,8 +14,6 @@ warnings.filterwarnings('ignore',
                         module='svn.core',
                         category=DeprecationWarning)
 
-from mercurial import util as hgutil
-
 required_bindings = (1, 5, 0)
 
 try:
@@ -423,10 +421,11 @@ class SubversionRepo(object):
                            self.pool)
             except core.SubversionException, e:
                 if e.apr_err == core.SVN_ERR_FS_NOT_FOUND:
-                    raise hgutil.Abort('%s not found at revision %d!'
-                                       % (self.subdir.rstrip('/'), stop))
+                    msg = ('%s not found at revision %d!'
+                           % (self.subdir.rstrip('/'), stop))
+                    raise SubversionConnectionException(msg)
                 elif e.apr_err == core.SVN_ERR_FS_NO_SUCH_REVISION:
-                    raise hgutil.Abort(e.message)
+                    raise SubversionConnectionException(e.message)
                 else:
                     raise