Create numbered changelists
To create a numbered changelist, issue the p4 change
command. This command displays the changelist form. Enter a description
and make any desired changes; then save the form and exit the editor.
All files open in the default changelist are moved to the new changelist. When you exit the text editor, the changelist is assigned a number. If you delete files from this changelist, the files are moved back to the default changelist.
Example Working with multiple changelists
Bruno is fixing two different bugs, and needs to submit each fix in a separate changelist. He syncs the head revisions of the files for the first fix and opens the file for edit in the default changelist:
C:\bruno_ws> p4 sync //JamCode/dev/jam/*.c
[list of files synced...]
C:\bruno_ws> p4 edit //JamCode/dev/jam/*.c
[list of files opened for edit...]
Now he issues the p4 change
command and enters a
description in the changelist form. After he saves the file and exits
the editor,
Helix Core Server
creates a numbered changelist containing the files.
C:\bruno_ws\dev\main\docs\manuals> p4 change
[Enter description and save form]
Change 777 created with 33 open file(s).
For the second bug fix, he performs the same steps, p4
sync
, p4 edit
, and p4
change
. Now he has two numbered changelists, one for
each fix.
The numbers assigned to submitted changelists reflect the order in which the changelists were submitted. When a changelist is submitted, Helix Core Server might renumber it, as shown in the following example:
Example Automatic renumbering of changelists
Bruno has finished fixing the bug that he’s been using changelist 777
for. After he created that changelist, he submitted another changelist,
and two other users also submitted changelists. Bruno submits
changelist 777 with p4 submit -c 777
, and sees the
following message:
Change 777 renamed change 783 and submitted.