This excerpt is from Mercurial: The Definitive Guide . This definitive guide takes you step by step through ways to track, merge, and manage both open source and commercial software projects with Mercurial, using Windows, Mac OS X, Linux, Solaris, and other systems.
Download a recent source tarball from http://mercurial.selenic.com/wiki/Download.
gzip -dc mercurial-MYVERSION.tar.gz | tar xf -
cd mercurial-MYVERSION python setup.py install --force --home=$HOME
You will probably need to set the
PYTHONPATH environment variable so that the Mercurial
executable can find the rest of the Mercurial packages. For example, on my laptop, I have set it to
/home/bos/lib/python. The exact path that you will need to
use depends on how Python was built for your system, but should be easy
to figure out. If you’re uncertain, look through the output of the
installer script above, and see where the contents of the
mercurial directory were installed to.
Building and installing Mercurial on Windows requires a variety of tools, a fair amount of technical knowledge, and considerable patience. I very much do not recommend this route if you are a “casual user.” Unless you intend to hack on Mercurial, I strongly suggest that you use a binary package instead.
If you are intent on building Mercurial from source on Windows, follow the “hard way” directions on the Mercurial wiki at http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall, and expect the process to involve a lot of fiddly work.
Copyright © 2009 O'Reilly Media, Inc.