hgbook
changeset 215:70e1f8448699
Document some hgweb config options.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Wed May 09 17:04:06 2007 -0700 (2007-05-09) |
parents | 154e4ba293e7 |
children | 699771d085c6 |
files | en/collab.tex |
line diff
1.1 --- a/en/collab.tex Wed May 09 17:03:56 2007 -0700 1.2 +++ b/en/collab.tex Wed May 09 17:04:06 2007 -0700 1.3 @@ -952,7 +952,7 @@ 1.4 into, or out of, the directory hierarchy in which you've configured 1.5 \sfilename{hgwebdir.cgi} to look. 1.6 1.7 -\subsubsection{Explicitly specifying the repositories to publish} 1.8 +\subsubsection{Explicitly specifying which repositories to publish} 1.9 1.10 In addition to the \texttt{collections} mechanism, the 1.11 \sfilename{hgwebdir.cgi} script allows you to publish a specific list 1.12 @@ -979,6 +979,109 @@ 1.13 behave unpredictably. 1.14 \end{note} 1.15 1.16 +\subsection{Downloading source archives} 1.17 + 1.18 +Mercurial's web interface lets users download an archive of any 1.19 +revision. This archive will contain a snapshot of the working 1.20 +directory as of that revision, but it will not contain a copy of the 1.21 +repository data. 1.22 + 1.23 +By default, this feature is not enabled. To enable it, you'll need to 1.24 +add an \rcitem{web}{allow\_archive} item to the \rcsection{web} 1.25 +section of your \hgrc. 1.26 + 1.27 +\subsection{Web configuration options} 1.28 + 1.29 +Mercurial's web interfaces (the \hgcmd{serve} command, and the 1.30 +\sfilename{hgweb.cgi} and \sfilename{hgwebdir.cgi} scripts) have a 1.31 +number of configuration options that you can set. These belong in a 1.32 +section named \rcsection{web}. 1.33 +\begin{itemize} 1.34 +\item[\rcitem{web}{allow\_archive}] Determines which (if any) archive 1.35 + download mechanisms Mercurial supports. If you enable this 1.36 + feature, users of the web interface will be able to download an 1.37 + archive of whatever revision of a repository they are viewing. 1.38 + To enable the archive feature, this item must take the form of a 1.39 + sequence of words drawn from the list below. 1.40 + \begin{itemize} 1.41 + \item[\texttt{bz2}] A \command{tar} archive, compressed using 1.42 + \texttt{bzip2} compression. This has the best compression ratio, 1.43 + but uses the most CPU time on the server. 1.44 + \item[\texttt{gz}] A \command{tar} archive, compressed using 1.45 + \texttt{gzip} compression. 1.46 + \item[\texttt{zip}] A \command{zip} archive, compressed using LZW 1.47 + compression. This format has the worst compression ratio, but is 1.48 + widely used in the Windows world. 1.49 + \end{itemize} 1.50 + If you provide an empty list, or don't have an 1.51 + \rcitem{web}{allow\_archive} entry at all, this feature will be 1.52 + disabled. Here is an example of how to enable all three supported 1.53 + formats. 1.54 + \begin{codesample4} 1.55 + [web] 1.56 + allow_archive = bz2 gz zip 1.57 + \end{codesample4} 1.58 +\item[\rcitem{web}{allowpull}] Boolean. Determines whether the web 1.59 + interface allows remote users to \hgcmd{pull} and \hgcmd{clone} this 1.60 + repository over~HTTP. If set to \texttt{no} or \texttt{false}, only 1.61 + the ``human-oriented'' portion of the web interface is available. 1.62 +\item[\rcitem{web}{contact}] String. A free-form (but preferably 1.63 + brief) string identifying the person or group in charge of the 1.64 + repository. This often contains the name and email address of a 1.65 + person. 1.66 +\item[\rcitem{web}{description}] String. A free-form (but preferably 1.67 + brief) string that describes the contents or purpose of the 1.68 + repository. 1.69 +\item[\rcitem{web}{maxchanges}] Integer. The default maximum number 1.70 + of changesets to display in a single page of output. 1.71 +\item[\rcitem{web}{maxfiles}] Integer. The default maximum number 1.72 + of modified files to display in a single page of output. 1.73 +\item[\rcitem{web}{stripes}] Integer. If the web interface displays 1.74 + alternating ``stripes'' to make it easier to visually align rows 1.75 + when you are looking at a table, this number controls the number of 1.76 + rows in each stripe. 1.77 +\item[\rcitem{web}{style}] Controls the template Mercurial uses to 1.78 + display the web interface. Mercurial ships with two web templates, 1.79 + named \texttt{default} and \texttt{gitweb} (the latter is much more 1.80 + visually attractive). You can also specify a custom template of 1.81 + your own; see chapter~\ref{chap:template} for details. Here, you 1.82 + can see how to enable the \texttt{gitweb} style. 1.83 + \begin{codesample4} 1.84 + [web] 1.85 + style = gitweb 1.86 + \end{codesample4} 1.87 +\item[\rcitem{web}{templates}] Path. The directory in which to search 1.88 + for template files. By default, Mercurial searches in the directory 1.89 + in which it was installed. 1.90 +\end{itemize} 1.91 +If you are using \sfilename{hgwebdir.cgi}, you can place a few 1.92 +configuration items in a \rcsection{web} section of the 1.93 +\sfilename{hgweb.config} file instead of a \hgrc\ file, for 1.94 +convenience. These items are \rcitem{web}{motd} and 1.95 +\rcitem{web}{style}. 1.96 + 1.97 +\subsubsection{Options specific to the \hgcmd{serve} command} 1.98 + 1.99 +Some of the items in the \rcsection{web} section of a \hgrc\ file are 1.100 +only for use with the \hgcmd{serve} command. 1.101 +\begin{itemize} 1.102 +\item[\rcitem{web}{accesslog}] Path. The name of a file into which to 1.103 + write an access log. By default, the \hgcmd{serve} command writes 1.104 + this information to standard output, not to a file. Log entries are 1.105 + written in the standard ``combined'' file format used by almost all 1.106 + web servers. 1.107 +\item[\rcitem{web}{address}] String. The local address on which the 1.108 + server should listen for incoming connections. By default, the 1.109 + server listens on all addresses. 1.110 +\item[\rcitem{web}{errorlog}] Path. The name of a file into which to 1.111 + write an error log. By default, the \hgcmd{serve} command writes this 1.112 + information to standard error, not to a file. 1.113 +\item[\rcitem{web}{ipv6}] Boolean. Whether to use the IPv6 protocol. 1.114 + By default, IPv6 is not used. 1.115 +\item[\rcitem{web}{port}] Integer. The TCP~port number on which the 1.116 + server should listen. The default port number used is~8000. 1.117 +\end{itemize} 1.118 + 1.119 %%% Local Variables: 1.120 %%% mode: latex 1.121 %%% TeX-master: "00book"