web-dev-qa-db-ja.com

Mercurial 3.3.2でTortoiseHGをインストールする

GUIでプロジェクトのバージョンを表示、比較、チェックアウトする必要があります。しかし、Tortoise HGをインストールする場合、aptはMercurialのダウングレードを提案します。 3.3にアップグレードするといくつかの問題が解決したことを思い出し(それが何であったか覚えていません)、3.3で作成された多くのリポジトリがあるので、ダウングレードしたくありません。

hg view並べ替えはできますが、リビジョンをチェックアウトしたり、2つのリビジョンをmeldと比較することはできません。

$ hg --version
Mercurial Distributed SCM (version 3.3.2)
...
$ Sudo aptitude install tortoisehg
....
The following packages have unmet dependencies:
 tortoisehg : Depends: Mercurial (< 3.2~) but 3.3.2-1ppa2~precise1 is installed.
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     tortoisehg [Not Installed]                         

Accept this solution? [Y/n/q/?] 

...

     Downgrade the following packages:                                                   
3)     Mercurial [3.3.2-1ppa2~precise1 (now, precise) -> 2.0.2-1ubuntu1 (precise)]

そう:

1。Mercurial 3.3にTortoise-hgをインストールするにはどうすればよいですか?

2。代わりにどのような代替手段を使用できますか?

編集:

$ lsb_release -a; uname -a; apt-cache policy tortoisehg Mercurial
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.5 LTS
Release:    12.04
Codename:   precise
Linux somename 3.11.0-26-generic #45~precise1-Ubuntu SMP Tue Jul 15 04:04:35 UTC 2014 i686 i686 i386 GNU/Linux
tortoisehg:
  Installed: (none)
  Candidate: 3.0-0ppa1~precise1
  Version table:
     3.0-0ppa1~precise1 0
    500 http://ppa.launchpad.net/tortoisehg-ppa/releases/ubuntu/ precise/main i386 Packages
     2.2-1 0
    500 http://XX.archive.ubuntu.com/ubuntu/ precise/universe i386 Packages
    100 /var/lib/dpkg/status
Mercurial:
  Installed: 3.3.2-1ppa2~precise1
  Candidate: 3.3.2-1ppa2~precise1
  Version table:
 *** 3.3.2-1ppa2~precise1 0
    500 http://ppa.launchpad.net/Mercurial-ppa/releases/ubuntu/ precise/main i386 Packages
    100 /var/lib/dpkg/status
     3.0.1-0ppa1~precise1 0
    500 http://ppa.launchpad.net/tortoisehg-ppa/releases/ubuntu/ precise/main i386 Packages
     2.0.2-1ubuntu1.2 0
    500 http://XX.archive.ubuntu.com/ubuntu/ precise-updates/universe i386 Packages
    500 http://security.ubuntu.com/ubuntu/ precise-security/universe i386 Packages
     2.0.2-1ubuntu1 0
    500 http://XX.archive.ubuntu.com/ubuntu/ precise/universe i386 Packages

EDIT2:

$ apt-cache policy tortoisehg
tortoisehg:
  Installed: (none)
  Candidate: 3.3.3+2-426769dbcfe8-0ppa1~precise1
  Version table:
     3.3.3+2-426769dbcfe8-0ppa1~precise1 0
    500 http://ppa.launchpad.net/tortoisehg-ppa/stable-snapshots/ubuntu/ precise/main i386 Packages
     2.2-1 0
    500 http://XX.archive.ubuntu.com/ubuntu/ precise/universe i386 Packages
    100 /var/lib/dpkg/status

さらに詳細な調査を行った結果、 私の回答の最初のバージョン が間違っていたことがわかりました。

"TortoiseHg PPA Packagers"チームPPA のいずれも、少なくとも正確ではないが、同じチームの Mercurial PPA と連携します。

TortoiseHg PPAパッケージャー:スナップショットPPA にはMercurial (>= 2.7~)およびMercurial (<< 2.9~)が必要です TortoiseHg PPAパッケージャー:安定したスナップショットPPA にはMercurial (>= 3.0~)およびMercurial (<< 3.2~)が必要です.

2
A.B.

tortoisehg-ppaは現在空なので、xenialから.debパッケージをビルドすることになりました。ただし、xenialのtortoisehgは3.7.3であり、Mercurial <3.8が必要であるため、3.8.3のMercurial-ppaは使用できません。したがって、XenialからMercurialもビルドします。

最初にソースリポジトリを構築および更新するためのツールをインストールします。

Sudo apt-get install dpkg-dev build-essential fakeroot

edit /etc/apt/sources.list and replace
  deb-src ... trusty universe
with
  deb-src ... xenial universe

Sudo apt-get update

Mercurialのビルド:

mkdir build-Mercurial
cd build-Mercurial
Sudo apt-get build-dep Mercurial
apt-get source Mercurial
cd Mercurial-3.7.3/
DEB_BUILD_OPTIONS=nocheck fakeroot debian/rules binary
Sudo dpkg -i ../Mercurial_*.deb

Tortoisehgのビルド:

cd ../..
mkdir build-tortoisehg
cd build-tortoisehg
Sudo apt-get build-dep tortoisehg
apt-get source tortoisehg
cd tortoisehg-3.7.3/
fakeroot debian/rules binary
Sudo dpkg -i ../tortoisehg_*.deb

Dpkgはアンインストールされた依存関係について文句を言うかもしれないことに注意してください。必要に応じてapt-get installを使用してインストールし、dpkg -i ...を再実行します。

1
patraulea

まず、私は A.B。の答えの最初のバージョン が提案したようにした:

Sudo apt-add-repository ppa:tortoisehg-ppa/stable-snapshots
Sudo apt-get update
Sudo apt-get install tortoisehg-nautilus tortoisehg

しかし、これでは不十分でした(最後のコマンドが失敗しました)。

それから私はやった

$ Sudo apt-get download tortoisehg
Get:1 Downloading tortoisehg 3.3.3+2-426769dbcfe8-0ppa1~precise1 [4,090 kB]
Fetched 4,090 kB in 0s (5,018 kB/s) 

(.debを現在のディレクトリにダウンロードします。ファイルの日付は現在の日付ではなく2015年4月3日で、完全なファイル名はnot印刷されますコンソールへ)およびその後

Sudo dpkg -i tortoisehg_3.3.3+2-426769dbcfe8-0ppa1~precise1_all.deb

それは私のために働き始めました。 (--force-all(link) が必要なかった理由はわかりません。)一般に、このようなインストールは正しくありませんが、最も一般的な機能を実行することが起こります。私のシステムでこれまでのところ動作するという事実は、将来的にあなたのシステムで動作するという保証ではありません。

apt-getupdate-managerは、使用するたびにこの構成を「修正」(つまり、破壊)しようとすることに注意してください。おそらく、彼らが提案したことを行い、仕事が終わった後にtortoisehgを再インストールする必要があります。