[PATCH] [PATCH RESEND] convert/svn: Abort operation when python bindings are not available

Mads Kiilerich mads at kiilerich.com
Wed Feb 23 04:42:26 CST 2011


On 02/23/2011 08:16 AM, Azhagu Selvan SP wrote:
> On Wed, 2011-02-23 at 01:48 +0100, Mads Kiilerich wrote:
>> Azhagu Selvan SP wrote, On 02/22/2011 06:02 PM:
>>> # HG changeset patch
>>> # User Azhagu Selvan SP<tamizhgeek at gmail.com>
>>> # Date 1298394117 -19800
>>> # Node ID 69dba6f17e3d3d7f1dd8a789cb7f2f4895bc948c
>>> # Parent  35a8659c57b8f40bad009d0574749c9d749db20f
>>> convert/svn: Abort operation when python bindings are not available
>>>
>>> Subversion python bindings check was not present in svn_sink source
>>> class which made it fail while using svn as destination repository.
>>> Added a more maintainble svn bindings check for svn_source and svn_sink
>>> classes.
>>
>> Thanks for the (updated) patch.
>>
>> But it seems like the convert framework doesn't handle MissingTool
>> exceptions from sinks, so even with your patch we get an ugly stacktrace
>> and the patch doesn't make any real difference. It is reproducible with
>> "hg convert -d svn . ."
>
> But why the tests didn't fail? Should we update the tests?

The svn convert tests are skipped if the svn libraries not are available 
- see hghave.

We could perhaps add some tests that hacked PYTHONPATH and/or provided a 
stub svn.py in such a way that we got some tests of these failures even 
when svn was available. But ... that would probably be complex and 
fragile and add very little value.

/Mads


More information about the Mercurial-devel mailing list