hgbook

diff es/collab.tex @ 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 0d6c97362064
children aeda195f54a6
line diff
     1.1 --- a/es/collab.tex	Thu Dec 04 00:30:24 2008 -0500
     1.2 +++ b/es/collab.tex	Sat Dec 06 00:14:38 2008 -0500
     1.3 @@ -787,180 +787,182 @@
     1.4  En este punto, cuando trate de recargar la página, deberá visualizar
     1.5  una linda vista HTML de la historia de su repositorio. Uff!
     1.6  
     1.7 -\subsubsection{Configuring lighttpd}
     1.8 -
     1.9 -To be exhaustive in my experiments, I tried configuring the
    1.10 -increasingly popular \texttt{lighttpd} web server to serve the same
    1.11 -repository as I described with Apache above.  I had already overcome
    1.12 -all of the problems I outlined with Apache, many of which are not
    1.13 -server-specific.  As a result, I was fairly sure that my file and
    1.14 -directory permissions were good, and that my \sfilename{hgweb.cgi}
    1.15 -script was properly edited.
    1.16 -
    1.17 -Once I had Apache running, getting \texttt{lighttpd} to serve the
    1.18 -repository was a snap (in other words, even if you're trying to use
    1.19 -\texttt{lighttpd}, you should read the Apache section).  I first had
    1.20 -to edit the \texttt{mod\_access} section of its config file to enable
    1.21 -\texttt{mod\_cgi} and \texttt{mod\_userdir}, both of which were
    1.22 -disabled by default on my system.  I then added a few lines to the end
    1.23 -of the config file, to configure these modules.
    1.24 +\subsubsection{Configuración de lighttpd}
    1.25 +
    1.26 +En mi intención de ser exhaustivo, intenté configurar
    1.27 +\texttt{lighttpd}, un servidor web con creciente aceptación, para
    1.28 +servir los repositorios de la misma forma como lo describí
    1.29 +anteriormente con Apache. Después de superar los problemas que mostré
    1.30 +con Apache, muchos de los cuáles no son específicos del servidor.  Por
    1.31 +lo tanto estaba seguro de que mis permisos para directorios y ficheros
    1.32 +eran correctos y que mi guión \sfilename{hgweb.cgi} también lo era.
    1.33 +
    1.34 +Dado que ya Apache estaba en ejecución correctamente, lograr que
    1.35 +\texttt{lighttpd} sirviera mi repositorio fue rápido(en otras
    1.36 +palabras, si está tratando de usar \texttt{lighttpd}, debe leer la
    1.37 +sección de Apache).  Primero tuve que editar la sección
    1.38 +\texttt{mod\_access} para habilitar \texttt{mod\_cgi} y
    1.39 +\texttt{mod\_userdir}, los cuales estaban inhabilitados en mi
    1.40 +instalación predeterminada.  Añadí posteriormente unas líneas al final
    1.41 +del fichero de configuración, para hacer lo propio con los módulos.
    1.42  \begin{codesample2}
    1.43    userdir.path = "public_html"
    1.44    cgi.assign = ( ".cgi" => "" )
    1.45  \end{codesample2}
    1.46 -With this done, \texttt{lighttpd} ran immediately for me.  If I had
    1.47 -configured \texttt{lighttpd} before Apache, I'd almost certainly have
    1.48 -run into many of the same system-level configuration problems as I did
    1.49 -with Apache.  However, I found \texttt{lighttpd} to be noticeably
    1.50 -easier to configure than Apache, even though I've used Apache for over
    1.51 -a decade, and this was my first exposure to \texttt{lighttpd}.
    1.52 -
    1.53 -\subsection{Sharing multiple repositories with one CGI script}
    1.54 -
    1.55 -The \sfilename{hgweb.cgi} script only lets you publish a single
    1.56 -repository, which is an annoying restriction.  If you want to publish
    1.57 -more than one without wracking yourself with multiple copies of the
    1.58 -same script, each with different names, a better choice is to use the
    1.59 -\sfilename{hgwebdir.cgi} script.
    1.60 -
    1.61 -The procedure to configure \sfilename{hgwebdir.cgi} is only a little
    1.62 -more involved than for \sfilename{hgweb.cgi}.  First, you must obtain
    1.63 -a copy of the script.  If you don't have one handy, you can download a
    1.64 -copy from the master Mercurial repository at
    1.65 +Hecho esto, \texttt{lighttpd} funcionó inmediatamente para
    1.66 +mí. Configuré \texttt{lighttpd} antes que Apache, tuve casi los mismos
    1.67 +reparos a nivel de configuración del sistema que con Apache.  De todas
    1.68 +maneras, considero que \texttt{lighttpd} es bastante más sencillo de
    1.69 +configurar que Apache, a pesar de haber usado Apache por lo menos por
    1.70 +una década, y esta fue mi primera experiencia con \texttt{lighttpd}.
    1.71 +
    1.72 +\subsection{Compartir varios repositorios con un script CGI}
    1.73 +
    1.74 +El guión \sfilename{hgweb.cgi} permite publicar únicamente un
    1.75 +repositorio, una restricción frustrante.  Si desea publicar más de uno
    1.76 +sin complicarse con varias copias del mismo guión, cada una con un
    1.77 +nombre distinto, resulta mucho mejor usar el guión
    1.78 +\sfilename{hgwebdir.cgi}.
    1.79 +
    1.80 +El procedimiento para configurar \sfilename{hgwebdir.cgi} tiene una
    1.81 +porción adicional frente al trabajo requerido con
    1.82 +\sfilename{hgweb.cgi}.  Primero se debe obtener una copia del
    1.83 +guión. Si no tiene una a mano, puede descargar una copia del ftp
    1.84 +principal del repositorio de Mercurial en
    1.85  \url{http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi}.
    1.86  
    1.87 -You'll need to copy this script into your \dirname{public\_html}
    1.88 -directory, and ensure that it's executable.
    1.89 +Necesitará una copia del guión en su directorio \dirname{public\_html},
    1.90 +y asegurarse de que sea ejecutable.
    1.91  \begin{codesample2}
    1.92    cp .../hgwebdir.cgi ~/public_html
    1.93    chmod 755 ~/public_html ~/public_html/hgwebdir.cgi
    1.94  \end{codesample2}
    1.95 -With basic configuration out of the way, try to visit
    1.96 -\url{http://myhostname/~myuser/hgwebdir.cgi} in your browser.  It
    1.97 -should display an empty list of repositories.  If you get a blank
    1.98 -window or error message, try walking through the list of potential
    1.99 -problems in section~\ref{sec:collab:wtf}.
   1.100 -
   1.101 -The \sfilename{hgwebdir.cgi} script relies on an external
   1.102 -configuration file.  By default, it searches for a file named
   1.103 -\sfilename{hgweb.config} in the same directory as itself.  You'll need
   1.104 -to create this file, and make it world-readable.  The format of the
   1.105 -file is similar to a Windows ``ini'' file, as understood by Python's
   1.106 -\texttt{ConfigParser}~\cite{web:configparser} module.
   1.107 -
   1.108 -The easiest way to configure \sfilename{hgwebdir.cgi} is with a
   1.109 -section named \texttt{collections}.  This will automatically publish
   1.110 -\emph{every} repository under the directories you name.  The section
   1.111 -should look like this:
   1.112 +Con la configuración básica, intente visitar en su navegador
   1.113 +\url{http://myhostname/~myuser/hgwebdir.cgi}.  Debería mostar una
   1.114 +lista vacía de repositorios.  Si obtiene una ventana en blanco o un
   1.115 +mensaje de error, verifique la lista de problemas potenciales en la 
   1.116 +sección~\ref{sec:collab:wtf}.
   1.117 +
   1.118 +El guión \sfilename{hgwebdir.cgi} se apoya en un fichero externo de
   1.119 +configuración.  En principio, busca un fichero llamado
   1.120 +\sfilename{hgweb.config} en el mismo directorio.  Tendrá que crear el
   1.121 +fichero, y permitir lectura de todo el mundo.  El formato del fichero
   1.122 +es similar a un fichero ``ini'' de Windows, que puede interpretar el módulo
   1.123 +\texttt{ConfigParser}~\cite{web:configparser} de Python.
   1.124 +
   1.125 +La forma más sencilla de configurar \sfilename{hgwebdir.cgi} es con
   1.126 +una sección llamada \texttt{collections}.  Esta publicará automáticamente
   1.127 +\emph{todos} los repositorios en los directorios que usted
   1.128 +especifique.  La sección debería lucir así:
   1.129  \begin{codesample2}
   1.130    [collections]
   1.131 -  /my/root = /my/root
   1.132 -\end{codesample2}
   1.133 -Mercurial interprets this by looking at the directory name on the
   1.134 -\emph{right} hand side of the ``\texttt{=}'' sign; finding
   1.135 -repositories in that directory hierarchy; and using the text on the
   1.136 -\emph{left} to strip off matching text from the names it will actually
   1.137 -list in the web interface.  The remaining component of a path after
   1.138 -this stripping has occurred is called a ``virtual path''.
   1.139 -
   1.140 -Given the example above, if we have a repository whose local path is
   1.141 -\dirname{/my/root/this/repo}, the CGI script will strip the leading
   1.142 -\dirname{/my/root} from the name, and publish the repository with a
   1.143 -virtual path of \dirname{this/repo}.  If the base URL for our CGI
   1.144 -script is \url{http://myhostname/~myuser/hgwebdir.cgi}, the complete
   1.145 -URL for that repository will be
   1.146 +  /mi/ruta = /mi/ruta
   1.147 +\end{codesample2}
   1.148 +Mercurial lo interpreta buscando el nombre del directorio que esté a la
   1.149 +\emph{derecha} del símbolo ``\texttt{=}''; encontrando repositorios en
   1.150 +la jerarquía de directorios; y usando el texto a la \emph{izquierda}
   1.151 +para eliminar el texto de los nombres que mostrará en la interfaz
   1.152 +web.  El componente restante de la ruta después de esta eliminación
   1.153 +usualmente se llama ``ruta virtual''.
   1.154 +
   1.155 +Dado el ejemplo de arriba, si tenemos un repositorio cuya ruta local es
   1.156 +\dirname{/mi/ruta/este/repo}, el guión CGI eliminará la porción inicial
   1.157 +\dirname{/mi/ruta} del nombre y publicará el repositorio con una ruta
   1.158 +virtual \dirname{este/repo}.  Si el URL base de nuestro guión CGI es
   1.159 +\url{http://myhostname/~myuser/hgwebdir.cgi}, el URL completo al
   1.160 +repositorio será
   1.161  \url{http://myhostname/~myuser/hgwebdir.cgi/this/repo}.
   1.162  
   1.163 -If we replace \dirname{/my/root} on the left hand side of this example
   1.164 -with \dirname{/my}, then \sfilename{hgwebdir.cgi} will only strip off
   1.165 -\dirname{/my} from the repository name, and will give us a virtual
   1.166 -path of \dirname{root/this/repo} instead of \dirname{this/repo}.
   1.167 -
   1.168 -The \sfilename{hgwebdir.cgi} script will recursively search each
   1.169 -directory listed in the \texttt{collections} section of its
   1.170 -configuration file, but it will \texttt{not} recurse into the
   1.171 -repositories it finds.
   1.172 -
   1.173 -The \texttt{collections} mechanism makes it easy to publish many
   1.174 -repositories in a ``fire and forget'' manner.  You only need to set up
   1.175 -the CGI script and configuration file one time.  Afterwards, you can
   1.176 -publish or unpublish a repository at any time by simply moving it
   1.177 -into, or out of, the directory hierarchy in which you've configured
   1.178 -\sfilename{hgwebdir.cgi} to look.
   1.179 -
   1.180 -\subsubsection{Explicitly specifying which repositories to publish}
   1.181 -
   1.182 -In addition to the \texttt{collections} mechanism, the
   1.183 -\sfilename{hgwebdir.cgi} script allows you to publish a specific list
   1.184 -of repositories.  To do so, create a \texttt{paths} section, with
   1.185 -contents of the following form.
   1.186 +Si reemplazamos \dirname{/mi/ruta} en el lado izquierdo de este
   1.187 +ejemplo con \dirname{/mi}, \sfilename{hgwebdir.cgi} eliminará solamente
   1.188 +\dirname{/mi} del nombre del repositorio, y nos ofrecerá la ruta
   1.189 +virtual \dirname{ruta/este/repo} en lugar de \dirname{este/repo}.
   1.190 +
   1.191 +El guión \sfilename{hgwebdir.cgi} buscará recursivamente en cada
   1.192 +directorio listado en la sección \texttt{collections} de su archivo de
   1.193 +configuración, pero \texttt{no} hará el recorrido recursivo dentro de
   1.194 +los repositorios que encuentre.
   1.195 +
   1.196 +El mecanismo de \texttt{collections} permite publicar fácilmente
   1.197 +repositorios de una forma ``hacer y olvidar''.  Solamente requiere
   1.198 +configurar el guión CGI y el archivo de configuración una vez.
   1.199 +Después de eso puede publicar y sacar de publicación un repositorio en
   1.200 +cualquier momento incluyéndolo o excluyéndolo de la jerarquía de
   1.201 +directorios en la cual le haya indicado a \sfilename{hgwebdir.cgi} que
   1.202 +mirase.
   1.203 +
   1.204 +\subsubsection{Especificación explícita de los repositorios a publicar}
   1.205 +
   1.206 +Además del mecanismo \texttt{collections}, el guión
   1.207 +\sfilename{hgwebdir.cgi} le permite publicar una lista específica de
   1.208 +repositorios.  Para hacerlo, cree una sección \texttt{paths}, con los
   1.209 +contenidos de la siguiente forma:
   1.210  \begin{codesample2}
   1.211    [paths]
   1.212 -  repo1 = /my/path/to/some/repo
   1.213 -  repo2 = /some/path/to/another
   1.214 -\end{codesample2}
   1.215 -In this case, the virtual path (the component that will appear in a
   1.216 -URL) is on the left hand side of each definition, while the path to
   1.217 -the repository is on the right.  Notice that there does not need to be
   1.218 -any relationship between the virtual path you choose and the location
   1.219 -of a repository in your filesystem.
   1.220 -
   1.221 -If you wish, you can use both the \texttt{collections} and
   1.222 -\texttt{paths} mechanisms simultaneously in a single configuration
   1.223 -file.
   1.224 +  repo1 = /mi/ruta/a/un/repo
   1.225 +  repo2 = /ruta/a/otro/repo
   1.226 +\end{codesample2}
   1.227 +En este caso, la ruta virtual (el componente que aparecerá en el URL)
   1.228 +está en el lado derecho de cada definición, mientras que la ruta al
   1.229 +repositorio está a la derecha.  Note que no tiene que haber relación
   1.230 +alguna entre la ruta virtual que elija y el lugar del repositorio en
   1.231 +su sistema de archivos.
   1.232 +
   1.233 +Si lo desea, puede usar los dos mecanismos \texttt{collections} y
   1.234 +\texttt{paths} simultáneamente en un sólo archivo de configuración.
   1.235  
   1.236  \begin{note}
   1.237 -  If multiple repositories have the same virtual path,
   1.238 -  \sfilename{hgwebdir.cgi} will not report an error.  Instead, it will
   1.239 -  behave unpredictably.
   1.240 +  Si varios repositorios tienen la misma ruta virtual,
   1.241 +  \sfilename{hgwebdir.cgi} no reportará error.  Pero se comportará
   1.242 +  impredeciblemente.
   1.243  \end{note}
   1.244  
   1.245 -\subsection{Downloading source archives}
   1.246 -
   1.247 -Mercurial's web interface lets users download an archive of any
   1.248 -revision.  This archive will contain a snapshot of the working
   1.249 -directory as of that revision, but it will not contain a copy of the
   1.250 -repository data.
   1.251 -
   1.252 -By default, this feature is not enabled.  To enable it, you'll need to
   1.253 -add an \rcitem{web}{allow\_archive} item to the \rcsection{web}
   1.254 -section of your \hgrc.
   1.255 -
   1.256 -\subsection{Web configuration options}
   1.257 -
   1.258 -Mercurial's web interfaces (the \hgcmd{serve} command, and the
   1.259 -\sfilename{hgweb.cgi} and \sfilename{hgwebdir.cgi} scripts) have a
   1.260 -number of configuration options that you can set.  These belong in a
   1.261 -section named \rcsection{web}.
   1.262 +\subsection{Descarga de ficheros fuente}
   1.263 +
   1.264 +La interfaz web de Mercurial permite a los ususarios descargar
   1.265 +un conjunto de cualquier revisión.  Este fichero contendrá una réplica
   1.266 +del directorio de trabajo en la revisión en cuestión, pero no
   1.267 +contendrá una copia de los datos del repositorio.
   1.268 +
   1.269 +De forma predeterminada esta característica no está habilitada.  Para
   1.270 +lograrlo adicione un \rcitem{web}{allow\_archive} a la sección \rcsection{web}
   1.271 +de su fichero \hgrc.
   1.272 +
   1.273 +\subsection{Opciones de configuración en Web}
   1.274 +
   1.275 +Las interfaces web de Mercurial(la orden \hgcmd{serve}, y los guiones
   1.276 +\sfilename{hgweb.cgi} y \sfilename{hgwebdir.cgi}) tienen varias
   1.277 +opciones de configuración para establecer. Todas ellas en la sección
   1.278 +\rcsection{web}.
   1.279  \begin{itemize}
   1.280 -\item[\rcitem{web}{allow\_archive}] Determines which (if any) archive
   1.281 -  download mechanisms Mercurial supports.  If you enable this
   1.282 -  feature, users of the web interface will be able to download an
   1.283 -  archive of whatever revision of a repository they are viewing.
   1.284 -  To enable the archive feature, this item must take the form of a
   1.285 -  sequence of words drawn from the list below.
   1.286 +\item[\rcitem{web}{allow\_archive}] Determina cuáles tipos de archivos
   1.287 +  de descarga soportará Mercurial.  Si habilita esta característica,
   1.288 +  los usuarios de la interfaz web podrán descargar una copia de la
   1.289 +  revisión del repositorio que estén viendo. Para activar la
   1.290 +  característica de descarga de fichero, el valor tendrá una secuencia
   1.291 +  de palabras extraídas de la lista de abajo.
   1.292    \begin{itemize}
   1.293 -  \item[\texttt{bz2}] A \command{tar} archive, compressed using
   1.294 -    \texttt{bzip2} compression.  This has the best compression ratio,
   1.295 -    but uses the most CPU time on the server.
   1.296 -  \item[\texttt{gz}] A \command{tar} archive, compressed using
   1.297 -    \texttt{gzip} compression.
   1.298 -  \item[\texttt{zip}] A \command{zip} archive, compressed using LZW
   1.299 -    compression.  This format has the worst compression ratio, but is
   1.300 -    widely used in the Windows world.
   1.301 +  \item[\texttt{bz2}] Un fichero \command{tar} con el método de
   1.302 +    compresión \texttt{bzip2}.  Tiene la mejor taza de compresión,
   1.303 +    pero usa más tiempo de procesamiento en el servidor.
   1.304 +  \item[\texttt{gz}] Un fichero \command{tar}, comprimido con
   1.305 +    \texttt{gzip}.
   1.306 +  \item[\texttt{zip}] Un fichero \command{zip}, comprimido con LZW.
   1.307 +    Este formato posee la peor tasa de compresió, pero es muy usado en
   1.308 +    el mundo Windows.
   1.309    \end{itemize}
   1.310 -  If you provide an empty list, or don't have an
   1.311 -  \rcitem{web}{allow\_archive} entry at all, this feature will be
   1.312 -  disabled.  Here is an example of how to enable all three supported
   1.313 -  formats.
   1.314 +  Si da una lista vacía o no tiene la entrada
   1.315 +  \rcitem{web}{allow\_archive}, esta característica se deshabilitará.
   1.316 +  A continuación un ejemplo de cómo habilitar los tres formatos soportados.
   1.317    \begin{codesample4}
   1.318      [web]
   1.319      allow_archive = bz2 gz zip
   1.320    \end{codesample4}
   1.321 -\item[\rcitem{web}{allowpull}] Boolean.  Determines whether the web
   1.322 -  interface allows remote users to \hgcmd{pull} and \hgcmd{clone} this
   1.323 -  repository over~HTTP.  If set to \texttt{no} or \texttt{false}, only
   1.324 -  the ``human-oriented'' portion of the web interface is available.
   1.325 +\item[\rcitem{web}{allowpull}] Booleano.  Determina si la interfaz web
   1.326 +  permite a los usuarios remotos emplear \hgcmd{pull} y \hgcmd{clone}
   1.327 +  sobre el repositorio~HTTP.  Si se coloca \texttt{no} o
   1.328 +  \texttt{false}, solamente la porción de los procesos
   1.329 +  ``human-oriented'' se habilita de la interfaz web.
   1.330  \item[\rcitem{web}{contact}] String.  A free-form (but preferably
   1.331    brief) string identifying the person or group in charge of the
   1.332    repository.  This often contains the name and email address of a