|
The instructions on this page describe how to configure a Mercurial source repository for either a Plan or a Job.
 |
|
On this page:
 |
|
|
Configuring a Mercurial Source Repository
The instructions in this section apply to configuring a source repository for both Plans and Jobs.

To configure a Mercurial source repository:
If you are creating a new Plan or new Job, or have come from the Editing a Plan or Editing a Job topics, start at step 4.
- Navigate to the source repository settings for a Plan or Job, as described on Specifying the Source Repository for a Plan and Specifying the Source Repository for a Job respectively.

- Enter the details for the Mercurial repository as described below:

- 'Repository' — select 'Mercurial'.
- 'Repository URL' — Type the full path to your Mercurial repository (e.g. '
http://bitbucket.org/sinbad/ogre |
'). Valid URLs are of the form:
local/filesystem/path[#revision] |
file://local/filesystem/path[#revision] |
http://[user[:pass]@]host[:port]/[path][#revision] |
https://[user[:pass]@]host[:port]/[path][#revision] |
ssh://[user[:pass]@]host[:port]/[path][#revision] |
(for further references visit Mercurial documentation)
- 'Branch' (Optional) — Type the name of the relevant branch you want to work on. Leave empty to work on
default branch.
- 'Username' (Optional) — Type the username (if any) required to access the repository.
- 'Authentication Type' — Select the authentication type you want to access Mercurial repository;
- If you select 'Password' (use that authentication type for http/https hosted repositories), the following fields will appear:
- 'Password' (Optional) — Type the password you want to access the repository.
- 'Change Password' (Only available after first saving the Plan/Job with a password) — Select this check box if you want to change the password that is used to access the repository.
- If you select 'Keyfile with passphrase' (use that authentication type for repositories accessible through ssh), the following fields will appear:
- 'SSH Key' — Choose an SSH private key from your hard drive.
- 'Change SSH Key' (Only available after first saving the Plan/Job with an SSH private key) — Select this check box if you want to change your SSH private key.
- 'Passphrase' — Type the passphrase for your SSH private key.
- 'Change Passphrase' (Only available after first saving the Plan/Job with a passphrase) — Select this check box if you want to change the passphrase for your SSH private key.
- If you select 'Keyfile without passphrase' (this authentication type is similar to above except it is a bit faster), the following fields will appear:
- 'SSH Key' — Choose an SSH private key from your hard drive.
- 'Change SSH Key' (Only available after first saving the Plan/Job with an SSH private key) — Select this check box if you want to change your SSH private key.
- If you select 'Default Mercurial credentials', Bamboo will rely on default hg authentication. Use this option, for example, if you had set up the Bamboo server manually with SSH servers defined in
.ssh/config, valid SSH identity files, etc.
- 'Command timeout' (Optional) — Type the number of minutes bamboo should wait for hg commands to finish. This is useful to cut hung Mercurial processes. On the slower networks you may consider increasing default timeout to allow bamboo making initial clone of mercurial repository.
- 'Location of POM file' (Only available when importing a Maven 2 project) — Type the path to your project's
pom.xml file which is relative to the root of your Mercurial Repository URL (defined above).
- 'Delay changeset detection' — Select this setting to allow Bamboo postponing collecting code changes after build phase. Otherwise Bamboo server needs to do full clone of repository before triggering the build, which may take time especially if it is the first build. Consider using this option if your build agents have significantly faster connection to the repository than Bamboo server.
- 'Clean cache directory' — Internally, Bamboo shares similar repositories between Plans/Jobs. It caches them in a special directory. Select this setting to force Bamboo removing cache directory for that plan before any occurrence of code change detection or plan build. Turning this option on will greatly increase the time it takes to complete a build (or even change detection). Consider using this option for example when remote repository was replaced but is still accessible through the same url as the previous one.
- 'Verbose logs' — Turns on
--verbose and --debug options in hg commands and pass the output to build logs. Use that option if you encounter problems in Bamboo Mercurial behaviour.



Screenshot above: Source Repository — Mercurial

Appendix - Build Strategies
Notes
You will not be able to create Plans/Jobs that use a Mercurial repository without specifying the shared local Mercurial capability first. Read more about configuring a Mercurial capability.
Related Topics
Specifying the Source Repository for a Plan
Specifying the Source Repository for a Job