Compare Editor

The compare editor show the results of compares between files that exist in the workbench or in a repository.  You can compare different files, or different versions of the same file.

After a compare is carried out, the compare editor appears in the editor area. In the compare editor, you can browse and copy various changes between the compared files.

Here is what the compare editor looks like between 2 different files:

Here is what the compare editor looks like between 3 different files:

 

Text Compare

The following buttons are available in the compare editor.

Control Visibility of Ancestor Pane

There are two conditions under which a three-way compare will occur, both when using the Team version management support: when comparing a file that is in conflict, and when comparing a merged file. In both cases, the system will determine a common ancestor in the version repository to compare the conflict or merge against. This button determines the visibility of this third editor. By default, the ancestor pane is not visible.

For more information on conflicts and merging, see Catching Up and Merge Wizard respectively.

Copy Current Change from Left to Right

This command merges changes in two files by copying the highlighted change in the left pane into the highlighted fragment on the right.  This will overwrite the highlighted fragment in the right pane.  

Copy Current Change from Right to Left

This command merges changes in two files by copying the highlighted change in the right pane into the highlighted fragment on the left.  This will overwrite the highlighted fragment in the left pane.  

Copy Whole Document from Left to Right

This command copies the entire contents of the file in the left pane into the file in the right pane.  This will overwrite the entire contents of the file in the right pane, making the contents of the two files identical.  

Copy Whole Document from Right to Left

This command copies the entire contents of the file in the right pane into the file in the left pane.  This will overwrite the entire contents of the file in the left pane, making the contents of the two files identical.  

Select Next Difference

This command highlights the next difference that is found between the compared resources.

Select Previous Difference

This command highlights the previous difference that is found between the compared resources.