Installing TortoiseHG 2.0 under Ubuntu 10.10 (Maverick)
On the 1st of March 2011 version 2.0 of TortoiseHG was released - and the people rejoiced. 2.0 features a much-refined interface allowing the user to perform most of the common tasks from a single dialog, instead of having to switch between a swathe of different dialogs. Unfortunately this new version is not available as a package under the Ubuntu repositories yet, but in this post you will find out how to install TortoiseHG 2.0 under Ubuntu 10.10.
This how-to was written and tested under a completely fresh install of Ubuntu 10.10 Desktop Edition. If you are performing this install on a system that already has a version of either Mercurial or TortoiseHG on then you must remove it first.
Also - you must have the Universe source enabled in '/etc/apt/sources.list'.
Let's get root first - and if needs be remove any previously installed packages.
|
1 2 |
sudo su apt-get purge mercurial tortoisehg tortoisehg-nautilus |
TortoiseHG 2.0 requires a newer version of Mercurial, as well as a few other packages that we may not have insatlled at the moment, so go ahead and install them.
|
1 |
apt-get install python-dev python-docutils checkinstall python-qt4 pyqt4-dev-tools python-qscintilla2 appmenu-gtk python-nautilus |
Now we're ready to install Mercurial 1.8 - we must grab the sources from the mercurial release site, extract, compile and install it.
|
1 2 3 4 5 6 |
cd /tmp wget http://mercurial.selenic.com/release/mercurial-1.8.tar.gz tar zxvf mercurial-1.8.tar.gz cd mercurial-1.8 make local checkinstall #hit enter a few times, the default settings are fine |
Once the above steps have been completed you should have Mercurial 1.8 installed and working - test this by typing the following. If the version output states is anything other than 1.8 then you most likely still have an older version of Mercurial installed or available under PATH. If so, go back to the top of this how-to and perform the required 'apt-get purge'.
|
1 2 |
hg version Mercurial Distributed SCM (version 1.8) |
Now it's time for us to install TortoiseHG 2.0. To do this we need to pull a clone from the TortoiseHG repo on bitbucket, and create a symlink.
|
1 2 3 |
cd /opt hg clone http://bitbucket.org/tortoisehg/thg tortoisehg ln -s /opt/tortoisehg/thg /usr/bin |
We are almost there! One last thing that we need to do is make a link to the Nautilus extension from the repo we just cloned so that we can make use of the context menu in the Nautilus file browser to perform actions with TortoiseHG.
Perform these steps as the user that you usually work as (i.e. administrator, SomeGuy).
|
1 2 |
mkdir -p ~/.nautilus/python-extensions ln -s /opt/tortoisehg/contrib/nautilus-thg.py ~/.nautilus/python-extensions |
Ok - one last step is to restart Nautilus to enable the TortoiseHG plugin.
|
1 |
nautilus -q |
If we now open up Nautilus and right-click we should see the TortoiseHG context menu.
That's pretty much it - note there were some errors appearing in the '.xsession-errors' log, but they did not seem to have any effect on the running of TortoiseHG or Nautilus.
Enjoy the lovely new interface that TortoiseHG 2.0 offers!


March 8th, 2011 - 13:25
Thanks a lot for this guide. I now too rejoice!
March 28th, 2011 - 13:26
Nice going. Thank you.
March 30th, 2011 - 06:17
Hoho!!!! Like This!!!
April 1st, 2011 - 00:00
Thanks for the guide, was about to go ahead but thought I’d search for ppa packages first and found some to make it easier: this worked for me: (with 1.1 already installed)
sudo apt-add-repository ppa:mercurial-ppa/releases
sudo apt-add-repository ppa:tortoisehg-ppa/releases
sudo apt-get update
sudo apt-get upgrade
nautilus -q
April 1st, 2011 - 08:07
Nice, thanks Owen – that’s definitely cleaner than having to compile everything from scratch! I think I saw that exact method not too long ago, but also read feedback that it did not work for a few people, so held off on posting it on here
October 11th, 2011 - 13:35
Hi, I tried your approach with Ubuntu 11.04 and I got till the tortoisehg context part. However, whatever I click does not have any effect. I can’t clone, open workbench etc etc. Just no response. Any ideas? Or where can I find debug logs?
October 11th, 2011 - 13:40
Hmm .. scrap that .. for some unknown reason it works now.