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

Re: Python SWIG bindings help

From: Hari Kodungallur <hkodungallur_at_gmail.com>
Date: Thu, 27 Mar 2008 11:57:29 -0700

On Thu, Mar 27, 2008 at 12:25 AM, Rishabh Manocha <rmanocha_at_gmail.com>
wrote:

> Hari,
>
> Thanks a lot. That does just what I wanted it to do. I had also, in
> the meantime figured out how to do something similar using pysvn -
>
> import pysvn
> path = svn+ssh://rmanocha@myhost/opt/svn/repos
> client = pysvn.Client()
> entries = client.ls(path)
>
> I will look into both these methods in some more detail and see which
> one I would rather use. Do you have any suggestions?? One problem I
> did have with using pysvn was that I have to login using my password
> everytime using the above code (even though I defined a login callback
> function and assigned it as per the documentation on pysvn's site).

If you can get the info that you need from the client (like your example
above), I would definitely suggest using pysvn because its interfaces and
documentation are in much cleaner shape. [I have not used pysvn, even though
I have wanted to. But from the docs and form what I have read, it is much
easier to use than the bindings]

>
>
> Also, is there any source of documentation/tutorials for the python
> svn SWIG bindings (I don't mind reading c header files too if someone
> can just show me how to :)).

I have not found a good documentation resource for the SWIG bindings. You
could obviously read the C header files within the source distribution. But
it is quite complicated. Moreover, I learn faster using examples and so I
started off by looking at the two short examples in the book (
http://svnbook.red-bean.com/en/1.1/ch08s02.html) and also the
svnlook.pyfile in the distribution (in the tools/examples folder).

The subversion/bindings/swig/python/test folder also includes code from the
trac project. The code within it is a good primer on how to use the
bindings.

These examples do not replace documentation, but if you just want to
experiment with the usage of python bindings, these resources will help you
a lot.

<snip>
Received on 2008-03-27 19:58:17 CET

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

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