TortoiseHg comes with a simple python application, hgtk, which allows you to launch the TortoiseHg dialogs on any platform that supports Mercurial and PyGtk. 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 method.
- Install Mercurial (consult the chart at the bottom of ReleaseNotes for version info)
- Clone the TortoiseHg repository:
hg clone http://bitbucket.org/tortoisehg/stable tortoisehg
- Symlink the hgtk script into your path:
ln -s /path/to/tortoisehg/hgtk ~/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/hgtk symlink.
Do NOT run setup.py, it is unnecessary
- 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.
You should %include our mergetools.rc into your ~/.hgrc file.
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.
Running hgtk without any arguments tells you what dialogs are available. For instance:
# hgtk Hgtk - TortoiseHg's GUI tools for Mercurial SCM (Hg) basic commands: about about TortoiseHg add add files clone clone tool commit commit tool datamine repository search and annotate tool guess guess previous renames or copies hgignore ignore filter editor init repository initialization tool log changelog viewer merge merge tool recovery recover, rollback & verify remove file status viewer in revert mode rename rename a single file or directory repoconfig repository configuration editor revert file status viewer in revert mode serve web server shelve shelve/unshelve tool status file status viewer synch repository synchronization tool update update/checkout tool userconfig user configuration editor vdiff launch configured visual diff tool version output version and copyright information use "hgtk help" for the full list of commands or "hgtk -v" for details
hgtk uses Mercurial's command matching logic to support abbreviated command names. For instance, hgtk ci will launch the commit dialog.
See the Debugging Dialogs section of developers/Debugging for debug hints.
Using Hgtk On Windows
If you are using a TortoiseHg binary install, hgtk.exe is already installed and in your path.
If you are using TortoiseHg from a source install, then you may need to create an hgtk.bat file with
python \path\to\tortoisehg\hgtk %*'
TortoiseHg Windows packages include GTK+ 2.16, PyGtk 2.12, and Python 2.5.
We target PyGtk 2.12 for development, but explicitly support PyGtk 2.10 since some long-life Linux distributions (RedHat, CentOS) still ship with 2.10. We require pygobject > 2.12.1 because of a bug that is present in earlier releases. See http://firstname.lastname@example.org/msg06900.html
PyGtk-2.16 generates deprecation warnings for tooltips. This will be resolved in the next release. If you enable stderr capture, these warnings will be hidden.
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