93

I know how to do this in SVN,

svn diff http://svn.example.com/branches/A/File1.txt http://svn.example.com/branches/B/File1.txt

But there has to be a less painful way to do this in TortoiseSVN. You would think that you could do it from the Show Log, but it appears to only show revisions on the current branch.

4 Answers 4

117
  1. Go to the repository browser (<right click>/TortoiseSVN/Repo-browser/<enter URL>).
  2. Open right click menu on branch B, select 'Mark for comparison'.
  3. Then open right click menu on branch A, select 'Compare URLs' or 'Show differences as unified diff'.
2
  • 1
    I think this works well across all versions, but in more recent versions, you should use the shortcut mentioned by Kris Erickson in his answer below. Sep 6, 2012 at 13:39
  • 1
    This approach ignores local changes whereas the approach in Kris Ericksons answers includes local changes. Both have their use cases. Imho just something one should be aware of.
    – domids
    Dec 16, 2019 at 9:17
70

I don't know how new this feature is (I certainly read the documentation and didn't find it when I posted the question), but if you hold the Shift button down when you right click on a file, you can compare URLs without having to go to the repository browser.

See Difference to another branch/tag in the Viewing Differences documentation.

To illustrate:

Enter image description here

3
  • This works fine in TortoiseSVN 1.6.12 (corresponding to SVN 1.6.15), 2010-11-24. Mar 1, 2012 at 8:45
  • 2
    this more appropriately answers the question of comparing files without the need to open the repo browser. Love it. Thanks a ton! There are a few other goodies that show up in the SHIFT + Right Click and view the TortoiseSVN menu. Sep 6, 2012 at 13:38
  • Directories can also be compared likewise. Tortoise 1.6.7 - works like a charm.
    – Achow
    Mar 11, 2014 at 7:49
24

I find this method to be much easier:

Open the revision graph for the file you want to diff (context menu->TortoiseSVN->Revision Graph). Select the first revision, and then control-click to select the second revision. Now right click on one of the selected revisions, and select Compare Revisions from the context menu.

Tested on TortoiseSVN 1.7.6.

enter image description here

0
2

The answers here are cool, i love it! Another cool way to diff, in my case, 2 different files found in 2 different folders:

Step 1 - Right-click, Diff later

enter image description here

Step 2 - Right-click, Diff with "..."

enter image description here



That's it! :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.