Diff Tab Layout

The Diff tool displays the two versions side-by-side in separate panes, so that corresponding text lines in the versions line up visually.

Diff Overview

(You can use buttons Horizontal Layout and Vertical Layout at the right side of the toolbar to arrange the panes above-and-below.) We'll call them the "before version" (displayed on the left, or above) and the "after version".

The element pathname and the version-IDs are displayed above the versions' contents.

Initially, the two panes are the same width, but you can drag the vertical separator to change the relative widths. To make both panes wider, just increase the size of the overall AccuRev GUI window.

Notes:

  • Namespace differences

The two versions being compared can have different pathnames: the element may have been renamed or moved to another directory within the depot. (This may have occurred in one of the versions, or in both of them.) The Diff tool does not highlight or announce such namespace differences.

  • Left vs. right

    Depending on how you launch the Diff tool, an older version might be displayed on the right, and a newer version on the left. We recommend keeping the older version on the left, so that "before" and "after" in the descriptions below correspond to reality.

  • Comparing binary files

    If the versions to be compared are in a binary image format that AccuRev can render, the Diff tool simply displays the versions, so that you can determine their differences by inspection. AccuRev can render the following image formats:

    • JPEG (.jpg or .JPG filename suffix)
    • PNG (.png or .PNG)
    • GIF (.gif or .GIF)
  • Applying changes from the "before" version to your workspace's version

    If you're comparing the file in your workspace with another version, you can use the Diff tool to edit your file as you view the differences.

    See Editing a File Using the Diff Tool.

Back to top

Difference Section Color-Coding

Through color-coding, the Diff tool partitions the text into the following kinds of "difference sections":

  • Unchanged Section (white background): Text section in which the versions are identical.
  • Added Section (green background): Text section that occurs only in the "after" version. Empty space with a blue background appears at that point in the "before" version.
  • Deleted Section (red background): Text section that occurs only in the "before" version. The deleted section appears with a blue background in the "before" version.
  • Changed Section (blue background): Sometimes, the Diff tool decides that a text section in the "before" version has been revised, producing the corresponding section in the "after" version. The before and after sections are not necessarily the same length, in which case some empty space is displayed in one of the versions. Both the before and after sections appear with a blue background. Both sections contain red character highlights, indicating the first location in a line where the two versions differ:

If a text block has been moved from one location in the file to another, the Diff tool indicates this as two separate changes: a deleted section at the original location, and an added section at the new location.

Your user preferences include controls for the Diff tool's handling of whitespace-only differences between the versions. (See AccuRev Preferences (Tools > Preferences Command).)

Back to top