1. download latest Mercurial source code $wget -c http://mercurial.selenic.com/release/mercurial-2.0.1.tar.gz
2. unzip
$tar zxvf mercurial-2.0.1.tar.gz && cd mecrurial-2.0.1
3.check support make command
$make
Commonly used make targets:
all - build program and documentation
install - install program and man pages to PREFIX (/usr/local)
install-home - install with setup.py install --home=HOME (/home/user)
local - build for inplace usage
tests - run all tests in the automatic test suite
test-foo - run only specified tests (e.g. test-merge1.t)
dist - run all tests and create a source tarball in dist/
clean - remove files created by other targets
(except installed files or dist source tarball)
update-pot - update i18n/hg.pot
Example for a system-wide installation under /usr/local:
make all && su -c "make install" && hg version
Example for a local installation (usable in this directory):
make local && ./hg version
4. 没有root就install到home
$ make install-home
...
make -C doc
make[1]: Entering directory `/home/kevinfeng/down/mercurial-2.0.1/doc'
python runrst hgmanpage --halt warning \
--strip-elements-with-class htmlonly hg.1.txt hg.1
abort: couldn't generate documentation: docutils module is missing
please install python-docutils or see http://docutils.sourceforge.net/
make[1]: *** [hg.1] Error 255
make[1]: Leaving directory `/home/kevinfeng/down/mercurial-2.0.1/doc'
make: *** [doc] Error 2
5. 提示没有安装docutils
$wget http://prdownloads.sourceforge.net/docutils/docutils-0.8.1.tar.gz
$tar zxvf docutils-0.8.1.tar.gz && cd docutils-0.8.1
6. 在docutils-0.8.1目录下
$ python setup.py install --user
7. 回到mcerurial-2.0.1目录再次make install-home
$make install-home
8. $ hg --version
Mercurial Distributed SCM (version 2.0.1)
(see http://mercurial.selenic.com for more information)
Copyright (C) 2005-2011 Matt Mackall and others
done!
阅读(1868) | 评论(0) | 转发(0) |