Need help with Subversion bindings

P

paul.keating

I'm trying to write a basic Subversion client because I need to
integrate Subversion with a product that keeps source code in a
database (so it has no notion of "working copy").

I have tried to translate the simple C examples in Garrett Rooney's
book into Python, but the very clever SWIG stuff has made the Python
access so different from the corresponding C that I can't do it.

Example: I can create an apr array but I have no idea how to insert
something into it. In C you use APR_ARRAY_PUSH. In Python that doesn't
exist. Another example: I can create an apr hash, but I can't work out
how to look inside it. In C it is a struct with members count and max
etc. In Python it is a class that doesn't remotely resemble the
struct.

Has anyone got a bare-bones bit of working Python that shows how to do
(say) an add or a checkout? There is an example of status in the
Subversion book but it's a toy: it doesn't show how you create an
authentication callback so it will only work locally.
 
D

Diez B. Roggisch

I'm trying to write a basic Subversion client because I need to
integrate Subversion with a product that keeps source code in a
database (so it has no notion of "working copy").

I have tried to translate the simple C examples in Garrett Rooney's
book into Python, but the very clever SWIG stuff has made the Python
access so different from the corresponding C that I can't do it.

Example: I can create an apr array but I have no idea how to insert
something into it. In C you use APR_ARRAY_PUSH. In Python that doesn't
exist. Another example: I can create an apr hash, but I can't work out
how to look inside it. In C it is a struct with members count and max
etc. In Python it is a class that doesn't remotely resemble the
struct.

Has anyone got a bare-bones bit of working Python that shows how to do
(say) an add or a checkout? There is an example of status in the
Subversion book but it's a toy: it doesn't show how you create an
authentication callback so it will only work locally.

The nice python-ide eric3, written in python itself, features a
subversion interface. Maybe you can take a look at that?

Diez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,951
Messages
2,570,113
Members
46,698
Latest member
alexxx

Latest Threads

Top