-
-
Save VioletGiraffe/166b62c4e170174976ee7691431c25e6 to your computer and use it in GitHub Desktop.
#!/bin/bash | |
TARGET_DIR=~/Downloads/repos/third-parties | |
TORTOISEHG_VERSION=${5:-stable} | |
prepare() { | |
sudo apt-get -y update | |
sudo apt-get -y install \ | |
curl \ | |
gcc \ | |
make \ | |
mercurial \ | |
python-is-python3 \ | |
python3 \ | |
python3-dev \ | |
python3-distutils \ | |
python3-docutils \ | |
python3-dulwich \ | |
python3-iniparse \ | |
python3-pip \ | |
libxcb-xinerama0 | |
pip3 install PyQt5 QScintilla mercurial | |
mkdir -p ${TARGET_DIR} | |
} | |
install_tortoisehg() { | |
echo 'Starting install_tortoisehg' | |
cd ${TARGET_DIR} | |
rm -rf thg || true | |
rm /usr/local/bin/thg || true | |
hg clone -u ${TORTOISEHG_VERSION} https://foss.heptapod.net/mercurial/tortoisehg/thg | |
sudo mkdir /usr/local/bin/ || true | |
sudo ln -fs ${TARGET_DIR}/thg/thg /usr/local/bin/thg | |
} | |
main() { | |
set -xe | |
prepare | |
install_tortoisehg | |
} | |
main |
This still working. Thanks!
To create a desktop application open /usr/share/applications/ and create a file tortoiseHG.desktop
:
[Desktop Entry]
Name=tortoiseHg
GenericName=Version Control GUI
Icon=TortoiseHG_logo
Comment=Mercurial GUI Client
Exec=thg --nofork
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Development;RevisionControl;
Keywords=thg;hgtk;mercurial;vcs
Thank you!
I had to also run
sudo apt-get install libxcb-xinerama0
because if not I got a Qt error:
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
Getting this error on Ubuntu 21.01, any ideas how to fix it and what's wrong?
ImportError: cannot import name 'urlutil' from 'mercurial.utils' (/usr/lib/python3/dist-packages/mercurial/utils/__init__.py)
P. S. It's finally available simply via apt install tortoisehg
on 21.10!
I had to also run
sudo apt-get install libxcb-xinerama0
because if not I got a Qt error:qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
Use
sudo apt-get install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
hello need help please
./thg
Traceback (most recent call last):
File "/home//Downloads/repos/third-parties/thg/./thg", line 163, in
tortoisehg.hgqt.run.run()
File "/usr/lib/python3.10/importlib/util.py", line 247, in getattribute
self.spec.loader.exec_module(self)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home//Downloads/repos/third-parties/thg/tortoisehg/hgqt/run.py", line 47, in
from ..util.i18n import agettext as _
ImportError: cannot import name 'agettext' from 'tortoisehg.util.i18n' (/home/***/Downloads/repos/third-parties/thg/tortoisehg/util/i18n.py)
hello need help please
Hello, what OS are you running? Ubuntu 22.04 has tortoisehg
in apt
so you can just install it hassle-free. I haven't used this script in years because it's no longer needed.
I Use Ubuntu 22.04, Yes I try snap, apt, and it's the same error
sudo apt install tortoisehg
Thanks, that worked for me.