How to get the current revision of the working directory?
How to get a specific revision of a file from the repository's server?
Asked
Active
Viewed 1,892 times
3

Babak
- 3,716
- 6
- 39
- 56
-
This thread contains quite a bit of information that can be considered to be answers to this question: http://stackoverflow.com/questions/684953/how-to-get-latest-revision-number-from-sharpsvn – RenniePet Jul 27 '14 at 23:13
2 Answers
6
Use the SvnClient.GetInfo() method, with the SvnTarget set as either your working directory or the remote repository. You can then use the Revision property of the SvnInfoEventArgs to get what you want.

Auron
- 76
- 2
0
Code
var cc = new SvnWorkingCopyClient();
cc.GetVersion("Checkout Source FullPath", out var ver);
ver.Start and ver.End are what you want. But, I don't know why two values(Start and End) exist.