3

I was trying to implement an extension to an exception collecting system.

After extracting file path and line number from an exception, I want to know who wrote that line and one obvious to accomplish this is "svn blame".

But I don't know how to access SVN in Python.

1 Answer 1

6

There are bindings for subversion here called pysvn. I've never used them, but they seem reasonable.

You can also just use the subprocess module and call out to svn, but I'd try the bindings first.

Sign up to request clarification or add additional context in comments.

5 Comments

+1 I actually created my own hg python binding, although there exist the mercurial (internal api and highly unstable), and hgapi out there. All I did was Popen so there is flexibility. Depends.
I've used PySVN for quick scripts and full applications. It can be a little inconsistent, but I've found it to be very, very useful.
@User007 ugh don't get me started on hg's bindings.
@detly Is it possible to do svn blame with PySVN? I can't find a blame function in a Client object.
@Satoru.Logic It's here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.