How can I get the diff detail (display whole file) of two version by use SharpSVN?

525 Views Asked by At

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?

2

There are 2 best solutions below

2
On

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.

0
On

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.