About This Manual
This manual documents every Perforce command, environment variable, and configurable. This manual is intended for users who prefer to learn by means of Unix-style man pages, and for users who already understand the basics of Perforce and need to quickly find information on a specific command. This manual is divided into the following parts:
- The first part lists commands in alphabetical order. The table below provides a function-based grouping of this same set of commands.
- The second part lists environment and registry variables in alphabetical order.
- The third part contains miscellaneous reference information about global options, file specifications, views, file types, and configurables.
The following table provides an index to the commands documented in this manual by functional area:
If you’d prefer to learn the concepts on which Perforce is based, or you prefer a style featuring more examples and tutorials than what you find here, see the Helix Versioning Engine User Guide, available from our web site at: http://www.perforce.com/documentation.
If there’s anything we’ve left out that you think should be included, let us know. Please send your comments to manual@perforce.com.
What’s new in this guide for the 2016.1 release
This section provides a summary of the notable changes in this guide for the 2016.1 release. For a list of all new functionality and major bug fixes in Perforce Server 2016.1, see the Release Notes.
Features
- Custom command alias
- You can define your own aliases for commands, and these can range from simple word substitutions to what might be called light scripting. For more information see Command aliases
New and changed configurables and environment variables
New configurables are described in “Configurables”.
auth.id- An alphanumeric identifier that must be set for all servers in a distributed configuration if you want to implement single login to the master, which is then valid across all replica instances.
auth.ldap.pagesize- Specifies the paging limit in bytes for LDAP searches with paged results.
dm.shelve.accessupdate- Updates a shelve access time when the shelf is viewed or modified access time if
its last access time was longer than the limit specified by the value of
dm.shelve.accessupdate. lbr.retry.max- The number of times a replica will try to retrieve a file if a file transfer fails.
server.locks.archive- Set to disable server locks when running the
p4 archiveorp4 restorecommands. P4ALIASES- Location of the directory that holds your
.p4aliasesfile. P4IGNORE- Now allows you to escape the
#character (which normally denotes a comment) with the backslash (\) character.
New specification fields
p4 remote-
The remote spec invoked by the
p4 remotecommand contains a new entry in theOptionsfield:*copyrcs/nocopyrcs. This option determines whether thep4 fetchandp4 pushcommands transfer entire Revision Control System (RCS) archive files when possible, or never transfer entire RCS archive files.The remote spec invoked by the
p4 remotecommand contains a new field:ArchiveLimits:. This field governs how many, if any, revisions of file archives are stored on the server to which the files are fetched. For more information, see the section "Configure server to limit storage of archive revisions" in the "Fetching and Pushing" chapter of Using Helix for Distributed Versioning.
New commands
- p4 aliases
- Display command aliases that are currently defined in a
.p4aliasesfile. - p4 reshelve
- Reshelve files.
New command options and other command changes
- p4 annotate
- New
-Toption allows you to specify tab stops. - p4 archive
- Use the
server.locks.archiveconfigurable to disable server locks when running thep4 archivecommand. - p4 branches
- Use the new option
--meas an abbreviation for-u $P4USER. - p4 change
- Use the option
-Ztag change -oto display, along with other information, the access time for a shelved file. - p4 changes
- Use the new option
--meas an abbreviation for-u $P4USER. - p4 client
- Use the new option
--meas an abbreviation for-u $P4USER. - p4 clone
-
When specifying a filespec, you no longer need to precede the filespec with a
-f.The
-poption is optional. If not specified,p4 cloneuses the remote server specified by theP4PORTenvironment variable. - p4 counter
-
Uses three new options:
--fromand--toset the specified counter to the new value only if the current value of the counter matches the specified old value.-vdisplays the previous value of the specified counter after it has been set or incremented.
- p4 counters
- Documentation has been updated to reflect the current list of counters that this command displays.
- p4 dbstat
- New
-foption displays a page count, free pages, and percent free data for the specified table(s). - p4 delete
- This command has a new
--remoteoption, which — if the specified file is of type+l— takes a global exclusive lock on the file in the shared server from which you cloned the file. - p4 dirs
- Specify new
-ioption to ignore the case of the directory argument when listing directories in a case-sensitive server. - p4 diskspace
- Value displayed for used space in the Size column for Unix file systems now excludes reserved space.
- p4 edit
- This command has a new
--remoteoption, which — if the specified file is of type+l— takes a global exclusive lock on the file in the shared server from which you cloned the file. - p4 fetch
-
This command has new options to refine the level of verbosity in its output: they are
-Oc,-Of, and-Oi, which restrict output to information about every changelist, every file in every changelist, and every integration of every file in every changelist, respectively.This command has a new
-soption, which specifies a shelved changelist to be fetched, instead of one or more submitted changelists. - p4 files
- A new
-ioption allows the server to ignore the case of the file argument when listing files in a case sensitive server. - p4 fstat
- Now displays the working revision for opened files.
- p4 group
-
New
MaxOpenFilesfield allows you to specify the maximum number of files a user in a given group can open as a result of a given command.New
-Foption removes a group from the protections table and from all groups. - p4 integrate
- The
p4 integrate -vcommand has been deprecated. Use thep4 populatecommand instead. - p4 key
-
Uses three new options:
--fromand--toset the specified key to the new value only if the current value of the key matches the specified old value.-vdisplays the previous value of the specified key after it has been set or incremented.
- p4 labels
- Use the new option
--meas an abbreviation for-u $P4USER. - p4 ldap
- You can now enclose values for the
SearchPasswdfield of the LDAP spec in quotation marks. This allows you to use special characters like#if needed. - p4 obliterate
- Documentation has been updated to note that this command does not obliterate a shelve of the file (archive or metadata). When you attempt to unshelve a file that has been obliterated, you will get an error. To recover the content of that file, print the file. To get rid of the shelve, delete the shelf.
- p4 protect
- You may now include comments in a
p4 protectspec. - p4 protects
-
- The new
-moption displays a one word summary of the maximum applicable access level. - The new
-Moption displays a one-word summary of the maximum access level, taking into account exclusions against the specified file path.
- The new
- p4 push
-
This command has new options to refine the level of verbosity in its output: they are
-Oc,-Of, and-Oi, which restrict output to information about every changelist, every file in every changelist, and every integration of every file in every changelist, respectively.p4 pushalso has a new-soption, which specifies a shelved changelist to be pushed, instead of one or more submitted changelists - p4 remote
-
A new
ArchiveLimits: field allows you to specify how many revisions of file archives to store locally when the files are fetched.A new entry in the
Optionsfield,copyrcs/nocopyrcs, determines whether thep4 fetchandp4 pushcommands transfer the entire RCS archive files when possible. - p4 renameuser
- A new
-foption forces the command to execute without checking for accidental merge checks that might have happened if the new user had already been used in this server. - p4 restore
- You can now set the
server.locks.archiveconfigurable to disable server locks when running thep4 restorecommand. - p4 revert
- This command has a new
--remoteoption, which — if the specified file is of type+l— releases the global exclusive lock on the file in the shared server from which you cloned the file. - p4 server
- A new
-coption allows you to set or change configuration values used to set up the distributed environment on an edge or commit server. - p4 shelve
- This command displays the working revision for the files being shelved, rather than the current depot revision.
- p4 submit
- If the
net.parallel.maxconfiguration variable is not set, or if the requested number of parallel threads exceeds the value set fornet.parallel.max, the command will execute without using parallel threads or will use the maximum number of allowed threads. - p4 switch
- The new
-Rxoption controls how files are reconciled when switching between streams. - p4 sync
- If the
net.parallel.maxconfiguration variable is not set, or if the requested number of parallel threads exceeds the value set fornet.parallel.max, the command will execute without using parallel threads or will use the maximum number of allowed threads. - p4 user
- New
-Foption forces the deletion of the specified user, and also removes the user from the protections table and from all groups. - p4 unzip
- This command has new options to refine the level of verbosity in its output:
they are
-Oc,-Of, and-Oi, which restrict output to information about every changelist, every file in every changelist, and every integration of every file in every changelist, respectively. - p4 verify
- A new
-Aoption allows you to verify that files in the archive depot have not become corrupted before you restore them with thep4 restorecommand. - p4 zip
- This command has a new
-soption, which specifies a shelved changelist to be zipped, instead of one or more submitted changelists.
Helix documentation
The following table lists and describes key documents for Helix users, developers, and administrators. For complete information see the following:
http://www.perforce.com/documentation
| For specific information about… | See this documentation… |
|---|---|
|
Introduction to version control concepts and workflows; Helix architecture, and related products. |
|
|
Using the command-line interface to perform software version management and codeline management; working with Helix streams; jobs, reporting, scripting, and more. |
|
|
Basic workflows using P4V, the cross-platform Helix desktop client. |
|
|
Working with personal and shared servers and understanding the distributed versioning features of the Helix Versioning engine. |
|
|
|
P4 Command Reference, |
|
Installing and administering the Helix versioning engine, including user management, security settings. |
|
|
Installing and configuring Helix servers (proxies, replicas, and edge servers) in a distributed environment. |
Helix Versioning Engine Administrator Guide: Multi-site Deployment |
|
Helix plug-ins and integrations. |
IDEs: Using IDE Plug-ins |
|
Developing custom Helix applications using the Helix C/C++ API. |
|
|
Working with Helix in Ruby, Perl, Python, and PHP. |
Syntax conventions
Helix documentation uses the following syntax conventions to describe command line syntax.
| Notation | Meaning |
|---|---|
|
|
Monospace font indicates a word or other notation that must be used in the command exactly as shown. |
|
italics |
Italics indicate a parameter for which you must supply specific information. For example, for a serverid parameter, you must supply the id of the server. |
|
[ |
Square brackets indicate that the enclosed elements are optional. Omit the brackets when you compose the command. Elements that are not bracketed are required. |
|
… |
Ellipses (…) indicate that the preceding element can be repeated as often as needed. |
|
element1 | element2 |
A vertical bar ( | ) indicates that either element1 or element2 is required. |
Please give us feedback
We are interested in receiving opinions on this manual from our users. In particular, we’d like to hear from users who have never used Perforce before. Does this guide teach the topic well? Please let us know what you think; we can be reached at manual@perforce.com.
If you need assistance, or wish to provide feedback about any of our products, contact support@perforce.com.