java.lang.RuntimeException: com.atlassian.bamboo.plugins.hg.HgCommandException: command [/usr/local/bin/hg, id, -i, --debug, --rev, ${bamboo.jira.version}, --config, ui.ssh=ssh -o StrictHostKeyChecking=no -o BatchMode=yes, file:///Users/akhachatryan/dev/Repositories/MercurialClone] failed. Working directory was `/Users/akhachatryan/Atlassian/BambooHome4.2.1/xml-data/build-dir/_hg-repositories-cache/6f80156028b3e846098db18bf296ceb6d6d498c0'. stderr: hg: parse error at 0: syntax error stdout:

Atlassian JIRA | Armen Khachatryan [Atlassian] | 4 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    I tried this with Bamboo 4.2.1, JIRA 5.0.7, and [Bamboo - JIRA plugin 5.1|https://marketplace.atlassian.com/plugins/com.atlassian.jira.plugin.ext.bamboo/version/460]. {code} java.lang.RuntimeException: com.atlassian.bamboo.plugins.hg.HgCommandException: command [/usr/local/bin/hg, id, -i, --debug, --rev, ${bamboo.jira.version}, --config, ui.ssh=ssh -o StrictHostKeyChecking=no -o BatchMode=yes, file:///Users/akhachatryan/dev/Repositories/MercurialClone] failed. Working directory was `/Users/akhachatryan/Atlassian/BambooHome4.2.1/xml-data/build-dir/_hg-repositories-cache/6f80156028b3e846098db18bf296ceb6d6d498c0'. stderr: hg: parse error at 0: syntax error stdout: at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:119) at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:79) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:174) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectionChangesWithRetry(DefaultChangeDetectionManager.java:389) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuild(DefaultChangeDetectionManager.java:260) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:218) ... Caused by: com.atlassian.bamboo.plugins.hg.HgCommandException: command [/usr/local/bin/hg, id, -i, --debug, --rev, ${bamboo.jira.version}, --config, ui.ssh=ssh -o StrictHostKeyChecking=no -o BatchMode=yes, file:///Users/akhachatryan/dev/Repositories/MercurialClone] failed. Working directory was `/Users/akhachatryan/Atlassian/BambooHome4.2.1/xml-data/build-dir/_hg-repositories-cache/6f80156028b3e846098db18bf296ceb6d6d498c0'. stderr: hg: parse error at 0: syntax error stdout: at com.atlassian.bamboo.plugins.hg.HgCommandProcessor.runCommand(HgCommandProcessor.java:460) at com.atlassian.bamboo.plugins.hg.HgCommandProcessor.runCommand(HgCommandProcessor.java:418) at com.atlassian.bamboo.plugins.hg.HgCommandProcessor.extractTipHash(HgCommandProcessor.java:485) at com.atlassian.bamboo.plugins.hg.HgCommandProcessor.getRemoteTipForBranch(HgCommandProcessor.java:339) at com.atlassian.bamboo.plugins.hg.HgRepositoryAccessImpl.getLatestRemoteRevisionHash(HgRepositoryAccessImpl.java:321) at com.atlassian.bamboo.plugins.hg.HgRepositoryAccessImpl.collectChangesSinceLastBuild(HgRepositoryAccessImpl.java:94) at com.atlassian.bamboo.plugins.hg.HgRepository.collectChangesSinceLastBuild(HgRepository.java:371) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$1.call(DefaultChangeDetectionManager.java:393) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$1.call(DefaultChangeDetectionManager.java:390) at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:100) ... 38 more Caused by: com.atlassian.utils.process.ProcessException: Non-zero exit code: 255 at com.atlassian.utils.process.PluggableProcessHandler.complete(PluggableProcessHandler.java:83) at com.atlassian.utils.process.ExternalProcess.finish(ExternalProcess.java:376) at com.atlassian.utils.process.ExternalProcess.execute(ExternalProcess.java:419) at com.atlassian.bamboo.plugins.hg.HgCommandProcessor.runCommand(HgCommandProcessor.java:455) ... 47 more {code} Bamboo cannot even substitute that variable in a script task: {code} /var/folders/gl/0lz__sg17fn4z5gcl_lsb66m0000gp/T/PROJ1-PLAN1-JOB1-4-ScriptBuildTask-8957754229755330542.sh: line 3: ${bamboo.jira.version}: bad substitution {code}

    Atlassian JIRA | 4 years ago | Armen Khachatryan [Atlassian]
    java.lang.RuntimeException: com.atlassian.bamboo.plugins.hg.HgCommandException: command [/usr/local/bin/hg, id, -i, --debug, --rev, ${bamboo.jira.version}, --config, ui.ssh=ssh -o StrictHostKeyChecking=no -o BatchMode=yes, file:///Users/akhachatryan/dev/Repositories/MercurialClone] failed. Working directory was `/Users/akhachatryan/Atlassian/BambooHome4.2.1/xml-data/build-dir/_hg-repositories-cache/6f80156028b3e846098db18bf296ceb6d6d498c0'. stderr: hg: parse error at 0: syntax error stdout:
  2. 0

    I tried this with Bamboo 4.2.1, JIRA 5.0.7, and [Bamboo - JIRA plugin 5.1|https://marketplace.atlassian.com/plugins/com.atlassian.jira.plugin.ext.bamboo/version/460]. {code} java.lang.RuntimeException: com.atlassian.bamboo.plugins.hg.HgCommandException: command [/usr/local/bin/hg, id, -i, --debug, --rev, ${bamboo.jira.version}, --config, ui.ssh=ssh -o StrictHostKeyChecking=no -o BatchMode=yes, file:///Users/akhachatryan/dev/Repositories/MercurialClone] failed. Working directory was `/Users/akhachatryan/Atlassian/BambooHome4.2.1/xml-data/build-dir/_hg-repositories-cache/6f80156028b3e846098db18bf296ceb6d6d498c0'. stderr: hg: parse error at 0: syntax error stdout: at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:119) at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:79) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:174) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectionChangesWithRetry(DefaultChangeDetectionManager.java:389) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuild(DefaultChangeDetectionManager.java:260) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:218) ... Caused by: com.atlassian.bamboo.plugins.hg.HgCommandException: command [/usr/local/bin/hg, id, -i, --debug, --rev, ${bamboo.jira.version}, --config, ui.ssh=ssh -o StrictHostKeyChecking=no -o BatchMode=yes, file:///Users/akhachatryan/dev/Repositories/MercurialClone] failed. Working directory was `/Users/akhachatryan/Atlassian/BambooHome4.2.1/xml-data/build-dir/_hg-repositories-cache/6f80156028b3e846098db18bf296ceb6d6d498c0'. stderr: hg: parse error at 0: syntax error stdout: at com.atlassian.bamboo.plugins.hg.HgCommandProcessor.runCommand(HgCommandProcessor.java:460) at com.atlassian.bamboo.plugins.hg.HgCommandProcessor.runCommand(HgCommandProcessor.java:418) at com.atlassian.bamboo.plugins.hg.HgCommandProcessor.extractTipHash(HgCommandProcessor.java:485) at com.atlassian.bamboo.plugins.hg.HgCommandProcessor.getRemoteTipForBranch(HgCommandProcessor.java:339) at com.atlassian.bamboo.plugins.hg.HgRepositoryAccessImpl.getLatestRemoteRevisionHash(HgRepositoryAccessImpl.java:321) at com.atlassian.bamboo.plugins.hg.HgRepositoryAccessImpl.collectChangesSinceLastBuild(HgRepositoryAccessImpl.java:94) at com.atlassian.bamboo.plugins.hg.HgRepository.collectChangesSinceLastBuild(HgRepository.java:371) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$1.call(DefaultChangeDetectionManager.java:393) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$1.call(DefaultChangeDetectionManager.java:390) at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:100) ... 38 more Caused by: com.atlassian.utils.process.ProcessException: Non-zero exit code: 255 at com.atlassian.utils.process.PluggableProcessHandler.complete(PluggableProcessHandler.java:83) at com.atlassian.utils.process.ExternalProcess.finish(ExternalProcess.java:376) at com.atlassian.utils.process.ExternalProcess.execute(ExternalProcess.java:419) at com.atlassian.bamboo.plugins.hg.HgCommandProcessor.runCommand(HgCommandProcessor.java:455) ... 47 more {code} Bamboo cannot even substitute that variable in a script task: {code} /var/folders/gl/0lz__sg17fn4z5gcl_lsb66m0000gp/T/PROJ1-PLAN1-JOB1-4-ScriptBuildTask-8957754229755330542.sh: line 3: ${bamboo.jira.version}: bad substitution {code}

    Atlassian JIRA | 4 years ago | Armen Khachatryan [Atlassian]
    java.lang.RuntimeException: com.atlassian.bamboo.plugins.hg.HgCommandException: command [/usr/local/bin/hg, id, -i, --debug, --rev, ${bamboo.jira.version}, --config, ui.ssh=ssh -o StrictHostKeyChecking=no -o BatchMode=yes, file:///Users/akhachatryan/dev/Repositories/MercurialClone] failed. Working directory was `/Users/akhachatryan/Atlassian/BambooHome4.2.1/xml-data/build-dir/_hg-repositories-cache/6f80156028b3e846098db18bf296ceb6d6d498c0'. stderr: hg: parse error at 0: syntax error stdout:

    Root Cause Analysis

    1. java.lang.RuntimeException

      com.atlassian.bamboo.plugins.hg.HgCommandException: command [/usr/local/bin/hg, id, -i, --debug, --rev, ${bamboo.jira.version}, --config, ui.ssh=ssh -o StrictHostKeyChecking=no -o BatchMode=yes, file:///Users/akhachatryan/dev/Repositories/MercurialClone] failed. Working directory was `/Users/akhachatryan/Atlassian/BambooHome4.2.1/xml-data/build-dir/_hg-repositories-cache/6f80156028b3e846098db18bf296ceb6d6d498c0'. stderr: hg: parse error at 0: syntax error stdout:

      at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun()
    2. com.atlassian.bamboo
      DefaultChangeDetectionManager.collectChangesSinceRevisions
      1. com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:119)
      2. com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:79)
      3. com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:174)
      4. com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectionChangesWithRetry(DefaultChangeDetectionManager.java:389)
      5. com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuild(DefaultChangeDetectionManager.java:260)
      6. com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:218)
      6 frames