# HG changeset patch # User Augie Fackler # Date 1267151220 21600 # Node ID 04e973e65cea862381cb17b01b5f81ac07ec5216 # Parent 4a1a68713773598d1f0e0bc0735391d17128eaf3 svn_swig: better ImportError to suggest steps for users. diff --git a/hgsubversion/svnwrap/svn_swig_wrapper.py b/hgsubversion/svnwrap/svn_swig_wrapper.py --- a/hgsubversion/svnwrap/svn_swig_wrapper.py +++ b/hgsubversion/svnwrap/svn_swig_wrapper.py @@ -22,10 +22,14 @@ from svn import ra from mercurial import util as hgutil def version(): - return '%d.%d.%d' % (core.SVN_VER_MAJOR, core.SVN_VER_MINOR, core.SVN_VER_MICRO) - -if (core.SVN_VER_MAJOR, core.SVN_VER_MINOR, core.SVN_VER_MICRO) < (1, 5, 0): #pragma: no cover - raise ImportError, 'You must have Subversion 1.5.0 or newer and matching SWIG bindings.' + return '%d.%d.%d' % (core.SVN_VER_MAJOR, core.SVN_VER_MINOR, + core.SVN_VER_MICRO) + +if (core.SVN_VER_MAJOR, core.SVN_VER_MINOR, + core.SVN_VER_MICRO) < (1, 5, 0): #pragma: no cover + raise ImportError, ('You must have Subversion 1.5.0 or newer and ' + 'matching SWIG bindings. You appear to' + ' have %s' % version()) class SubversionRepoCanNotReplay(Exception): """Exception raised when the svn server is too old to have replay.