PhpStorm 2017.3 Help

TFS Check-in Policies

A check-in policy is a rule that is executed before every check-in to ensure that the selected changeset is OK to commit. Standard policies are stored on the server and are executed on the client machines.

Custom policies are implemented as custom plugins to PhpStorm. The IDs of these plugins are stored on the server, while the policies themselves are applied locally. Therefore, to enable the use of a policy in a team, all the team members should install the corresponding plugin.

On this page:

To define the default policy settings to be applied at the PhpStorm level

  1. Press Ctrl+Alt+S or choose File | Settings (for Windows and Linux) or PhpStorm | Preferences (for macOS) on the main menu, and then go to Version Control | TFS.
  2. On the TFS page, that opens, select the applicable checkboxes in the Checkin policies compatibility area.
    • Evaluate Team Explorer policies: select this checkbox to have the Microsoft Team Explorer policy definitions installed and executed on the client machine.
    • Evaluate Teamprise policies: select this checkbox to have the Teamprise policy definitions installed and executed on the client machine.
    • Warn about not installed policies: select this checkbox to have warnings displayed in case the specified policy definition is not installed.

To suppress applying the default check-in policy settings to a project

  1. Press Ctrl+Alt+S or choose File | Settings (for Windows and Linux) or PhpStorm | Preferences (for macOS) on the main menu, and then go to Version Control | TFS.
  2. On the TFS page, that opens, click the Manage button in the Servers and Workspaces area.
  3. In the Manage TFS Servers and Workspaces dialog box, that opens, select the project in question from the Team project drop-down list.
  4. In the Compatibility area, select the Override default settings for team project <project name> checkbox.
  5. Re-define the default settings by selecting or clearing the corresponding checkboxes below.
    • Evaluate Team Explorer policies: select this checkbox to have the Microsoft Team Explorer policy definitions installed and executed on the client machine.
    • Evaluate Teamprise policies: select this checkbox to have the Teamprise policy definitions installed and executed on the client machine.
    • Warn about not installed policies: select this checkbox to have warnings displayed in case the specified policy definition is not installed.

To manage the list of available policies

The list of available policies consists of standard third-party policies and custom, user-defined policies.

  1. Press Ctrl+Alt+S or choose File | Settings (for Windows and Linux) or PhpStorm | Preferences (for macOS) on the main menu, and then go to Version Control | TFS.
  2. On the TFS page, that opens, click the Manage button in the Servers and Workspaces area.
  3. In the Manage TFS Servers and Workspaces dialog box, that opens, select the required workspace and click the Checkin Policies button.
  4. In the Edit Checkin Policies dialog box, that opens, configure the list of policies:
    • To activate a policy, select the Enabled checkbox next to it.
    • To suppress a policy, clear the Enabled checkbox next to it.
    • To discard a policy permanently, select it in the list and click the Remove button.

To introduce a custom check-in policy

  1. Implement the required policy as a custom plugin.
  2. Download, install, and enable the plugin as described in Installing, Updating and Uninstalling Repository Plugins and Enabling and Disabling Plugins.
Last modified: 6 December 2017

See Also