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

Re: setting ra_callbacks.open_tmp_file from python bindings?

From: Gregory (Grisha) Trubetskoy <grisha_at_apache.org>
Date: 2006-05-24 21:40:14 CEST

On Tue, 23 May 2006, Jelmer Vernooij wrote:

>> ...because file->cc->ras->callbacks->open_tmp_file is null, unless you set it
>> to something.
>> But can you set it from python? I tried (based on a comment I saw in swig
>> bindings somewhere):

> At the moment, you can't, indeed. I've got a half finished patch that
> implements this, but I haven't bothered to finish it yet. I'll try to
> send an updated one to this list tomorrow.
> As far as I know, doing things like this from the Python bindings hasn't
> ever worked (yet), so there might be other problems once opening
> temporary files works.

Well - my first try was to expose the open_tmp_file() function in
libsvn_client/ra.h through SWIG. Then of course I ran into the next
problem - it expects a svn_client__callback_baton_t, which is also private
to libsvn_client and not exposed to Python.

Somehow I get the feeling that I am not pursuing the right path here - OR
all the stuff in libsvn_client would need to be swigged.

When ra.svn_ra_open() is called in Python, what should that third argument
(the callback_baton, which in all examples I've seen, e.g. viewvc is just
None, since they only read) be, if things were done the "right way"?

Should open_tmp_file really be a Python function (e.g. something based on
the Python standard lib way of creating temp files) and the baton - some
sort of a pure Python object?

Sorry if these are stupid questions, BTW, I've only been looking at this
for a couple of days and don't understand it all too well (and on top of
that I've always been completely ignorant of SWIG), but I really want ra
to work from Python for a project I'm working on, and I'd like to do it
right :)



To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 24 21:40:45 2006

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