hgbook
changeset 438:22391f67dc26
Translated lighttpd and started web options
author | Igor TAmara <igor@tamarapatino.org> |
---|---|
date | Sat Dec 06 00:14:38 2008 -0500 (2008-12-06) |
parents | 05bfbe50e7e4 |
children | 955f5218f63e |
files | es/Leame.1st es/collab.tex |
line diff
1.1 --- a/es/Leame.1st Fri Dec 05 22:09:05 2008 -0500 1.2 +++ b/es/Leame.1st Sat Dec 06 00:14:38 2008 -0500 1.3 @@ -103,7 +103,7 @@ 1.4 || tour-merge.tex || Javier Rojas || 100% || 28/10/2008 || 03/11/2008 || 1.5 || concepts.tex || Javier Rojas || 100% || 03/11/2008 || 23/11/2008 || 1.6 || intro.tex || Igor Támara || 100% || 08/11/2008 || 09/11/2008 || 1.7 -|| collab.tex || Igor Támara || 73% || 10/11/2008 || || 1.8 +|| collab.tex || Igor Támara || 89% || 10/11/2008 || || 1.9 || filenames.tex || Javier Rojas || 72% || 27/11/2008 || || 1.10 || hook.tex || Javier Rojas || 8% || 01/12/2008 || || 1.11
2.1 --- a/es/collab.tex Fri Dec 05 22:09:05 2008 -0500 2.2 +++ b/es/collab.tex Sat Dec 06 00:14:38 2008 -0500 2.3 @@ -787,180 +787,182 @@ 2.4 En este punto, cuando trate de recargar la página, deberá visualizar 2.5 una linda vista HTML de la historia de su repositorio. Uff! 2.6 2.7 -\subsubsection{Configuring lighttpd} 2.8 - 2.9 -To be exhaustive in my experiments, I tried configuring the 2.10 -increasingly popular \texttt{lighttpd} web server to serve the same 2.11 -repository as I described with Apache above. I had already overcome 2.12 -all of the problems I outlined with Apache, many of which are not 2.13 -server-specific. As a result, I was fairly sure that my file and 2.14 -directory permissions were good, and that my \sfilename{hgweb.cgi} 2.15 -script was properly edited. 2.16 - 2.17 -Once I had Apache running, getting \texttt{lighttpd} to serve the 2.18 -repository was a snap (in other words, even if you're trying to use 2.19 -\texttt{lighttpd}, you should read the Apache section). I first had 2.20 -to edit the \texttt{mod\_access} section of its config file to enable 2.21 -\texttt{mod\_cgi} and \texttt{mod\_userdir}, both of which were 2.22 -disabled by default on my system. I then added a few lines to the end 2.23 -of the config file, to configure these modules. 2.24 +\subsubsection{Configuración de lighttpd} 2.25 + 2.26 +En mi intención de ser exhaustivo, intenté configurar 2.27 +\texttt{lighttpd}, un servidor web con creciente aceptación, para 2.28 +servir los repositorios de la misma forma como lo describí 2.29 +anteriormente con Apache. Después de superar los problemas que mostré 2.30 +con Apache, muchos de los cuáles no son específicos del servidor. Por 2.31 +lo tanto estaba seguro de que mis permisos para directorios y ficheros 2.32 +eran correctos y que mi guión \sfilename{hgweb.cgi} también lo era. 2.33 + 2.34 +Dado que ya Apache estaba en ejecución correctamente, lograr que 2.35 +\texttt{lighttpd} sirviera mi repositorio fue rápido(en otras 2.36 +palabras, si está tratando de usar \texttt{lighttpd}, debe leer la 2.37 +sección de Apache). Primero tuve que editar la sección 2.38 +\texttt{mod\_access} para habilitar \texttt{mod\_cgi} y 2.39 +\texttt{mod\_userdir}, los cuales estaban inhabilitados en mi 2.40 +instalación predeterminada. Añadí posteriormente unas líneas al final 2.41 +del fichero de configuración, para hacer lo propio con los módulos. 2.42 \begin{codesample2} 2.43 userdir.path = "public_html" 2.44 cgi.assign = ( ".cgi" => "" ) 2.45 \end{codesample2} 2.46 -With this done, \texttt{lighttpd} ran immediately for me. If I had 2.47 -configured \texttt{lighttpd} before Apache, I'd almost certainly have 2.48 -run into many of the same system-level configuration problems as I did 2.49 -with Apache. However, I found \texttt{lighttpd} to be noticeably 2.50 -easier to configure than Apache, even though I've used Apache for over 2.51 -a decade, and this was my first exposure to \texttt{lighttpd}. 2.52 - 2.53 -\subsection{Sharing multiple repositories with one CGI script} 2.54 - 2.55 -The \sfilename{hgweb.cgi} script only lets you publish a single 2.56 -repository, which is an annoying restriction. If you want to publish 2.57 -more than one without wracking yourself with multiple copies of the 2.58 -same script, each with different names, a better choice is to use the 2.59 -\sfilename{hgwebdir.cgi} script. 2.60 - 2.61 -The procedure to configure \sfilename{hgwebdir.cgi} is only a little 2.62 -more involved than for \sfilename{hgweb.cgi}. First, you must obtain 2.63 -a copy of the script. If you don't have one handy, you can download a 2.64 -copy from the master Mercurial repository at 2.65 +Hecho esto, \texttt{lighttpd} funcionó inmediatamente para 2.66 +mí. Configuré \texttt{lighttpd} antes que Apache, tuve casi los mismos 2.67 +reparos a nivel de configuración del sistema que con Apache. De todas 2.68 +maneras, considero que \texttt{lighttpd} es bastante más sencillo de 2.69 +configurar que Apache, a pesar de haber usado Apache por lo menos por 2.70 +una década, y esta fue mi primera experiencia con \texttt{lighttpd}. 2.71 + 2.72 +\subsection{Compartir varios repositorios con un script CGI} 2.73 + 2.74 +El guión \sfilename{hgweb.cgi} permite publicar únicamente un 2.75 +repositorio, una restricción frustrante. Si desea publicar más de uno 2.76 +sin complicarse con varias copias del mismo guión, cada una con un 2.77 +nombre distinto, resulta mucho mejor usar el guión 2.78 +\sfilename{hgwebdir.cgi}. 2.79 + 2.80 +El procedimiento para configurar \sfilename{hgwebdir.cgi} tiene una 2.81 +porción adicional frente al trabajo requerido con 2.82 +\sfilename{hgweb.cgi}. Primero se debe obtener una copia del 2.83 +guión. Si no tiene una a mano, puede descargar una copia del ftp 2.84 +principal del repositorio de Mercurial en 2.85 \url{http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi}. 2.86 2.87 -You'll need to copy this script into your \dirname{public\_html} 2.88 -directory, and ensure that it's executable. 2.89 +Necesitará una copia del guión en su directorio \dirname{public\_html}, 2.90 +y asegurarse de que sea ejecutable. 2.91 \begin{codesample2} 2.92 cp .../hgwebdir.cgi ~/public_html 2.93 chmod 755 ~/public_html ~/public_html/hgwebdir.cgi 2.94 \end{codesample2} 2.95 -With basic configuration out of the way, try to visit 2.96 -\url{http://myhostname/~myuser/hgwebdir.cgi} in your browser. It 2.97 -should display an empty list of repositories. If you get a blank 2.98 -window or error message, try walking through the list of potential 2.99 -problems in section~\ref{sec:collab:wtf}. 2.100 - 2.101 -The \sfilename{hgwebdir.cgi} script relies on an external 2.102 -configuration file. By default, it searches for a file named 2.103 -\sfilename{hgweb.config} in the same directory as itself. You'll need 2.104 -to create this file, and make it world-readable. The format of the 2.105 -file is similar to a Windows ``ini'' file, as understood by Python's 2.106 -\texttt{ConfigParser}~\cite{web:configparser} module. 2.107 - 2.108 -The easiest way to configure \sfilename{hgwebdir.cgi} is with a 2.109 -section named \texttt{collections}. This will automatically publish 2.110 -\emph{every} repository under the directories you name. The section 2.111 -should look like this: 2.112 +Con la configuración básica, intente visitar en su navegador 2.113 +\url{http://myhostname/~myuser/hgwebdir.cgi}. Debería mostar una 2.114 +lista vacía de repositorios. Si obtiene una ventana en blanco o un 2.115 +mensaje de error, verifique la lista de problemas potenciales en la 2.116 +sección~\ref{sec:collab:wtf}. 2.117 + 2.118 +El guión \sfilename{hgwebdir.cgi} se apoya en un fichero externo de 2.119 +configuración. En principio, busca un fichero llamado 2.120 +\sfilename{hgweb.config} en el mismo directorio. Tendrá que crear el 2.121 +fichero, y permitir lectura de todo el mundo. El formato del fichero 2.122 +es similar a un fichero ``ini'' de Windows, que puede interpretar el módulo 2.123 +\texttt{ConfigParser}~\cite{web:configparser} de Python. 2.124 + 2.125 +La forma más sencilla de configurar \sfilename{hgwebdir.cgi} es con 2.126 +una sección llamada \texttt{collections}. Esta publicará automáticamente 2.127 +\emph{todos} los repositorios en los directorios que usted 2.128 +especifique. La sección debería lucir así: 2.129 \begin{codesample2} 2.130 [collections] 2.131 - /my/root = /my/root 2.132 -\end{codesample2} 2.133 -Mercurial interprets this by looking at the directory name on the 2.134 -\emph{right} hand side of the ``\texttt{=}'' sign; finding 2.135 -repositories in that directory hierarchy; and using the text on the 2.136 -\emph{left} to strip off matching text from the names it will actually 2.137 -list in the web interface. The remaining component of a path after 2.138 -this stripping has occurred is called a ``virtual path''. 2.139 - 2.140 -Given the example above, if we have a repository whose local path is 2.141 -\dirname{/my/root/this/repo}, the CGI script will strip the leading 2.142 -\dirname{/my/root} from the name, and publish the repository with a 2.143 -virtual path of \dirname{this/repo}. If the base URL for our CGI 2.144 -script is \url{http://myhostname/~myuser/hgwebdir.cgi}, the complete 2.145 -URL for that repository will be 2.146 + /mi/ruta = /mi/ruta 2.147 +\end{codesample2} 2.148 +Mercurial lo interpreta buscando el nombre del directorio que esté a la 2.149 +\emph{derecha} del símbolo ``\texttt{=}''; encontrando repositorios en 2.150 +la jerarquía de directorios; y usando el texto a la \emph{izquierda} 2.151 +para eliminar el texto de los nombres que mostrará en la interfaz 2.152 +web. El componente restante de la ruta después de esta eliminación 2.153 +usualmente se llama ``ruta virtual''. 2.154 + 2.155 +Dado el ejemplo de arriba, si tenemos un repositorio cuya ruta local es 2.156 +\dirname{/mi/ruta/este/repo}, el guión CGI eliminará la porción inicial 2.157 +\dirname{/mi/ruta} del nombre y publicará el repositorio con una ruta 2.158 +virtual \dirname{este/repo}. Si el URL base de nuestro guión CGI es 2.159 +\url{http://myhostname/~myuser/hgwebdir.cgi}, el URL completo al 2.160 +repositorio será 2.161 \url{http://myhostname/~myuser/hgwebdir.cgi/this/repo}. 2.162 2.163 -If we replace \dirname{/my/root} on the left hand side of this example 2.164 -with \dirname{/my}, then \sfilename{hgwebdir.cgi} will only strip off 2.165 -\dirname{/my} from the repository name, and will give us a virtual 2.166 -path of \dirname{root/this/repo} instead of \dirname{this/repo}. 2.167 - 2.168 -The \sfilename{hgwebdir.cgi} script will recursively search each 2.169 -directory listed in the \texttt{collections} section of its 2.170 -configuration file, but it will \texttt{not} recurse into the 2.171 -repositories it finds. 2.172 - 2.173 -The \texttt{collections} mechanism makes it easy to publish many 2.174 -repositories in a ``fire and forget'' manner. You only need to set up 2.175 -the CGI script and configuration file one time. Afterwards, you can 2.176 -publish or unpublish a repository at any time by simply moving it 2.177 -into, or out of, the directory hierarchy in which you've configured 2.178 -\sfilename{hgwebdir.cgi} to look. 2.179 - 2.180 -\subsubsection{Explicitly specifying which repositories to publish} 2.181 - 2.182 -In addition to the \texttt{collections} mechanism, the 2.183 -\sfilename{hgwebdir.cgi} script allows you to publish a specific list 2.184 -of repositories. To do so, create a \texttt{paths} section, with 2.185 -contents of the following form. 2.186 +Si reemplazamos \dirname{/mi/ruta} en el lado izquierdo de este 2.187 +ejemplo con \dirname{/mi}, \sfilename{hgwebdir.cgi} eliminará solamente 2.188 +\dirname{/mi} del nombre del repositorio, y nos ofrecerá la ruta 2.189 +virtual \dirname{ruta/este/repo} en lugar de \dirname{este/repo}. 2.190 + 2.191 +El guión \sfilename{hgwebdir.cgi} buscará recursivamente en cada 2.192 +directorio listado en la sección \texttt{collections} de su archivo de 2.193 +configuración, pero \texttt{no} hará el recorrido recursivo dentro de 2.194 +los repositorios que encuentre. 2.195 + 2.196 +El mecanismo de \texttt{collections} permite publicar fácilmente 2.197 +repositorios de una forma ``hacer y olvidar''. Solamente requiere 2.198 +configurar el guión CGI y el archivo de configuración una vez. 2.199 +Después de eso puede publicar y sacar de publicación un repositorio en 2.200 +cualquier momento incluyéndolo o excluyéndolo de la jerarquía de 2.201 +directorios en la cual le haya indicado a \sfilename{hgwebdir.cgi} que 2.202 +mirase. 2.203 + 2.204 +\subsubsection{Especificación explícita de los repositorios a publicar} 2.205 + 2.206 +Además del mecanismo \texttt{collections}, el guión 2.207 +\sfilename{hgwebdir.cgi} le permite publicar una lista específica de 2.208 +repositorios. Para hacerlo, cree una sección \texttt{paths}, con los 2.209 +contenidos de la siguiente forma: 2.210 \begin{codesample2} 2.211 [paths] 2.212 - repo1 = /my/path/to/some/repo 2.213 - repo2 = /some/path/to/another 2.214 -\end{codesample2} 2.215 -In this case, the virtual path (the component that will appear in a 2.216 -URL) is on the left hand side of each definition, while the path to 2.217 -the repository is on the right. Notice that there does not need to be 2.218 -any relationship between the virtual path you choose and the location 2.219 -of a repository in your filesystem. 2.220 - 2.221 -If you wish, you can use both the \texttt{collections} and 2.222 -\texttt{paths} mechanisms simultaneously in a single configuration 2.223 -file. 2.224 + repo1 = /mi/ruta/a/un/repo 2.225 + repo2 = /ruta/a/otro/repo 2.226 +\end{codesample2} 2.227 +En este caso, la ruta virtual (el componente que aparecerá en el URL) 2.228 +está en el lado derecho de cada definición, mientras que la ruta al 2.229 +repositorio está a la derecha. Note que no tiene que haber relación 2.230 +alguna entre la ruta virtual que elija y el lugar del repositorio en 2.231 +su sistema de archivos. 2.232 + 2.233 +Si lo desea, puede usar los dos mecanismos \texttt{collections} y 2.234 +\texttt{paths} simultáneamente en un sólo archivo de configuración. 2.235 2.236 \begin{note} 2.237 - If multiple repositories have the same virtual path, 2.238 - \sfilename{hgwebdir.cgi} will not report an error. Instead, it will 2.239 - behave unpredictably. 2.240 + Si varios repositorios tienen la misma ruta virtual, 2.241 + \sfilename{hgwebdir.cgi} no reportará error. Pero se comportará 2.242 + impredeciblemente. 2.243 \end{note} 2.244 2.245 -\subsection{Downloading source archives} 2.246 - 2.247 -Mercurial's web interface lets users download an archive of any 2.248 -revision. This archive will contain a snapshot of the working 2.249 -directory as of that revision, but it will not contain a copy of the 2.250 -repository data. 2.251 - 2.252 -By default, this feature is not enabled. To enable it, you'll need to 2.253 -add an \rcitem{web}{allow\_archive} item to the \rcsection{web} 2.254 -section of your \hgrc. 2.255 - 2.256 -\subsection{Web configuration options} 2.257 - 2.258 -Mercurial's web interfaces (the \hgcmd{serve} command, and the 2.259 -\sfilename{hgweb.cgi} and \sfilename{hgwebdir.cgi} scripts) have a 2.260 -number of configuration options that you can set. These belong in a 2.261 -section named \rcsection{web}. 2.262 +\subsection{Descarga de ficheros fuente} 2.263 + 2.264 +La interfaz web de Mercurial permite a los ususarios descargar 2.265 +un conjunto de cualquier revisión. Este fichero contendrá una réplica 2.266 +del directorio de trabajo en la revisión en cuestión, pero no 2.267 +contendrá una copia de los datos del repositorio. 2.268 + 2.269 +De forma predeterminada esta característica no está habilitada. Para 2.270 +lograrlo adicione un \rcitem{web}{allow\_archive} a la sección \rcsection{web} 2.271 +de su fichero \hgrc. 2.272 + 2.273 +\subsection{Opciones de configuración en Web} 2.274 + 2.275 +Las interfaces web de Mercurial(la orden \hgcmd{serve}, y los guiones 2.276 +\sfilename{hgweb.cgi} y \sfilename{hgwebdir.cgi}) tienen varias 2.277 +opciones de configuración para establecer. Todas ellas en la sección 2.278 +\rcsection{web}. 2.279 \begin{itemize} 2.280 -\item[\rcitem{web}{allow\_archive}] Determines which (if any) archive 2.281 - download mechanisms Mercurial supports. If you enable this 2.282 - feature, users of the web interface will be able to download an 2.283 - archive of whatever revision of a repository they are viewing. 2.284 - To enable the archive feature, this item must take the form of a 2.285 - sequence of words drawn from the list below. 2.286 +\item[\rcitem{web}{allow\_archive}] Determina cuáles tipos de archivos 2.287 + de descarga soportará Mercurial. Si habilita esta característica, 2.288 + los usuarios de la interfaz web podrán descargar una copia de la 2.289 + revisión del repositorio que estén viendo. Para activar la 2.290 + característica de descarga de fichero, el valor tendrá una secuencia 2.291 + de palabras extraídas de la lista de abajo. 2.292 \begin{itemize} 2.293 - \item[\texttt{bz2}] A \command{tar} archive, compressed using 2.294 - \texttt{bzip2} compression. This has the best compression ratio, 2.295 - but uses the most CPU time on the server. 2.296 - \item[\texttt{gz}] A \command{tar} archive, compressed using 2.297 - \texttt{gzip} compression. 2.298 - \item[\texttt{zip}] A \command{zip} archive, compressed using LZW 2.299 - compression. This format has the worst compression ratio, but is 2.300 - widely used in the Windows world. 2.301 + \item[\texttt{bz2}] Un fichero \command{tar} con el método de 2.302 + compresión \texttt{bzip2}. Tiene la mejor taza de compresión, 2.303 + pero usa más tiempo de procesamiento en el servidor. 2.304 + \item[\texttt{gz}] Un fichero \command{tar}, comprimido con 2.305 + \texttt{gzip}. 2.306 + \item[\texttt{zip}] Un fichero \command{zip}, comprimido con LZW. 2.307 + Este formato posee la peor tasa de compresió, pero es muy usado en 2.308 + el mundo Windows. 2.309 \end{itemize} 2.310 - If you provide an empty list, or don't have an 2.311 - \rcitem{web}{allow\_archive} entry at all, this feature will be 2.312 - disabled. Here is an example of how to enable all three supported 2.313 - formats. 2.314 + Si da una lista vacía o no tiene la entrada 2.315 + \rcitem{web}{allow\_archive}, esta característica se deshabilitará. 2.316 + A continuación un ejemplo de cómo habilitar los tres formatos soportados. 2.317 \begin{codesample4} 2.318 [web] 2.319 allow_archive = bz2 gz zip 2.320 \end{codesample4} 2.321 -\item[\rcitem{web}{allowpull}] Boolean. Determines whether the web 2.322 - interface allows remote users to \hgcmd{pull} and \hgcmd{clone} this 2.323 - repository over~HTTP. If set to \texttt{no} or \texttt{false}, only 2.324 - the ``human-oriented'' portion of the web interface is available. 2.325 +\item[\rcitem{web}{allowpull}] Booleano. Determina si la interfaz web 2.326 + permite a los usuarios remotos emplear \hgcmd{pull} y \hgcmd{clone} 2.327 + sobre el repositorio~HTTP. Si se coloca \texttt{no} o 2.328 + \texttt{false}, solamente la porción de los procesos 2.329 + ``human-oriented'' se habilita de la interfaz web. 2.330 \item[\rcitem{web}{contact}] String. A free-form (but preferably 2.331 brief) string identifying the person or group in charge of the 2.332 repository. This often contains the name and email address of a