tags:

views:

42

answers:

4

Hi,

So I'm looking to implement a wrapper for SVN in C#, I'm wondering what is the best way to interact with the SVN backend through the wrapper application.

Any suggestions?

The first thing that came through my head was directly using shell to manipulate SVN. Just wondering if there are alternative methods :)

Thanks!

+1  A: 

Check out sharpsvn.

larrys
A: 

The subversion client libraries, as used by Tortoise and the various command-line clients, have a published API - see http://svn.collab.net/svn-doxygen and http://svnbook.red-bean.com/en/1.1/ch08s02.html.

anon
A: 

You could take a look at SubversionSharp which is a C# implementation if the SVN client side API. For any other language, I'd take the same approach: see if a native implementation of the protocol is already available. If yes, use it. If not, see if the protocol is well enough documented to implement it yourself. Only if that is not the case, or time is really scarce, fall back to wrapping the command-line client.

VoidPointer
A: 

APIs are much safer than command-line interaction, if you can find suitable ones. If you do decide to go the command-line route, be EXTREMELY careful and filter everything using whitelists, or someone will come along and own you by svn co'ing a file called ; rm -rf /.

John Stoneham