views:

46

answers:

4

I am writing a utility that automates some SVN processes. All of the machines that this utility will be deployed to have TortoiseSVN installed - however, they might not be the same versions. I understand that TortoiseSVN is statically linked to a specific version of a SVN library, and that this is upgraded often.

What I want to avoid is having the checkouts that my utility creates and updates be incompatible with TortoiseSVN. My initial idea was to use the TortoiseSVN command line arguments to invoke the dialogs, but they all require user input. I would rather this all be automatic, and the output of the SVN commands be sent to stdout.

Is there any way that I can gain direct access to the SVN library that TortoiseSVN uses internally? Or are SVN checkouts guaranteed to be (forwards and backwards) compatible between minor version differences? Upgrading the SVN binaries my utility uses per major version of SVN wouldn't be too much of a problem. I just don't want to mandate that every user use a specific version of TortoiseSVN.

To those who suggest that I use the command lines tools for SVN:

The clients may not have the SVN command line binaries installed - and even if they do, there would be differences between the version that TortoiseSVN is linked to and the version the command line binaries are linked to - which could lead to incomparability.

A: 

I've tried this a few times and the differences between certain versions of SVN code have sometimes been substantial. My guess is that you will have to specify that your code is only compatible with certain version(s) of SVN.

If your application needs are simple, you might be able to execute command line instructions?

Another option would be to try and write your code to read the SVN version, and then handle the differences in your code. That would be a nightmare IMHO.

Jess
+1  A: 

You may use the sharpsvn api for direct access the svn server.

It's xcopy deployable and isolated from other svn or tortoisesvn binaries.

Ertan
A: 

TortoiseSVN installation has command line tool named TortoiseProc.exe. See "Appendix D. Automating TortoiseSVN" topic in TortoiseSVN's help book (which is included to TortoiseSVN installation as well).

DNNX
Yeah, I already looked into this - but every invocation results in a dialog box being created that a user has to confirm. I would rather this be automatic.
nlaq
+1  A: 

I'm used to a setup that uses TortoiseSVN and also some scripts that rely on a seperate svn commandline client.

In general we don't have issues.

The main compatibility concern is if the working copy format changes. This happened between svn 1.5 and 1.6.

An svn 1.5 client could not work with a 1.6 checkout.

See: http://subversion.apache.org/docs/release-notes/1.6.html

On past projects I have also used the TortoiseProc commandline tool - note that it can be called in a manner that removes user interaction if no errors occur see /closeonend in http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-automation.html

I don't believe there is any way to access the base svn client code inside the Tortoise binaries.

morechilli
Alright, thanks. It seems the only real option here is just bundle/deploy/link a separate install of the SVN binaries, and hope it doesn't break tortoise. Also, on the docs it says: "Remember that TortoiseSVN is a GUI client, and this automation guide shows you how to make the TortoiseSVN dialogs appear to collect user input. If you want to write a script which requires no input, you should use the official Subversion command line client instead." Even with closeonend, it still requires user input.
nlaq