個人環境へのMercurialインストールまで
状況の確認:
$ python -V
Python 2.3.4$ which python
/usr/bin/python$ /usr/local/python/bin/python -V
Python 2.6.4$
virtual-pythonのインストール:
$ wget http://peak.telecommunity.com/dist/virtual-python.py$ ls *.py
virtual-python.py$ /usr/local/python/bin/python ./virtual-python.py \
--prefix=/home/caty/python2.6.4 \
--no-site-package
Creating /home/caty/python2.6.4/lib/python2.6
Creating /home/caty/python2.6.4/lib/python2.6/site-packages
Creating /home/caty/python2.6.4/include/python2.6
Creating /home/caty/python2.6.4/bin
Copying /usr/local/python/bin/python to /home/caty/python2.6.4/bin
You're now ready to download ez_setup.py, and run
/home/caty/python2.6.4/bin/python ez_setup.py$
ez_setupの実行=setuptoolsのインストール:
$ wget http://peak.telecommunity.com/dist/ez_setup.py$ ls *.py
ez_setup.py virtual-python.py$ ~/python2.6.4/bin/python ./ez_setup.py
Downloading http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg
Processing setuptools-0.6c11-py2.6.egg
Copying setuptools-0.6c11-py2.6.egg to /home/caty/python2.6.4/lib/python2.6/site-packages
Adding setuptools 0.6c11 to easy-install.pth file
Installing easy_install script to /home/caty/python2.6.4/bin
Installing easy_install-2.6 script to /home/caty/python2.6.4/binInstalled /home/caty/python2.6.4/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg
Processing dependencies for setuptools==0.6c11
Finished processing dependencies for setuptools==0.6c11$
.bash_profileの編集:
# .bash_profilePATH=$HOME/python2.6.4/bin:$HOME/bin:$PATH
確認:
$ which python
~/python2.6.4/bin/python$ which easy_install
~/python2.6.4/bin/easy_install$
Mercurialのインストール:
$ easy_install mercurial
Searching for mercurial
Reading http://pypi.python.org/simple/mercurial/
Reading http://www.selenic.com/mercurial
Best match: mercurial 1.4.3
Downloading http://mercurial.selenic.com/release/mercurial-1.4.3.tar.gz
Processing mercurial-1.4.3.tar.gz
Running mercurial-1.4.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-3T2s_G/mercurial-1.4.3/egg-dist-tmp-iQgrM2
zip_safe flag not set; analyzing archive contents...
mercurial.lsprof: module references __file__
mercurial.templater: module references __file__
mercurial.help: module references __file__
mercurial.extensions: module references __file__
mercurial.i18n: module references __file__
Adding mercurial 1.4.3 to easy-install.pth file
Installing hg script to /home/caty/python2.6.4/binInstalled /home/caty/python2.6.4/lib/python2.6/site-packages/mercurial-1.4.3-py2.6-linux-i686.egg
Processing dependencies for mercurial
Finished processing dependencies for mercurial$ which hg
~/python2.6.4/bin/hg$ hg help
Mercurial Distributed SCMlist of commands:
add add the specified files on the next commit
...[snip]
extensions Using additional featuresuse "hg -v help" to show aliases and global options
$
Mercurialのrcファイル:
$ cat ./.hgrc
[ui]
username=Caty$