Edit online

View Differences

One of the most common requirements in project development is to see what changes have been made to the files from your Working Copy or to the files from the repository. You can examine these changes after a synchronize operation with the repository, by using the Open in compare editor action from the contextual menu.

The text files are compared using a built-in Compare view that uses a line differencing algorithm or a specified external diff application (if such an application is set in the SVN Diff preferences page). When a file with outgoing status is involved, the compare is performed between the file from the working copy and the BASE revision of the file. When a file with incoming or conflict status is involved, the differences are computed using a three-way algorithm that means that the local file and the repository file are each compared with the BASE revision of the file. The results are displayed in the same view. The differences obtained from the local file comparison are considered outgoing changes and the ones obtained from the repository file comparison are considered incoming changes. If any of the incoming changes overlap outgoing changes then they are in conflict.

A special case of difference is a diff pseudo-conflict. This is the case when the left and the right sections are identical but the BASE revision does not contain the changes in that section. By default, this type of changes are ignored. If you want to change this, you can go to the SVN preferences page and select the Allow unversioned obstructions option.

The right editor of the internal compare view presents either the BASE revision or a revision from the repository of the file so its content cannot be modified. By default, when opening a synchronized file in the Compare view, a compare is automatically performed. After modifying and saving the content of the local file presented in the left editor, another compare is performed. You will also see the new refreshed status in the Working Copy view.

Figure 1. Compare View

At the top of each of the two editors, there are presented the name of the open file, the corresponding SVN revision number (for remote resources) and the author who committed the associated revision.

There are three types of differences:
  • Incoming changes - Changes committed by other users and not present yet in your working copy file. They are marked with a blue highlight and on the middle divider the arrows point from right to left.
  • Outgoing changes - Changes you have done in the content of the working copy file. They are marked with a gray highlight and the arrows on the divider are pointing from left to right.
  • Conflicting changes - This is the case when the same section of text that you already modified in the local file has been modified and committed by some other person. They are marked with a red highlight and red diamonds on the divider.

There are numerous actions and options available in the Compare View toolbar or in the Compare menu from the main menu. You can decide that some changes need adjusting or that new ones must be made. After you perform the adjustments, you may want to perform a new compare between the files. For this case there is an action called Perform files differencing. After each files differencing operation the first found change will be selected. You can navigate from one change to another by using the actions Go to first, Go to previous, Go to next and Go to last modification. If you decide that some incoming change needs to be present in your working file you can use the action Copy change from right to left. This is useful also when you want to override the outgoing modifications contained in a conflicting section. The Copy all non-conflicting changes from right to left action copies all incoming changes that are not contained inside a conflicting section in your local file.

Suppose that only a few words or letters are changed. Considering that the differences are performed taking whole lines of text into account, the change will contain all the lines involved. To find exactly what words or letters have changed, the Word Details and Character Details dialog boxes are available. They present a more detailed comparison result when you double-click the middle divider of a difference.

When you want to examine only the changes in the real text content of the files, while disregarding the changes in the number of white spaces between words or lines, there is an option available in the SVN Preferences that allows you to enable or disable the white space ignoring feature of the compare algorithm.