Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically use TortoiseSVN with C# or its related processes to check if a repository is up-to-date

Tags:

c#

tortoisesvn

Is there a way to programmatically use TortoiseSVN with C# or its related processes to check if a repository is up-to-date?

(I can use System.Diagnostics.Process, but I don't want any GUI stuff to show.)

I don't have SVN.

It is open source... So I could go through all the code, but that seems like a pain.

Should I use [dllImport] to call one of the DLL files in the TortoiseSVN bin directory?

In a related problem I wanted to see if a folder was even a Subversion'ed folder. My solution to this was to first find if the folder existed, then to use subwcrev in the bin folder of TortoiseSVN. If the folder isn't a Subversion'ed folder, it would complain.

like image 281
user420667 Avatar asked Dec 08 '25 20:12

user420667


2 Answers

You might check SharpSvn

like image 143
Kalman Speier Avatar answered Dec 11 '25 10:12

Kalman Speier


You can check out sharpsvn: http://sharpsvn.open.collab.net/.

For your related problem - folders that are under subversion sourcecontrol have a (hidden) folder named .svn with subversion specific data inside. You might use the existence of this directory as a rudimentary check. Sharpsvn probably has better support for this.

like image 41
Marijn Avatar answered Dec 11 '25 10:12

Marijn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!