Show: Object Pascal C++
Display Preferences

Diff'ing (Comparing) Versions of a File

From Appmethod Topics
Jump to: navigation, search

Go Up to Version Control Systems in the IDE


You can use the version control system integration in the History Manager to diff (compare) versions of a file that is under a version control system.

To diff (compare) versions of a file

  1. In the IDE, open the file that you want to diff. The file should be open in the Code Editor.
  2. Open the History Manager by clicking the History tab, located at the the lower edge of the Code Editor window. If the file is under the version control system, you will see:
    • All the available versions of the file (Version Control in the upper pane, Revision Content)
    • The contents of the current version of the file (read-only, in the lower pane)
  3. On the History Manager, click the Differences tab, located at the lower edge of the window.
  4. The upper pane of the window is now divided into two panes that list the versions of the file. The panes are labeled as:
    • Differences From: Select the first version that you want to compare.
    • To: Select the second version that you want to compare.
In the lower pane, the differences are displayed as follows:
  • Source lines that were deleted are highlighted and marked with a large minus sign (Minus.bmp).
  • Source lines that were added are highlighted and marked with a large plus sign (Plus.bmp).

Highlight Colors

The colors used in the highlighting on the Differences tab depend on several options you can set on the Tools > Options > Editor Options > Color dialog box. In the Element dropdown list, select:

  • diff addition option sets the color to be used for lines marked with Plus.bmp
  • diff deletion option sets the color to be used for lines marked with Minus.bmp
  • diff move option sets the color to be used for lines that have been moved:
    • Source lines that were deleted are highlighted and marked with a large minus sign (Minus.bmp).
    • Source lines that were added are highlighted and marked with a large plus sign (Plus.bmp).

See Also

Personal tools
In other languages