How To Install Mercurial on a WestHost VPS

Mercurial is a distributed version control system written in Python. Mercurial should be considered experimental, as it has not yet reached release 1.0.

Follow the instructions below to install Mercurial.

Installing

Use the WestHost Site Manager to install the GNU Compiler Collection and the latest release of Python.

Screen grab of WestHost Site Applications

Log in to your VPS and give the following command line commands:

  1. Download and install the Mercurial distribution package:

    cd
    wget http://www.selenic.com/mercurial/release/mercurial-0.9.3.tar.gz
    tar zxf mercurial-0.9.3.tar.gz
    cd mercurial-0.9.3
    python setup.py install --prefix /usr/local --install-lib /usr/local/python/lib/python2.5/site-packages/

  2. If you want to remove the distribution packages to save space:

    cd
    rm -rf mecurial-0.9.3*

Uninstalling

To remove Mercurial from your VPS, do the following:

rm -rf /usr/local/python/lib/python2.5/site-packages/mecurial/ /usr/local/bin/hg

Notes

hg debuginstall gives a warning about patch. The root cause is that the version of patch installed on the VPS defaults to outputting a message after each succssful patch, which is not expected by the test script.

make test in mercurial-0.9.3 has multiple failures.

Last modified: Tuesday, May 29 2007 at 2:33:59 PM MDT