=== modified file 'NEWS'
--- NEWS	2008-04-12 16:08:21 +0000
+++ NEWS	2008-04-12 18:54:16 +0000
@@ -49,6 +49,8 @@
    * Work around bug in the Subversion libraries which don't accept 
      http(s) URLs with urlencoded characters. (#190229)
 
+   * Handle Subversion >= 1.5 not always setting SubversionException.args.
+
 bzr-svn 0.4.9    2008-03-23
 
   FEATURES

=== modified file 'errors.py'
--- errors.py	2008-03-24 04:52:30 +0000
+++ errors.py	2008-04-12 18:54:16 +0000
@@ -86,7 +86,12 @@
     :param err: SubversionException.
     :return: BzrError instance if it could be converted, err otherwise
     """
-    (msg, num) = err.args
+    # Subversion 1.5 sometimes sets args to ()
+    if len(err.args) == 0:
+        msg = None
+        num = err.apr_err
+    else:
+        (msg, num) = err.args
 
     if num == svn.core.SVN_ERR_RA_SVN_CONNECTION_CLOSED:
         return ConnectionReset(msg=msg)

=== modified file 'tests/test_errors.py'
--- tests/test_errors.py	2008-03-24 04:52:30 +0000
+++ tests/test_errors.py	2008-04-12 18:54:16 +0000
@@ -49,6 +49,15 @@
         self.assertIsInstance(convert_error(SubversionException("foo", -4)),
                 SubversionException)
 
+    def test_convert_error_no_message(self):
+        class ExampleSubversionException:
+            def __init__(self, num):
+                self.args = ()
+                self.apr_err = num
+        x = ExampleSubversionException(svn.core.SVN_ERR_RA_SVN_CONNECTION_CLOSED)
+        self.assertEquals((), x.args)
+        self.assertIsInstance(convert_error(x), ConnectionReset)
+
     def test_convert_malformed(self):
         self.assertIsInstance(convert_error(SubversionException("foo", svn.core.SVN_ERR_RA_SVN_MALFORMED_DATA)), TransportError)
 

