P4V and P4VS can now integrate with Swarm. To indicate how these applications should connect with Swarm, Swarm sets the
P4.Swarm.URL property set in Helix Server. P4V and P4VS read this property, and if set, they connect to the specified URL to make Swarm API calls. If the property is unset, Swarm integration features are disabled.
P4.Swarm.URL is set, P4V provides the following integration features:
- Request a review: requests a review for pending or committed changelists.
- Update a review: updates a review from the current state of a pending changelist. This works for changelists that are already associated with a review, or for unassociated changelists.
- Open review in Swarm: opens the review associated with the selected changelist in your system's default web browser.
- Review Id and State columns: adds Review Id and Review State columns to both the Pending and Submitted tabs.
By default, the first Swarm worker auto-detects the URL it is running under and sets
For customized Swarm installations, the auto-detected URL may not use the correct hostname or port. In these scenarios, you can disable the URL auto-detection by editing the
SWARM_ROOT/data/config.php file and setting the
auto_register_url item to
false in the p4 configuration block. For example:
'p4' => array(
'auto_register_url' => false,
If you choose to disable this feature, you should manually set the
P4.Swarm.URL property in Helix Server to the URL for your Swarm installation:
$ p4 property -a -n P4.Swarm.URL -v https://myswarm.url:port/
https://myswarm.url:port/ with the URL for your Swarm installation.
P4V uses an integration timeout, specified in the
P4.Swarm.Timeout property, to limit delays in the P4V user interface. The default timeout is 10 seconds.
To change the integration timeout, run:
$ p4 property -a -n P4.Swarm.Timeout -v 10
10 with the desired timeout in seconds. Increasing the timeout could cause notable delays in the P4V user interface, and decreasing the timeout could cause sporadic integration failures if Swarm's API responses take longer than the specified timeout.