比较 TortoiseSVN 中两个分支之间的文件

我知道在 SVN 里怎么做,

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

但是在 TortoiseSVN 中一定有一种不那么痛苦的方法来做到这一点。您可能认为可以从 Show Log 中进行此操作,但它似乎只显示当前分支上的修订。

66837 次浏览
  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'.

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

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

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! :)