Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Reference | 2025.1

# p4 describe

Provides information about changelists, as well as files in the changelists, and the path of the open stream, if a stream is open.

## Syntax

    p4 [g-opts] describe [-doptions] [-a -f -I -m -O -s -S] changelist ...

Syntax conventions

## Description

p4 describe displays the details of one or more changelists. For each changelist, the output includes the changelist number, the changelist creator, the client workspace name, the date the changelist was created, and the changelist description.

This command also works with openable stream specifications. See Examples for files.

If a changelist has been `submitted`, the default output also includes a list of affected files and the diffs of those files relative to the previous revision. By default, this command does not perform Keyword expansion because keyword differences tend to obscure real differences.

If a changelist is `pending`, it is flagged as such in the output, and the list of open files is shown.

Diffs for `pending` changelists are not displayed because the files have yet to be submitted to the depot.

The `p4 describe` command limits its report depending on whether or not a changelist is public or restricted. Restricted `submitted` or `shelved` changes are not reported unless you either own the change or have `list` permission for at least one file in the change. Restricted `pending` (but unshelved) changes are visible only to the change owner. If you do not have permission to view a restricted changelist, the message "no permission" is displayed in place of a changelist description. Administrators can override this behavior and view restricted changelists by using the `-f` option.

You cannot run `p4 describe` on the default changelist.

The `p4 describe` command uses `p4`'s built-in diff subroutine. The `P4DIFF` variable has no effect on this command.

## Options

`-a` | For text files only (ignores binary files): For shelved files, shows the content for "open for add" (pending) files. For submitted files, shows the content of added files.
`-d`options`` | Runs the diff routine with one of a subset of the standard UNIX diff options. See Usage notes for an option listing.
`-f` | Force the display of descriptions for restricted changelists. This option requires `admin` permission.
`-I` | Specifies that the changelist number is the `Identity` field of a changelist.
`-m` `max` | Limits files to the first max number of files. The following example alphabetically lists (and diffs) two files affected by changelist 765 and two files affected by changelist 987: p4 describe -m 2 765 987
`-O` | If a changelist was renumbered on submit, and you know only the original changelist number, use `-O` and the original changelist number to describe the changelist.
`-s` | Display a shortened output that excludes the diffs of the files.
`-S` | Lists files that are shelved for the pending changelist and displays diffs of the files against their previous revision.
`g-opts` | See Global options.

## Usage notes

Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required
--- | --- | ---
N/A | N/A | read, `list` for p4 describe -s

The diff options supported by `p4 describe` are:

Option | Name
--- | ---
`-dn` | RCS output format, showing additions and deletions made to the file and associated line ranges.
`-dc[`num`]` | context output format, showing line number ranges and num lines of context around the changes.
`-ds` | summary output format, showing only the number of chunks and lines added, deleted, or changed.
`-du[`num`]` | unified output format, showing added and deleted lines with num lines of context, in a form compatible with the `patch(1)` utility.
`-dl` | ignore line-ending (CR/LF) convention when finding diffs
`-db` | ignore changes made within whitespace; this option implies `-dl`.
`-dw` | ignore whitespace altogether; this option implies `-dl`.

## Examples for files

These examples use `8` to represent a changelist number associated with text (non-binary) files.

Command | Pending Changelist displays | Submitted Changelist displays
`p4 describe 8` | changelist description | changelist description with a list of affected files and any diffs
`p4 describe -S 8` | changelist description of the shelved files associated with the specified changelist diff between shelved and depot versions
`p4 describe -Sa 8` | diffs of edited files that are shelved content of new files that will be added | diffs of edited files that were shelved content of files that were added
`p4 describe -a 8` | diffs of edited files content of shelved files that will be added | diffs of edited files content of files that were added

## Examples for open stream

p4 describe 2

    Change 2 by bruno@brn123 on 2019/02/04 09:12:23 pending
    x
    Affected stream: //root/main
    Affected files ...

    p4 -ztag describe 2

Copy

    ... change 2
    ... user bruno
    ... client brn123
    ... time 1546621943
    ... desc x
    ... status pending
    ... changeType public
    ... stream //root/main

## Related commands

To view a list of changelists | `p4 changes`
To view a list of all opened files | `p4 opened`
To compare any two depot file revisions | `p4 diff2`
To compare a changed file in the client to a depot file revision | `p4 diff`

Your search for returned results