File specifiers can be modified by appending # or
@ to them.
The # and @ specifiers refer to specific
revisions of files as stored in the depot:
| Modifier | Meaning |
|---|---|
|
|
Revision specifier: The |
|
|
The nonexistent revision: If a revision of
This is useful when you want to remove a file from the client
workspace while leaving it intact in the depot, as in The filespec |
|
|
The head revision (latest version) of |
|
|
The revision on the current client: the revision of file last
|
|
|
Change number: The revision of |
|
|
Change number: The revision of
|
|
|
Label name: The revision of |
|
|
Client name: The revision of Note that deleted files (that is, files marked for
|
|
|
Date and time: The revision of If no time is specified, the head revision at 00:00:00 on the morning of the date specified is returned. Dates are specified
The datespec |
Revision specifiers can be used to operate on many files at once:
p4 sync //myclient/...#4
copies the fourth revision of all non-open files into the client
workspace.
If specifying files by date and time (that is, using specifiers of the
form ),
the date specification should be parsed by your local shell as a single
token. You may need to use quotation marks around the date specification
if you use it to specify a time as well as a date.file@datespec
Files that have been shelved can also be accessed with the p4 diff, p4 diff2, p4 files, and p4 print commands, using
the revision specifier @=, where
changechange is the pending changelist number.
Some
Perforce
file specification characters may be intercepted and interpreted by the
local shell, and need to be escaped before use. For instance,
# is used as the comment character in most UNIX shells, and
/ may be interpreted by (non-Perforce) DOS commands as an
option specifier. File names with spaces in them may have to be quoted on
the command line.
For information on these and other platform-specific issues, see the release notes for your platform.