diff hgsubversion/wrappers.py @ 601:0fe490ce2fbb

isolate all imports of Subversion modules in svnwrap. editor: move dependancy on Subversion bindings to svnwrap package. In the editor, this involves importing the superclass of `HgEditor' as `svnwrap.Editor'. Additionally, the `delta.svn_txdelta_apply()' function has been abstracted away into a simpler interface, stored in `svnwrap.apply_txdelta()'.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Wed, 31 Mar 2010 17:51:09 +0200
parents a42e9c9bbb8a
children 7c44bc259505
line wrap: on
line diff
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
@@ -7,8 +7,6 @@ from mercurial import util as hgutil
 from mercurial import node
 from mercurial import i18n
 
-from svn import core
-
 import replay
 import pushmod
 import stupid as stupidmod
@@ -294,8 +292,8 @@ def pull(repo, source, heads=[], force=F
                         ui.status('%s\n' % e.message)
                         stupidmod.print_your_svn_is_old_message(ui)
                         have_replay = False
-                    except core.SubversionException, e: #pragma: no cover
-                        if (e.apr_err == core.SVN_ERR_RA_DAV_REQUEST_FAILED
+                    except svnwrap.SubversionException, e: #pragma: no cover
+                        if (e.args[1] == svnwrap.ERR_RA_DAV_REQUEST_FAILED
                             and '502' in str(e)
                             and tries < 3):
                             tries += 1