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

Re: Is there any doc for python SWIG bindings?

From: Max Bowsher <maxb_at_ukf.net>
Date: 2005-02-12 21:03:03 CET

Joerg Hessdoerfer wrote:
> Hi,
>
> On Saturday 12 February 2005 02:11, Max Bowsher wrote:
>> Joerg Hessdoerfer wrote:
>>> Hi,
>>>
>>> I face the task of writing a very specialised svn client. I thought I'd
>>> stick
>>> with python, but I can't find any docs for the SWIG bindings. At least
>>> an
>>> argument list for each function would be very helpful!
>>>
>>> I just can't find out what to send 'svn_client_status', for example. I
>>> just
>>> get all kinds of argument errors. Can anyone point me in the right
>>> direction?
>>
>> http://svn.collab.net/repos/svn/trunk/subversion/bindings/swig/python/READM
>> E
>>
>> Max.
>>
>
> Thank you, this helped a lot. I now can get status information for a wc,
> using
>
> def callback(path, status):
> print path, (...)
>
> svn_client_status(path, None, callback, 1, 0, 0, 0,ctx,pool)
>
> but, when I try to use 'update = 1', I get a 'Segmentation fault'. I
> reckoned
> I needed the revision arg, so I did:
>
> rev = util.svn_opt_revision_t
> rev.kind = util.svn_opt_revision_head
> client.svn_client_status(path, rev, callback, 1, 0, 1, 0, ctx, pool)
>
> ...and it says 'TypeError: Expected a pointer'.
>
> I also tried
>
> client.svn_client_status(path, util.svn_opt_revision_tPtr(rev), callback,
> 1,
> 0, 0, 0, ctx, pool)
>
> but still, 'TypeError: Expected a pointer'.
>
> How does one pass the revision argument? (Or how does one create a SWIG
> pointer'ed argument?)

I've attached some demo code I've been slowly building.
Hopefully, that can help.

Max.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

  • application/octet-stream attachment: client.py
Received on Sat Feb 12 21:04:26 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.