Ubuntu – How to set TortoiseHG to work with Caja on Ubuntu 16.04 LTS

16.04cajamatemercurial

It is known that modern Ubuntu versions such as Ubuntu 18.04 LTS has corresponding tortoisehg-caja package. The TortoiseHG package provides GUI for Mercurial.

This results in nice looking item in drop-down menu:

TortoiseHG-Caja in 18.04 LTS

But old Ubuntu 16.04 LTS does not have such package.

Is it possible to have TortoiseHG integration into Caja file-manager on 16.04 LTS?

Best Answer

  • It is possible because of the fact that Caja integration is already included into Python-extension (see my patch from 2014 year) and current version of nautilus-thg.py file.

    So we need to install tortoisehg-nautilus and copy extension from it to home folder, install Python Caja extension and then remove tortoisehg-nautilus package:

    sudo apt-get install tortoisehg-nautilus caja-extensions-common python-caja
    
    mkdir -p ~/.local/share/caja-python/extensions
    cp /usr/share/nautilus-python/extensions/nautilus-thg.py ~/.local/share/caja-python/extensions/caja-thg.py
    
    sudo apt-get purge tortoisehg-nautilus
    sudo apt-get autoremove
    sudo apt-get install tortoisehg mercurial
    

    restart Caja with caja -q and enjoy.