Clone wiki

thg / thg


TortoiseHg comes with a simple python application, thg, which allows you to launch the TortoiseHg dialogs on any platform that supports Mercurial and PyQt. This is the easiest way to start using TortoiseHg on Linux and Mac OS X.


You may be able to find RPM and DEB packages on the download page. If not, please use the source install method.

From Source

Do NOT run, it is unnecessary

  1. Install Mercurial (consult the chart at ReleaseNotes for version info)
  2. Clone the TortoiseHg repository: hg clone tortoisehg
  3. Symlink the thg script into your path: ln -s /path/to/tortoisehg/thg ~/bin

That is usually all you have to do. You should now be able to launch the TortoiseHg dialogs. If you move the tortoisehg repository, just remember to update the ~/bin/thg symlink.

  • If you want to use the stable branch, run (inside the repository): hg update stable
  • If you want translations, run (inside the repository): python build_mo

To use the settings tool (repoconfig, userconfig) you must have installed.

If pygments is installed, the commit tool will provide completions for variable names in the source file you are previewing.

Here is a blog post about installing TortoiseHg 2.0 as source on Ubuntu 10.10

Visual Diffs

It is recommended %include our mergetools.rc into your ~/.hgrc file, especially if you use KDiff3 as your merge tool.

%include /path/to/tortoisehg/contrib/mergetools.rc


We do not suggest that you run from a tarball, even though we make one available for download. The tarball is only intended for use by distribution packagers. We prefer you use a local clone of TortoiseHg instead. If you do use a tarball, you may need to delete thgutil/* to remove the hard-coded paths. If you run from a tarball, you will likely need to edit the installed thgutil/

Using thg

Running thg without any arguments launches the Workbench. To see what commands are available, use:

# thg --help
thg - TortoiseHg's GUI tools for Mercurial SCM (Hg)

basic commands:

 about        about TortoiseHg
 add          add files

thg uses Mercurial's command matching logic to support abbreviated command names. For instance, thg ci will launch the commit dialog.

See the Debugging Dialogs section of developers/Debugging for debug hints.

Prerequisites, Versions

TortoiseHg Windows packages include Python 2.6.6, Qt 4.7.1, and PyQt 4.8.2

We require a minimum PyQt version of 4.6

TortoiseHg should work on Python 2.4 or later, the same restriction as Mercurial.

Consult the chart at the bottom of ReleaseNotes for Mercurial version info