diff svnwrap/svn_swig_wrapper.py @ 224:2165461d2dd8

Exception clean-ups; use symbolic names & avoid Python 2.6 deprecations.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Thu, 19 Mar 2009 21:27:39 +0100
parents 77812f98e250
children f71af18c4379
line wrap: on
line diff
--- a/svnwrap/svn_swig_wrapper.py
+++ b/svnwrap/svn_swig_wrapper.py
@@ -189,7 +189,7 @@ class SubversionRepo(object):
         try:
             tags = self.list_dir('tags', revision=revision).keys()
         except core.SubversionException, e:
-            if e.apr_err == 160013:
+            if e.apr_err == core.SVN_ERR_FS_NOT_FOUND:
                 return {}
             raise
         tag_info = {}
@@ -386,10 +386,8 @@ class SubversionRepo(object):
                       e_baton, self.pool)
         except core.SubversionException, e: #pragma: no cover
             # can I depend on this number being constant?
-            if (e.message == "Server doesn't support the replay command"
-                or e.apr_err == 170003
-                or e.message == 'The requested report is unknown.'
-                or e.apr_err == 200007):
+            if (e.apr_err == core.SVN_ERR_RA_NOT_IMPLEMENTED or
+                e.apr_err == core.SVN_ERR_UNSUPPORTED_FEATURE):
                 raise SubversionRepoCanNotReplay, ('This Subversion server '
                    'is older than 1.4.0, and cannot satisfy replay requests.')
             else: