1

SVNClient.diff method seems just can get the differences result, and it would not show all the code. All I want is to compare two versions like SVN show.

PS: Does method GetDiffSummary just show the summary status(modified, delete, etc...) of each version? And it would not show the detail line change, right?

dennybi
  • 11
  • 3

2 Answers2

1

Retrieve each of the revisions separately (you already know the URL & revision numbers) & display them in your application.

SVNClient.Diff() asks the server to calculate the difference. What you're getting is the "diff detail" because that's all that's changed.

You could also use SVNClient.Blame() to get an annotation of who last changed which lines, and at which revisions.

alroc
  • 27,574
  • 6
  • 51
  • 97
  • Thanks alroc. But SVNClient.Blame() can't compare two special versions, and it doesn't display the changes... – dennybi Dec 10 '14 at 02:44
  • I didn't say that it would compare two versions. As for "display", that's up to the application you're writing. SharpSVN is just the API to get at the data. – alroc Dec 10 '14 at 03:44
0

If you want access to both versions of the file (to provide/generate the diff yourself) you can use .Write() to fetch a single version... and do that twice. This is what tools like TortoiseSVN do to show their visual diff.

Bert Huijben
  • 19,525
  • 4
  • 57
  • 73