Mercurial Trigger

Top  Previous  Next

The Mercurial Trigger allows you to monitor a Mercurial Repository for changes. A build is triggered when a commit occurs on the repository being monitored or when changes are pushed and updated into the repository being monitored. By making use of the Remote Repository Monitoring options you can specify a remote repository to monitor, if a change is detected, the local repository will be updated to match before checking the local repository for changes.

General information on creating triggers can be found under the Triggers Reference topic.

 

When adding a Mercurial trigger you are required to supply the following details:

Repository to monitor - This is the location of the Mercurial repository that you want to monitor for changes. This must be a local repository (local directory, mapped drive or network share).

VersionControl_Mercurial_Repository

 

Mercurial executable - This is the location of the Mercurial executable file on the local machine.

VersionControl_Mercurial_Executable

 

Mercurial Trigger Options

VersionControl_Mercurial_Options

Update on Trigger

Update on Trigger - This perform an update on the local repository when the build is triggered to ensure that the working directory is up to date.

 

Remote Repository Monitoring

Update local repository from remote repository before checking for changes - Enabling this option, will enable the fields below so that you can specify the details of the repository you wish to monitor.
Remote Repository Connection String - Provide the connection string of the remote repository that you want to monitor. This can be in any of the following formats:
http://example.com/user/repository - this is read only and requires no authentication.
https://user@example.com/user/repository - will generally require authentication either via Provide HTTPS password option (see below) or by configuring the [auth] section in the Mercurial.ini file to store the password for URL being used.
ssh://example.com/user/repository - using SSH will require public/private key authentication, this will need to be configured using Putty/Pageant and also require the ssh node to be configured under the [ui] section of the Mercurial.ini file.

Click here for more information about configuring the Mercurial.ini file.

Provide HTTPS password -  This option enables you to specify the HTTPS password to be used with a HTTPS connection string. If you specify a HTTPS connection string that requires authentication without providing  a password the trigger will throw an error. An alternative to using this option is to configure the [auth] section of the Mercurial.ini file which will allow you to use a HTTPS connection string without being prompted for a password. Note: As a security measure, the password field will be blank when editing an existing trigger that already has a password defined. In this case leaving the option enabled and the field blank will retain the existing password, entering a new value will override the existing password. Enabling the option and leaving the field blank when creating a new trigger will result in a validation exception.
Remote Branch to Monitor - Provide the name of a specific branch to monitor and pull changes from. Changes occurring on other branches will be ignored.
Use Force Option - By default the Mercurial will not allow to pull changes from a source repository that is unrelated to the destination repository. Enabling the Force option overrides this behaviour allowing changes to be pulled from an unrelated source.

 

Exclude Files From Monitoring

See Excluding Files From Source Control Monitoring