Using

apt-get

to install Mercurial on Karmic will only get you version 1.3. That’s pretty lame. Instead, use

easy_install

and get version 1.5!

sudo apt-get install python-setuptools build-essential python-dev

sudo easy_install mercurial