$ sudo pip install http://mercurial.selenic.com/release/mercurial-2.8.tar.gz
Mercurial, the distributed version control tool was recently released to version 2.8. Decided to give it a try after all these while. However, the default installed version in Ubuntu 13.10 is still stuck at version 2.6.3. Hence, try to upgrade it to this latest version. Installation procedure as follows.
1. Just to confirm, find the installed version using different methods. I didn't realize there are so many alternative ways to find a version for a installed packages.
$ hg --version | grep version Mercurial Distributed SCM (version 2.6.3)
$ dpkg -s mercurial | grep Version Version: 2.6.3-1
$ sudo apt-get install apt-show-versions $ apt-show-versions mercurial mercurial:amd64/saucy 2.6.3-1 uptodate
2. Add the Mercurial's PPA repository. Update and upgrade your packages.
$ apt-cache policy mercurial | grep Installed Installed: 2.6.3-1
$ sudo apt-add-repository ppa:mercurial-ppa/snapshots $ sudo apt-get update $ sudo apt-get dist-upgrade
3. Check the version again. Nope still at version 2.7.2. Have to do an installation by source code compilation.
$ hg --version | grep version Mercurial Distributed SCM (version 2.7.2+48-5b327880a660)
4. Download the latest source code (currently 2.8) from the official website. Extract the source code and try to compile the source code.
$ wget http://mercurial.selenic.com/downloads $ tar zxvf mercurial-2.8.tar.gz $ cd mercurial-2.8 $ make
5. You will encounter some missing Python library. Install all the necessary packages in order to compile the source again. Before that, please make sure you have uninstall existing old Mercurial installation.
$ sudo apt-get remove --purge mercurial $ sudo apt-get build-dep mercurial
6. Compile the source and create a deb package using checkinstall so we can remove it later.
$ make install && sudo checkinstall $ hg version | grep version Mercurial Distributed SCM (version 2.8)