PhpStorm 2022.2 Help

Mercurial

Mercurial support

  • When Mercurial integration with PhpStorm is enabled, the Mercurial option appears in the VCS menu, and in the context menus of the editor and Project tool window.

  • The files in the folders under the Mercurial control are highlighted according to their status. See File status highlights for file status highlighting conventions.

  • Modifications results are shown in the Commit tool window Alt+0.

  • When using Mercurial integration, it is helpful to open the Console tab of the Mercurial tool window Alt+9, which displays the following data:

    • All commands generated based on the settings you specify through the PhpStorm user interface.

    • Information messages concerning the results of executing generated Mercurial commands.

    • Error messages.

Set up Mercurial

Make sure that Mercurial is installed on your computer.

Configure Mercurial executable

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

  2. In the Path to Mercurial executable field, specify the path to hg executable.

    If you followed the standard installation procedure, the default location is /Applications/TortoiseHg.app/Contents/MacOS/hg or /usr/local/bin for Linux and macOS and /Program Files/TortoiseHG for Windows.

    It is recommended that you add the path to the Mercurial executable file to the PATH variable. In this case, you can specify only the executable name, the full path to the executable location is not required.

  3. Click Test to make sure the path is specified correctly. Apply the changes and close the dialog.

Enable Mercurial integration for your project

  1. Press Alt+` to open the VCS Operations Popup and select Enable Version Control Integration.

    Alternatively, from the main menu, select VCS | Enable Version Control Integration.

  2. In the Enable Version Control Integration dialog that opens, select Mercurial.

  3. Click OK to apply the changes.

Last modified: 01 August 2022