Differences in detail
Differences are useful to allow you to see what has changed between recent revisions of a file. There are several different ways that you can view differences between files, or between a file and a previous version of the file.
Viewing differences between versions of a specific file in your working copy
You can view differences using the change log. There is another way to view differences from within your working copy folder, using the right-click menu.
Time for action – viewing differences in a working copy
To view the differences between a file in your working copy and a previous version, follow these steps:
- Navigate to your working copy folder.
- Select the file that you want to compare version history for.
- Right-click the file, and select TortoiseSVN | Diff with previous version.
- A TortoiseMerge window will appear, showing the differences between the current version of the file and the previous version.
(Move the mouse over the image to enlarge.)
What just happened?
You have viewed the differences between a current version of a file and the previously checked in one. If you have made changes to a file, but not yet checked in those changes, you can view the difference between the BASE revision (the version that was in the repository when you last updated), and the working copy by selecting TortoiseSVN | Diff, instead of TortoiseSVN | Diff with previous version.
In addition to using this method, you can view specific differences by going to TortoiseSVN | Show Log and selecting the revision you are interested in from the list at the top of the window. Double-click on the relevant file in the list at the bottom of the window—this will bring up a TortoiseMerge window showing the difference list for the revisions in question.
Viewing differences between files outside your working copy
You don’t have to be inside your working copy to view differences. In fact, you can view differences between files that aren’t under version control.
Time for action – viewing differences in files outside your working copy
To view the differences between files that aren’t within your working copy:
- Navigate to the folder where the files are stored.
- Click on the older version of the file.
- Hold down the Ctrl key and then click on the newer version of the file.
- Right-click on the file, and select TortoiseSVN | Diff.
- The next window will show the differences between the two files (depending on what applications you have installed, and the file type of the file you view the differences for, your screen may differ from the following screenshot):
What just happened?
You have just viewed the differences between two files which are not under version control. You could use this to compare submitted patches, documents or source code. When you use this method to compare differences, the differences may be displayed in the editor or IDE that supports the file (as shown in the previous screenshot), or using the TortoiseMerge window: