-
-
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 |
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
Use