Ximon Eighteen wrote:
> 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
> 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.
> use config methods that don't require a callback) or set me straight on
> 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.
Swig, whilst being wonderful at automatically wrapping ordinary functions,
doesn't automatically do very much to help with callback functions.
Each callback type has to be manually wrapped. If that has not been done,
the functions requiring them cannot be used.
> 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
> 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
The Subversion configuration format is intended to be identical to that
supported by the core Python module ConfigParser. (We might be forced to
change that someday, to support usernames containing the characters '=' and
':', but for the moment, it is true.)
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Tue Sep 13 16:51:27 2005