It doesn't actually build and install the package, but it does do the egg_info
step, if that's available for your package on your platform. You can see this from your output (or from ~/.pip/pip.log):
Running setup.py egg_info for package mercurial
…
Command python setup.py egg_info failed with error code 1 in /var/folders/fl/kgrflrj92pv1yjr_918x0t800000gq/T/pip-build/mercurial
Whether that step succeeds or fails, you still end up with nothing installed to site-packages. However, you may not end up with the tarball in your target directory unless it succeeds. (From a very quick test, it looks like 1.2.1 and 1.4dev1 under Python 2.7.2 both fail to copy the tarball to the target if it fails, while 1.4dev1 under 3.3.0 copies it ether way… But that may be misleading; it's possible that the difference has to do with whether the tarball is already in the download-cache or something…)