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 2023.2.

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 the db.traits table. The trait 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 or p4ignore.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 the p4 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, -N numberOfThreads options for the p4 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 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

  • 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.

  • p4 changes has the --stream option to include only changelists with a stream spec in the Stream field, as well as the --nostream option to exclude such changelists.

  • 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 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 or 25.

  • 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 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 of p4 topology indicates the most recent update to the record with LastSeenDate, and the dm.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.

Note

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.

  • p4 obliterate:

    • 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.

  • p4 verify:

    • 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 new dm.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
    • 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.
  • 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

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 server.extensions.allow.admin and server.extensions.allow.unsigned 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:
  • 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

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:

  • Swarm 2018.1
  • The 2018.2 releases of P4V, P4Eclipse, P4VS, and P4EXP
Graph depot commands

Commands to read or write against Git repos stored in the Helix 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 - alphabetical list
  • rpl.journalcopy.location be useful in a distributed environment. For details, see Helix Core Server Administrator Guide.
  • To prevent p4 info from exposing sensitive fields, consider using dm.info.hide.
  • p4 configure set now notifies you when you attempt to set a numeric configurable to a value outside of the acceptable range.
    Previously, a value below the minimum was silently altered to the minimum, and a value above the maximum was silently altered to the maximum. (Configurables already set outside the acceptable ranges will continue to be silently altered.)
  • To prevent users from being created if they would have no permissions on the server, you can configure auth.ldap.userautocreate
  • Additional security is available by using auth.tickets.nounlocked

  • filesys.checklinks supports an additional value, 3

p4 admin

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 path_type pattern/to/....exe or path_type pattern/to/*.txt
For examples, see theTo manage files of a similar file type in your stream specs, consider using wildcards (... and *) after the final slash (/) in the path definition:

Second factor authentication

For details and examples, see the p4 help 2fa documentation and the Support Knowledgebase article, "Second Factor Authentication Support".

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.