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:

Function

Where to look

Help

p4 help, p4 info, “File Specifications”, “Views”, “Global Options”, “File Types”

Client workspace

p4 clean, p4 client, p4 clients, p4 flush, p4 have, p4 ignores, p4 sync, p4 update, p4 where, p4 workspace, p4 workspaces

Files

p4 add, p4 attribute, p4 copy, p4 delete, p4 diff, p4 diff2, p4 dirs, p4 edit, p4 files, p4 fstat, p4 grep, p4 move, p4 lock, p4 print, p4 reconcile, p4 rename, p4 revert, p4 status, p4 sizes, p4 unlock

Changelists

p4 change, p4 changelist, p4 changes, p4 changelists, p4 describe, p4 filelog, p4 opened, p4 reopen, p4 review, p4 shelve, p4 submit, p4 unshelve

Jobs

p4 fix, p4 fixes, p4 job, p4 jobs, p4 jobspec

Branching and Merging

p4 branch, p4 branches, p4 copy, p4 cstat, p4 integrate, p4 integrated, p4 interchanges, p4 istat, p4 label, p4 labels, p4 labelsync, p4 list, p4 merge, p4 populate, p4 tag, p4 resolve, p4 resolved, p4 stream, p4 streams

Administration

p4 admin, p4 archive, p4 cachepurge, p4 configure, p4 counter, p4 counters, p4 dbschema, p4 dbstat, p4 depot, p4 depots, p4 diskspace, p4 journals, p4 key, p4 keys, p4 license, p4 lockstat, p4 logappend, p4 logger, p4 logparse, p4 logrotate, p4 logschema, p4 logstat, p4 logtail, p4 monitor, p4 obliterate, p4 ping, p4 property, p4 proxy, p4 pull, p4 reload, p4 renameuser, p4 replicate, p4 restore, p4 reviews, p4 server, p4 serverid, p4 servers, p4 triggers, p4 typemap, p4 unload, p4 verify

Security

p4 group, p4 groups, p4 login, p4 logout, p4 passwd, p4 protect, p4 protects, p4 tickets, p4 trust, p4 user, p4 users, P4CLIENTPATH, P4SSLDIR, P4TRUST

Environment

p4 set, “Environment and Registry Variables”, P4AUDIT, P4AUTH, P4BROKEROPTIONS, P4CHANGE, P4CHARSET, P4COMMANDCHARSET, P4CLIENT, P4CONFIG, P4DEBUG, P4DIFF, P4DIFFUNICODE, P4EDITOR, P4HOST, P4IGNORE, P4JOURNAL, P4LANGUAGE, P4LOG, P4MERGE, P4MERGEUNICODE, P4NAME, P4PAGER, P4PASSWD, P4PCACHE, P4PFSIZE, P4POPTIONS, P4PORT, P4ROOT, P4TARGET, P4TICKETS, P4USER, PWD, TMP, TEMP

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 .

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 changelist# option to display only changes that are greater or equal to the specified changelist number.

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 field StreamDepth 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 to 3.

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 spec options 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 changelist option.

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 as serverid.

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, and net.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 [email protected] 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 changelist option.

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 have lbr.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, and LdapUserAttribute. 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, and net.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 the db.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.

Introducing Helix

Using the command-line interface to perform software version management, working with Helix streams, jobs, reporting, scripting, and more.

Helix Versioning Engine User Guide

Basic workflows using the P4V, the cross-platform Helix desktop client.

P4V User Guide

Working with personal and shared servers and understanding the distributed versioning features of the Helix Versioning engine.

Using Distributed Versioning with Helix

p4 command line (reference).

P4 Command Reference, p4 help

Installing and administering the Helix versioning engine, including user management, and security settings.

Helix Versioning Engine Administrator Guide: Fundamentals

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.

C/C++ API User Guide

Working with Helix in Ruby, Perl, Python, and PHP.

APIs for Scripting

Syntax conventions

Helix documentation uses the following syntax conventions to describe command line syntax.

Notation

Meaning

literal

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.

[-f]

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 .

If you need assistance, or wish to provide feedback about any of our products, contact .