目次
TortoiseHg - Mercurial 分散型バージョン管理システム用ツール
インストール
Fedora
$ sudo dnf install -y mercurial tortoisehg tortoisehg-nautilus
リポジトリの更新を読み込み中: リポジトリを読み込みました。 Package "mercurial-6.8.2-1.fc41.x86_64" is already installed. Package Arch Version Repository Size Installing: tortoisehg noarch 6.6.3-8.fc41 fedora 14.4 MiB Installing dependencies: python-pyqt6-rpm-macros noarch 6.8.1-0.1.fc41 updates 144.0 B python3-iniparse noarch 0.5-10.fc41 fedora 124.9 KiB python3-pygments noarch 2.18.0-2.fc41 fedora 10.6 MiB python3-pyqt6 x86_64 6.8.1-0.1.fc41 updates 5.8 MiB python3-pyqt6-base x86_64 6.8.1-0.1.fc41 updates 15.5 MiB python3-pyqt6-sip x86_64 13.9.1-1.fc41 updates 142.2 KiB python3-qscintilla-qt6 x86_64 2.14.1-2.fc41 fedora 20.0 MiB qscintilla-qt6 x86_64 2.14.1-2.fc41 fedora 3.3 MiB qt6-qtconnectivity x86_64 6.8.2-1.fc41 updates 1.5 MiB qt6-qtpdf x86_64 6.8.2-1.fc41 updates 5.7 MiB qt6-qtpositioning x86_64 6.8.2-1.fc41 updates 1.5 MiB qt6-qtremoteobjects x86_64 6.8.2-1.fc41 updates 1.4 MiB qt6-qtsensors x86_64 6.8.2-1.fc41 updates 937.4 KiB qt6-qtserialport x86_64 6.8.2-1.fc41 updates 219.2 KiB qt6-qtspeech x86_64 6.8.2-1.fc41 updates 360.8 KiB qt6-qttools-common noarch 6.8.2-1.fc41 updates 7.5 KiB qt6-qttools-libs-designer x86_64 6.8.2-1.fc41 updates 5.8 MiB qt6-qttools-libs-help x86_64 6.8.2-1.fc41 updates 586.9 KiB qt6-qtwebchannel x86_64 6.8.2-1.fc41 updates 427.4 KiB qt6-qtwebsockets x86_64 6.8.2-1.fc41 updates 311.6 KiB Installing weak dependencies: qt6-qtspeech-speechd x86_64 6.8.2-1.fc41 updates 68.2 KiB Transaction Summary: Installing: 22 packages パッケージサイズ 22 MiB 、ダウンロードサイズ 22 MiB 。 完了後、89 MiB のサイズが利用されます(インストール 89 MiB、削除 0 B)。 [ 1/22] python3-iniparse-0:0.5-10.fc41.noarch 100% | 105.5 KiB/s | 54.0 KiB | 00m01s [ 2/22] python3-pygments-0:2.18.0-2.fc41.noarch 100% | 1.1 MiB/s | 2.5 MiB | 00m02s [ 3/22] qscintilla-qt6-0:2.14.1-2.fc41.x86_64 100% | 788.7 KiB/s | 1.1 MiB | 00m01s [ 4/22] tortoisehg-0:6.6.3-8.fc41.noarch 100% | 885.0 KiB/s | 3.4 MiB | 00m04s [ 5/22] python3-qscintilla-qt6-0:2.14.1-2.fc41.x86_64 100% | 704.7 KiB/s | 2.8 MiB | 00m04s [ 6/22] python-pyqt6-rpm-macros-0:6.8.1-0.1.fc41.noarch 100% | 30.1 KiB/s | 10.3 KiB | 00m00s [ 7/22] python3-pyqt6-0:6.8.1-0.1.fc41.x86_64 100% | 672.4 KiB/s | 1.1 MiB | 00m02s [ 8/22] python3-pyqt6-base-0:6.8.1-0.1.fc41.x86_64 100% | 1.3 MiB/s | 3.0 MiB | 00m02s [ 9/22] python3-pyqt6-sip-0:13.9.1-1.fc41.x86_64 100% | 38.8 KiB/s | 62.0 KiB | 00m02s [10/22] qt6-qtconnectivity-0:6.8.2-1.fc41.x86_64 100% | 293.8 KiB/s | 508.8 KiB | 00m02s [11/22] qt6-qtpositioning-0:6.8.2-1.fc41.x86_64 100% | 583.5 KiB/s | 445.8 KiB | 00m01s [12/22] qt6-qtremoteobjects-0:6.8.2-1.fc41.x86_64 100% | 785.5 KiB/s | 486.2 KiB | 00m01s [13/22] qt6-qtsensors-0:6.8.2-1.fc41.x86_64 100% | 414.1 KiB/s | 224.8 KiB | 00m01s [14/22] qt6-qtpdf-0:6.8.2-1.fc41.x86_64 100% | 1.3 MiB/s | 2.5 MiB | 00m02s [15/22] qt6-qtserialport-0:6.8.2-1.fc41.x86_64 100% | 134.2 KiB/s | 78.6 KiB | 00m01s [16/22] qt6-qtspeech-0:6.8.2-1.fc41.x86_64 100% | 282.3 KiB/s | 115.5 KiB | 00m00s [17/22] qt6-qttools-common-0:6.8.2-1.fc41.noarch 100% | 9.2 KiB/s | 11.4 KiB | 00m01s [18/22] qt6-qttools-libs-help-0:6.8.2-1.fc41.x86_64 100% | 147.0 KiB/s | 207.2 KiB | 00m01s [19/22] qt6-qttools-libs-designer-0:6.8.2-1.fc41.x86_64 100% | 1.7 MiB/s | 2.9 MiB | 00m02s [20/22] qt6-qtwebchannel-0:6.8.2-1.fc41.x86_64 100% | 328.3 KiB/s | 152.7 KiB | 00m00s [21/22] qt6-qtwebsockets-0:6.8.2-1.fc41.x86_64 100% | 361.8 KiB/s | 107.8 KiB | 00m00s [22/22] qt6-qtspeech-speechd-0:6.8.2-1.fc41.x86_64 100% | 250.0 KiB/s | 35.5 KiB | 00m00s ------------------------------------------------------------------------------------------------------------------ [22/22] Total 100% | 1.8 MiB/s | 21.9 MiB | 00m12s トランザクションを実行中 [ 1/24] パッケージ ファイルを検証 100% | 68.0 B/s | 22.0 B | 00m00s [ 2/24] トランザクションの準備 100% | 1.0 B/s | 22.0 B | 00m18s [ 3/24] インストール中 qt6-qttools-common-0:6.8.2-1.fc41.noarch 100% | 54.5 KiB/s | 7.9 KiB | 00m00s [ 4/24] インストール中 qt6-qtspeech-0:6.8.2-1.fc41.x86_64 100% | 3.2 MiB/s | 364.3 KiB | 00m00s [ 5/24] インストール中 qt6-qtserialport-0:6.8.2-1.fc41.x86_64 100% | 3.3 MiB/s | 221.4 KiB | 00m00s [ 6/24] インストール中 python3-pyqt6-sip-0:13.9.1-1.fc41.x86_64 100% | 2.6 MiB/s | 144.6 KiB | 00m00s [ 7/24] インストール中 qt6-qtpositioning-0:6.8.2-1.fc41.x86_64 100% | 6.8 MiB/s | 1.5 MiB | 00m00s [ 8/24] インストール中 qt6-qttools-libs-designer-0:6.8.2-1.fc41.x8 100% | 32.8 MiB/s | 5.8 MiB | 00m00s [ 9/24] インストール中 qt6-qttools-libs-help-0:6.8.2-1.fc41.x86_64 100% | 8.7 MiB/s | 587.8 KiB | 00m00s [10/24] インストール中 qt6-qtwebsockets-0:6.8.2-1.fc41.x86_64 100% | 4.6 MiB/s | 313.8 KiB | 00m00s [11/24] インストール中 qt6-qtwebchannel-0:6.8.2-1.fc41.x86_64 100% | 1.1 MiB/s | 431.1 KiB | 00m00s [12/24] インストール中 qt6-qtsensors-0:6.8.2-1.fc41.x86_64 100% | 5.2 MiB/s | 942.4 KiB | 00m00s [13/24] インストール中 qt6-qtremoteobjects-0:6.8.2-1.fc41.x86_64 100% | 12.7 MiB/s | 1.4 MiB | 00m00s [14/24] インストール中 qt6-qtpdf-0:6.8.2-1.fc41.x86_64 100% | 20.6 MiB/s | 5.7 MiB | 00m00s [15/24] インストール中 qt6-qtconnectivity-0:6.8.2-1.fc41.x86_64 100% | 2.1 MiB/s | 1.5 MiB | 00m01s [16/24] インストール中 python-pyqt6-rpm-macros-0:6.8.1-0.1.fc41.no 100% | 18.5 KiB/s | 416.0 B | 00m00s [17/24] インストール中 python3-pyqt6-base-0:6.8.1-0.1.fc41.x86_64 100% | 34.0 MiB/s | 15.6 MiB | 00m00s [18/24] インストール中 python3-pyqt6-0:6.8.1-0.1.fc41.x86_64 100% | 15.4 MiB/s | 5.8 MiB | 00m00s [19/24] インストール中 qscintilla-qt6-0:2.14.1-2.fc41.x86_64 100% | 29.8 MiB/s | 3.3 MiB | 00m00s [20/24] インストール中 python3-qscintilla-qt6-0:2.14.1-2.fc41.x86_ 100% | 67.3 MiB/s | 20.0 MiB | 00m00s [21/24] インストール中 python3-pygments-0:2.18.0-2.fc41.noarch 100% | 18.6 MiB/s | 10.8 MiB | 00m01s [22/24] インストール中 python3-iniparse-0:0.5-10.fc41.noarch 100% | 1.6 MiB/s | 130.8 KiB | 00m00s [23/24] インストール中 tortoisehg-0:6.6.3-8.fc41.noarch 100% | 11.9 MiB/s | 14.5 MiB | 00m01s [24/24] インストール中 qt6-qtspeech-speechd-0:6.8.2-1.fc41.x86_64 100% | 4.8 KiB/s | 70.1 KiB | 00m14s 完了しました!
CentOS 7.1
CentOS 7 で EPEL, RPM Fusion, Remi, RepoForge(RPM Forge), Nux Dextop リポジトリを利用する の手順を行ってから、以下の手順でインストールする。
$ sudo yum install PyQt4-devel python-devel python-iniparse gcc gettext $ sudo yum install qscintilla-python python-keyring python-sphinx Django $ hg clone https://bitbucket.org/tortoisehg/thg $ cd thg $ ./thg
起動
トラブルシューティング
TortoiseHgバグ報告が表示される
Fedora 23 で tortoisehg-3.5.1、mercurial-3.6.3の場合は、画面に以下の内容が表示されてしまう。
#!python ** ** Mercurial version (3.6.3). TortoiseHg version (3.5.1) ** Command: --nofork ** CWD: /var/www/vhosts/localhost/private/cloud_manager ** Encoding: UTF-8 ** Extensions loaded: ** Python version: 2.7.10 (default, Sep 8 2015, 17:20:17) [GCC 5.1.1 20150618 (Red Hat 5.1.1-4)] ** System: Linux hostname.localdomain 4.2.8-300.fc23.x86_64 #1 SMP Tue Dec 15 16:49:06 UTC 2015 x86_64 ** Qt-4.8.7 PyQt-4.11.4 QScintilla-2.9.1 This version of TortoiseHg requires Mercurial version 3.4.n to 3.5.n, but found 3.6.3
その場合は、tortoisehg の checkhgversion() で判定しているバージョンを修正することで、ひとまず動作させることができる。
- hgversion.pyのパスを調べる。
$ rpm -ql tortoisehg | grep hgversion.py /usr/lib/python2.7/site-packages/tortoisehg/util/hgversion.py
- checkhgversion() 関数の手前の testedwith 変数を書き足す。
$ sudo vi /usr/lib/python2.7/site-packages/tortoisehg/util/hgversion.py
#testedwith = '3.4 3.5' testedwith = '3.4 3.5 3.6'
古い tortoisehg の場合は以下のように直す。
- checkhgversion() 関数のバージョンを2.6から2.8へ変更する。
$ sudo vi /usr/lib/python2.7/site-packages/tortoisehg/util/hgversion.py
def checkhgversion(v): """range check the Mercurial version""" # reqver = ['2', '6'] reqver = ['2', '8'] v = v.split('+')[0]
何も表示されず起動もしない... orz
Qtまわりが原因で起動しない場合は何も表示されないようである。
python から import してみる。
$ python Python 2.7.3 (default, Aug 9 2012, 17:23:57) [GCC 4.7.1 20120720 (Red Hat 4.7.1-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import tortoisehg.hgqt.run TortoiseHg requires Qt 4.6 and PyQt 4.7 You have Qt 4.8.4 and PyQt 4.10
Qt や PyQt のバージョンチェックを修正して、無理やり動かす。(自己責任で!!)
$ sudo vi /usr/lib/python2.7/site-packages/tortoisehg/hgqt/qtlib.py
if PYQT_VERSION_STR.split('.') < ['4', '10'] or \ QT_VERSION_STR.split('.') < ['4', '8']: sys.stderr.write('TortoiseHg requires Qt 4.8 and PyQt 4.10\n') sys.stderr.write('You have Qt %s and PyQt %s\n' % (QT_VERSION_STR, PYQT_VERSION_STR)) sys.exit()