Search code examples
pythonwindowssvnpython-bindings

What is the alternative for CollabNet's python svn bindings?


What is the alternative for the python svn bindings provided by CollabNet (this where you have 2 directories: svn and libsvn, the second with a lot of pre-compiled libraries)? The problem with it is that it just can't be configured to run with Windows version on Python. We've done what was written on various fora, but it just didn't work.

At best would be the package written fully in python - no compilation issues. I know of pysvn, but it seems to have client-side functionality (based on checkouted code) not server-side (based on provided repository path, such as svnlook).


Solution

  • Apache Subversion is written in C and provides native libraries for the OS. On Windows, this means DLL's. Subversion provides "bindings" for a number of different languages, including Python. This gives you a shim that lets you write code in your language and the bindings handle making calls into the native libraries.

    To use the Python bindings, you need to install them into your Python system but you ALSO need to make sure the appropriate Subversion native library are on PATH. Your Python code will load the Python bindings, but that code will load and make calls into the native DLL's. So they have to be on the PATH and they have to be a matching version.

    There is no "pure Python" version of Subversion.