[PATCH] convert/svn: Abort operation when python bindings are not available
Mads Kiilerich
mads at kiilerich.com
Fri Feb 18 13:48:17 CST 2011
On 02/18/2011 08:15 PM, Azhagu Selvan SP wrote:
> # HG changeset patch
> # User Azhagu Selvan SP<tamizhgeek at gmail.com>
> # Date 1298056326 -19800
> # Node ID c4e14b409061f10dff1c0f3eee4c3060cd945707
> # Parent d6ab3edca8cde6f6f8459868f97aaa1a43b0b72c
> convert/svn: Abort operation when python bindings are not available
>
> If python bindings are not available, raise a exception and abort
> the operation.
>
> diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py
> --- a/hgext/convert/subversion.py
> +++ b/hgext/convert/subversion.py
> @@ -36,7 +36,7 @@
> category=DeprecationWarning)
>
> except ImportError:
> - pass
> + raise util.Abort("Subversion Python bindings not installed or Not found in PYTHONPATH!")
>
> class SvnPathNotFound(Exception):
> pass
Thanks for the patch, but I'm afraid this approach won't work.
The import has to fail silently here, and the missing libraries should
be caught later in the svn_source constructor where it tries to access
SubversionException.
I guess it is your experience that it doesn't happen that way? What do
you see - and can you figure out exactly why it doesn't work as intended?
/Mads
More information about the Mercurial-devel
mailing list