1 message in com.perforce.perforce-userPCR: 'p4 add' command| From | Sent On | Attachments |
|---|---|---|
| Robe...@perforce.com | 08 Jul 1997 11:34 |
| Subject: | PCR: 'p4 add' command![]() |
|---|---|
| From: | Robe...@perforce.com (Robe...@perforce.com) |
| Date: | 07/08/1997 11:34:51 AM |
| List: | com.perforce.perforce-user |
NAME p4 add -- Opens file(s) in a client workspace for addition to the depot
SYNTAX p4 add [ -c change# ] [ -t type ] filename...
DESCRIPTION 'p4 add' opens a file for 'add' within the client workspace. The specified file(s) are linked to a changelist; the files are not actually added to the depot until the changelist is sent to the server with 'p4 submit'.
By default, the specified files are added to the default changelist. Use '-c' to specify a different changelist.
The new files need not exist within the client workspace at 'p4 add' time, but they must be in the client workspace at 'p4 submit' time, or the submit will fail.
The new file(s) must either not already exist in the depot, or they can exist in the depot but be deleted at the current head revision. Files may be deleted and re-added arbitrarily. The file(s) must be contained within the user's current client view.
Any files that are already opened for 'add' are simply moved into the specified changelist, which must have a status of 'pending'.
When the '-t flag is not provided, Perforce examines the file to determine whether it is text or binary, and the file is stored accordingly. File revisions are stored in reverse delta format if the file is text; the full file revision is stored if the file is binary.
OPTIONS -c change# Opens the files for 'add' within the specified changelist. If this flag is not provided, the files are linked to the default changelist.
-t type Adds the file as the specified type, which must be one of text, ltext, xtext, binary, xbinary, ktext, kxtext, symlink, or resource.
NOTES Wildcards in file specifications provided to 'p4 add' are expanded by the local operating system, not by the Perforce server program 'p4d'. Thus, the '...' wildcard may NOT be used with 'p4 add'.
EXAMPLES p4 add -c 13 * Opens all the files within the user's current directory for 'add'; links these files to changelist 13.
p4 add README ~src/*.c Opens all *.c files in the user's 'src' for 'add'; also opens the README file in the user's current working directory for 'add'. These files are linked to the default changelist.
RELATED COMMANDS Actions: To open a file for edit p4 edit To open a file for delete p4 delete
To copy all open files to the depot p4 submit To create or edit a new changelist p4 change
To revert a file to its unopened state p4 revert To move a file to a different changelist p4 reopen
Reports: To list all opened files: p4 opened
RELATED MANUAL CHAPTERS Chapter 3: QuickStart Chapter 4: Details




