mercurial - その1 MacPortsでインストール
仕事でソースコード管理はSubversionでもVSSでもなくて、CVSを使い続けているのだけど多少は違う形態のものも知っておかないといけないと思っていたので勉強としてmercurialを試すべく自宅PCへ導入をしたので、その際のメモ。
環境はMacOSX10.5 Leopardな訳で、MacPortsを使うとすぐインストールできると見聞きしたので、ターミナルから入力
/Users/hideack% sudo port install mercurial
Password:
- > Building py25-bz2
- > Staging py25-bz2 into destroot
- > Installing py25-bz2 @2.5.4_0
- > Activating py25-bz2 @2.5.4_0
(中略)
- > Cleaning mercurial
- > Building py25-bz2
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-bz2/work/Python-2.5.4/Modules" && /opt/local/bin/python2.5 setup.py --no-user-cfg build " returned error 1
Command output: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --helperror: option --no-user-cfg not recognized
Error: The following dependencies failed to build: py25-bz2 py25-zlib
Error: Status 1 encountered during processing.
早速止まる。海外のユーザのTwitterの叫びを見つけて見るところ、"Pythonのバージョンが古いのが原因だ!"と一言書いてあったので、素直に信じて
/Users/hideack% sudo port upgrade python25
でアップグレードしてみるもNG。
ふと気づくと、どうもMacPortsで入れているPythonではなくて、/usr/binにあるPythonを参照してしまっているのが原因(?)の様だ。
/usr/bin/python を一旦リネームしてみると、
となって、Portsでいれた場合のパスになっている。
再度、mercurialをMacPorts経由でインストールしてみる。
/Users/hideack% sudo port install mercurial
Password:
- > Building py25-bz2
- > Staging py25-bz2 into destroot
(中略)
- > Attempting to fetch mercurial-1.1.2.tar.gz from http://distfiles.macports.org/python
- > Verifying checksum(s) for mercurial
- > Extracting mercurial
- > Configuring mercurial
- > Building mercurial
- > Staging mercurial into destroot
- > Installing mercurial @1.1.2_0
- > Activating mercurial @1.1.2_0
- > Cleaning mercurial
無事終了。
確認してみる。
/Users/hideack% hg --version
Mercurial Distributed SCM (version 1.1.2)Copyright (C) 2005-2008 Matt Mackall
and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
準備完了である。
さぁ、使ってみようかな...。