How to install TortoiseHg on ubuntu 19.10

The latest version of TortoiseHg for Debian based OS is 4.8.1-0.1 (as per Debian search results). The same version is available in Ubuntu's pool of archives (and can be found by searching on Ubuntu Packages*) and the dependencies can still be satisfied in Eoan Ermine (19.10) without any extra work.

To install run:

wget http://ftp.us.debian.org/debian/pool/main/t/tortoisehg/tortoisehg_4.8.1-0.1_all.deb
sudo apt install ./tortoisehg_4.8.1-0.1_all.deb

*Thanks N0rbert for reminding to include the link.


Kulfy's answer didn't work for me. In fact the wget line fails because the file doesn't exist. As of today, 4.5.2 is the latest tortoisehg version available for Ubuntu.

Here's how I did it in Ubuntu 20; it will probably work for 19, too. Note I am pulling from the "stable" branch, because it has fixes which are not in the main branch (as of today, e.g. shelf functionality is broken on main branch but is fixed on "stable".)

# make a folder to hold the tortoise source
mkdir ~/temp 2>/dev/null
cd ~/temp

# alias the python3 binary as python
sudo apt install python-is-python3
# now this should work, and return a 3.8.x version
python --version

# pip3 is needed to fulfill all the build dependencies
sudo apt install -y python3-pip build-essential

# install mercurial command line
sudo apt install -y mercurial
# pull tortoisehg source (stable branch)
# this no longer exists: hg clone https://bitbucket.org/tortoisehg/thg/ -r stable
# use this one instead:
hg clone https://foss.heptapod.net/mercurial/tortoisehg/thg -r stable
cd thg
pip3 install pyqt5
pip3 install mercurial
pip3 install qscintilla
sudo apt install -y pyqt5.qsci-dev

# install one more necessary package
sudo apt install -y python3-iniparse

# build it
make local
# move it to ~/tortoisehg  (this is optional)
cd ~/temp
rm -rf ~/tortoisehg 2>/dev/null
mkdir ~/tortoisehg
mv thg/* ~/tortoisehg

Now you can create a dock/desktop entry:

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 hit the "Show Applications" button (the Start menu), search for Tortoise, and add it to favorites.