[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[python bindings] How to create an authentication func

From: Alexis Boutillier <alexis.boutillier_at_arteris.net>
Date: 2004-10-07 17:09:43 CEST

I'm trying to make a svn_client_ls on a URL.

It works fine if another client (svn status -u) have stored username and
password in /.subversion directory but if i delete this directory, my
python prog can't authenticate with the apache serveur.

I use LDAP password under apache.

there is my python code :
                util.apr_initialize()
                pool = util.svn_pool_create(None)

                util.svn_config_ensure(None,pool)

                provider = client.svn_client_get_simple_provider(pool)

                ctx = client.svn_client_create_context(pool)
                ctx.config = util.svn_config_get_config(None,pool)
                ctx.auth_baton = util.svn_auth_open([provider],pool)
                rev = util.svn_opt_revision_t()
                if svnRev is None:
                        rev.kind = util.svn_opt_revision_head
                else:
                        rev.kind = util.svn_opt_revision_number
                        rev.value.number = svnRev
                result =
client.svn_client_ls('http://intranet/svn-test-repos/testEnv/testDrivers/test1',rev,False,ctx,pool)

The program end with a : libsvn._core.SubversionException: ("PROPFIND
request failed on '/svn-test-repos/testEnv/testDrivers/test1'", 170001)

I try to use "svn_auth_set_parameter" with ctx.auth_baton but it require
a pointer as the last argument instead of a string.

I try to use "svn_client_get_simple_prompt_provider" with a function but
it require a svn_auth_simple_prompt_func_t instead of a python function.

I try to set util.SVN_AUTH_PARAM_DEFAULT_USERNAME and
util.SVN_AUTH_PARAM_DEFAULT_PASSWORD as well as
client.SVN_CLIENT_AUTH_USERNAME and client.SVN_CLIENT_AUTH_PASSWORD but
it doesn't change anythings.

Could someone help me to fix this problem ?

-- 
Boutillier Alexis
Methodology engineer
Arteris SA
The Network-on-Chip Company TM
www.arteris.net
6 par Ariane Immeuble Mercure
78284 Guyancourt Cedex
France
Office: (+33) 1 61 37 38 71
Fac:    (+33) 1 61 37 38 41
Alexis.Boutillier@arteris.net
-- 
Boutillier Alexis
Methodology engineer
Arteris SA
The Network-on-Chip Company TM
www.arteris.net
6 par Ariane Immeuble Mercure
78284 Guyancourt Cedex
France
Office: (+33) 1 61 37 38 71
Fac:    (+33) 1 61 37 38 41
Alexis.Boutillier@arteris.net
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Oct 8 05:14:08 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.