hgbook
changeset 212:ef8a5e393103
Mention the paths section of a hgwebdir config file.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Wed May 09 14:35:23 2007 -0700 (2007-05-09) |
parents | b461d7ead9e1 |
children | 18cffee85038 |
files | en/collab.tex |
line diff
1.1 --- a/en/collab.tex Tue May 08 17:00:44 2007 -0700 1.2 +++ b/en/collab.tex Wed May 09 14:35:23 2007 -0700 1.3 @@ -924,20 +924,21 @@ 1.4 \emph{right} hand side of the ``\texttt{=}'' sign; finding 1.5 repositories in that directory hierarchy; and using the text on the 1.6 \emph{left} to strip off matching text from the names it will actually 1.7 -list in the web interface. 1.8 +list in the web interface. The remaining component of a path after 1.9 +this stripping has occurred is called a ``virtual path''. 1.10 1.11 Given the example above, if we have a repository whose local path is 1.12 \dirname{/my/root/this/repo}, the CGI script will strip the leading 1.13 -\dirname{/my/root} from the name, and publish the repository as 1.14 -\dirname{this/repo}. If the base URL for our CGI script is 1.15 -\url{http://myhostname/~myuser/hgwebdir.cgi}, the URL for the 1.16 -repository will be 1.17 +\dirname{/my/root} from the name, and publish the repository with a 1.18 +virtual path of \dirname{this/repo}. If the base URL for our CGI 1.19 +script is \url{http://myhostname/~myuser/hgwebdir.cgi}, the complete 1.20 +URL for that repository will be 1.21 \url{http://myhostname/~myuser/hgwebdir.cgi/this/repo}. 1.22 1.23 If we replace \dirname{/my/root} on the left hand side of this example 1.24 with \dirname{/my}, then \sfilename{hgwebdir.cgi} will only strip off 1.25 -\dirname{/my} from the repository name, and will publish it as 1.26 -\dirname{root/this/repo} instead of \dirname{this/repo}. 1.27 +\dirname{/my} from the repository name, and will give us a virtual 1.28 +path of \dirname{root/this/repo} instead of \dirname{this/repo}. 1.29 1.30 The \sfilename{hgwebdir.cgi} script will recursively search each 1.31 directory listed in the \texttt{collections} section of its 1.32 @@ -951,6 +952,33 @@ 1.33 into, or out of, the directory hierarchy in which you've configured 1.34 \sfilename{hgwebdir.cgi} to look. 1.35 1.36 +\subsubsection{Explicitly specifying the repositories to publish} 1.37 + 1.38 +In addition to the \texttt{collections} mechanism, the 1.39 +\sfilename{hgwebdir.cgi} script allows you to publish a specific list 1.40 +of repositories. To do so, create a \texttt{paths} section, with 1.41 +contents of the following form. 1.42 +\begin{codesample2} 1.43 + [paths] 1.44 + repo1 = /my/path/to/some/repo 1.45 + repo2 = /some/path/to/another 1.46 +\end{codesample2} 1.47 +In this case, the virtual path (the component that will appear in a 1.48 +URL) is on the left hand side of each definition, while the path to 1.49 +the repository is on the right. Notice that there does not need to be 1.50 +any relationship between the virtual path you choose and the location 1.51 +of a repository in your filesystem. 1.52 + 1.53 +If you wish, you can use both the \texttt{collections} and 1.54 +\texttt{paths} mechanisms simultaneously in a single configuration 1.55 +file. 1.56 + 1.57 +\begin{note} 1.58 + If multiple repositories have the same virtual path, 1.59 + \sfilename{hgwebdir.cgi} will not report an error. Instead, it will 1.60 + behave unpredictably. 1.61 +\end{note} 1.62 + 1.63 %%% Local Variables: 1.64 %%% mode: latex 1.65 %%% TeX-master: "00book"