p4 resubmit

Resolve and resubmit some or all unsubmitted changes.

Note

For distributed version control only:

Syntax

p4 [g-opts] resubmit -l
p4 [g-opts] [-R] resubmit -m
p4 [g-opts] [-R] resubmit -e
p4 [g-opts] [-R] resubmit -i [[-r remote] filespec ...]

Syntax conventions

Description

The p4 resubmit command resubmits changes that have been unsubmitted. Use this command to revise a set of changelists that you have:

  • submitted locally
  • not pushed to any other server
  • have unsubmitted

This command has three modes:

automatic

-m

Syncs your workspace to #head and processes each conflicting change. For details, see -m under Options.

partially interactive

-e

 

Prepares the first (oldest) conflicting change, then exits. The files for the change are open in your workspace.

  1. Resolve or make any other necessary changes to the workspace files
  2. Run p4 resubmit -R -e
  3. This prepares the next conflicting change.
fully interactive -i

If a file path is also specified, this option unsubmits each change that modified a file in that path.

If the -r flag is also specified, it names a remote spec.

The mapping in the remote spec limits the files affected by the unsubmit operation.

Thus a command such as p4 resubmit -r rmt @>=17 affects only the files specified by the remote spec.

resubmit -i then processes each conflicting change.

Options

-e

Runs p4 resubmit in partially-interactive mode, allowing you to inspect each change prior to submitting it.

-i

Runs p4 resubmit as a fully interactive resubmission tool. You can reorder, combine, or discard changes.

For each change, resubmit displays summary information about the change and prompts you to indicate which action to take:

c Modify the change description for this change.
m Merge this change, then submit if no conflicts.
e

Merge this change, then exit for further editing. After choosing either e or q you can continue interactive resubmit by running resubmit -R -i

r

Interactively resolve this change, then submit if no conflicts.

a

Add (squash) this change into the next conflicting change.

s Skip this change and move on to the next.
d Delete this change without submitting it.
b Begin again from the earliest remaining change.
l List the changes remaining to be processed.
v View the current change in short form.
V View the current change with full diffs.
R Display the status of resolved and unresolved merges.
q

Quit the resubmit operation. After choosing either e or q you can continue interactive resubmit by running resubmit -R -i

? Display (short) help during the resubmit command.

-l

Lists all the unsubmitted changes but takes no action. This is useful as a way to preview the work that must be resubmitted.

-m

p4 resubmit -m runs in automatic mode:

  1. Syncs your workspace to #head.
  2. Processes each unsubmitted change:
  3. If the change is a tangent of unsubmitted work in the tangent depot
    created by p4 fetch -t
    sync
    integrate tangent/...@=change dest/...
    resolve -am
    submit
    If the change is a shelf of unsubmitted work
    created by p4 unsubmit
    sync
    unshelve -s change -c change
    resolve -am
    submit

If, for any change in the list, the p4 resolve -am processing detects merge conflicts in any file in that change, the p4 resubmit command terminates. All the files in that change which had merge conflicts are left unresolved until you do the following:

  1. Run the p4 resolve command to resolve the conflicts.
  2. Re-run p4 resubmit -Rm to resume the resubmit process (the first thing it does is submit the resolved files from this change, then it proceeds to the next change).

-r remote

When p4 resubmit is run with the -i option, the -r option specifies the remote spec whose mapping is used to limit the files affected by the unsubmit operation. For example:

p4 resubmit -r rmt @>=17

This example affects only the files specific by the remote spec, not all files in the depot.

-R

Resume the resubmit process once conflicts have been resolved. With this flag, resubmit begins by submitting the fully-resolved change and then proceeds to the next unsubmitted change.

filespec

When a filespec is provided with the -i option, the interactive resubmit first unsubmits each change that modified a file in that path.

Usage notes

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

N/A

N/A

write,
or admin to use the -i option

Examples

p4 resubmit -m

Merges and resubmits your unsubmitted changes.

Related commands

To unsubmit submitted changelists

p4 unsubmit