p4 unsubmit

Unsubmit a changelist, making it a shelved set of changes.

You may not issue this command directly to an edge server, but you can issue it directly to a commit server.

Syntax

p4 [g-opts] unsubmit [-n] [-r remote] [[FileSpec][revSpec]]

Syntax conventions

Description

(DVCS) The p4 unsubmit command takes one or more submitted changelists and undoes the submissions, leaving the changelist as a shelved change with the same content. The changelist can then be unshelved and further updated prior to resubmitting it.

The changelist must have been submitted by the same user and workspace which are used in the p4 unsubmit command. The files in the changelist must be the head revisions of those files in the server. The files must not have been integrated into any other files in the server. The files must not be open by any pending or shelved changelists. The files must not have been archived or purged. The files must not have associated attributes.

If the command specifies multiple files or multiple revisions, all the changelists which affected the specified revisions of the specified files are unsubmitted. Each such change becomes its own separate shelf. Fix records linked to the changelist are not modified.

After unsubmitting a change which has associated jobs, you should review the job and fix status for accuracy. The shelved changelists that are created do not fire any triggers of type shelve-submit or shelve-commit.

After all the specified changelists have been unsubmitted, the p4 unsubmit command syncs the workspace to the head revision.

Options

-n

Performs all the correctness checks, but does not unsubmit any files.

-r remotespec

Specifies a remote spec. The map in the remote spec is used to limit the files affected by the p4 unsubmit command. Thus a command such as p4 unsubmit -r rmt @>=17 will affect only the files specified by the remote spec, not all files in the depot.

FileSpec

The files whose changes will be unsubmitted.

revSpec

If the file argument has a revision, the specified revision is unsubmitted. If the file argument has a revision range, the revisions in that range are unsubmitted.

Usage Notes

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

Yes

Yes

admin

Examples

p4 unsubmit //depot/foo#head

Unsubmits the last change to //depot/foo.

Related Commands

To resubmit unsubmitted changelists

p4 resubmit