Bryan O'Sullivan committed b7c69a6

A little progress on "lightning tour".

  • Participants
  • Parent commits 43b9793

Comments (0)

Files changed (5)

   title =	 {GNU Coding Standards---Change Logs},
   note =	 {\url{}},
+  author =	 {Bob Ippolito, Ronald Oussoren},
+  title =	 {Universal MacPython},
+  note =	 {\url{}},
 	intro.tex \
 	mq.tex \
 	preface.tex \
+	srcinstall.tex \
 	template.tex \


+\chapter{Installing Mercurial from source}
+\section{On a Unix-like system}
+If you are using a Unix-like system that has a sufficiently recent
+version of Python (2.3~or newer) available, it is easy to install
+Mercurial from source.
+\item Download a recent source tarball from
+  \url{}.
+\item Unpack the tarball:
+  \begin{codesample4}
+    gzip -dc mercurial-\emph{version}.tar.gz | tar xf -
+  \end{codesample4}
+\item Go into the source directory and run the installer script.  This
+  will build Mercurial and install it in your home directory.
+  \begin{codesample4}
+    cd mercurial-\emph{version}
+    python install --force --home=\$HOME
+  \end{codesample4}
+Once the install finishes, Mercurial will be in the \texttt{bin}
+subdirectory of your home directory.  Don't forget to make sure that
+this directory is present in your shell's search path.
+You will probably need to set the \envar{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
+\texttt{/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
+\texttt{mercurial} directory were installed to.
+\section{On Windows}
+Building and installing Mercurial on Windows requires a variety of
+tools, a fair amount of technical knowledge, and considerable
+patience.  I very much \emph{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
+and expect the process to involve a lot of fiddly work.
+%%% Local Variables: 
+%%% mode: latex
+%%% TeX-master: "00book"
+%%% End: 
 \section{Installing Mercurial on your system}
+Prebuilt binary packages of Mercurial are available for every popular
+operating system.  These make it easy to start using Mercurial on your
+computer immediately.
-All major Linux distributions provide a prebuilt Mercurial package.
 Because each Linux distribution has its own packaging tools, policies,
 and rate of development, it's difficult to give a comprehensive set of
-instructions on how to install Mercurial binaries, and the version of
-Mercurial that you will end up with can vary widely.  
+instructions on how to install Mercurial binaries.  The version of
+Mercurial that you will end up with can vary depending on how active
+the person is who maintains the package for your distribution.
 To keep things simple, I will focus on installing Mercurial from the
 command line under the most popular Linux distributions.  Most of
 you install Mercurial with a single click; the package name to look
 for is \texttt{mercurial}.
+  \begin{codesample4}
+    apt-get install mercurial
+  \end{codesample4}
-  apt-get install mercurial
+\item[Fedora Core]
+  \begin{codesample4}
+    yum install mercurial
+  \end{codesample4}
-\subsubsection{Fedora Core}
+  \begin{codesample4}
+    emerge mercurial
+  \end{codesample4}
-  yum install mercurial
+  \begin{codesample4}
+    yum install mercurial
+  \end{codesample4}
-  emerge mercurial
-  yum install mercurial
-  apt-get install mercurial
+\item[Ubuntu] Ubuntu's Mercurial package is particularly old, and you
+  should not use it.  If you know how, you can rebuild and install the
+  Debian package.  It's probably easier to build Mercurial from source
+  and simply run that; see section~\ref{sec:srcinstall:unixlike} for
+  details.
 \subsection{Mac OS X}
 Lee Cantey publishes an installer of Mercurial for Mac OS~X at
 \url{}.  This package works on both
-Intel- and Power-based Macs, but requires you to install Universal
-Python before you can use it.  This is easy to do; simply follow the
-instructions on Lee's site.
+Intel-~and Power-based Macs.  Before you can use it, you must install
+a compatible version of Universal MacPython~\cite{web:macpython}.  This
+is easy to do; simply follow the instructions on Lee's site.
   work. XXX Flesh this out.
 %%% Local Variables: 
 %%% mode: latex
 %%% TeX-master: "00book"