When you name files and entities, such as users and clients, be aware of the following limitations.
Character | Helix Core Usage | Not allowed for the entity you create with |
---|---|---|
|
recursive subdirectory wildcard file matching wildcard positional substitution wildcard |
|
|
separating pathname components |
and not allowed in the name of a file |
|
No special meaning for Perforce. |
(Allowed, but be aware that Microsoft Windows uses the backslash as the separator for pathname components.) |
|
prefix to the identifier of a changelist, label, client, or datespec. |
|
|
specifying the revision number |
|
|
changelist numbers are purely numeric |
A purely numberic identifier is NOT allowed for a user, client,
depot, label, job, or stream, so consider something like
|
To refer to files containing the
Perforce
revision specifier wildcards (@
and #
), file
matching wildcard (*
), or positional substitution wildcard
(%%
) in either the file name or any directory component, use
the ASCII expression of the character’s hexadecimal value. ASCII
expansion applies only to the following four characters:
Character | ASCII expansion |
---|---|
|
|
|
|
|
|
|
|
To add a file such as [email protected]
, force a literal
interpretation of special characters by using:
$ p4 add -f //depot/path/[email protected]
When you submit the changelist, the characters are automatically expanded and appear in the change submission form as follows:
//depot/path/status%40june.txt
After submitting the changelist with the file’s addition, you must use the ASCII expansion in order to sync it to your workspace or edit it within your workspace:
$ p4 sync //depot/path/status%40june.txt
$ p4 edit //depot/path/status%40june.txt
Most special characters tend to be difficult to use in filenames in
cross-platform environments: UNIX separates path components with
/
, while many DOS commands interpret /
as a
command line switch. Most UNIX shells interpret #
as the
beginning of a comment. Both DOS and UNIX shells automatically expand
*
to match multiple files, and the DOS command line uses
%
to refer to variables.
Similarly, although non-ASCII characters are allowed in filenames and Perforce identifiers, entering these characters from the command line may require platform-specific solutions. Users of GUI-based file managers can manipulate such files with drag-and-drop operations.