Babak
Babak

Reputation: 3976

Current Revision of the working directory in SharpSVN

  1. How to get the current revision of the working directory?

  2. How to get a specific revision of a file from the repository's server?

Upvotes: 3

Views: 1932

Answers (2)

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.

Upvotes: 0

Auron
Auron

Reputation: 76

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.

Upvotes: 6

Related Questions