# HG changeset patch # User Igor T彨ara # Date 1230858529 18000 # Node ID 1b8b19825994ec8847f2121df9592df2975e24a0 # Parent 6880f9c8e7e7e35fcf3099a5b8d2024717b2666e finished translation of assigned chapters to ikks diff -r 6880f9c8e7e7 -r 1b8b19825994 es/Leame.1st --- a/es/Leame.1st Sun Dec 28 00:30:26 2008 -0500 +++ b/es/Leame.1st Thu Jan 01 20:08:49 2009 -0500 @@ -108,12 +108,12 @@ || hook.tex || Javier Rojas || 53% || 01/12/2008 || || || mq.tex || Igor T谩mara || 100% || 06/12/2008 || 13/12/2008 || || hgext.tex || Igor T谩mara || 100% || 13/12/2008 || 16/12/2008 || -|| template.tex || Igor T谩mara || 40% || 27/12/2008 || || +|| template.tex || Igor T谩mara || 100% || 27/12/2008 || 01/01/2009 || || mq-collab.tex || Javier Rojas || || || || || mq-ref.tex || Javier Rojas || || || || -|| cmdref.tex || || || || || +|| cmdref.tex || Igor T谩mara || 100% || 01/01/2009 || 01/01/2009 || || license.tex || Igor T谩mara || 100% || 16/12/2008 || 16/12/2008 || -|| srcinstall.tex || || || || || +|| srcinstall.tex || Igor T谩mara || 100% || 01/01/2009 || 01/01/2009 || == Archivos en proceso de revisi贸n == ||'''archivo''' || '''revisor''' ||'''Estado'''||'''Inicio'''|| '''Fin''' || @@ -128,6 +128,13 @@ || intro.tex || || || || || || collab.tex || Javier Rojas || || || || || mq.tex || || || || || +|| hgext.tex || || || || || +|| template.tex || || || || || +|| mq-collab.tex || || || || || +|| mq-ref.tex || || || || || +|| cmdref.tex || || || || || +|| license.tex || || || || || +|| srcinstall.tex || || || || || == Archivos terminados == @@ -168,6 +175,7 @@ Filelog: fichero de registro Fold: Integrar Fork: Bifurcaci贸n + Hash: No se traduce Head: Principal. En el contexto de revisiones HEAD se sugiere usar "frente" Hook: Gancho Merge: Fusi贸n diff -r 6880f9c8e7e7 -r 1b8b19825994 es/cmdref.tex --- a/es/cmdref.tex Sun Dec 28 00:30:26 2008 -0500 +++ b/es/cmdref.tex Thu Jan 01 20:08:49 2009 -0500 @@ -1,174 +1,184 @@ -\chapter{Command reference} +\chapter{Referencia de 脫rdenes} \label{cmdref} -\cmdref{add}{add files at the next commit} +\cmdref{add}{A帽ade ficheros en la pr贸xima consignaci贸n} \optref{add}{I}{include} \optref{add}{X}{exclude} \optref{add}{n}{dry-run} -\cmdref{diff}{print changes in history or working directory} +\cmdref{diff}{imprime los cambios en la historia o el directorio actual} -Show differences between revisions for the specified files or -directories, using the unified diff format. For a description of the -unified diff format, see section~\ref{sec:mq:patch}. +Mostrar las diferencias entre revisiones para ficheros especificados o +directorios, con el formato unificado diff. Si desea ver una +descripci贸n del formato unificado diff, ver la secci贸n~\ref{sec:mq:patch}. -By default, this command does not print diffs for files that Mercurial -considers to contain binary data. To control this behaviour, see the -\hgopt{diff}{-a} and \hgopt{diff}{--git} options. +De forma predeterminada, esta orden no imprime las diferencias para +los archivos binarios que Mercurial est茅 siguiendo. Para controlar +este comportamiento, vea las opciones \hgopt{diff}{-a} y +\hgopt{diff}{--git}. \subsection{Options} \loptref{diff}{nodates} -Omit date and time information when printing diff headers. +Omite la fecha y hora cuando se muestran los encabezados de las +diferencias. \optref{diff}{B}{ignore-blank-lines} -Do not print changes that only insert or delete blank lines. A line -that contains only whitespace is not considered blank. +No imprime los cambios que solamente insertan o eliminan l铆neas en +blanco. Una l铆nea que contiene espacios en blanco no se considera +como una l铆nea en blanco. \optref{diff}{I}{include} -Include files and directories whose names match the given patterns. +Incluye ficheros y directorios cuyos nombres coinciden con los +patrones elegidos. \optref{diff}{X}{exclude} -Exclude files and directories whose names match the given patterns. +Excluye los ficheros y directorios cuyos nombres coinciden con los +patrones elegidos. \optref{diff}{a}{text} -If this option is not specified, \hgcmd{diff} will refuse to print -diffs for files that it detects as binary. Specifying \hgopt{diff}{-a} -forces \hgcmd{diff} to treat all files as text, and generate diffs for -all of them. +Si no especifica esta opci贸n, \hgcmd{diff} no mostrar谩 las diferencias +de los ficheros que detecte como binarios. Al especificar \hgopt{diff}{-a} +se forza a \hgcmd{diff} a tratar los ficheros como texto, y generar +diferencias para todos. -This option is useful for files that are ``mostly text'' but have a -few embedded NUL characters. If you use it on files that contain a -lot of binary data, its output will be incomprehensible. +Esta opci贸n es 煤til para los ficherso que son ``texto en mayor +medida'' pero que tienen caracteres NUL. Si lo usa en ficheros que +contienen muchos datos binarios, la salida ser谩 incomprensible. \optref{diff}{b}{ignore-space-change} -Do not print a line if the only change to that line is in the amount -of white space it contains. +No imprime si el 煤nico cambio que en la l铆nea es la cantidad de +espacio en blanco. \optref{diff}{g}{git} -Print \command{git}-compatible diffs. XXX reference a format +Mostrar diferencias compatibles con \command{git}. XXX reference a format description. \optref{diff}{p}{show-function} -Display the name of the enclosing function in a hunk header, using a -simple heuristic. This functionality is enabled by default, so the -\hgopt{diff}{-p} option has no effect unless you change the value of -the \rcitem{diff}{showfunc} config item, as in the following example. +Mostrar el nombre de la funci贸n que contiene el c贸digo en una porci贸n +del encabzado usando una heur铆stica simple. Esta funcionalidad se +habilita de forma predeterminada, as铆 que la opci贸n \hgopt{diff}{-p} +no tiene efectos a menos que cambie el valor de +\rcitem{diff}{showfunc} en la configuraci贸n, como en el ejemplo +siguiente. \interaction{cmdref.diff-p} \optref{diff}{r}{rev} -Specify one or more revisions to compare. The \hgcmd{diff} command -accepts up to two \hgopt{diff}{-r} options to specify the revisions to -compare. +Especifique una o m谩s revisiones para comparar. La orden \hgcmd{diff} +acepta hasta dos opciones \hgopt{diff}{-r} para especificar las +revisiones a comparar. \begin{enumerate} \setcounter{enumi}{0} -\item Display the differences between the parent revision of the - working directory and the working directory. -\item Display the differences between the specified changeset and the - working directory. -\item Display the differences between the two specified changesets. +\item Despliega las diferencias entre la revisi贸n padre y del directorio + de trabajo. +\item Despliega las diferencias entre el conjunto de cambios + especificados y el directorio de trabajo. +\item Despliega las diferencias entre dos conjuntos de cambios + especificados. \end{enumerate} -You can specify two revisions using either two \hgopt{diff}{-r} -options or revision range notation. For example, the two revision -specifications below are equivalent. +Puede especificar dos revisiones usando o bien sea las opciones +\hgopt{diff}{-r} o la notaci贸n de rango. Por ejemplo, las dos +especificaciones de revisiones a continuaci贸n son equivalentes: \begin{codesample2} hg diff -r 10 -r 20 hg diff -r10:20 \end{codesample2} -When you provide two revisions, Mercurial treats the order of those -revisions as significant. Thus, \hgcmdargs{diff}{-r10:20} will -produce a diff that will transform files from their contents as of -revision~10 to their contents as of revision~20, while -\hgcmdargs{diff}{-r20:10} means the opposite: the diff that will -transform files from their revision~20 contents to their revision~10 -contents. You cannot reverse the ordering in this way if you are -diffing against the working directory. +Cuando especifica dos revisiones, esto tiene significado para +Mercurial. Esto significa que \hgcmdargs{diff}{-r10:20} producir谩 un +diff que transformar谩 los ficheros desde los contenidos en la revisi贸n +10 a los contenidos de la revisi贸n 20, mientras que +\hgcmdargs{diff}{-r20:10} significa lo opuesto: el diff que +transformar铆a los contenidos de los ficheros de la revisi贸n 20 a los +contenidos de la revisi贸n 10. No puede invertir el orden de esta +forma si est谩 haciendo un diff frente al directorio de trabajo. \optref{diff}{w}{ignore-all-space} -\cmdref{version}{print version and copyright information} +\cmdref{version}{imprime la informaci贸n de versi贸n y derechos de reproducci贸n} -This command displays the version of Mercurial you are running, and -its copyright license. There are four kinds of version string that -you may see. +Esta orden despliega la versi贸n de Mercurial que est谩 usando, y su +nota de derechos de reproducci贸n. Hay cuatro clases de cadenas de +versi贸n posibles: \begin{itemize} -\item The string ``\texttt{unknown}''. This version of Mercurial was - not built in a Mercurial repository, and cannot determine its own - version. -\item A short numeric string, such as ``\texttt{1.1}''. This is a - build of a revision of Mercurial that was identified by a specific - tag in the repository where it was built. (This doesn't necessarily - mean that you're running an official release; someone else could - have added that tag to any revision in the repository where they - built Mercurial.) -\item A hexadecimal string, such as ``\texttt{875489e31abe}''. This - is a build of the given revision of Mercurial. -\item A hexadecimal string followed by a date, such as - ``\texttt{875489e31abe+20070205}''. This is a build of the given - revision of Mercurial, where the build repository contained some - local changes that had not been committed. +\item La cadena ``\texttt{unknown}''. Esta versi贸n de Mercurial no fue + construida en un repositorio de Mercurial, y no puede determinar su + propia versi贸n. +\item Una cadena num茅rica corta, tal como ``\texttt{1.1}''. Esta es + una construcci贸n de una versi贸n de Mercurial que se identifica con + una etiqueta espec铆fica en el repositorio en el cual fue + armada(Esto no significa necesariamente que est谩 ejecutando una + versi贸n oficial; alguien pudo haber a帽adido tal etiqueta a cualquier + versi贸n del repositorio en el cual armaron Mercurial). +\item Una cadena hexadecimal, tal como ``\texttt{875489e31abe}''. + Esta es una construcci贸n de una revisi贸n dada de Mercurial. +\item Una cadena hexadecimal seguida por una fecha, tal como + ``\texttt{875489e31abe+20070205}''. Esta construcci贸n de la + revisi贸n de Mercurial fue la construcci贸n de un repositorio que tuvo + cambios locales que no han sido consignados. \end{itemize} -\subsection{Tips and tricks} +\subsection{Consejos y trucos} -\subsubsection{Why do the results of \hgcmd{diff} and \hgcmd{status} - differ?} +\subsubsection{驴Por qu茅 difieren los resultados de \hgcmd{diff} y + \hgcmd{status}?} \label{cmdref:diff-vs-status} -When you run the \hgcmd{status} command, you'll see a list of files -that Mercurial will record changes for the next time you perform a -commit. If you run the \hgcmd{diff} command, you may notice that it -prints diffs for only a \emph{subset} of the files that \hgcmd{status} -listed. There are two possible reasons for this. +Cuando ejecuta la orden \hgcmd{status}, ver谩 una lista de ficheros +para los cuales Mercurial almacenar谩 cambios la pr贸xima vez que +consigne. Si ejecuta la orden \hgcmd{diff}, ver谩 que imprime +diferencias solamente para un \emph{subconjunto} de los ficheros que +\hgcmd{status} liste. Hay dos posibles razones para este comportamiento: -The first is that \hgcmd{status} prints some kinds of modifications -that \hgcmd{diff} doesn't normally display. The \hgcmd{diff} command -normally outputs unified diffs, which don't have the ability to -represent some changes that Mercurial can track. Most notably, -traditional diffs can't represent a change in whether or not a file is -executable, but Mercurial records this information. +La primera es que \hgcmd{status} imprime cierta clase de +modificaciones que \hgcmd{diff} no despliega normalmente. La orden +\hgcmd{diff} usualmente despliega diferencias unificadas, las cuales +no tienen la habilidad de representar algunos cambios que Mercurial +puede seguir. Lo m谩s notable es que las diferencias tradicionales no +pueden representar un cambio acerca de la ejecutabilidad de un +fichero, pero Mercurial s铆 almacena esta informaci贸n. -If you use the \hgopt{diff}{--git} option to \hgcmd{diff}, it will -display \command{git}-compatible diffs that \emph{can} display this -extra information. +Si usa la opci贸n \hgopt{diff}{--git} de \hgcmd{diff}, mostrar谩 +diferencias compatibles con \command{git} que \emph{pueden} desplegar +esta informaci贸n adicional. -The second possible reason that \hgcmd{diff} might be printing diffs -for a subset of the files displayed by \hgcmd{status} is that if you -invoke it without any arguments, \hgcmd{diff} prints diffs against the -first parent of the working directory. If you have run \hgcmd{merge} -to merge two changesets, but you haven't yet committed the results of -the merge, your working directory has two parents (use \hgcmd{parents} -to see them). While \hgcmd{status} prints modifications relative to -\emph{both} parents after an uncommitted merge, \hgcmd{diff} still -operates relative only to the first parent. You can get it to print -diffs relative to the second parent by specifying that parent with the -\hgopt{diff}{-r} option. There is no way to print diffs relative to -both parents. +La segunda raz贸n posible para que \hgcmd{diff} est茅 imprimiendo +diferencias para un subconjunto de ficheros de lo que muestra +\hgcmd{status} es que si usted le invoca sin argumento alguno, +\hgcmd{diff} imprime diferencias frente al primer padre del directorio +de trabajo. Si ha ejecutado \hgcmd{merge} para fusionar dos conjuntos +de cambios, pero no ha consignado a煤n los resultados de la fusi贸n, su +directorio de trabajo tiene dos padres(use \hgcmd{parents} para +verlos). Mientras que \hgcmd{status} imprime modificaciones relativas +a \emph{ambos} padres despu茅s de una fusi贸n que no se ha consignado, +\hgcmd{diff} opera a煤n relativo solamente al primer padre. Puede +lograr que imprima las diferencias relativas al segundo padre +especificando tal padre con la opci贸n \hgopt{diff}{-r}. No hay forma +de hacer que imprima las diferencias relativas a los dos padres. -\subsubsection{Generating safe binary diffs} +\subsubsection{Generar diferencias seguras en binarios} -If you use the \hgopt{diff}{-a} option to force Mercurial to print -diffs of files that are either ``mostly text'' or contain lots of -binary data, those diffs cannot subsequently be applied by either -Mercurial's \hgcmd{import} command or the system's \command{patch} -command. +Si usa la opci贸n \hgopt{diff}{-a} para forzar que Mercurial imprima +las diferencias de los ficheros que so o bien ``casi completamente +texto'' o contienen muchos datos binarios, tales diferencias no pueden +aplicarse subsecuentemente a la orden \hgcmd{import} de Mercurial o a +la orden \command{patch} del sistema. -If you want to generate a diff of a binary file that is safe to use as -input for \hgcmd{import}, use the \hgcmd{diff}{--git} option when you -generate the patch. The system \command{patch} command cannot handle -binary patches at all. +Si desea generar una diferencia de un fichero binario que es seguro +para usarlo como entrada a la orden \hgcmd{import}, use la opci贸n +\hgcmd{diff}{--git} cuando genere el parche. La orden \command{patch} +del sistema no puede tratar con parches binarios. %%% Local Variables: %%% mode: latex diff -r 6880f9c8e7e7 -r 1b8b19825994 es/srcinstall.tex --- a/es/srcinstall.tex Sun Dec 28 00:30:26 2008 -0500 +++ b/es/srcinstall.tex Thu Jan 01 20:08:49 2009 -0500 @@ -1,51 +1,53 @@ -\chapter{Installing Mercurial from source} +\chapter{Instalar Mercurial desde las fuentes} \label{chap:srcinstall} -\section{On a Unix-like system} +\section{En un sistema tipo Unix} \label{sec:srcinstall:unixlike} -If you are using a Unix-like system that has a sufficiently recent -version of Python (2.3~or newer) available, it is easy to install -Mercurial from source. +Si usa un sistema tipo Unix que tiene una versi贸n suficientemente +reciente de Python(2.3~o superior) disponible, es f谩cil instalar +Mercurial desde las fuentes. \begin{enumerate} -\item Download a recent source tarball from +\item Descargue un paquete fuente reciente de \url{http://www.selenic.com/mercurial/download}. -\item Unpack the tarball: +\item Descompr铆malo: \begin{codesample4} gzip -dc mercurial-\emph{version}.tar.gz | tar xf - \end{codesample4} -\item Go into the source directory and run the installer script. This - will build Mercurial and install it in your home directory. +\item Vaya al directorio fuente y ejecute el gui贸n de instalaci贸n. + Esto armar谩 Mercurial y lo instalar谩 en su directorio casa: \begin{codesample4} cd mercurial-\emph{version} python setup.py install --force --home=\$HOME \end{codesample4} \end{enumerate} -Once the install finishes, Mercurial will be in the \texttt{bin} -subdirectory of your home directory. Don't forget to make sure that -this directory is present in your shell's search path. - -You will probably need to set the \envar{PYTHONPATH} environment -variable so that the Mercurial executable can find the rest of the -Mercurial packages. For example, on my laptop, I have set it to -\texttt{/home/bos/lib/python}. The exact path that you will need to -use depends on how Python was built for your system, but should be -easy to figure out. If you're uncertain, look through the output of -the installer script above, and see where the contents of the -\texttt{mercurial} directory were installed to. +Cuando termine la instalaci贸n, Mercurial estar谩 en el subdirectorio +\texttt{bin} de su directorio casa. No olvide asegurarse de que este +directorio est茅 presente en el camino de b煤squeda de su int茅rprete de +贸rdenes. -\section{On Windows} +Probablemente necesitar谩 establecer la variable de ambiente +\envar{PYTHONPATH} de tal forma que los ejecutables de Mercurial +puedan encontrar el resto de los paquetes de Mercurial. Por ejemplo, +en mi port谩til, la establec铆a a \texttt{/home/bos/lib/python}. La +ruta exacta que usted use depender谩 de como ha sido constru铆do Python +en su sistema, pero deber铆a ser f谩cil deducirla. Si no est谩 seguro, +mire lo que haya mostrado el script en el paso anterior, y vea d贸nde +se instalaron los contenidos del directorio \texttt{mercurial} se +instalaron. -Building and installing Mercurial on Windows requires a variety of -tools, a fair amount of technical knowledge, and considerable -patience. I very much \emph{do not recommend} this route if you are a -``casual user''. Unless you intend to hack on Mercurial, I strongly -suggest that you use a binary package instead. +\section{En Windows} -If you are intent on building Mercurial from source on Windows, follow -the ``hard way'' directions on the Mercurial wiki at +Armar e instalar Mercurial en Windows requiere una variedad de +herramientas, cierta suficiencia t茅cnica y paciencia considerable. +Personalmente, \emph{no le recomiendo} hacerlo si es un ``usuario +casual''. A menos que intente hacer hacks a Mercurial, le recomiendo +que mejor use un paquete binario. + +Si est谩 decidido a construir Mercurial desde las fuentes en Windows, +siga el ``camino dif铆cil'' indicado en el wiki de Mercurial en \url{http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall}, -and expect the process to involve a lot of fiddly work. +y espere que el proceso sea realmente un trabajo duro. %%% Local Variables: %%% mode: latex diff -r 6880f9c8e7e7 -r 1b8b19825994 es/template.tex --- a/es/template.tex Sun Dec 28 00:30:26 2008 -0500 +++ b/es/template.tex Thu Jan 01 20:08:49 2009 -0500 @@ -212,273 +212,284 @@ todo en palabras claves relativas a \tplkword{ficheros}. Trata el texto como una ruta, retornando el nombre base. Por ejemplo, ``\Verb+foo/bar/baz+'', se convierte en ``\Verb+baz+''. -\item[\tplkwfilt{date}{date}] \tplkword{date} keyword. Render a date - in a similar format to the Unix \tplkword{date} command, but with - timezone included. Yields a string like - ``\Verb+Mon Sep 04 15:13:13 2006 -0700+''. -\item[\tplkwfilt{author}{domain}] Any text, but most useful for the - \tplkword{author} keyword. Finds the first string that looks like - an email address, and extract just the domain component. For - example, ``\Verb+Bryan O'Sullivan +'' becomes +\item[\tplkwfilt{date}{date}] \tplkword{date} palabra clave. Mostrar + la fecha en un formato similar a la orden \tplkword{date} de + in a similar format to the Unix, pero con la zona horaria inclu铆da. + Una cadena como ``\Verb+Mon Sep 04 15:13:13 2006 -0700+''. +\item[\tplkwfilt{author}{domain}] Cualquier texto, pero de mayor + utilidad para la palabra clave \tplkword{author}. Encuentra la + primera cadena que luce como una direcci贸n de correo electr贸nico, y + extrae solamente el componente del dominio. Por ejemplo, de + ``\Verb+Bryan O'Sullivan +'' se extrae ``\Verb+serpentine.com+''. -\item[\tplkwfilt{author}{email}] Any text, but most useful for the - \tplkword{author} keyword. Extract the first string that looks like - an email address. For example, - ``\Verb+Bryan O'Sullivan +'' becomes +\item[\tplkwfilt{author}{email}] Cualquier texto, pero de mayor + utilidad para la palabra clave \tplkword{author}. Extrae la primera + cadena que luce como una direcci贸n de correo. Por ejemplo, de + ``\Verb+Bryan O'Sullivan +'' extrae ``\Verb+bos@serpentine.com+''. -\item[\tplfilter{escape}] Any text. Replace the special XML/XHTML - characters ``\Verb+&+'', ``\Verb+<+'' and ``\Verb+>+'' with - XML entities. -\item[\tplfilter{fill68}] Any text. Wrap the text to fit in 68 - columns. This is useful before you pass text through the - \tplfilter{tabindent} filter, and still want it to fit in an - 80-column fixed-font window. -\item[\tplfilter{fill76}] Any text. Wrap the text to fit in 76 - columns. -\item[\tplfilter{firstline}] Any text. Yield the first line of text, - without any trailing newlines. -\item[\tplkwfilt{date}{hgdate}] \tplkword{date} keyword. Render the - date as a pair of readable numbers. Yields a string like - ``\Verb+1157407993 25200+''. -\item[\tplkwfilt{date}{isodate}] \tplkword{date} keyword. Render the - date as a text string in ISO~8601 format. Yields a string like - ``\Verb+2006-09-04 15:13:13 -0700+''. -\item[\tplfilter{obfuscate}] Any text, but most useful for the - \tplkword{author} keyword. Yield the input text rendered as a - sequence of XML entities. This helps to defeat some particularly - stupid screen-scraping email harvesting spambots. -\item[\tplkwfilt{author}{person}] Any text, but most useful for the - \tplkword{author} keyword. Yield the text before an email address. - For example, ``\Verb+Bryan O'Sullivan +'' - becomes ``\Verb+Bryan O'Sullivan+''. -\item[\tplkwfilt{date}{rfc822date}] \tplkword{date} keyword. Render a - date using the same format used in email headers. Yields a string - like ``\Verb+Mon, 04 Sep 2006 15:13:13 -0700+''. -\item[\tplkwfilt{node}{short}] Changeset hash. Yield the short form - of a changeset hash, i.e.~a 12-byte hexadecimal string. -\item[\tplkwfilt{date}{shortdate}] \tplkword{date} keyword. Render - the year, month, and day of the date. Yields a string like +\item[\tplfilter{escape}] Cualquier texto. Reemplaza los caracteres + especiales de XML/XHTML: ``\Verb+&+'', ``\Verb+<+'' y ``\Verb+>+'' + con las entidades XML. +\item[\tplfilter{fill68}] Cualquier texto. lograr que el texto ocupe + las primeras 68 columnas. Es 煤til emplearlo antes de pasar el texto + por el filtro \tplfilter{tabindent}, y queremos que a煤n quepa en una + ventana de fuente fija y 80 columnas. +\item[\tplfilter{fill76}] Cualquier texto. Lograr que el texto quepa + en 76 columnas. +\item[\tplfilter{firstline}] Cualquier texto. Mostrar la primera + l铆nea de texto sin saltos de l铆nea. +\item[\tplkwfilt{date}{hgdate}] \tplkword{date} palabra clave. + Mostrar la fecha como un par de n煤meros legibles. Muestra una + cadena como ``\Verb+1157407993 25200+''. +\item[\tplkwfilt{date}{isodate}] \tplkword{date} palabra clave. + Mostrar la fecha como una cadena de texto en el formato. Muestra + una cadena como ``\Verb+2006-09-04 15:13:13 -0700+''. +\item[\tplfilter{obfuscate}] Cualquier texto, pero de mayor utilidad + para la palabra clave \tplkword{author}. Muestra el campo de texto + como una secuencia de entidades XML. Esto ayuda a eliminar ciertos + robots est煤pidos de adquisici贸n de correo. +\item[\tplkwfilt{author}{person}] Cualquier texto, 煤til sobre todo + para la palabra clave \tplkword{author}. Muestra el texto que hay + antes de la direcci贸n de correo electr贸nico. Por ejemplo, + ``\Verb+Bryan O'Sullivan +'' mostrar铆a + ``\Verb+Bryan O'Sullivan+''. +\item[\tplkwfilt{date}{rfc822date}] \tplkword{date} palabra clave. + Muestra una fecha con el mismo formato que se usa en los encabezados + de correo. Mostrar铆a una cadena como + ``\Verb+Mon, 04 Sep 2006 15:13:13 -0700+''. +\item[\tplkwfilt{node}{short}] Hash del conjunto de cambios. Muestra + la forma corta de un hash de conjunto de cambios, + of a changeset hash, p.e.~una cadena hexadecimal de 12 bytes. +\item[\tplkwfilt{date}{shortdate}] \tplkword{date} palabra clave. + Mostrar a帽o, mes y d铆a de una fecha. Muestrauna cadena como ``\Verb+2006-09-04+''. -\item[\tplfilter{strip}] Any text. Strip all leading and trailing - whitespace from the string. -\item[\tplfilter{tabindent}] Any text. Yield the text, with every line - except the first starting with a tab character. -\item[\tplfilter{urlescape}] Any text. Escape all characters that are - considered ``special'' by URL parsers. For example, \Verb+foo bar+ - becomes \Verb+foo%20bar+. -\item[\tplkwfilt{author}{user}] Any text, but most useful for the - \tplkword{author} keyword. Return the ``user'' portion of an email - address. For example, - ``\Verb+Bryan O'Sullivan +'' becomes +\item[\tplfilter{strip}] Cualquier texto. Elimina todos los espacios + en blanco al principio y al final de la cadena. +\item[\tplfilter{tabindent}] Cualquier texto. Muestra el texto con + todas las l铆neas excepto la primera que comience con el caracter tab. +\item[\tplfilter{urlescape}] Cualquier texto. Escapa todos los + caracteres que se consideren como ``especiales'' por los parsers de + URL. Por ejemplo, \Verb+foo bar+ se convierte en \Verb+foo%20bar+. +\item[\tplkwfilt{author}{user}] Cualquier texto, 煤til sobre todo para + la palabra clave \tplkword{author}. Retorna el ``usuario'' de una + direcci贸n de correo. Por ejemplo, + ``\Verb+Bryan O'Sullivan +'' se convierte en ``\Verb+bos+''. \end{itemize} \begin{figure} \interaction{template.simple.manyfilters} - \caption{Template filters in action} + \caption{Filtros de plantilla en acci贸n} \label{fig:template:filters} \end{figure} \begin{note} - If you try to apply a filter to a piece of data that it cannot - process, Mercurial will fail and print a Python exception. For - example, trying to run the output of the \tplkword{desc} keyword - into the \tplkwfilt{date}{isodate} filter is not a good idea. + Si trata de aplicar un filtro a una porci贸n de datos que no puede + procesarse, Mercurial fallar谩 e imprimir谩 una excepci贸n de Python. + Por ejemplo, el tratar de usar la salida de la palabra clave + \tplkword{desc} con el filtro \tplkwfilt{date}{isodate} no resultar谩 + algo 煤til. \end{note} -\subsection{Combining filters} +\subsection{Combinar filtros} -It is easy to combine filters to yield output in the form you would -like. The following chain of filters tidies up a description, then -makes sure that it fits cleanly into 68 columns, then indents it by a -further 8~characters (at least on Unix-like systems, where a tab is -conventionally 8~characters wide). +Combinar filtros es para generar una salida en la forma como usted lo +desea es muy sencillo. La cadena de filtros siguientes arman una +descripci贸n, despu茅s aseguran que cabe limpiamente en 68 columnas, y +las indenta con 8~caracteres (por lo menos en sistemas tipo Unix, en +los que el tab por convenci贸n se extiende en 8~caracteres). \interaction{template.simple.combine} -Note the use of ``\Verb+\t+'' (a tab character) in the template to -force the first line to be indented; this is necessary since -\tplkword{tabindent} indents all lines \emph{except} the first. +Observe el uso de ``\Verb+\t+'' (un caracter tab) en la plantilla para +forzar que la primera l铆nea se indente; esto es necesario para lograr +que la primera l铆nea luzca indentada; es necesario debido a que +\tplkword{tabindent} indenta todas las l铆neas \emph{excepto} la primera. -Keep in mind that the order of filters in a chain is significant. The -first filter is applied to the result of the keyword; the second to -the result of the first filter; and so on. For example, using -\Verb+fill68|tabindent+ gives very different results from -\Verb+tabindent|fill68+. +Tenga en cuenta que el orden de los filtros importa. El primer filtro +se aplica primero al resultado de la palabra clave; el segundo al +resultado de la aplicaci贸n del primer filtro y as铆 sucesivamente. Por +ejemplo, usar \Verb+fill68|tabindent+ es muy distinto al resultado de +usar \Verb+tabindent|fill68+. -\section{From templates to styles} +\section{De plantillas a estilos} -A command line template provides a quick and simple way to format some -output. Templates can become verbose, though, and it's useful to be -able to give a template a name. A style file is a template with a -name, stored in a file. +Una plantilla provee una forma r谩pida y sencilla para dar formato a +una salida. Las plantillas pueden volvers verbosas, y es 煤til poder +darle un nombre a una plantilla. Un fichero de estilo es una +plantilla con un nombre, almacenado en un fichero. -More than that, using a style file unlocks the power of Mercurial's -templating engine in ways that are not possible using the command line -\hgopt{log}{--template} option. +M谩s a煤n, al usar un fichero de estilo se dispara el poder del motor de +plantillas en un nivel imposible de alcanzar usando las opci贸n +\hgopt{log}{--template} desde la l铆nea de 贸rdenes. -\subsection{The simplest of style files} -Our simple style file contains just one line: +\subsection{Los ficheros de estilo m谩s sencillos} + +Nuestro fichero sencillo de estilo contiene una sola l铆nea: \interaction{template.simple.rev} -This tells Mercurial, ``if you're printing a changeset, use the text -on the right as the template''. +Se le indica a Mercurial, ``si est谩 imprimiendo un conjunto de +cambios, use el texto de la derecha como la plantilla''. -\subsection{Style file syntax} +\subsection{Sintaxis de ficheros de estilo} -The syntax rules for a style file are simple. +Las reglas de sintaxis para un fichero de estilo son sencillas: \begin{itemize} -\item The file is processed one line at a time. +\item El fichero se procesa l铆nea por l铆nea. -\item Leading and trailing white space are ignored. +\item Se ignoran el espacio en blanco circundante. -\item Empty lines are skipped. +\item Se omiten las l铆neas en blanco. -\item If a line starts with either of the characters ``\texttt{\#}'' or - ``\texttt{;}'', the entire line is treated as a comment, and skipped - as if empty. +\item Si una l铆nea comienza con los caracteres ``\texttt{\#}'' o + ``\texttt{;}'', la l铆nea completa se trata como un comentario, y se + omite como si fuera vac铆a. -\item A line starts with a keyword. This must start with an - alphabetic character or underscore, and can subsequently contain any - alphanumeric character or underscore. (In regexp notation, a - keyword must match \Verb+[A-Za-z_][A-Za-z0-9_]*+.) - -\item The next element must be an ``\texttt{=}'' character, which can - be preceded or followed by an arbitrary amount of white space. +\item Una l铆nea comienza con una palabra clave. Esta debe comenzar + con una caracter alfab茅tico o una raya al piso, y puede contener + subsecuentemente cualquier caracter alfanum茅rico o una raya al + piso. (En notaci贸n de expresiones regulares debe coincidir con + \Verb+[A-Za-z_][A-Za-z0-9_]*+.) -\item If the rest of the line starts and ends with matching quote - characters (either single or double quote), it is treated as a - template body. +\item El pr贸ximo elemento debe ser un caracter ``\texttt{=}'', que + puede estar precedido o seguido por una cantidad arbitraria de + espacio. -\item If the rest of the line \emph{does not} start with a quote - character, it is treated as the name of a file; the contents of this - file will be read and used as a template body. +\item Si el resto de la l铆nea comienza y termina con caracteres + encerrados entre caracteres de comillas(bien sea sencillas o + dobles), se trata como cuerpo de la plantilla. + +\item Si el resto de la l铆nea \emph{no} comienza con una comilla, se + trata como el nombre de un fichero; los contenidos de este fichero + se leer谩n y se usar谩n como cuerpo de la plantilla. \end{itemize} -\section{Style files by example} +\section{Ejemplos de ficheros de estilos} -To illustrate how to write a style file, we will construct a few by -example. Rather than provide a complete style file and walk through -it, we'll mirror the usual process of developing a style file by -starting with something very simple, and walking through a series of -successively more complete examples. +Para ilustrar la creaci贸n de un fichero de estilo, construiremos +algunos ejemplos. En lugar de ofrecer un fichero completo de estilo y +analizarlo, replicaremos el proceso usual de desarrollo de un fichero +de estilo comenzando con algo muy sencillo, y avanzando por una serie +de ejemplos sucesivos m谩s completos. -\subsection{Identifying mistakes in style files} +\subsection{Identificar equivocaciones en ficheros de estilo} -If Mercurial encounters a problem in a style file you are working on, -it prints a terse error message that, once you figure out what it -means, is actually quite useful. +Si Mercurial encuentra un problema en un fichero de estilo en el cual +usted est谩 trabajando, imprime un mensaje de error suscinto, cuando +usted identifique lo que significa, resulta muy 煤til. \interaction{template.svnstyle.syntax.input} -Notice that \filename{broken.style} attempts to define a -\texttt{changeset} keyword, but forgets to give any content for it. -When instructed to use this style file, Mercurial promptly complains. +Tenga en cuenta que \filename{broken.style} trata de definir la +palabra clave \texttt{changeset}, pero omite dar un contenido para esta. +Cuando se le indica a Mercurial que use este fichero de estilo, se +queja inmediatamente. \interaction{template.svnstyle.syntax.error} -This error message looks intimidating, but it is not too hard to -follow. +Este mensaje de error luce intimidante, pero no es muy dif铆cil de +seguir: \begin{itemize} -\item The first component is simply Mercurial's way of saying ``I am - giving up''. +\item El primer componente es la forma como Mercurial dice ``me rindo''. \begin{codesample4} \textbf{abort:} broken.style:1: parse error \end{codesample4} -\item Next comes the name of the style file that contains the error. +\item A continuaci贸n viene el nombre del fichero que contiene el error. \begin{codesample4} abort: \textbf{broken.style}:1: parse error \end{codesample4} -\item Following the file name is the line number where the error was - encountered. +\item Siguendo el nombre del fichero viene el n煤mero de l铆nea en la + que se encontr贸 el error. \begin{codesample4} abort: broken.style:\textbf{1}: parse error \end{codesample4} -\item Finally, a description of what went wrong. +\item Finalmente, la descripci贸n de lo que fall贸. \begin{codesample4} abort: broken.style:1: \textbf{parse error} \end{codesample4} - The description of the problem is not always clear (as in this - case), but even when it is cryptic, it is almost always trivial to - visually inspect the offending line in the style file and see what - is wrong. + La descripci贸n del problema no siempre es clara(como en este caso), + pero aunque sea cr铆ptica, casi siempre es trivial la inspecci贸n + visual de la l铆nea en el fichero de estilo y encontrar lo que est谩 + mal. \end{itemize} -\subsection{Uniquely identifying a repository} +\subsection{Identificar de forma 煤nica un repositorio} -If you would like to be able to identify a Mercurial repository -``fairly uniquely'' using a short string as an identifier, you can -use the first revision in the repository. +Si desea identificar un repositorio de Mercurial ``de forma 煤nica'' +con una cadena corta como identificador, puede usar la primera +revisi贸n en el repositorio. \interaction{template.svnstyle.id} -This is not guaranteed to be unique, but it is nevertheless useful in +No es garant铆a de unicidad, pero no es 煤till en ciertos casos: many cases. \begin{itemize} -\item It will not work in a completely empty repository, because such - a repository does not have a revision~zero. -\item Neither will it work in the (extremely rare) case where a - repository is a merge of two or more formerly independent - repositories, and you still have those repositories around. +\item No funcionar谩 en un repositorio completamente vac铆o, porque un + repositorio as铆 no tiene una revisi贸n~zero. +\item Tampoco funcionar谩 en caso(muy raro) cuando el repositorio sea + una fusi贸n de dos repositorios independientes y tiene los dos + directorios por ah铆. \end{itemize} -Here are some uses to which you could put this identifier: +Hay ciertos casos en los cuales podr铆a colocar el identificador: \begin{itemize} -\item As a key into a table for a database that manages repositories - on a server. -\item As half of a \{\emph{repository~ID}, \emph{revision~ID}\} tuple. - Save this information away when you run an automated build or other - activity, so that you can ``replay'' the build later if necessary. +\item Como una llave en la tabla de una base de datos que administra + repositorios en un servidor. +\item Como una parte del par \{\emph{ID~repositorio}, \emph{ID~revisi贸n}\}. + Almacene esta informaci贸n de forma independiente cuando ejecute + construcciones automatizadas u otras actividades, de forma que pueda + ``reconstruir'' posteriormente en caso de ser necesario. \end{itemize} -\subsection{Mimicking Subversion's output} +\subsection{Mostrando salida parecida a Subversion} -Let's try to emulate the default output format used by another -revision control tool, Subversion. +Intentemos emular la salida usual que usa otro sistema de control de +revisiones, Subversion. \interaction{template.svnstyle.short} -Since Subversion's output style is fairly simple, it is easy to -copy-and-paste a hunk of its output into a file, and replace the text -produced above by Subversion with the template values we'd like to see -expanded. +Dado que la salida de Subversion es sencilla, es f谩cil copiar y pegar +una porci贸n de su salida en un fichero, y reemplazar el texto +producido previamente por Subversion con valores base que quisi茅ramos +ver expandidos. \interaction{template.svnstyle.template} -There are a few small ways in which this template deviates from the -output produced by Subversion. +Esta plantilla difiere en algunos detalles de la salida producida por +Subversion: \begin{itemize} -\item Subversion prints a ``readable'' date (the ``\texttt{Wed, 27 Sep - 2006}'' in the example output above) in parentheses. Mercurial's - templating engine does not provide a way to display a date in this - format without also printing the time and time zone. -\item We emulate Subversion's printing of ``separator'' lines full of - ``\texttt{-}'' characters by ending the template with such a line. - We use the templating engine's \tplkword{header} keyword to print a - separator line as the first line of output (see below), thus - achieving similar output to Subversion. -\item Subversion's output includes a count in the header of the number - of lines in the commit message. We cannot replicate this in - Mercurial; the templating engine does not currently provide a filter - that counts the number of items it is passed. +\item Subversion imprime una fecha ``legible'' (el ``\texttt{Wed, 27 Sep + 2006}'' en el ejemplo de salida anterior) en par茅ntesis. El motor + de plantillas de Mercurial no ofrece una forma sencilla de desplegar + una fecha en este formato sin imprimir tambi茅n la hora y la zona horaria. +\item Emulamos las l铆neas de ``separaci贸n'' de subversion con caracteres + ``\texttt{-}'' en una l铆nea. Usamos la palabra clave + \tplkword{header} del motor de plantillas para imprimir una l铆nea de + separaci贸n como la primera l铆nea de salida(ver m谩s abajo), para + lograr una salida similara a la de Subversion. +\item La salida de subversion incluye un conteo en el encabezado del + n煤mero de l铆neas en el mensaje de consinaci贸n. No podemos + replicarlo en Mercurial; el motor de plantilla no ofrece en la + actualidad un filtro que cuente la cantidad de objetos que se le + pasen. \end{itemize} -It took me no more than a minute or two of work to replace literal -text from an example of Subversion's output with some keywords and -filters to give the template above. The style file simply refers to -the template. +No me tom贸 m谩s de un minuto o dos de trabajo para reemplazar texto +literal de un ejemplo de salida de la salida de Subversion con ciertas +palabras claves y filtros para ofrecer la plantilla anterior. El +fichero de estilo se refiere sencillamente a la plantilla. \interaction{template.svnstyle.style} -We could have included the text of the template file directly in the -style file by enclosing it in quotes and replacing the newlines with -``\verb!\n!'' sequences, but it would have made the style file too -difficult to read. Readability is a good guide when you're trying to -decide whether some text belongs in a style file, or in a template -file that the style file points to. If the style file will look too -big or cluttered if you insert a literal piece of text, drop it into a -template instead. +Podr铆amos haber inclu铆do el texto del fichero plantilla directamente +en el fichero de estilo encerrando entre comillas y reemplazando las +nuevas l铆neas con secuencias ``\verb!\n!'', pero har铆a muy dif铆cil de +leer el archivo de estilos. La facilidad para leer es importante +cuando est谩 decidiendo si un texto pertenece a un fichero de estilo o +a un fichero de plantilla inclu铆do en el estilo. Si el fichero de +estilo luce muy grande o complicado, si inserta una pieza de texto +literal, mejor col贸quelo en una plantilla. %%% Local Variables: %%% mode: latex