TeamCity 8.0 Help

Mercurial

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 Configuring VCS Roots. The section below contains the description of Mercurial-specific fields and options.

Mercurial support in TeamCity is implemented as a plugin.

General Settings

Option

Description

Pull changes from

The URL of your hosting.

Default branch

Set to the default branch which used in the absence of branch specification or when the branch of the branch specification cannot be found. Note that parameter references are supported here.

Branch specification

In this area list all the branches you want to be monitored for changes. The syntax is similar to checkout rules: +|-:branch_name, where branch_name is specific to the VCS (with the optional * placeholder). Note that only one asterisk is allowed and each rule has to start with a new line. Bookmarks can also be used in the branch and branch specification fields. If a bookmark has the same name as a regular branch, a regular branch wins. More in the related TeamCity blogpost.

Use tags as branches

Allows you to use tags in branch specification. By default, tags are ignored.

Clone repository to

Clones the repository structure. Provide the path to a parent directory on the TeamCity server where a cloned repository will be created (applicable to the VCS Checkout Mode checkout mode only). Leave blank to use the default path.

Detect subrepo changes

By default, subrepositories are not monitored for changes.

Username for tags/merge

A custom username used for labeling

Use uncompressed transfer

Uncompressed transfer is faster for repositories in the LAN.

HG command path

The path to the hg executable.See more hgDetection.

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.

Internal Properties

This section describes hg-related Configuring TeamCity Server Startup Properties. You can modify the defaults to adjust the Mercurial settings as needed.

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 the 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 speeds up a clean checkout, because only build working directory is cleaned. Also if single root is used in several build configurations a 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