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

Mercurial

Last modified: 20 April 2023

TeamCity uses typical Mercurial command line client: hg command. Supported version of hg is 1.5.2+.

Mercurial should be installed in the server machine, and, if agent-side checkout is used, on the agents.

Path to hg executable detection



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

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

Internal Properties



Server-side Configuring TeamCity Server Startup Properties:

Build Agent Configuration for Mercurial: