Send changes made to open files to the depot
When a file has been opened by p4 add, p4 edit, p4 delete,or p4 integrate, the file is listed in a changelist. The user's changes to the file are made only within in the client workspace copy until the changelist is sent to the depot with p4 submit.
By default, files are opened within the default changelist, but new numbered changelists can be created with p4 change. To submit the default changelist, use p4 submit; to submit a numbered changelist, use p4 submit -c changelist#.
When used with the default changelist, p4 submit brings up a form for editing in the editor defined by the EDITOR environment or registry variable. Files can be deleted from the changelist by deleting them from the form, but these files will remain open within the next default changelist. To close a file and remove it from all changelists, use p4 revert.
All changelists have a Status: field; the value of this field is pending or submitted. Submitted changelists have been successfully submitted with p4 submit; pending changelists have been created by the user but have not yet been submitted successfully.
p4 submit works atomically: either all the files listed in the changelist are saved in the depot, or none of them are.
p4 submit will fail if it is interrupted, or if any of the files in the changelist are not found in the client workspace, are locked within another client workspace, or require resolution and remain unresolved. If p4 submit fails while processing the default changelist, the changelist is assigned the next number in the changelist sequence, and the default changelist is emptied. The changelist that failed submission must be resubmitted by number after the problems are fixed.
A single file pattern may be specified as a parameter to a p4 submit of the default changelist. This file pattern is used to limit which files in the default changelist are included in the submission; files that don't match the file pattern are moved to the next default changelist.
-c changelist# | Submit changelist number changelist#. Changelists are assigned numbers either manually by the user with p4 change, or automatically by Perforce when submission of the default changelist fails. |
-i | Read a changelist specification from standard input. Input must be in the same format at that used by the p4 submit form. |
g_opts | See global options. |
Can File Arg Use Revision Specifier? |
Can File Arg Use Revision Range? |
Minimal Access Level Required |
---|---|---|
No | No | write |
A file's location within the depot is determined by intersection of its locations in the client workspace with the client view as set within the p4 client form.
p4 submit's atomicity allows files to be grouped in changelists according to their purpose. For example, a single changelist might contain changes to three files that fix a single bug. Submission atomicity guarantees that all the files that fix the bug are stored in the depot at the same time.
When used with a numbered changelist, p4 submit will not display a form. To change the description information for a numbered changelist, use p4 change -c changelist#.
The file pattern parameter to p4 submit cannot be used when submitting a numbered changelist.
p4 change | |
To open a file in a client workspace and list it in a changelist |
p4 add p4 edit p4 delete p4 integrate |
To move a file from one changelist to another | p4 reopen |
To remove a file from all changelists, reverting it to its previous state | p4 revert |
To view a list of changelists that meet particular criteria | p4 changes |
To read a full description of a particular changelist | p4 describe |
To read files from the depot into the client workspace | p4 sync |
To edit the mappings between files in the client workspace and files in the depot | p4 client |