You can install Mercurial from source using pip (apt-get install pip if you don't already have it):
pip install mercurial
This will usually install it to /usr/local/bin/hg, instead of the default /usr/bin/hg.
If you want to install a specific version, you can always point pip at one of the source releases, such as https://www.mercurial-scm.org/release/mercurial-1.8.1.tar.gz.
Lastly, if you really want to install from source, download one of those source tarballs, unzip it, and run
cd mercurial-1.8.1 python setup.py install