Previous Table of Contents Index Next
Perforce 2009.1: Command Reference



p4 change
Synopsis
Create or edit a changelist specification.
Syntax
p4 [g-opts] change [ -s ] [ -f | -u ] [ changelist# ]
p4 [g-opts] change -d [ -f -s ] changelist#
p4 [g-opts] change -o [ -s ] [ changelist# ]
p4 [g-opts] change -i [ -s ] [ -f | -u ]
Description
When files are opened with p4 add, p4 delete, p4 edit, or p4 integrate, the files are listed in a changelist. Edits to the files are kept in the local client workspace until the changelist is sent to the depot with p4 submit. By default, files are opened within the default changelist, but multiple changelists can be created and edited with the p4 change command.
p4 change brings up a form for editing or viewing in the editor defined by the environment or registry variable P4EDITOR. When no arguments are provided, this command creates a new, numbered changelist. (All files open in the default changelist are moved to the new changelist.)
Changelist numbers are assigned in sequence; Perforce may renumber changelists automatically on submission in order to keep the numeric order of submitted changelists identical to the chronological order.
To edit the description of a pending changelist, or to view the fields of a submitted changelist, use p4 change changelist.
If p4 submit of the default changelist fails, a numbered changelist is created in its place. The changelist must be referred to by number from that point forward.
The command p4 changelist is an alias for p4 change.
Form Fields
Contains the changelist number if editing an existing changelist, or new if creating a new changelist.
pending, submitted, or new. Not editable by the user. The status is new when the changelist is created, pending when it has been created but has not yet been submitted to the depot with p4 submit, and submitted when its contents have been stored in the depot with p4 submit.
Writable,
mandatory
Textual description of changelist. This value must be changed before submission.
A list of jobs that are fixed by this changelist. The list of jobs that appears when the form is first displayed is controlled by the p4 user form's JobView: setting. Jobs may be deleted from or added to this list.
The list of files being submitted in this changelist. Files may be deleted from this list, and files that are found in the default changelist can be added.
Options
Delete the changelist. This is usually allowed only with pending changelists that contain no files or pending fixes, but the superuser can delete changelists under other circumstances with the addition of the -f flag.
Force flag. Allows the description, modification date, or user of a submitted changelist to be edited. Editing a submitted changelist requires admin or super access. Superusers and administrators may also overwrite read-only fields when using the -f flag.
Forcibly delete a previously submitted changelist. Only a Perforce administrator or superuser can use this command, and the changelist must have had all of its files removed from the system with p4 obliterate.
Allows jobs to be assigned arbitrary status values on submission of the changelist, rather than the default status of closed. To leave a job unchanged, use the special status of same.
On new changelists, the fix status is displayed as the special status ignore. (If the status is left unchanged, the job is not fixed by the submission of the changelist.)
This option works in conjunction with the -s option to p4 fix, and is intended for use in conjunction with defect tracking systems.
Update a submitted changelist. Only the Jobs: and Description: fields may be updated, and only the submitter of the changelist may update the changelist. The -u and the -f flags are mutually exclusive.
Usage Notes
Can File Arguments Use
Revision Specifier?
You should create multiple changelists when editing files corresponding to different logical tasks. For example, if edits to files file1.c and file2.c fix a particular bug, and edits to file other.c add a new feature, file1.c and file2.c should be opened in one changelist, and other.c should be opened in a different changelist.
p4 change changelist# edits the specification of an existing changelist, but does not display the files or jobs that are linked to the changelist. Use p4 opened -c changelist# to see a list of files linked to a particular changelist and p4 fixes -c changelist# to see a list of jobs linked to a particular changelist
To move a file from one changelist to another, use p4 reopen, or use p4 revert to remove a file from all pending changelists.
Examples
Related Commands
p4 opened -c changelist#
p4 describe changelist#


Previous Table of Contents Index Next

Perforce 2009.1: Command Reference
Copyright 1999-2009 Perforce Software.