Matthijs Kooijman wrote on Tue, Feb 07, 2012 at 20:52:08 +0100:
> Hi Daniel,
> 
> > svn_config_get_config() reads from disk.  You'd do that just once (and
> > stash the result in the client context, if svn_cmdline_init() or someone
> > else doesn't do that for you), and then ["config"] it.  (In the C level
> > that's just an apr_hash_get().)
> > 
> > Have a look at what the svn* binaries do.
> Ah, thanks for the pointers, I think I got it now. A closer looks hows
> that ctx.config was even filled already, but a bit further down. I've
> attached a patch to fix this, which now allows me to disable
> gnome-keyring from ~/.subversion/config when running the example.
> 
> > If you don't find a better way (even after asking) I'll also be happy
> > with a test that does a strstr() on the repr() of the objects.
> It turned out that the type is just exported as
> svn.core.svn_auth_provider_object_t, so the change is trivial. See the
> other attached patch.
> 
> Gr.
> 
> Matthijs

> Improve the testcase for the python binding for
> svn_auth_get_platform_specific_client_providers.
> 
> This test was introduced in r1241530, but it only checked if a list was
> returned. Now also the type of the elements of the list is checked.
> 
> * subversion/bindings/swig/python/tests/client.py
>   (test_platform_providers): Improve testcase.
> 
> Patch by: Matthijs Kooijman <matth...@stdin.nl>
> 
> Index: subversion-trunk/subversion/bindings/swig/python/tests/client.py
> ===================================================================
> --- subversion-trunk.orig/subversion/bindings/swig/python/tests/client.py     
> 2012-02-07 20:13:48.666552472 +0100
> +++ subversion-trunk/subversion/bindings/swig/python/tests/client.py  
> 2012-02-07 20:35:39.329660618 +0100
> @@ -378,6 +378,7 @@
>      providers = core.svn_auth_get_platform_specific_client_providers(None, 
> None)
>      # Not much more we can test in this minimal environment.
>      self.assert_(isinstance(providers, list))
> +    self.assert_(all(map(lambda x: isinstance(x, 
> core.svn_auth_provider_object_t), providers)))

Tests fail with:

    
core.svn_auth_set_gnome_keyring_unlock_prompt_func(self.client_ctx.auth_baton, 
prompt_func)
AttributeError: 'module' object has no attribute 
'svn_auth_set_gnome_keyring_unlock_prompt_func'

I think the patch in your mail to Stefan may fix that?

>  
>    def testGnomeKeyring(self):
>      # This tests setting the gnome-keyring unlock prompt function as an

> Let the get-location-segments.py example pass a proper config to
> svn_auth_get_platform_specific_client_providers.
> 
> This call was introduced in r1241530, but it did not properly pass a
> configuration option.
> 

Applied unchanged.  Thanks!

Reply via email to