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. Context-click and choose 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.

    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.

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

    folderdiff ident pairs

    Shows file pairs with identical content.

    folderdiff unique

    Shows unique files, with no counterparts in the other folder.

    folderdiff differences

    Shows file pairs with content differences.

    p4v filters

    Filter 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.

    p4v nextdiff

    Go to previous or 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.