What’s new in the Helix Core Command-Line (P4) Reference
This section provides a summary with links to topics in this Helix Core Command-Line (P4) Reference. For a complete list of what's new in this release, see also What’s new in the Helix Core Server Administrator Guide, What’s new in Helix Core Command-Line (P4) Guide, and the Release Notes for Version 2024.1.
2024.1 release
-
To allow you to start working with a new stream quickly, the p4 stream command includes the sparsedev and sparserel stream types.
-
To keep a sparse stream lightweight, the dm.stream.sparse.branchmax configurable allows you to set a limit on the number of files in the sparse stream.
-
If that limit needs to be exceeded, a
sparsedev
stream can be converted to adevelopment
stream, and asparserel
stream can be converted to arelease
stream. To learn more, see the convertsparse option ofp4 stream
.
-
-
A new type of client workspace,
partitioned-jnl
, might have a positive effect on performance and, like the defaultwriteable
type of client workspace, is eligible for journaling, checkpointing, and recovery. To learn more, see theType:
field ofp4 client
.-
Configurables that support
partitioned-jnl
are: client.readonly.dir, db.partition.dropondelete, and db.partition.verify.
-
-
Running
p4 verify -t
on the commit server adds any missing archives to the journal to be replicated to downstream replicas, including edge servers. To learn more, see-t
in the Options of p4 verify. -
For security, consider setting the
dm.user.hideinvalid
configurable. -
To improve performance for commits of large binary files of type
+F
(see File type modifiers) from low-bandwidth remote users, it is possible to only send the modified portion (delta) of such files. The configurables to enable and control this are:-
net.delta.transfer.minsize
, the minimum file size for delta transfers. -
net.delta.transfer.threshold
, the maximum percentage of a file that differs before the whole file is transferred rather than only transferring the deltas.
-
-
To improve the management of configurables:
-
p4 configure show
includes the timestamp of the most recent modification of given configurable. To learn more, see show in the Options of p4 configure. -
Providing a comment when changing the value of a configurable with the
p4 configure
command can be made mandatory by setting thedm.configure.comment.mandatory
configurable. -
Additional information about each configurable is available from the output of
p4 configure help
command. See Default value and p4 configure help. (The output ofp4 help configurables
lists each configurable's Name and Use.) -
A single command that deletes both a client workspace and its shelves. To learn more, see the
-Fd
option of p4 client. -
Support for adding comments preceded by
##
to theView
section of p4 client, p4 branch, and p4 label specs, as well as to theTypemap
section of p4 typemap specs. (These follow the same pattern as protection table Comments.) -
The db.journalrotate.warnthresh can be set to remind admins and users of type operator to rotate the journal.
-
The dm.change.skipkeyed configurable might improve performance for p4 populate.
-
The submit.storagefields configurable controls the action of a submit request with regards to the
compCksum
field in a storage record. -
The
-a
option of p4 depots lists all depots, including hidden depots.
See also What's New in Helix Core Server Administrator Guide.
2023.2 release
-
To help mitigate performance problems with creating and restoring checkpoints with large database tables, this release provides a feature to specify the type of storage for new "attributes", also known as "traits". Attributes that have. large values can be stored in the
trait
depot instead of in thedb.traits
table. Thetrait
depot is a new type of depot that is created automatically and is used exclusively for managing trait values.-
To specify the minimum size of traits that are stored in the
trait
depot, set the trait.storagedepot.min configurable. -
The trait depot is visible by using the
p4 depots -t trait
command.
-
To avoid the risk of trait values being lost in the event of a disk failure, include the trait depot in the list of depots that require regular backups.
-
For more information, see
p4 attribute
.
-
-
The p4 fstat command has a new option,
-On
, to report attributes with their storage location rather than their values. -
The new zlib.compression.level configurable specifies the amount of compression, with can be tuned to balance compression time and file size.
-
Setting up rules for which files to exclude from p4 add and p4 reconcile no longer requires setting the P4IGNORE environment variable. Just create a file named
.p4ignore
orp4ignore.txt
and add your rules to that file. -
p4 configure
now supports comments, which can be used to track the reason why a configurable setting was changed. In addition, detailed information about each configurable is displayed with thep4 configure help
command. -
The
proxy.clearcachethresh
configurable allows you to set the threshold for deleting inactive files from the proxy cache. -
The -L option of the p4 license command lists the server IP and MAC addresses to use when requesting a license from Perforce Support.
-
The new journalPrefixBackup Commit Server configurable makes it possible to manually move rotated journal files to a secondary storage location on the commit server and still support edge server activity. For example, your commit server machine might have access to a location where storage is more economical. Setting this configurable enables the commit server to read the rotated journal files from the secondary location. No server shutdown is necessary to set the configurable.
-
p4 streams
--viewmatch
now accepts a revision specifier.
See also What's New in Helix Core Server Administrator Guide.
2023.1 release
-
Support for parallel checkpoint and multifile options. See the
-p
,-m
, -NnumberOfThreads
options for thep4 admin checkpoint
command. -
To enhance performance tuning and provide system resource monitoring, twelve
sys.pressure.*
configurables have been added for system resource monitoring, starting with sys.pressure.max.pause.time. Additionally, logs now include the amount of time a command has spent in the paused state. See paused state in P4LOG. The system resource monitoring feature is described in detail in Performance tuning > System resources in the Helix Core Server Administrator Guide. -
Support for Helix Core Virtual File Service (P4VFS), including support for alternative sync agents that update the state of virtual file service providers. See the
[no]altsync
option in p4 client, the P4ALTSYNC environment variable, and the Helix Core Virtual File Service (P4VFS) Guide. -
You have the option of ensuring that DVCS pushes and fetches retain the existing change numbers by setting the dm.fetch.preservechangenumbers configurable. (See Using Helix Core Server for Distributed Versioning.)
-
The
p4 sizes -C
option reports what the filesizes would be if written with the current client connection. -
The
-m max
option of p4 integrated allows you to specify how many integrations are listed. -
p4 topology allows the user to mark the Server record as moved with the
-m
option, and accepts the destination server address and the server id to delete the record with the-D
option. -
Content distribution provides a way to push a subset of content from a source server to one or more target servers so that authorized users can access that content. See distribution-server in the Services: field of the p4 server topic.
2022.2 release
-
Improve performance with parallel checkpointing, dumping and recovery. See the db.checkpoint.threads configurable and Parallel checkpointing, dumping and recovery in the Helix Core Server Administrator Guide.
-
To help your organization avoid unwanted downtime, starting seven days before the license expires, the Helix Core administrator is notified of the expiration date when logging in to the Server. To modify this default behavior, use the auth.licenseexpiry.warn and auth.licenseexpiry.warnthreshold configurables.
-
p4 renameclient makes it easy to rename a client workspace, and the run.renameclient.allow configurable determines which sort of user can run the command.
-
On Windows Server 2016 and newer, journal rotation can be performed using an atomic rename. Previous journal rotation for Windows was performed as a copy and truncate operation. The atomic rename journal rotation offers a significant performance gain on Windows NTFS filesystems. To enable this feature, see the instructions at filesys.atomic.rename.
-
The
Components
field of p4 stream has two additional values forcomponent_type
:writeimport+
andwriteall
. See also Writable components in the Helix Core Command-Line (P4) Guide.
-
p4 changes has the
--stream
option to include only changelists with a stream spec in theStream
field, as well as the--nostream
option to exclude such changelists.
-
p4 sync has the
-
--use-stream-change
option to specify the stream specification version, and a related configurable is dm.sync.streamchange -
-E option for an edge server to get the most up-to-date replication information and archive files
-
-
--streamviews
is an option of p4 dirs, p4 files, and p4 fstat to to report files and directories from stream Paths and Components. (See also Stream Components in the Helix Core Command-Line (P4) Guide.) -
p4 group specification supports setting the
MaxMemory:
field as one of the limits to preserve server resources.
-
dm.protects.exclusioncheck defaults to the most secure setting.
-
p4 topology reports the type of event that caused the server topology record to be created, such as startup, connect, or delete, as well as the address, destination address, and the server-id of the target server. The new
-D
option removes the server records, and the-d
option now marks the server record as deleted instead of removing it. -
Server log files now include an estimate of the memory used by the server to process a command. See memory used by command and process in the P4LOG topic.
-
The track output in server log files include network stats for upstream server-to-server communication as well as with the client or downstream server. See server-to-server network usage on replicas in the P4LOG topic.
2022.1 release
-
A stream can include views from other streams. For details and examples, see Stream Components in the Helix Core Command-Line (P4) Guide. To support this feature, the p4 stream spec has the Components: field. To enable the feature, set the dm.stream.components configurable.
- p4 failback restores the original master to its previous role as master after a failover.
-
stream spec deletion and obliteration:
-
p4 stream -d
to create a changelist and mark the stream spec deleted. All stream spec metadata is preserved. -
p4 streams -a
reports existing and deleted streams. -
p4 streamlog
reports stream deletion as well as stream edits and stream additions. Note that a deleted stream can be re-created. -
p4 obliterate [-y] stream
permanently removes all stream spec metadata.
-
-
real-time monitoring to enhance administration: set the rt.monitorfile configurable and adjust the monitor level while commands are running. To identify commands that have been holding locks on tables for long periods and the commands that are waiting for those locks to be released, set the monitor configurable to
10
or25
. -
Text files that are stored compressed on the server are now decompressed client-side. This excludes
+k
type files, which require keyword expansion server-side. Replication also benefits from this by transferring the compressed archives without needing to decompress or re-compress them. -
You can suppress the keyword expansion of
+k
type files by using the new-K
option in p4 clean, p4 copy, p4 integrate, p4 merge, p4 revert, p4 submit, p4 sync, and p4 undo. -
p4 group has the optional
Description
field, which might be useful if your company has a large number of groups. -
Ability to print a portion of a file by using the
--offset
and--size
options of p4 print -
An option to display or set the
serverid
of proxy server. See-xD [serverID]
in Proxy options in the Helix Core Server Administrator Guide -
Control whether the client's browser opens automatically when using p4 login with an authentication Extension, such as the one used with Helix Authentication Service - see P4USEBROWSER in Environment and registry variables.
-
p4 topology enhancements:
-
See the following options:
-t
,-F
,-T
,-d
,-s
,-e
,-y
-
the
-ztag
output ofp4 topology
indicates the most recent update to the record withLastSeenDate
, and thedm.topology.lastseenupdate
configurable allows you to adjust the update interval
-
For additional new features, see What’s new in the Helix Core Server Administrator Guide.
2021.2 release
-
(Technical Preview) The p4 topology command lists information about all the servers that are connected to the server on which the command is run.
-
Support for one-to-many "ditto" mappings of paths in stream specs. See
-
You can find out which streams have views for the depot path you specify. See the new
--viewmatch
option of p4 streams. -
To enable automatic reporting of the global lock status on files when running p4 commands that open files on edge servers, set the dm.open.show.globallocks configurable. To get notification manually, use new
-OL
option of p4 fstat. -
To improve performance by making the server use a buffer for writing to the structured log file, set the serverlog.bufsz.N configurable.
-
To improve performance for p4 populate, set the dm.populate.skipkeyed configurable.
-
Support for SSL connections that do not require P4TRUST.
-
To list only labels with the
autoreload
option set, use the-R
option of p4 labels. -
Propagating attributes are now supported on edge servers for commands that open files, such as
p4 copy
,p4 delete
,p4 edit
,p4 integrate
,p4 reconcile
,p4 resolve
,p4 shelve
,p4 submit
, andp4 unshelve
. -
For graph depots A depot of type graph that is used to store Git repos managed by Helix Core Server. See also Git Connector and classic depot., three new commands are related to the removal of obsolete metadata: p4 graph gc (graph), p4 graph purge-refhist (graph), and p4 graph recompute-refcnts (graph). For the complete use case, see Delete a repo and free the used storage in Work with Git in Helix Core Server Administrator Guide.
-
Helix Core Extensions now support the Windows platform because the memory manager for Helix Core server has changed to mimalloc, which Microsoft developed for multiplatform use. To find out which version of mimalloc, see the output of the
p4 -ztag info
andp4d -V
commands.
The Helix Core Command-Line (P4) Reference was formerly titled Helix Core P4 Command Reference.
2021.1 release
-
You can enable the display of real-time monitoring values. See p4 monitor realtime.
-
The ability to switch to a different stream that resides in a different stream hierarchy. See
--allow-unrelated
under Options in p4 switch. -
-
has the
-T
option to obliterate task streams -
has the
--purged-only
option to remove records that have previously been purged. -
when run in report mode, includes how many archived revisions it would delete. With no
-A
flag, it reports the number of archived revisions that it ignored.
-
-
-
has the flexibility to report
--only BAD
or--only MISSING
files -
has the
-R
option to help in disaster recovery involving shelved files.
-
-
p4 resolve
-as
behaves differently if the newdm.resolve.ignoredeleted
configurable is set. -
The p4 repo (graph) spec has four new Form Fields for mirroring repos with Git Connector:
GonnMirrorSecretToken:, GconnMirrorServerId:, GconnMirrorStatus:, GconnMirrorExcludedBranches:
-
P4PROOT allows the proxy database to be stored in a different directory than the archives.
2020.2 release
- Streams and inheritance:
- The p4 stream specification has a new field, ParentView: that can be set with the --parentview parameter to either of the following values:
- inherit, which is the original behavior of streams. The inheritance is implicit, so the inherited Paths, Remapped, and Ignored values are not displayed with the child stream specification.
- Task streams and virtual streams must always be inherit.
- noinherit, which means that the Paths, Remapped, and Ignored fields are not affected by the stream's ancestors. For example, the build system for a noinherit release stream continues to build even if the import path of its parent mainline stream has switched to newer libraries that the release stream does not have.
- Release, development and mainline streams can be inherit or noinherit.
- Because a mainline stream has no parent, the inherit or noinherit settings have no meaning for a mainline stream unless the mainline stream is converted to a different stream type.
- The dm.stream.parentview configurable determines whether a newly-created stream is inherit or noinherit
- inherit, which is the original behavior of streams. The inheritance is implicit, so the inherited Paths, Remapped, and Ignored values are not displayed with the child stream specification.
- The p4 stream command has a new option, parentview, that can be used to convert an existing mainline, development, or release stream from noinherit to inherit, or from inherit to noinherit.
- If you convert a child stream to be noinherit, paths that are implicit in an inherit stream become explicit.
- The --source-comments option causes comments to appear in the child stream spec. Such comments begin with ##. For example:
exclude myExclude/... ## copy from //stream/main@5
indicate that version 5 of the parent stream spec is the source of this path. - You can also add manually add comments to a stream spec.
- The --source-comments option causes comments to appear in the child stream spec. Such comments begin with ##. For example:
- If you convert a child stream to be noinherit, paths that are implicit in an inherit stream become explicit.
- The p4 stream specification has a new field, ParentView: that can be set with the --parentview parameter to either of the following values:
- Streams integration:
- If, for any reason, you want path changes of the parent stream to be applied to a child stream with a ParentView that is noinherit, use stream spec integration. See p4 integrate for the syntax p4 integrate -S stream [-As | -Af]
- Stream spec integration can also be used to integrated the values of custom, propagatable fields, regardless of the parent view setting.
- The dm.integ.streamspec configurable determines how stream spec integration works with regard to noinherit.
- The p4 istat command has the -As and -Af options to report the integration status of the stream spec and the stream files.
- The p4 streamlog command now shows a stream spec's integration and revision history. This command has new options: -c for changelist, -i for inherited stream history, and -h for the history of stream content.
-
During upgrades to a new server version, the upgrade steps now execute in the background (applies to 2019.2 and later upgrade steps). This can improve server availability and replication performance during upgrades.
-
The p4 upgrades command indicates the status of upgrade steps.
-
-
Enhancement of the background submit feature: if the administrator has not enabled background submit, the -b option is ignored and standard submit behavior occurs. See About background archive transfer for edge server submits.
- The p4 dbschema command has the -A option to display information about all versions of one or more database tables.
- For graph depots, to control the retaining or unpacking of Git packfiles into loose objects when Git Connector imports the contents of an external Git repo into a Helix Core graph depot, set the dm.repo.unpack configurable in the Configurables chapter.
-
Connections and commands completing faster than the threshold defined by the new db.monitor.addthresh configurable are not added to the db.monitor table at monitor levels 1 or 2.
- For the p4 failover command,
Failover from a mandatory standby server when the master is not participating used to require specifying -s <serverID>. Now, failover for this scenario includes checking the ReplicatingFrom field of the standby server spec for the master's serverID when -s is not specified on the command line.
- Part of the failover process involves stopping the journalcopy and pull threads. If the failover process fails, those threads needed to be restarted manually. Now any pull -L, pull -u, or journalcopy threads that were configured using startup.N configurables will automatically be restarted if the failover process did not succeed.
2020.1 release
-
The storage upgrade process:
- is now visible through the p4 monitor command.
-
can make use of a new configurable that can suppress the generation of digests during a storage upgrade. See lbr.storage.skipkeyed.
- To monitor the responsiveness of a server, see:
- the new p4 heartbeat command
- the new configurables net.heartbeat.interval, net.heartbeat.wait, net.heartbeat.missing.interval, net.heartbeat.missing.wait, and net.heartbeat.missing.count
- TLS 1.3 is now supported, but TLS 1.2 remains the default. See ssl.tls.version.max
- The p4 protects command:
- has new access levels for stream spec protections. See
readstreamspec
,openstreamspec
, andwritestreamspec
in the p4 protect topic. - has the new
-H
option, which displays the protections that apply to the current client's host (IP address) - supports using the
-M
option with the-h
flag to display the protections that apply to the specified host (IP address)
- has new access levels for stream spec protections. See
- The host field in the protections table now allows multiple IP addresses or CIDR matchers to be specified on a single line with a comma-separated list.
- Global labels can now be updated from edge servers using either
p4 tag -g
orp4 labelsync -g
. See p4 tag and p4 labelsync. - The new
--no-graph
option for p4 have and p4 have (graph) limits the output to non-graph files when working with a hybrid workspace A client workspace that supports both repos of type graph (see 'Git Connector') and the classic Helix Core file revision model.. - The
p4 graph log
command has added functionality to the--oneline
option:- an optional
tree
value adds a column in the output for tree-SHA-1 values - an optional
--no-abbrev
value causes SHA-1 values in the output to appear in the original 40 characters, instead of the default 7 characters abbreviation
See p4 graph log (graph).
- an optional
p4 extension --list --type=extensions
has two new fields to indicate if the extension has a global configuration and at least one instance configuration. See p4 extension.
Extensions support certificates and installation by admins, not just super users
By default, only super users are permitted to install Extensions, but as of this change, it's possible for 'admin' users to install, configure and delete them as well if the Extension is signed and the signature of the signing key has been installed in the Extensions depot. See p4 extension as well as the Configurables reference and Configurables reference configurables.
2019.2 release
- p4 configure history allows the super user to display information about changes to configurables on any 2019.2 server.
- The -p option of p4 obliterate marks the revison as purged and leave the integration history intact rather than removing the records. This one-step command improves performance compared to first invoking p4 archive, and then invoking p4 archive -p
- p4 stream and p4 jobspec support the automatic assignment of values to identify custom fields.
- p4 storage has new options, -l and -d, to locate and delete any existing "orphaned" files left over from a previous failed submit or shelve operation. Two new configurables associated with this feature are lbr.storage.allowsymlink and lbr.storage.delay.
- p4 verify has a new option, -Z, to boost performance.
-
Added the ability to create custom fields in stream specs. See the new command, p4 streamspec.
- To avoid the risk of conflicting field codes, field codes for custom stream and job specs can now be generated automatically if the admin uses the optional NNN placeholder value. For details, see p4 streamspec and p4 jobspec.
-
A new configurable, db.monitor.term.allow, allows users to terminate their own processes.
2019.1 release
- Private editing of streams in the p4 stream topic
- Additional enhancements to streams:
- Option to make switching between streams faster with p4 switch
- The following commands now handle open stream specs: p4 revert, p4 resolve, p4 submit
- p4 unshelve now defaults to unshelving both files and the stream spec. Previously, the default was to unshelve only files.
- p4 streamlogdisplays the history of changes to the specified list of streams.
- About background archive transfer for edge server submits: the user submitting a change with p4 submit -b will see the submit complete as soon as the metadata commit is completed, and will not have to wait for the archives to transfer. To enable this feature, set submit.allowbgtransfer and, optionally, submit.autobgtransfer.
- p4 pull has the new option for -t target for recovery of failed archive transfers.
- p4 server - For all server types, the DistributedConfig: field of that server spec shows a line for each configurable that is set to a non-default value. In this field, you can edit the value, add a new line to set a different configurable to a non-default value, or delete a line to reset that configurable to its default value.
-
The Helix Core server extensions are a fully-supported alternative to triggers. See
- Support for locking Git LFS (Large File Storage) files in depots of type graph by using the new commands: p4 graph lfs-lock (graph), p4 graph lfs-locks (graph), and p4 graph lfs-unlock (graph) such that the locks created in Helix Core Server with p4 graph lfs-lock are visible to Git clients, and the locks created in Git with git lfs lock are visible to Helix Core Server.
- By default, the server.maxcommands.allow configurable enables the super and operator users to issue certain administrative commands even if the server.maxcommands is blocking standard users.
- Failover: see the Description section on the p4 failover topic about the High Availability standby server.
- p4 archive has the new -z option, which can reduce disk space usage.
- The net.autotune configurable is enabled (1) by default. This enables the TCP stack to manage the size of the network send and receive buffers, allowing more efficient use of the network, especially over slow, high-latency connections. This behavior can be disabled in clients, proxies, brokers and the server by setting the configurable to 0. On Windows-based platforms, send buffer sizes are not autotuned but are manually configurable with net.tcpsize.
- p4 reconcile has a new option, -t, to consider the file type
- p4 integrated has two new options to make it easier to show where a change has been integrated to: -s and --into-only
-
The definition of the P4LANGUAGE variable was updated in 2019.1 and it should be set to the language tag and optional region for the user. For example, if $LANG is en-US.UTF-8, set P4LANGUAGE=en-US. Servers with existing message translations will need their message database to be re-seeded with an updated message file.
-
Support for utilizing multiple processor groups on Windows depends on the new configurable, sys.threading.groups.
- Setting the new push.unlocklocked configurable to 1 automatically unlocks files that were locked as part of a failed push.
2018.2 release
- Failover from the current master to a standby server has improved.
- See p4 failover, p4 journalcopy, and p4 server
- Commands with additional functionality:
- New configurables related to single sign-on:
2018.1 Patch release
Multi-factor authentication (MFA) |
For help on multi-factor authentication:
This feature is currently supported for most Helix Core Server clients, including:
|
Graph depot commands |
Commands to read or write against Git repos stored in the Helix Core Server within a Graph Depot are no longer in Tech Preview. See Commands for Git repos. |
Configurables | To see whether changing the value of a given configurable requires stopping the server, in that configurable's details look for "After you change the value of this configurable, you must explicitly "stop" the server." For an example, see ssl.tls.version.min. |
2018.1 release
Area | Feature |
graph depot |
|
Configurables reference |
|
For failover scenarios, the p4 admin end-journal command can be useful. See that command's Examples |
|
p4 keys | p4 keys -e nameFilter supports a period in key names |
p4 stream |
Stream path definitions can include a wildcard in the final
expression of a path, following the last slash. You can use this feature to refer to a collection of files, such as |
Second factor authentication |
For details and examples,
see the Please note that not all client applications have added support for second factor authentication yet. |
LDAP | You can track the activity of p4 ldapsync. See ldapsync.csv at p4 logparse. |