Perforce Command Reference:   [Index] [Prev] [Next]


p4 delete

Synopsis

Opens file(s) in a client workspace for deletion from the depot

Syntax

p4 [g-opts] delete [-c changelist#] file...

Description

Opens file(s) in a client workspace for deletion from the depot. The files are immediately removed from the client workspace, but are not deleted from the depot until the corresponding changelist is sent to the server with p4 submit.

Although it will appear that a deleted file has been deleted from the depot, the file is never truly deleted, as older revisions of the same file are always accessible. Instead, a new head revision of the file is created; it marks the file as being deleted. If p4 sync is used to bring the head revision of this file into another workspace, the file will be deleted from that workspace.

A file that is open for deletion will not appear on the client's have list.

Options

g_opts See global options section.
-c change# Opens the files for delete within the specified changelist. If this flag is not provided, the files are linked to the default changelist.

Usage Notes

Can File Arg Use
Revision Specifier?
Can File Arg
Use Revision Range?
Minimal
Access Level Required
No No open

Examples

p4 delete //depot/README Opens the file called README in the depot's top level directory for deletion. The corresponding file within the client workspace is immediately deleted, but the file is not deleted from the depot until the default changelist is submitted.
p4 delete -c 40 Opens all files in the current client workspace for deletion. The files are immediately removed from the client workspace; they won't be deleted from the depot until changelist 40 is sent to the server with p4 submit.

Related Commands

To open a file for add p4 add
To open a file for edit p4 edit
To copy all open files to the depot p4 submit
To read files from the depot into the client workspace p4 sync
To create or edit a new changelist p4 change
To list all opened files p4 opened
To revert a file to its unopened state p4 revert
To move an open file to a different changelist p4 reopen



Perforce Command Reference:   [Index] [Prev] [Next]


Copyright 1999 Perforce Software.
Contact us at [email protected]
Last updated: 09/15/99 (Manual version 99.1.cr.6)