7

On previous systems like Ubuntu 16.04 LTS and 18.04 LTS it was possible.

But 20.04 LTS do not have tortoisehg and tortoisehg-caja in the repositories.

What to do?

N0rbert
  • 103,263

2 Answers2

9

It is still possible, but by manual installation of packages.

One can use the method below based on obtaining packages from Ubuntu 20.10:

# 1. Get the newest Mercurial with Python 3 support
cd ~/Downloads
wget https://launchpad.net/ubuntu/+source/mercurial/5.5.1-1/+build/19906561/+files/mercurial-common_5.5.1-1_all.deb
wget https://launchpad.net/ubuntu/+source/mercurial/5.5.1-1/+build/19906561/+files/mercurial_5.5.1-1_amd64.deb

2. Install Mercurial packages

sudo apt-get install ./mercurial*.deb -y

3. Get dependencies for TortoiseHg

sudo apt install python3-all-dev python3-pyqt5 python3-pyqt5.qsci python3-iniparse -y

4. Get sources of TortoiseHg

hg clone https://foss.heptapod.net/mercurial/tortoisehg/thg cd thg hg checkout 5.5.1

5. Compile TortoiseHg using Python 3

sudo apt-get install python-is-python3 make local sudo python3 setup.py install

6. Install TortoiseHg extension for Caja

mkdir -p ~/.local/share/caja-python/extensions cp /usr/local/share/nautilus-python/extensions/nautilus-thg.py ~/.local/share/caja-python/extensions/caja-thg.py

and then restart Caja with caja -q && caja.

As the result one will get full functionality of Mercurial with TortoiseHG front-end in Caja:

  • the same emblems

    Caja with TortoiseHG integrated - emblems

  • and dropdown menus

    Caja with TortoiseHG integrated - menus


Notes:

  1. 20201019 - Ubuntu 20.10 repositories provide python3-based Mercurial packages.
  2. Ubuntu 20.10 have needed packages, so we can replace step 1 by sudo apt-get install mercurial and then proceed with next steps. I have tested this method on Ubuntu MATE 20.10. It works well!
N0rbert
  • 103,263
2

THANK YOU N0RBERT !!

One tweak to N0rbert's instructions: you may want to pull the "stable" branch of tortoise. As of today (6/2/2020) the "Shelf" feature is broken on main branch but is fixed in stable.

hg clone https://foss.heptapod.net/mercurial/tortoisehg/thg -r stable

(old: the command was: hg clone https://bitbucket.org/tortoisehg/thg/ -r stable but it looks like that is now gone.)

After you complete all of N0rbert's instrutions, if you'd like an easy way to launch Tortoise, create a .desktop file:

gedit ~/.local/share/applications/tortoisehg.desktop

And paste in these lines (replace "developer" with your username) :

[Desktop Entry]
Name=TortoiseHG
Exec=/home/developer/tortoisehg/thg
Comment=Launch TortoiseHG
Terminal=false
Type=Application
Icon=/home/developer/tortoisehg/icons/thg_logo.ico

Now you can click the start menu ("Show Applications"), search for Tortoise, right-click it and add to favorites.

Jay
  • 131
  • 3