composer/composer — pull request #2184 by matt-whittom (2013-08-16 15:48:02+00:00)
Title: Added Perforce VCS driver/downloader

Perforce driver for Composer

Will allow Composer to connect to a Perforce repository

In Composer.json, a few parameters need to be specified for the repository:
depot - the name of the depot (project) in perforce
branch - the name of the branch or stream of the depot
p4user - (Optional) the username to use to connect to perforce
p4password - (Optional) the password for the username, used to login to perforce

If p4user is not specified, the driver will check for the "p4 set" variable on windows, or the environment variable P4USER on other systems. If that is not set, it will query for the username on the command line.
The driver will then check to see if that user is already logged in. If not, then it will request the password so that it can log in.
Likewise, if p4password is not specified the driver will check the "p4 set" variable or the environment variable P4PASSWD, and if it is not set, will query for the password on the command line.

The Perforce driver logs in with the -a parameter, allowing you to use the same username/password as you use for any other automated access, such as a build system.

The Perforce driver does not currently support checking for local changes before overriding.

The Perforce driver will use labels as tags if they are defined, however Perforce's use of labels is somewhat different from most other VCS.