linux:tortoisehg

文書の過去の版を表示しています。


TortoiseHg - Mercurial 分散型バージョン管理システム用ツール

Screenshot_from_2013-03-19 23:59:18

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

Fedora

$ sudo dnf install mercurial tortoisehg tortoisehg-nautilus

メタデータの期限切れの最終確認: 0:48:23 前の 2024年01月29日 12時30分38秒 に実施しました。
パッケージ mercurial-6.3.3-1.fc38.x86_64 は既にインストールされています。
依存関係が解決しました。
==============================================================================================================
 パッケージ                           アーキテクチャー  バージョン                   リポジトリー       サイズ
==============================================================================================================
インストール:
 tortoisehg                           noarch            6.4.2-1.fc38                 updates            3.6 M
 tortoisehg-nautilus                  noarch            6.4.2-1.fc38                 updates             13 k
依存関係のインストール:
 nautilus-python                      x86_64            4.0-2.fc38                   fedora              30 k
 python-qt5-rpm-macros                noarch            5.15.9-7.fc38                updates            8.6 k
 python3-iniparse                     noarch            0.5-4.fc38                   fedora              56 k
 python3-pygments                     noarch            2.14.0-1.fc38                fedora             2.5 M
 python3-pyqt5-sip                    x86_64            12.11.1-1.fc38               fedora              87 k
 python3-qscintilla-qt5               x86_64            2.13.4-1.fc38                updates            307 k
 python3-qt5                          x86_64            5.15.9-7.fc38                updates            1.2 M
 python3-qt5-base                     x86_64            5.15.9-7.fc38                updates            3.3 M
 qscintilla-qt5                       x86_64            2.13.4-1.fc38                updates            1.1 M
 qt5-qtconnectivity                   x86_64            5.15.11-1.fc38               updates            464 k
 qt5-qtlocation                       x86_64            5.15.11-1.fc38               updates            3.2 M
 qt5-qtmultimedia                     x86_64            5.15.11-1.fc38               updates            811 k
 qt5-qtsensors                        x86_64            5.15.11-1.fc38               updates            229 k
 qt5-qtserialport                     x86_64            5.15.11-1.fc38               updates             65 k
 qt5-qttools-libs-designer            x86_64            5.15.11-1.fc38               updates            2.7 M
 qt5-qtwebchannel                     x86_64            5.15.11-1.fc38               updates            100 k
 qt5-qtwebsockets                     x86_64            5.15.11-1.fc38               updates             87 k

トランザクションの概要
==============================================================================================================
インストール  19 パッケージ

ダウンロードサイズの合計: 20 M
インストール後のサイズ: 77 M
これでよろしいですか? [y/N]: y
パッケージのダウンロード:
(1/19): nautilus-python-4.0-2.fc38.x86_64.rpm                                  18 kB/s |  30 kB     00:01    
(2/19): python3-iniparse-0.5-4.fc38.noarch.rpm                                 30 kB/s |  56 kB     00:01    
(3/19): python-qt5-rpm-macros-5.15.9-7.fc38.noarch.rpm                         24 kB/s | 8.6 kB     00:00    
(4/19): python3-pyqt5-sip-12.11.1-1.fc38.x86_64.rpm                            87 kB/s |  87 kB     00:01    
(5/19): python3-qscintilla-qt5-2.13.4-1.fc38.x86_64.rpm                       202 kB/s | 307 kB     00:01    
(6/19): python3-pygments-2.14.0-1.fc38.noarch.rpm                             433 kB/s | 2.5 MB     00:05    
(7/19): python3-qt5-5.15.9-7.fc38.x86_64.rpm                                  326 kB/s | 1.2 MB     00:03    
(8/19): python3-qt5-base-5.15.9-7.fc38.x86_64.rpm                             525 kB/s | 3.3 MB     00:06    
(9/19): qt5-qtconnectivity-5.15.11-1.fc38.x86_64.rpm                          121 kB/s | 464 kB     00:03    
(10/19): qscintilla-qt5-2.13.4-1.fc38.x86_64.rpm                              199 kB/s | 1.1 MB     00:05    
(11/19): qt5-qtlocation-5.15.11-1.fc38.x86_64.rpm                             701 kB/s | 3.2 MB     00:04    
(12/19): qt5-qtmultimedia-5.15.11-1.fc38.x86_64.rpm                           174 kB/s | 811 kB     00:04    
(13/19): qt5-qtsensors-5.15.11-1.fc38.x86_64.rpm                               56 kB/s | 229 kB     00:04    
(14/19): qt5-qtserialport-5.15.11-1.fc38.x86_64.rpm                            89 kB/s |  65 kB     00:00    
(15/19): qt5-qttools-libs-designer-5.15.11-1.fc38.x86_64.rpm                  425 kB/s | 2.7 MB     00:06    
(16/19): qt5-qtwebchannel-5.15.11-1.fc38.x86_64.rpm                            16 kB/s | 100 kB     00:06    
(17/19): qt5-qtwebsockets-5.15.11-1.fc38.x86_64.rpm                            13 kB/s |  87 kB     00:06    
(18/19): tortoisehg-nautilus-6.4.2-1.fc38.noarch.rpm                           13 kB/s |  13 kB     00:01    
(19/19): tortoisehg-6.4.2-1.fc38.noarch.rpm                                   225 kB/s | 3.6 MB     00:16    
--------------------------------------------------------------------------------------------------------------
合計                                                                          490 kB/s |  20 MB     00:41     
トランザクションの確認を実行中
トランザクションの確認に成功しました。
トランザクションのテストを実行中
トランザクションのテストに成功しました。
トランザクションを実行中
  準備             :                                                                                      1/1 
  インストール中   : python3-pyqt5-sip-12.11.1-1.fc38.x86_64                                             1/19 
  インストール中   : qt5-qtwebsockets-5.15.11-1.fc38.x86_64                                              2/19 
  インストール中   : qt5-qtwebchannel-5.15.11-1.fc38.x86_64                                              3/19 
  インストール中   : qt5-qttools-libs-designer-5.15.11-1.fc38.x86_64                                     4/19 
  インストール中   : qt5-qtserialport-5.15.11-1.fc38.x86_64                                              5/19 
  インストール中   : qt5-qtsensors-5.15.11-1.fc38.x86_64                                                 6/19 
  インストール中   : qt5-qtmultimedia-5.15.11-1.fc38.x86_64                                              7/19 
  インストール中   : qt5-qtlocation-5.15.11-1.fc38.x86_64                                                8/19 
  インストール中   : qt5-qtconnectivity-5.15.11-1.fc38.x86_64                                            9/19 
  インストール中   : qscintilla-qt5-2.13.4-1.fc38.x86_64                                                10/19 
  インストール中   : python-qt5-rpm-macros-5.15.9-7.fc38.noarch                                         11/19 
  インストール中   : python3-qt5-base-5.15.9-7.fc38.x86_64                                              12/19 
  インストール中   : python3-qt5-5.15.9-7.fc38.x86_64                                                   13/19 
  インストール中   : python3-qscintilla-qt5-2.13.4-1.fc38.x86_64                                        14/19 
  インストール中   : python3-pygments-2.14.0-1.fc38.noarch                                              15/19 
  インストール中   : python3-iniparse-0.5-4.fc38.noarch                                                 16/19 
  インストール中   : tortoisehg-6.4.2-1.fc38.noarch                                                     17/19 
  インストール中   : nautilus-python-4.0-2.fc38.x86_64                                                  18/19 
  インストール中   : tortoisehg-nautilus-6.4.2-1.fc38.noarch                                            19/19 
  scriptletの実行中: tortoisehg-nautilus-6.4.2-1.fc38.noarch                                            19/19 
  検証             : nautilus-python-4.0-2.fc38.x86_64                                                   1/19 
  検証             : python3-iniparse-0.5-4.fc38.noarch                                                  2/19 
  検証             : python3-pygments-2.14.0-1.fc38.noarch                                               3/19 
  検証             : python3-pyqt5-sip-12.11.1-1.fc38.x86_64                                             4/19 
  検証             : python-qt5-rpm-macros-5.15.9-7.fc38.noarch                                          5/19 
  検証             : python3-qscintilla-qt5-2.13.4-1.fc38.x86_64                                         6/19 
  検証             : python3-qt5-5.15.9-7.fc38.x86_64                                                    7/19 
  検証             : python3-qt5-base-5.15.9-7.fc38.x86_64                                               8/19 
  検証             : qscintilla-qt5-2.13.4-1.fc38.x86_64                                                 9/19 
  検証             : qt5-qtconnectivity-5.15.11-1.fc38.x86_64                                           10/19 
  検証             : qt5-qtlocation-5.15.11-1.fc38.x86_64                                               11/19 
  検証             : qt5-qtmultimedia-5.15.11-1.fc38.x86_64                                             12/19 
  検証             : qt5-qtsensors-5.15.11-1.fc38.x86_64                                                13/19 
  検証             : qt5-qtserialport-5.15.11-1.fc38.x86_64                                             14/19 
  検証             : qt5-qttools-libs-designer-5.15.11-1.fc38.x86_64                                    15/19 
  検証             : qt5-qtwebchannel-5.15.11-1.fc38.x86_64                                             16/19 
  検証             : qt5-qtwebsockets-5.15.11-1.fc38.x86_64                                             17/19 
  検証             : tortoisehg-6.4.2-1.fc38.noarch                                                     18/19 
  検証             : tortoisehg-nautilus-6.4.2-1.fc38.noarch                                            19/19 

インストール済み:
  nautilus-python-4.0-2.fc38.x86_64                       python-qt5-rpm-macros-5.15.9-7.fc38.noarch         
  python3-iniparse-0.5-4.fc38.noarch                      python3-pygments-2.14.0-1.fc38.noarch              
  python3-pyqt5-sip-12.11.1-1.fc38.x86_64                 python3-qscintilla-qt5-2.13.4-1.fc38.x86_64        
  python3-qt5-5.15.9-7.fc38.x86_64                        python3-qt5-base-5.15.9-7.fc38.x86_64              
  qscintilla-qt5-2.13.4-1.fc38.x86_64                     qt5-qtconnectivity-5.15.11-1.fc38.x86_64           
  qt5-qtlocation-5.15.11-1.fc38.x86_64                    qt5-qtmultimedia-5.15.11-1.fc38.x86_64             
  qt5-qtsensors-5.15.11-1.fc38.x86_64                     qt5-qtserialport-5.15.11-1.fc38.x86_64             
  qt5-qttools-libs-designer-5.15.11-1.fc38.x86_64         qt5-qtwebchannel-5.15.11-1.fc38.x86_64             
  qt5-qtwebsockets-5.15.11-1.fc38.x86_64                  tortoisehg-6.4.2-1.fc38.noarch                     
  tortoisehg-nautilus-6.4.2-1.fc38.noarch                

完了しました!

アクティビティ → アプリケーションを表示する → TortoiseHg をクリック。
TortoiseHg-icon

または、コマンドラインより

$ /usr/bin/thg

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() で判定しているバージョンを修正することで、ひとまず動作させることができる。

  1. hgversion.pyのパスを調べる。
    $ rpm -ql tortoisehg | grep hgversion.py
    /usr/lib/python2.7/site-packages/tortoisehg/util/hgversion.py
  2. 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 の場合は以下のように直す。

  1. 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]

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()
  • linux/tortoisehg.1707022007.txt.gz
  • 最終更新: 2024/02/04 13:46
  • by 非ログインユーザー