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.

Packages

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 setup.py, it is unnecessary

  1. Install Mercurial (consult the chart at ReleaseNotes for version info)
  2. Clone the TortoiseHg repository: hg clone https://bitbucket.org/tortoisehg/thg 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 setup.py build_mo

To use the settings tool (repoconfig, userconfig) you must have http://code.google.com/p/iniparse/ 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

Tarballs

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/config.py* to remove the hard-coded paths. If you run setup.py from a tarball, you will likely need to edit the installed thgutil/config.py.

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

Updated

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.