Mercurial is a version control system and TortoiseHG is a tool to
manage that. :) So, here are its installation steps in Ubuntu 11.10
folder_name is the place where you want the code to be saved :) Give in the required permissions and it'll be saved !!
sudo add-apt-repository ppa:mercurial-ppa/releases
sudo add-apt-repository ppa:tortoisehg-ppa/releases
sudo apt-get update
sudo apt-get install mercurial
sudo apt-get install tortoisehg*
hg clone https://bitbucket.org/(user_name)/(project_name)/ (folder_name)
folder_name is the place where you want the code to be saved :) Give in the required permissions and it'll be saved !!