hgbook
diff es/hook.tex @ 464:951bf84ca8e2
translated up to the section "testing and troubleshooting"
author | Javier Rojas <jerojasro@devnull.li> |
---|---|
date | Tue Dec 23 18:57:35 2008 -0500 (2008-12-23) |
parents | 0ab26d50eba3 |
children | aa6036a9688e |
line diff
1.1 --- a/es/hook.tex Tue Dec 23 17:45:08 2008 -0500 1.2 +++ b/es/hook.tex Tue Dec 23 18:57:35 2008 -0500 1.3 @@ -567,7 +567,7 @@ 1.4 reutilizar el mensaje de consignación guardado anteriormente, una vez 1.5 usted haya corregido el problema. 1.6 1.7 -Como anotación final, note que en la figura~\ref{ex:hook:ws.better} el 1.8 +Como anotación final, note en la figura~\ref{ex:hook:ws.better} el 1.9 %TODO on-site => in-situ ? 1.10 uso de la característica de edición \emph{in-situ} de \command{perl} 1.11 para eliminar los espacios en blanco finales en un fichero. Esto es 1.12 @@ -580,83 +580,95 @@ 1.13 perl -pi -e 's,\textbackslash{}s+\$,,' nombre\_fichero 1.14 \end{codesample2} 1.15 1.16 -\section{Bundled hooks} 1.17 - 1.18 -Mercurial ships with several bundled hooks. You can find them in the 1.19 -\dirname{hgext} directory of a Mercurial source tree. If you are 1.20 -using a Mercurial binary package, the hooks will be located in the 1.21 -\dirname{hgext} directory of wherever your package installer put 1.22 +%TODO bundled 1.23 +\section{Ganchos bundled} 1.24 + 1.25 +Mercurial se instala con varios ganchos bundled. Usted puede 1.26 +encontrarlos en el directorio \dirname{hgext} del árbol de ficheros 1.27 +fuente de Mercurial. Si usted está usando un paquete binario de 1.28 +Mercurial, los ganchos estarán ubicados en el directorio 1.29 +\dirname{hgext} en donde su instalador de paquetes haya puesto a 1.30 Mercurial. 1.31 1.32 -\subsection{\hgext{acl}---access control for parts of a repository} 1.33 - 1.34 -The \hgext{acl} extension lets you control which remote users are 1.35 -allowed to push changesets to a networked server. You can protect any 1.36 -portion of a repository (including the entire repo), so that a 1.37 -specific remote user can push changes that do not affect the protected 1.38 -portion. 1.39 - 1.40 -This extension implements access control based on the identity of the 1.41 -user performing a push, \emph{not} on who committed the changesets 1.42 -they're pushing. It makes sense to use this hook only if you have a 1.43 -locked-down server environment that authenticates remote users, and 1.44 -you want to be sure that only specific users are allowed to push 1.45 -changes to that server. 1.46 - 1.47 -\subsubsection{Configuring the \hook{acl} hook} 1.48 - 1.49 -In order to manage incoming changesets, the \hgext{acl} hook must be 1.50 -used as a \hook{pretxnchangegroup} hook. This lets it see which files 1.51 -are modified by each incoming changeset, and roll back a group of 1.52 -changesets if they modify ``forbidden'' files. Example: 1.53 +\subsection{\hgext{acl}---control de acceso a partes de un repositorio} 1.54 + 1.55 +La extensión \hgext{acl} le permite controlar a qué usuarios remotos 1.56 +les está permitido empujar conjuntos de cambios a un servidor en red. 1.57 +Usted puede proteger cualquier porción de un repositorio (incluyendo 1.58 +el repositorio completo), de tal manera que un usuario remoto 1.59 +específico pueda empujar cambios que no afecten la porción protegida. 1.60 + 1.61 +Esta extensión implementa control de acceso basado en la identidad del 1.62 +usuario que empuja los conjuntos de cambios, \emph{no} en la identidad 1.63 +de quien hizo la consignación de los mismos. Usar este gancho tiene 1.64 +sentido sólo si se tiene un servidor adecuadamente asegurado que 1.65 +autentique a los usuarios remotos, y si usted desea segurarse de que 1.66 +sólo se le permita a ciertos usuarios empujar cambios a dicho 1.67 +servidor. 1.68 + 1.69 +\subsubsection{Configurar el gancho \hook{acl}} 1.70 + 1.71 +Para administrar los conjuntos de cambios entrantes, se debe usar el 1.72 +gancho \hgext{acl} como un gancho de tipo \hook{pretxnchangegroup}. 1.73 +Esto le permite ver qué ficheros son modificados por cada conjunto de 1.74 +%TODO rollback => "deshacer el efecto" 1.75 +cambios entrante, y deshacer el efecto de un grupo de conjuntos de 1.76 +cambios si alguno de ellos modifica algún fichero ``prohibido''. 1.77 +Ejemplo: 1.78 \begin{codesample2} 1.79 [hooks] 1.80 pretxnchangegroup.acl = python:hgext.acl.hook 1.81 \end{codesample2} 1.82 1.83 -The \hgext{acl} extension is configured using three sections. 1.84 - 1.85 -The \rcsection{acl} section has only one entry, \rcitem{acl}{sources}, 1.86 -which lists the sources of incoming changesets that the hook should 1.87 -pay attention to. You don't normally need to configure this section. 1.88 -\begin{itemize} 1.89 -\item[\rcitem{acl}{serve}] Control incoming changesets that are arriving 1.90 - from a remote repository over http or ssh. This is the default 1.91 - value of \rcitem{acl}{sources}, and usually the only setting you'll 1.92 - need for this configuration item. 1.93 -\item[\rcitem{acl}{pull}] Control incoming changesets that are 1.94 - arriving via a pull from a local repository. 1.95 -\item[\rcitem{acl}{push}] Control incoming changesets that are 1.96 - arriving via a push from a local repository. 1.97 -\item[\rcitem{acl}{bundle}] Control incoming changesets that are 1.98 - arriving from another repository via a bundle. 1.99 -\end{itemize} 1.100 - 1.101 -The \rcsection{acl.allow} section controls the users that are allowed to 1.102 -add changesets to the repository. If this section is not present, all 1.103 -users that are not explicitly denied are allowed. If this section is 1.104 -present, all users that are not explicitly allowed are denied (so an 1.105 -empty section means that all users are denied). 1.106 - 1.107 -The \rcsection{acl.deny} section determines which users are denied 1.108 -from adding changesets to the repository. If this section is not 1.109 -present or is empty, no users are denied. 1.110 - 1.111 -The syntaxes for the \rcsection{acl.allow} and \rcsection{acl.deny} 1.112 -sections are identical. On the left of each entry is a glob pattern 1.113 -that matches files or directories, relative to the root of the 1.114 -repository; on the right, a user name. 1.115 - 1.116 -In the following example, the user \texttt{docwriter} can only push 1.117 -changes to the \dirname{docs} subtree of the repository, while 1.118 -\texttt{intern} can push changes to any file or directory except 1.119 -\dirname{source/sensitive}. 1.120 +La extensión \hgext{acl} es configurada mediante tres secciones. 1.121 + 1.122 +La sección \rcsection{acl} sólo tiene una entrada, 1.123 +\rcitem{acl}{sources}\footnote{Fuentes.}, que lista las fuentes de los 1.124 +conjuntos de cambios entrantes a las que el gancho debe prestar 1.125 +atención. Usualmente usted no necesita configurar esta sección. 1.126 +\begin{itemize} 1.127 + \item[\rcitem{acl}{serve}] Controlar conjuntos de 1.128 + cambios entrantes que están llegando desde un repositorio a 1.129 + través de http o ssh. Este es el valor por defecto de 1.130 + \rcitem{acl}{sources}, y usualmente es el único valor de 1.131 + configuración que necesitará para este ítem. 1.132 +\item[\rcitem{acl}{pull}] Controlar conjuntos de cambios entrantes que 1.133 + lleguen vía un pull (jalado) desde un repositorio local. 1.134 +\item[\rcitem{acl}{push}] Controlar conjuntos de cambios entrantes que 1.135 + lleguen vía un push (empuje) desde un repositorio local. 1.136 +\item[\rcitem{acl}{bundle}] Controlar conjuntos de cambios entrantes 1.137 + %TODO bundle 1.138 + que lleguen desde otro repositorio a través de un bundle. 1.139 +\end{itemize} 1.140 + 1.141 +La sección \rcsection{acl.allow} controla los usuarios a los que les 1.142 +está permitido añadir conjuntos de cambios al repositorio. Si esta 1.143 +sección no está presente, se le permite acceso a todos los usuarios 1.144 +excepto a los que se les haya negado explícitamente el acceso. Si 1.145 +esta sección no está presente, se niega el acceso a todos los usuarios 1.146 +excepto a todos a los que se les haya permitido de manera explícita 1.147 +(así que una sección vacía implica que se niega el acceso a todos los 1.148 +usuarios). 1.149 + 1.150 +La sección \rcsection{acl.deny} determina a qué usuarios no se les 1.151 +permite añadir conjuntos de cambios al repositorio. Si esta sección no 1.152 +está presente o está vacía, no se niega el acceso a ningún usuario. 1.153 + 1.154 +La sintaxis para los ficheros \rcsection{acl.allow} y 1.155 +\rcsection{acl.deny} es idéntica. A la izquierda de cada entrada se 1.156 +encuentra un patrón glob que asocia ficheros o directorios, respecto a 1.157 +la raíz del repositorio; a la derecha, un nombre usuario. 1.158 + 1.159 +En el siguiente ejemplo, el usuario \texttt{escritordoc} sólo puede 1.160 +empujar cambios al directorio \dirname{docs} del repositorio, mientras 1.161 +que \texttt{practicante} puede enviar cambios a cualquier fichero o 1.162 +directorio excepto \dirname{fuentes/sensitivo}. 1.163 \begin{codesample2} 1.164 [acl.allow] 1.165 - docs/** = docwriter 1.166 + docs/** = escritordoc 1.167 1.168 [acl.deny] 1.169 - source/sensitive/** = intern 1.170 + fuentes/sensitivo/** = practicante 1.171 \end{codesample2} 1.172 1.173 \subsubsection{Testing and troubleshooting}