Mercurial operations fail due to mis-configured HG capability
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
Mercurial builds fail with the following error:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"java.lang.RuntimeException : com.atlassian.bamboo.repository.RepositoryException: Mercurial Executable capability `/usr/local/bin/hg' does not seem to be a hg client. Is it properly set?"
but executable exists and works properly.
Some experimants shows that bamboo calls hg with illegal arguments:
version --config ui.ssh=ssh -o StrictHostKeyChecking=no -o BatchMode=yes
hg reports:
hg version: option -o not recognized
---------------------
java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Mercurial Executable capability `/usr/local/bin/hg' does not seem to be a hg client. Is it properly set?
at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:119)
at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:79)
Caused by: com.atlassian.bamboo.repository.RepositoryException: Mercurial Executable capability `/usr/local/bin/hg' does not seem to be a hg client. Is it properly set?
at com.atlassian.bamboo.plugins.hg.HgCommandProcessor.checkHgExistenceInSystem(HgCommandProcessor.java:91)
at com.atlassian.bamboo.plugins.hg.HgRepositoryAccessImpl.<init>(HgRepositoryAccessImpl.java:82)
Cause
The Mercurial capability is pointed to an incorrect location.
Resolution
Ensure that the configured Mercurial Capability points to the correct hg executable.
Was this helpful?