changeset 796:22f0c50c29a6

subvertpy wrapper: handle NotImplementedError from Subvertpy on missing replay
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Thu, 31 Mar 2011 20:30:29 +0200
parents 6f0b0a47938c
children 7bf283d4c7a9
files hgsubversion/svnwrap/subvertpy_wrapper.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnwrap/subvertpy_wrapper.py
+++ b/hgsubversion/svnwrap/subvertpy_wrapper.py
@@ -417,9 +417,10 @@ class SubversionRepo(object):
 
         try:
             self.remote.replay(revision, oldestrev, AbstractEditor(editor))
-        except SubversionException, e: #pragma: no cover
+        except (SubversionException, NotImplementedError), e: #pragma: no cover
             # can I depend on this number being constant?
-            if (e.args[1] == subvertpy.ERR_RA_NOT_IMPLEMENTED or
+            if (isinstance(e, NotImplementedError) or
+                e.args[1] == subvertpy.ERR_RA_NOT_IMPLEMENTED or
                 e.args[1] == subvertpy.ERR_UNSUPPORTED_FEATURE):
                 msg = ('This Subversion server is older than 1.4.0, and '
                        'cannot satisfy replay requests.')