Using the folder diff utility

To display the differences in the contents of two folders, you can diff them. For example, after working offline, you can diff your workspace with the depot to determine how to submit your changes so that your workspace and the depot are consistent. To display the changes made to a folder over time, diff two versions of the same folder. The Folder Diff utility offers show/hide options that enable you to list only files of interest.

To diff folders:

  1. Select two folders in the depot or workspace pane.

    You can also select one folder and enter the second folder directly in the Diff dialog.

  2. Right-click and select Diff Against.
  3. In the Diff dialog, specify the paths and versions of the folders you want to compare.
  4. Click Diff to launch the Folder Diff utility.
  5. The Folder Diff utility lists the subfolders and files in both diffed folders, side-by-side.

    Tip

    You can use the following shortcut keys to expand or collapse a folder:

    • Ctrl+Shift+Right Arrow (expand)
    • Ctrl+Shift+Left Arrow (collapse)

    Differences are highlighted as follows:

    p4v diffhighlight violet

    Violet highlight indicates content difference in file or subfolder.

    p4v diffhighlight ivory

    Ivory highlight indicates file is present in only one of the two folders.

    p4v diffhighlight turquoise
    Turquoise highlight indicates file or folder has moved.

    You can select from among the following display options (most of these can be used in combination):

    folderdiff ident pairs

    Show file pairs with identical content

    folderdiff unique

    Show unique files, with no counterparts in the other folder

    folderdiff differences

    Show file pairs with content differences

    p4v filters

    Filter for the files that are displayed

    Click to select a saved filter or to create a filter using the Filter dialog. You can filter by filename (or part of a filename) and folder path. For more information about P4V filters, see Searching and filtering.

    Go to previous diff

    Go to next diff

    folderdiff tree

    Show files in a tree hierarchy

    folderdiff list

    Show files as list

    You can view details about a file by selecting it. The selected file is highlighted in a darker hue. File details appear in the following tabs below the diff windows:

    • Details
    • Integrations
    • Labels
    • Preview

    You can also view a brief description of the latest change to any file by placing your mouse over the file icon.