p4 describe (graph)

Display a commit description.

Syntax

p4 describe -n //repo/name [-a -doptions -s] sha

Syntax conventions

Description

Display information about the specified commit.

  • Specify the repo name after -n
  • sha is the corresponding sha1 of the commit

Note

For commits that include a submodule version change, see example for submodule .

Options

-a

Display the content of added files in addition to diff of updated files.

-doptions

Passes one or more options to the built-in diff routine to modify the output

-s

Display a shortened output that excludes the diffs of the files that were updated.

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.

Usage Notes

Can File Arguments Use Revision Specifier? Can File Arguments Use Revision Range? Minimal Access Level Required

N/A

N/A

list protection on path

Examples

p4 describe -n //repo/name SHA1

where SHA1 represents the commit SHA1 that is created after the submit occurs. A changelist that is pending does not yet have a SHA1.

example for submodule

If the commit includes a submodule version change, p4 describe includes the submodule commit-sha values for before and after the version change in the submodule. Suppose that:

  • we have a repo for main, and another repo for a submodule within main

  • the main repo has a commit for an update to the submodule

The output of p4 describe on the main commit includes two commit-sha values that pertain to the submodule:

$ p4 describe -n //repo/platform/main 2c3e8c266e698b5b8f820090925d660
commit 2c3e8c266e698b5b8f820090925d660
Author: maria <maria@company.com>
Date: 2021/09/11 15:09:53
bump-utils-in-main
Affected files ...
//repo/platform/main/lib/utils (edit)
Differences ...
==== //repo/platform/main/lib/utils (Submodule) ====
<#6fa3f5d92439dfa23616385ef72fd60397204
>#4169ea6176af01fb9ef3b6fc3b5ecf617df80

where #6fa3f5d92439dfa23616385ef72fd60397204 is the submodule commit-sha for before the current commit in main, and #4169ea6176af01fb9ef3b6fc3b5ecf617df80 is the submodule commit-sha for after the current commit in main.