Configuring integration with Perforce

Installation and Configuration of Perforce server

Perforce is a commercial, proprietary revision control system developed by Perforce Software, Inc. One Perforce server can simultaneously have several repositories, called as depot.

Perforce server can be installed in operating systems Unix, GNU/Linux, Mac OS X, Microsoft Windows. We have described the installation and configuration of Perforce in GNU/Linux for testing the capabilities of TrackStudio.

Download Perforce server p4d . The download page has versions for different operating systems, including the one for 32 and 64-bit versions of GNU/Linux.
Download command-line client application p4 from the same page.
Save these files in the directory /usr/local/bin or /opt/perforce or in any other directory convenient for you.
Make these files executable:

chmod +x p4
chmod +x p4d

Create a directory for the root perforce repository (e.g. /usr/local/p4root)

Communication with Perforce server takes place through TCP/IP protocol. By default the server listens domain with the name perforce through port 1666.
Start Perforce server using command:

p4d -r /usr/local/p4root -p localhost:1666 &

For stopping Perforce server, execute the command

p4 -p localhost:1666 admin stop

Configuring connection parameters

You can configure the connection parameters with Perforce repository in the tool TrackStudio Server Manager, or, if it is not available – in any text editor.

Server Manager

  • Run the application TrackStudio Server Manager (SMAN)
  • Go to the section SCM
  • Select the option “Enable SCM integration”, if it is not enabled.
  • Indicate the update interval in minutes. For testing it is better to specify the interval at 1 minute, and for practical usage 10 minutes are sufficient.
  • Press the button " Add "
  • In the window that opens, indicate the connection name
  • Enter the task number, corresponding to the project, for which you want to enable the integration. Integration will be implemented for all the sub-tasks of this task.
  • Select the type of SCM: Perforce
  • Indicate the address and port of Perforce server
  • Indicate the username and password
  • Indicate the path of p4 client
  • Indicate the project module
  • Press the button “Test Connection”.
  • Press the button "ОК", for saving the parameters of connection.

Configuring the connection in .properties files

If you are not in a position to run Server Manager, you can configure the integration with Perforce in the file

  • Open the file
  • Enable the integration with SCM
  • Indicate the update interval in minutes

Now you can configure a particular connection.

  • For each of your projects, create a parameter trackstudio.scm.<name>.tasknum, where tasknum — project number, and <name> — name of the connection. Integration with SCM will be implemented for all the sub-tasks of the task mentioned in the parameter.



In this example, repository will be connected to the root project and integration will be implemented for all the tasks in the system.

  • Indicate the type of SCM:
  • Indicate the address and port of Perforce server:
  • Indicate the parameters of user account in SCM, through which monitoring will be implemented (developers will send the information to the system in their name).
  • Indicate the path of Perforce client:
  • Indicate the module, corresponding to the code of project:
  • You can also indicate the number of revision, from which to start the indexing:

Working with TrackStudio

So that your commits in Perforce connected with the particular tasks in TrackStudio, in the commit messages add the number (or numbers) of respective tasks in the system.

After TrackStudio processes the information, commit logs will be displayed in Perforce when task is browsed.

You can also see the logs of commits to all the tasks of the project, with references to these tasks. For this purpose, in TrackStudio you need to go to the required project and select the menu item “SCM Browser”.