TeamCity
 
You are viewing the documentation for an earlier version of TeamCity.

Mercurial

Last modified: 20 April 2023

TeamCity uses the typical Mercurial command line client: hg command. Mercurial 1.5.2+ is supported.

Note that:

  • Remote Run from IDE is not supported. Please use Branch Remote Run Trigger instead.

  • Checkout rules for agent-side checkout are not supported except for the .=><target_dir> rule.

Common VCS Root properties are described here. The section below contains the description of Mercurial-specific fields and options.

Mercurial support in TeamCity is implemented as a plugin.

General Settings



Path to hg executable detection



When an agent starts, the hg-plugin detects Mercurial installed on the agent machine. The plugin tries to run the hg version command using the path specified by teamcity.hg.agent.path parameter. You can change this parameter in < >\conf\buildAgent.properties. If this parameter is not set, the plugin uses hg as a path to the command, assuming it is somewhere in the $PATH. If the command is executed successfully and mercurial has an appropriate version (1.5.2+), then the hg-plugin reports the path to hg in the teamcity.hg.agent.path parameter. During the build, the plugin uses the hg specified in the HG command path field of a VCS root settings. To use the detected hg, put %\teamcity.hg.agent.path% in this field. Configurations with such settings will be run only on agents which report the path to hg.

The server side of the plugin first checks the value of the internal property teamcity.hg.server.path and if the property is set, its value is used. Secondly, the plugin tries to use the path from the settings of VCS root: if the path is equal to %\teamcity.hg.agent.path%, it uses hg as a path, otherwise uses the value specified in the root settings.

Agent Settings



These are the settings used in case of the agent-side checkout, which requires Mercurial installed on all agents.

Internal Properties



This section describes hg-related internal properties. You can modify the defaults to adjust the Mercurial settings as needed.

Server-side internal properties:

Agent configuration for Mercurial: