Delete files
Deleting files is more complicated than just deleting them from your
filesystem. To mark files for delete, issue the p4
delete
command. In this case, we choose to delete just the
header files.
p4 delete *.h
Helix Core Server displays the following:
//JamCode/main/file1.h#1 - opened for delete //JamCode/main/file2.h#1 - opened for delete //JamCode/main/file3.h#1 - opened for delete
As in
Edit files, you
issue the p4 submit
command to have the deletion
affect files in the depot:
p4 submit
Helix Core Server
opens the change specification
in an editor:
# A Perforce Change Specification. # # Change: The change number. 'new' on a new changelist. # Date: The date this specification was last modified. # Client: The client on which the changelist was created. Read-only. # User: The user who created the changelist. # Status: Either 'pending' or 'submitted'. Read-only. # Type: Either 'public' or 'restricted'. Default is 'public'. # Description: Comments about the changelist. Required. # ImportedBy: The user who fetched or pushed this change to this server. # Identity: Identifier for this change. # Jobs: What opened jobs are to be closed by this changelist. # You may delete jobs from this list. (New changelists only.) # Files: What opened files from the default changelist are to be added # to this changelist. You may delete files from this list. # (New changelists only.) Change: new Client: jschaffer_ws User: jschaffer Status: new Description: <enter description here> Files: //JamCode/main/file1.h # delete //JamCode/main/file2.h # delete //JamCode/main/file3.h # delete
Enter a description under Description
and then save your
changes, to store the changes you made in the
Helix Core Server
depot. Something like the following output is displayed:
Change 3 created with 3 open file(s). Submitting change 3. Locking 3 files ... delete //JamCode/main/file1.h#2 delete //JamCode/main/file2.h#2 delete //JamCode/main/file3.h#2 Change 3 submitted.