Source

builders / mercurial

Full commit
#!/usr/bin/env python

import os
from build import *

apt_get(['python-dev', 'python-docutils'])
apt_get(['mercurial', 'mercurial-common'], remove=True)

os.environ['HOME'] = INSTALL_DIR

dir = init('http://mercurial.selenic.com/release/mercurial-1.4.2.tar.gz')
call(['make', 'install-home'], cwd=dir)

rmtree(BUILD_DIR)
mkdir(BUILD_DIR)
call(['hg', 'clone', 'http://selenic.com/hg'], cwd=BUILD_DIR)
call(['make', 'install-home'],
     cwd=join(BUILD_DIR, 'hg'),
     fail_ok=True)

call(['hg', 'clone', 'http://bitbucket.org/abderrahim/dulwich/'], cwd=BUILD_DIR)
call(['python', 'setup.py', 'install', '--prefix=' + INSTALL_DIR],
     cwd=join(BUILD_DIR, 'dulwich'))

call(['hg', 'clone', 'http://bitbucket.org/durin42/hg-git/'], cwd=BUILD_DIR)
install_path = join(INSTALL_DIR, 'lib/python/hggit')
rmtree(install_path)
shutil.copytree(join(BUILD_DIR, 'hg-git/hggit'), install_path)

call(['hg', 'clone', 'http://bitbucket.org/durin42/histedit/'], cwd=BUILD_DIR)
install_path = join(INSTALL_DIR, 'lib/python/histedit.py')
rmtree(install_path)
shutil.copy(join(BUILD_DIR, 'histedit/__init__.py'), install_path)