"Bad hg executable: No version string found"

Still need help?

The Atlassian Community is here for you.

Ask the community

There's a known issue with Fisheye/Crucible that persists until the latest version. The development team is already aware of the bug and work is being done in order to correct the problem, but for now, there's a workaround for customers who have servers with the defined locale being different than en_US.


The error message appears under the server configuration screen in Fisheye/Crucible and is presented below:

The following appears on atlassian-fisheye.log when debugging is activated:

DEBUG [qtp305606643-220 ] fisheye ProfilingServletFilter-logRequest - start request POST /admin/editHgConfig.do?atl_token=f265d9bfa61c1f1ab83d2643c09d1242b0e6fa90&hgExecutable=C%3A%5CProgram%20Files%5CTortoiseHg%5Chg.exe sessionid=17qwbbi2wpv1f48do8lc8onhq
DEBUG [qtp305606643-220 ] fisheye LoggingProcessMonitor-onBeforeStart - Starting process: C:\Program Files\TortoiseHg\hg.exe version
DEBUG [qtp305606643-220 ] fisheye LoggingProcessMonitor-onAfterFinished - Finished process: C:\Program Files\TortoiseHg\hg.exe version took 125ms
DEBUG [qtp305606643-220 ] fisheye ProfilingServletFilter-logRequest - end request in 219ms POST /admin/editHgConfig.do?atl_token=f265d9bfa61c1f1ab83d2643c09d1242b0e6fa90&hgExecutable=C%3A%5CProgram%20Files%5CTortoiseHg%5Chg.exe sessionid=17qwbbi2wpv1f48do8lc8onhq 200


This issue occurs because Fisheye executes a command on the system to look for the installed version of Mercurial and it expects an output in en_US format, so that it can parse the string and store the installed version in its configuration files. The command, the same for both DOS (Windows) or Unix (Linux, Mac) systems, is the following:

C:\> hg version

And here is the output in English locale systems:

Mercurial Distributed SCM (version 2.9.1)
(see http://mercurial.selenic.com for more information)

Copyright (C) 2005-2014 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO

As the output pattern is not the same in a system set to a different locale and Fisheye has to parse it in a certain manner, its parsing formula does not work. Here is the output of the command on a Windows Server 2012 R2 system that has its locale defined as pt_BR.UTF-8. You can notice the totally different way the information is presented.

Sistema de controle de versÒo distribuÝdo Mercurial (versÒo 2.9.1)
(veja http://mercurial.selenic.com para mais informaþ§es)

Copyright (C) 2005-2014 Matt Mackall e outros
Este software Ú livre; veja os fontes para condiþ§es de c¾pia. NÒo
hß garantias, nem mesmo de adequaþÒo para qualquer prop¾sito em


In order to make Fisheye work without diving in your system's settings and change locale variables, an option that can prevent other softwares you use from running or change the expected behaviour of programs for your users, you can set Mercurial to report its version always in English (en_US.UTF-8). Follow the steps below to learn how to do that:

1. Open up the folder where you installed Mercurial;

Windows default installation path
C:\Program Files\TortoiseHg
Stand-alone Mercurial
C:\Program Files\Mercurial
Linux default installation directory

There's no default path on Linux, it's where you extracted the Fisheye/Crucible package when setting it up.

2. Rename the sub-folder locale to locale.orig (or anything different than the original name)

Why? Because it will prevent Mercurial from translating its output strings.

tip/resting Created with Sketch.

Please note that this can affect other applications relying on Mercurial's outputs.

Now, try to setup again the Hg executable path under Server settings in Fisheye's Administration page.

Last modified on Nov 14, 2018

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.