# HG changeset patch
# User Dan Villiom Podlaski Christiansen <danchr@gmail.com>
# Date 1284470745 -7200
# Node ID 59860a15b6173d42bec0f6f70fbc3d63fc7b3553
# Parent  e9306b23d32343e8063426da6db6b81573ee7329
svnwrap: improve error message when no bindings are found.

diff --git a/hgsubversion/svnwrap/__init__.py b/hgsubversion/svnwrap/__init__.py
--- a/hgsubversion/svnwrap/__init__.py
+++ b/hgsubversion/svnwrap/__init__.py
@@ -23,11 +23,14 @@ elif choice == 'none':
 else:
     try:
         from subvertpy_wrapper import *
-    except ImportError, e:
+    except ImportError, e1:
         try:
             from svn_swig_wrapper import *
-        except ImportError:
-            # propagate the subvertpy error; it's easier to install
-            raise e
+        except ImportError, e2:
+            raise ImportError('no compatible bindings available:\n\n'
+                              '%s\n%s\n\n'
+                              'Please install either Subvertpy or the '
+                              'Subversion Python SWIG bindings'
+                              % (e2, e1))
 
 del os, choice