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

Can svn_config_enumerate() be called from Python?

From: Ximon Eighteen <ximon.eighteen_at_int.greenpeace.org>
Date: 2005-09-13 01:08:25 CEST

Hi all,

I've been looking all over the place giving myself a rather drastic crash
course in python, subversion, swig, viewcvs, trac, the subversion book etc in
an attempt to answer for myself whether or not I can call svn_config_enumerate
from python using the swig bindings.

In subversion 1.2.1 I can call it but only if the callback func parameter is
passed as None - anything else causes "TypeError: Expected a pointer".

Can anyone either show me how I can use a callback python function with
svn_config_enumerate, tell me I should be doing this another way (e.g. just
use config methods that don't require a callback) or set me straight on what
is and isn't possible so that I can perhaps focus my research efforts on
helping to fix (in subversion with a patch if necessary) my problem.

I haven't found a single Python invocation of svn_config_enumerate() in my
travels back through time in mailing lists and my wading through current
versions of trac, viewcvs, the subversion book and so on.

A quick bit of background for you. I started on this problem when I submitted
a patch to the ViewCVS project to allow authorisation using the mod_authz_svn
configuration file. I hated my patch because it's hacky and it used some trac
code which isn't on (my patch was meant as an example of what can work and
stated I didn't mean for code to be incorporated directly into viewcvs by
stealing it from trac). I wanted to replace the code borrowed from trac with
python code that calls the exact same subversion apis as mod_authz_svn does
instead of writing new code to interpret the mod_authz_svn config file (why
reinvent the wheel and a whole host of new mistakes to boot?) and then I ran
into the problem with svn_config_enumerate.

Thanks,

Ximon

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 13 02:56:35 2005

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.