IntelliJ IDEA 14.0.0 Web Help

Using Multiple Perforce Depots with P4CONFIG

If your project contains directories that are stored in the different Perforce depots, you might need to switch between them. IntelliJ IDEA uses P4CONFIG to automatically switch to the respective depot as you use a Perforce-versioned directory.

P4CONFIG is an environment variable that contains the name of P4CONFIG file without a path. If a certain directory is associated with Perforce, IntelliJ IDEA seeks for P4CONFIG file in this directory and its parents; if the file is not found, it is sought in the bin directory of IntelliJ IDEA installation. When a P4CONFIG file is found, IntelliJ IDEA uses the settings contained therein, to connect to the respective Perforce depot.

A sample P4CONFG file might consist of such lines:

P4CLIENT=MyClient P4USER=MySelf P4PORT=ida:3456

To use multiple Perforce depots in a project, follow these general steps

  1. Create a P4CONFIG file in each directory associated with Perforce.
  2. Create environment variable P4CONFIG that contains file name without a path.

See Also

Last modified: 4 December 2014
comments powered by Disqus