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 P4 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
[email protected]
.
What's new in this guide for the 2015.2 release
This section provides a summary of the notable changes in this guide for the 2015.2 release. For a list of all new functionality and major bug fixes in Perforce Server 2015.2, see the Perforce Server 2015.2 Release Notes.
New commands
- p4 ignores
-
Provides information about why a file is being ignored during add and reconcile operations. Using this command allows you to see the ignore rules that are applied for any given path.
New command options and other command changes
-
$home
can be used in defining environment variables. -
See “Environment and Registry Variables” for more information.
- Scripts
-
If the API level is 79 or greater, canonical filetypes are now displayed by default for all commands that display filetypes. If the API level is 78 or lower, filetype aliases are displayed instead. If your script depends on the display of filetype aliases, you will need either to change the api level or to change your script.
- p4 annotate
-
The use of the new
-u
option allows you to display the name of the user who modified the change and the date when the modification occurred. - p4 change
-
The addition of the
--serverid
option prevents you from forcibly removing a changelist that is on another server. - p4 changes
-
Includes a new
-e
option to display only changes that are greater or equal to the specified changelist number.changelist#
- p4 client
-
The addition of the
--serverid
option prevents you from forcibly removing a client that is connected to another server. - p4 depot
-
You can now create a depot of type
tangent
. The depot spec has also added the fieldStreamDepth
that you can use to specify the subdirectory level where you can root streams in a stream-type depot. - p4 diff2
-
The
-S
option is now optional. If you specify no arguments for p4 diff2, the current stream is diffed against its parent stream. - p4 fetch
-
In addition to copying files, p4 fetch also copies any revision attributes and fix records.
p4 fetch now takes a
-t
option, which specifies that conflicting changes should be unsubmitted and moved into a tangent in the tangent depot, automatically creating that depot if it doesn't exist. - p4 files
-
This command now runs in lockless mode if
db.peeking
is set to3
. - p4 info
-
This command now returns information about the services offered by the current server and specifies which server this server replicates if this server is a replica.
- p4 label
-
The owner of a label may be a group.
- p4 ldap
-
This command may not be run from a read-only or build replica. New attributes have been added to the LDAP spec.
LDAP configurations are stored in the new
db.ldap
table. This table is journalled, so LDAP configurations are now included in checkpoints and are replicated. - p4 ldapsync
-
You can use the
[no]downcase
option in the LDAP specoptions
field to specify whether p4 ldapsync should downcase user names (found by the group query) when updating user names. - p4 login
-
Login attempts, whether successful or not, are logged to a structured log file. If the login fails, the reason for failure is included in the log. In the case of authentication triggers or LDAP authentication, the parts of the error message that contain user data are sanitized as needed.
You can now specify the remote server to which the login should be forwarded, with the new
-r
option. - p4 lock
-
In an edge/commit architecture, use the new
-g
flag to lock the files locally and globally. This option may only be used from an edge server, and it must be used with the-c
option.changelist
- p4 logstat
-
Login attempts, whether successful or not, are logged to a structured log file. If the login fails, the reason for failure is included in the log. In the case of authentication triggers or LDAP authentication, the parts of the error message that contain user data are sanitized as needed.
- p4 monitor
-
More precise information about a replica's use of pull threads is now available.
- p4 pull
-
A new
--batch
option allows you to specify the number of files that can be fetched by one pull operation. This might improve performance if you are pulling many small files. - p4 push
-
In addition to copying files, p4 push also copies any revision attributes and fix records.
- p4 reconcile
-
Use the new
-k
option to update the have list if files are mapped in a client's workspace to files in the depot that are not on the have list. - p4 remote
-
You can specify the identity (user) the Helix Versioning Engine will use to authenticate against a remote server when pushing and fetching, using the new
RemoteUser
field. - p4 resubmit
-
You may not issue this command directly to an edge server; you can issue it directly to a commit server.
- p4 server
-
You can leave the
Name:
field blank in the server specification, or you can set it to the same value asserverid
. - p4 shelve
-
When you run this command, in addition to any open files being shelved, now any open stream specification will also be shelved.
- p4 stream
-
You may now isolate edits to the stream spec to your client only and then make them available to other clients as part of an atomic changelist submission, using the new p4 stream edit, p4 stream resolve, and p4 stream revert commands.
You no longer have to pass in a stream name. By default, p4 stream edits your current stream, that is, the stream associated with your current workspace.
- p4 submit
-
You can set the
net.parallel.max
,net.parallel.submit.threads
,net.parallel.submit.min
, andnet.parallel.submit.batch
configurables to automate parallel processing. In this case, you can use any of the syntax variants for the p4 submit command (without specifying the--parallel
option) and processing will be automatically done in parallel.When you run this command, in addition to any open files being submitted, now any open stream specification will also be submitted.
- p4 switch
-
This command can now take
stream@change
argument to generate a workspace view from a stream’s particular version. - p4 sync
-
Defaults for
--parallel
option values have changed. - p4 triggers
-
Journal-rotate and push triggers have been added.
- p4 unload
-
Defaults for
--parallel
option values have changed.Use the new
-p
option for promoting the shelves of unloaded clients. - p4 unlock
-
An administrator can now remove unwanted orphaned locked files.
In an edge/commit architecture, use the new
-g
flag to unlock the files locally and globally. This option may only be used from an edge server, and it must be used with the-c
option.changelist
- p4 unshelve
-
You may unshelve a promoted shelf into open files and branches on a server from where the shelf did not originate.
When you run this command, in addition to any shelved files being unshelved, now any shelved stream specification will also be shelved.
- p4 unsubmit
-
You may not issue this command directly to an edge server; you can issue it directly to a commit server.
- p4 unzip
-
In addition to copying files, p4 unzip also copies any revision attributes and fix records.
A new option allows you to enable push triggers for the p4 unzip command.
- p4 verify
-
A new
-S
option allows you to verify shelved files.The existing
-t
option may now be used for replicas that havelbr.replication=cache
set. - p4 zip
-
In addition to copying files, p4 zip also copies any revision attributes and fix records.
New specification fields
- p4 client
-
The addition of the
type
field allows you to create a read-only client that can be used for automated testing.The addition of the
backup
field allows you to disable the backup of a particular client connected to a cluster workspace. - p4 group
-
New fields include
LdapConfig
,LdapSearchQuery
, andLdapUserAttribute
. These are used with the p4 ldapsync command. - p4 remote
-
New field to specify a remote user.
- p4 server
-
New optional field
ExternalAddress
specifies the external address used for connections to a commit server. This field must be set for the edge server to enable parallel submits in a federated environment.
New configurables
All configurables are described here: “Configurables”.
client.readonly.dir
-
Set this configurable to the path were db.* files will be placed for a read-only client.
net.parallel.submit.*
-
You can set the
net.parallel.max
,net.parallel.submit.threads
,net.parallel.submit.min
, andnet.parallel.submit.batch
configurables to automate parallel processing. In this case, you can use any of the syntax variants for the p4 submit command (without specifying the--parallel
option) and processing will be automatically done in parallel. rejectList
-
Specifies one or more clients whose requests should be blocked. For more information, see "Rejecting client connection requests" in Helix Versioning Engine Administrator Guide: Fundamentals.
rpl.replay.userrpi
-
Set to
1
to replicate thedb.user.rp
table. See “Configurables” for more information. server.global.client.views
-
Controls whether the view maps of a non-stream client on an edge server or workspace server are made global when a client is modified. See also "Setting global client views" in Helix Versioning Engine Administrator Guide: Multi-site Deployment.
Changed configurables and environment variables
All configurables are described here: “Configurables”
P4CONFIG
-
Can now inherit any extra settings specified in
P4CONFIG
files in subdirectories. P4IGNORE
-
Can be set to a list of files rather than a single file. Syntax rules for ignore files have also changed.
P4NAME
-
Can no longer be set globally; you must specify a server id.
db.replication
-
Can no longer be set globally; you must specify a server id.
lbr.replication
-
Can no longer be set globally; you must specify a server id.
net.backlog
-
The default length of the queue has been increased to 128 connections.
rpl.compress
-
A new value of 4 allows you to compress only the journal pull and journal copy connections between the replica and the master.
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, working with Helix streams, jobs, reporting, scripting, and more. |
|
Basic workflows using the 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 line (reference). |
P4 Command Reference, p4 help |
Installing and administering the Helix versioning engine, including user management, and security settings. |
|
Installing and configuring Helix servers (proxies, replicas, and edge servers) in a distributed environment. |
Helix Versioning Engine Administrator Guide: Multi-site Deployment |
Installing and administering a Helix server cluster for high performance and automated failover. |
Helix Versioning Engine Administrator Guide: Cluster Management |
Helix plug-ins and integrations. |
IDEs: Using IDE Plug-ins Defect trackers: Defect Tracking Gateway Guide Others: online help from the Perforce menu or web site |
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 indicate a parameter for which you must supply specific
information. For example, for a
|
[ |
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. |
|
A vertical bar ( | ) indicates that either
|
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 [email protected]
.
If you need assistance, or wish to provide feedback about any of our
products, contact [email protected]
.