TeamCity 7.0 Help

Mercurial

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:

Property

Default

Description

teamcity.hg.pull.timeout.seconds

3600

Maximum time in seconds for pull operation to run

teamcity.hg.server.path

hg

Path to hg executable on the server (see hgDetection for the details).

Build Agent Configuration for Mercurial:

Property

Default

Description

teamcity.hg.use.local.mirrors

false

When checkout on agent: whether TeamCity should clone to local agent mirror first and then clone to working directory from this local mirror. This option speed-ups clean checkout, because only build working directory is cleaned. Also if single root is used in several build configurations clone will be faster.

teamcity.hg.pull.timeout.seconds

3600

Maximum time in seconds for pull operation to run

teamcity.hg.agent.path

hg

Path to hg executable on the agent (see hgDetection for the details).

Last modified: 20 April 2023