Mercurial > hgbook
changeset 85:b7c69a68b0cc
A little progress on "lightning tour".
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Wed, 04 Oct 2006 15:15:54 -0700 |
parents | 43b9793b4e38 |
children | 796738d75876 |
files | en/00book.tex en/99book.bib en/Makefile en/srcinstall.tex en/tour.tex |
diffstat | 5 files changed, 95 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- a/en/00book.tex Wed Oct 04 13:11:40 2006 -0700 +++ b/en/00book.tex Wed Oct 04 15:15:54 2006 -0700 @@ -45,6 +45,7 @@ \include{mq} \appendix +\include{srcinstall} \include{license} \addcontentsline{toc}{chapter}{Bibliography} \bibliographystyle{alpha}
--- a/en/99book.bib Wed Oct 04 13:11:40 2006 -0700 +++ b/en/99book.bib Wed Oct 04 15:15:54 2006 -0700 @@ -56,3 +56,9 @@ title = {GNU Coding Standards---Change Logs}, note = {\url{http://www.gnu.org/prep/standards/html_node/Change-Logs.html}}, } + +@Misc{web:macpython, + author = {Bob Ippolito, Ronald Oussoren}, + title = {Universal MacPython}, + note = {\url{http://bob.pythonmac.org/archives/2006/04/10/python-and-universal-binaries-on-mac-os-x/}}, +}
--- a/en/Makefile Wed Oct 04 13:11:40 2006 -0700 +++ b/en/Makefile Wed Oct 04 15:15:54 2006 -0700 @@ -13,6 +13,7 @@ intro.tex \ mq.tex \ preface.tex \ + srcinstall.tex \ template.tex \ tour.tex
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/en/srcinstall.tex Wed Oct 04 15:15:54 2006 -0700 @@ -0,0 +1,53 @@ +\chapter{Installing Mercurial from source} +\label{chap:srcinstall} + +\section{On a Unix-like system} +\label{sec:srcinstall:unixlike} + +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. +\begin{enumerate} +\item Download a recent source tarball from + \url{http://www.selenic.com/mercurial/download}. +\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 setup.py install --force --home=\$HOME + \end{codesample4} +\end{enumerate} +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 +\url{http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall}, +and expect the process to involve a lot of fiddly work. + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "00book" +%%% End:
--- a/en/tour.tex Wed Oct 04 13:11:40 2006 -0700 +++ b/en/tour.tex Wed Oct 04 15:15:54 2006 -0700 @@ -4,13 +4,17 @@ \section{Installing Mercurial on your system} \label{sec:tour:install} +Prebuilt binary packages of Mercurial are available for every popular +operating system. These make it easy to start using Mercurial on your +computer immediately. + \subsection{Linux} -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 @@ -18,43 +22,41 @@ you install Mercurial with a single click; the package name to look for is \texttt{mercurial}. -\subsubsection{Debian} - -\begin{codesample2} - apt-get install mercurial -\end{codesample2} +\begin{itemize} +\item[Debian] + \begin{codesample4} + apt-get install mercurial + \end{codesample4} -\subsubsection{Fedora Core} - -\begin{codesample2} - yum install mercurial -\end{codesample2} - -\subsubsection{Gentoo} +\item[Fedora Core] + \begin{codesample4} + yum install mercurial + \end{codesample4} -\begin{codesample2} - emerge mercurial -\end{codesample2} - -\subsubsection{OpenSUSE} +\item[Gentoo] + \begin{codesample4} + emerge mercurial + \end{codesample4} -\begin{codesample2} - yum install mercurial -\end{codesample2} +\item[OpenSUSE] + \begin{codesample4} + yum install mercurial + \end{codesample4} -\subsubsection{Ubuntu} - -\begin{codesample2} - apt-get install mercurial -\end{codesample2} +\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. +\end{itemize} \subsection{Mac OS X} Lee Cantey publishes an installer of Mercurial for Mac OS~X at \url{http://mercurial.berkwood.com}. 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. \subsection{Solaris} @@ -73,6 +75,7 @@ work. XXX Flesh this out. \end{note} + %%% Local Variables: %%% mode: latex %%% TeX-master: "00book"