IntelliJ IDEA 2023.2 Help

Configure Perforce integration

The Perforce Integration is disabled by default. If you want to perform Perforce-related operations right from IntelliJ IDEA, enable the integration at the IDE level and associate the project root or specific directories with Perforce. The general procedure is described in the section Enable version control.

Enable Perforce for a project or directory

  1. Press Control+Alt+S to open the IDE settings and then select Version Control | Directory Mappings.

  2. Click the Add button App welcome create new project on the right.

  3. In the Add VCS Directory Mapping dialog that opens, select the necessary option (Directory or Project).

  4. Type the path to the directory that you want to associate with a version control system, or click the Browse button the Browse button and select the directory in the dialog that opens.

  5. From the VCS list, select Perforce.

  6. Click Apply to save the changes and close the dialog.

Enabling Perforce integration for directory

Configure Perforce integration settings

  1. Press Control+Alt+S to open the IDE settings and then select Version Control | Perforce.

  2. Select the Perforce is online checkbox to establish live connection to the Perforce server.

  3. Specify which credentials you want to use for connecting to the Perforce server.

    • To use the connection settings from your P4CONFIG files, choose the Use P4CONFIG or default connection option.

      If you are using P4CONFIG files for configuration, IntelliJ IDEA shows what config files it has found and what other default settings are used. This way you can be sure that your P4CONFIG files are detected and taken into account.

    • To configure connection manually, choose the Use connection parameters option and specify the following settings in the corresponding text boxes:

      1. The Port the Perforce client will listen to.

      2. The Client.

      3. Your User name and Password to authenticate to the server.

  4. To use ticket-based authentication, select the Use login authentication checkbox. Otherwise, password-based authentication will be used. In either cases IntelliJ IDEA uses the login name and password specified in the dialog or stored in the P4CONFIG files.

  5. To have IntelliJ IDEA create a P4.output file and store the output of Perforce commands in it, select the Dump Perforce Commands to checkbox.

  6. Specify the path to the Perforce executable file. Click Test Connection to make sure your settings ensure successful connection.

  7. In the Timeout field, specify the lapse of time in seconds during which IntelliJ IDEA waits for response from the server. If the server does not respond in due time, the user is prompted to disable integration.

  8. To enable displaying the branch history of a specified file, including all file branch points, edits, and merges, select the Show branching history checkbox.

  9. To have IntelliJ IDEA point at committed changes that are also integrated to other changelists and provide information on the target changelists that received the content, select the Show integrated changelists in committed changes checkbox.

  10. To get the user interface for attaching and detaching Perforce jobs to changelists, select the Enable Perforce Jobs support checkbox.

You will know that the Perforce integration has been enabled once you close the settings: you will see the Perforce tool window at the bottom of your IDE window.

Last modified: 23 August 2023