You are viewing the documentation of TeamCity 10.x and 2017.x, which is not the most recently released version of TeamCity.
View this page in the latest documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.


Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


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 Starting with 2017.2. the server side of the plugin checks the value of the teamcity.hg.customServerHgPathWhitelist internal property. The property contains ;-separated list of allowed hg paths to use on the server.  If the path specified in VCS root is in whitelist, then it is used on the server. If not, the path specified in the teamcity.hg.server.path internal property is used. If this property is not set, TeamCity server uses hg from the $PATH.




Mercurial config

Specify the Mercurial configuration options to be applied to the repository during agent-side checkout, e.g. enter the following to enable the largefiles extension:
 largefiles =
The configuration format is described here.

Before 2017.2.2 this option was also used on TeamCity server. This was disabled for security reasons.

Purge settings

Defines whether to purge files and directories not being tracked by Mercurial in the current repository. You can choose to remove only unknown files and empty directories, or to remove ignored files as well. Added files and (unmodified or modified) tracked files are preserved.

Use mirrors

When enabled, TeamCity creates a local agent mirror first (under agent's system/mercurial directory) and then clones to the working directory from this local mirror. This option speeds up clean checkout, because only the build working directory is cleaned. Also, if a single root is used in several build configurations, a clone will be faster.