installing mercurial on dreamhost

general = { about, articles, links, projects }     meta = { date-posted: 2006-06-29 }

Installing mercurial on dreamhost is not terribly difficult.

This guide covers:

Requirements:


Prep work

We need to first get our environment prepared.

  1. Create a packages directory, for our local compiled apps to reside

    $ mkdir packages
    
  2. Create a directory to work in, and entering that directory

    $ mkdir work_dir
    $ cd work_dir
    
  3. Fetch the source files & extract them. Adjust the mercurial source path as needed.

    $ wget http://www.selenic.com/mercurial/release/mercurial-0.9.tar.gz
    $ tar -xzvf mercurial-0.9.tar.gz</code></pre>
    

Building

  1. Enter the mercurial source directory

    $ cd mercurial-0.9
    
  2. Compiling

    $ python setup.py install --home=~/packages/
    

Environment Setup

Now we have to make a few modifications to our environment, so that the applications know where to find the code we just built.

  1. Add the following to your .bashrc file in your home directory

    export PYTHONPATH=${HOME}/packages/lib/python
    export PATH=${HOME}/packages/bin:$PATH
    
  2. Load the .bashrc into the current session

    $ . ~/.bashrc
    
  3. Cleanup
    If you want to remove the mercurial source now, you can. Remember though, that the hgweb and hgwebdir cgi scripts are still in the source. Use those as needed.

Test!

  1. Check to see if mercurial is working

    $ hg version
    $ hg help</code></pre>