annotate es/template.tex @ 838:d1f676a6a4b3 default tip

update mq chapter. propagate ef53d025f410.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Thu, 03 Dec 2009 01:26:08 +0900
parents 801442e58e6d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
1 \chapter{Personalizar los mensajes de Mercurial}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
2 \label{chap:template}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
3
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
4 Mercurial provee un poderoso mecanismo que permite controlar como
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
5 despliega la información. El mecanismo se basa en plantillas. Puede
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
6 usar plantillas para generar salida específica para una orden
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
7 particular o para especificar la visualización completa de la interfaz
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
8 web embebida.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
9
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
10 \section{Usar estilos que vienen con Mercurial}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
11 \label{sec:style}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
12
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
13 Hay ciertos estilos listos que vienen con Mercurial. Un estilo es
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
14 simplemente una plantilla predeterminada que alguien escribió e
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
15 instaló en un sitio en el cual Mercurial puede encontrarla.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
16
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
17 Antes de dar un vistazo a los estilos que trae Mercurial, revisemos su
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
18 salida usual.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
19
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
20 \interaction{template.simple.normal}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
21
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
22 Es en cierta medida informativa, pero ocupa mucho espacio---cinco
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
23 líneas de salida por cada conjunto de cambios. El estilo
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
24 \texttt{compact} lo reduce a tres líneas, presentadas de forma
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
25 suscinta.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
26
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
27 \interaction{template.simple.compact}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
28
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
29 El estilo de la \texttt{bitácora de cambios} vislumbra el poder
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
30 expresivo del sistema de plantillas de Mercurial. Este estilo busca
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
31 seguir los estándares de bitácora de cambios del proyecto
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
32 GNU\cite{web:changelog}.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
33
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
34 \interaction{template.simple.changelog}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
35
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
36 No es una sorpresa que el estilo predeterminado de Mercurial se llame
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
37 \texttt{default}\ndt{predeterminado}.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
38
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
39 \subsection{Especificar un estilo predeterminado}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
40
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
41 Puede modificar el estilo de presentación que Mercurial usará para
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
42 toda orden vía el fichero \hgrc\, indicando el estilo que prefiere
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
43 usar.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
44
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
45 \begin{codesample2}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
46 [ui]
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
47 style = compact
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
48 \end{codesample2}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
49
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
50 Si escribe un estilo, puede usarlo bien sea proveyendo la ruta a su
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
51 fichero de estilo o copiando su fichero de estilo a un lugar en el
619
bbc5db74bd77 changed many "X(" for "X ("
Javier Rojas <jerojasro@devnull.li>
parents: 615
diff changeset
52 cual Mercurial pueda encontrarlo (típicamente el subdirectorio
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
53 \texttt{templates} de su directorio de instalación de Mercurial).
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
54
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
55 \section{Órdenes que soportan estilos y plantillas}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
56
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
57 Todas las órdenes de Mercurial``relacionadas con \texttt{log}'' le
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
58 permiten usar estilos y plantillas: \hgcmd{incoming}, \hgcmd{log},
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
59 \hgcmd{outgoing} y \hgcmd{tip}.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
60
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
61 Al momento de la escritura del manual estas son las únicas órdenes que
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
62 soportan estilos y plantillas. Dado que son las órdenes más
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
63 importantes que necesitan personalización, no ha habido muchas
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
64 solicitudes desde la comunidad de usuarios de Mercurial para añadir
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
65 soporte de plantillas y estilos a otras órdenes.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
66
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
67 \section{Cuestiones básicas de plantillas}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
68
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
69 Una plantilla de Mercurial es sencillamente una pieza de texto.
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
70 Cierta porción nunca cambia, otras partes se \emph{expanden}, o
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
71 reemplazan con texto nuevo cuando es necesario.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
72
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
73 Antes de continuar, veamos de nuevo un ejemplo sencillo de la salida
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
74 usual de Mercurial:
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
75
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
76 \interaction{template.simple.normal}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
77
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
78 Ahora, ejecutemos la misma orden, pero usemos una plantilla para
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
79 modificar su salida:
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
80
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
81 \interaction{template.simple.simplest}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
82
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
83 El ejemplo anterior ilustra la plantilla más sencilla posible; es
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
84 solamente una porción estática de código que se imprime una vez por
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
85 cada conjunto de cambios. La opción \hgopt{log}{--template} de la
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
86 orden \hgcmd{log} indica a Mercurial usar el texto dado como la
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
87 plantilla cuando se imprime cada conjunto de cambios.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
88
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
89 Observe que la cadena de plantilla anterior termina con el texto
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
90 ``\Verb+\n+''. Es una \emph{secuencia de control}, que le indica a
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
91 Mercurial imprimira una nueva línea al final de cada objeto de la
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
92 plantilla. Si omite esta nueva línea, Mercurial colocará cada pieza
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
93 de salida seguida. Si desea más detalles acerca de secuencias de
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
94 control, vea la sección~\ref{sec:template:escape}.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
95
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
96 Una plantilla que imprime una cadena fija de texto siempre no es muy
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
97 útil; intentemos algo un poco más complejo.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
98
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
99 \interaction{template.simple.simplesub}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
100
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
101 Como puede ver, la cadena ``\Verb+{desc}+'' en la plantilla ha sido
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
102 reemplazada en la salida con la descricipción de cada conjunto de
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
103 cambios. Cada vez que Mercurial encuentra texto encerrado entre
619
bbc5db74bd77 changed many "X(" for "X ("
Javier Rojas <jerojasro@devnull.li>
parents: 615
diff changeset
104 corchetes (``\texttt{\{}'' y ``\texttt{\}}''), intentará reemplazar los
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
105 corchetes y el texto con la expansión de lo que sea está adentro.
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
106 Para imprimir un corchete de forma literal, debe escaparlo, como se
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
107 describe en la sección~\ref{sec:template:escape}.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
108
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
109 \section{Palabras claves más comunes en las plantillas}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
110 \label{sec:template:keyword}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
111
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
112 Puede empezar a escribir plantillas sencillas rápidamente con las
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
113 palabras claves descritas a continuación:
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
114
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
115 \begin{itemize}
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
116 \item[\tplkword{author}] Cadena. El autor NO modificado del conjunto
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
117 de cambios.
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
118 \item[\tplkword{branches}] Cadena. El nombre de la rama en la cual se
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
119 consignó el conjunto de cambios. Será vacía si el nombre de la rama es
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
120 \texttt{default}.
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
121 \item[\tplkword{date}] Información de fecha. La fecha en la cual se
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
122 consignó el conjunto de cambios. \emph{No} es legible por un
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
123 humano, debe pasarla por un firltro que la desplegará
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
124 apropiadamente. En la sección~\ref{sec:template:filter} hay más
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
125 detalles acerca de filtros. La fecha se expresa como un par de
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
126 números. El primer número corresponde a una marca de tiempo UNIX
619
bbc5db74bd77 changed many "X(" for "X ("
Javier Rojas <jerojasro@devnull.li>
parents: 615
diff changeset
127 UTC (segundos desde el primero de enero de 1970); la segunda es el
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
128 corrimiento horario de la zona horaria del UTC en la cual se encontraba
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
129 quien hizo la consignación, en segundos.
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
130 \item[\tplkword{desc}] Cadena. La descripción en texto del conjunto
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
131 de cambios.
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
132 \item[\tplkword{files}] Lista de cadenas. Todos los ficheros
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
133 modificados, adicionados o eliminados por este conjunto de cambios.
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
134 \item[\tplkword{file\_adds}] Lista de cadenas. Ficheros adicionados
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
135 por este conjunto de cambios.
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
136 \item[\tplkword{file\_dels}] Lista de cadenas. Ficheros eliminados
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
137 por este conjunto de cambios.
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
138 \item[\tplkword{node}] Cadena. El hash de identificación de este
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
139 conjunto de cambios como una cadena hexadecimal de 40 caracteres.
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
140 \item[\tplkword{parents}] Lista de cadenas. Los ancestros del
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
141 conjunto de cambios.
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
142 \item[\tplkword{rev}] Entero. El número de revisión del repositorio
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
143 local.
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
144 \item[\tplkword{tags}] Lista de cadenas. Todas las etiquetas
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
145 asociadas al conjunto de cambios.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
146 \end{itemize}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
147
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
148 Unos experimentos sencillos nos mostrarán qué esperar cuando usamos
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
149 estas palabras claves; puede ver los resultados en la
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
150 figura~\ref{fig:template:keywords}.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
151
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
152 \begin{figure}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
153 \interaction{template.simple.keywords}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
154 \caption{Template keywords in use}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
155 \label{fig:template:keywords}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
156 \end{figure}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
157
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
158 Como mencionamos anteriormente, la palabra clave de fecha no produce
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
159 salida legible por un humano, debemos tratarla de forma especial.
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
160 Esto involucra usar un \emph{filtro}, acerca de lo cual hay más en la
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
161 sección~\ref{sec:template:filter}.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
162
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
163 \interaction{template.simple.datekeyword}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
164
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
165 \section{Secuencias de Control}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
166 \label{sec:template:escape}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
167
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
168 El motor de plantillas de Mercurial reconoce las secuencias de control
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
169 más comunmente usadas dentro de las cadenas. Cuando ve un backslash
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
170 (``\Verb+\+''), ve el caracter siguiente y sustituye los dos
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
171 caracteres con un reemplazo sencillo, como se describe a continuación:
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
172
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
173 \begin{itemize}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
174 \item[\Verb+\textbackslash\textbackslash+] Backslash, ``\Verb+\+'',
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
175 ASCII~134.
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
176 \item[\Verb+\textbackslash n+] Nueva línea, ASCII~12.
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
177 \item[\Verb+\textbackslash r+] Cambio de línea, ASCII~15.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
178 \item[\Verb+\textbackslash t+] Tab, ASCII~11.
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
179 \item[\Verb+\textbackslash v+] Tab Vertical, ASCII~13.
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
180 \item[\Verb+\textbackslash \{+] Corchete abierto, ``\Verb+{+'', ASCII~173.
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
181 \item[\Verb+\textbackslash \}+] Corchete cerrado, ``\Verb+}+'', ASCII~175.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
182 \end{itemize}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
183
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
184 Como se indicó arriba, si desea que la expansión en una plantilla
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
185 contenga un caracter literal ``\Verb+\+'', ``\Verb+{+'', o
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
186 ``\Verb+{+'', debe escaparlo.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
187
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
188 \section{Uso de filtros con palabras claves}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
189 \label{sec:template:filter}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
190
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
191 Algunos de los resultados de la expansión de la plantilla no son
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
192 fáciles de usar de inmediato. Mercurial le permite especificar una
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
193 cadena de \emph{filtros} opcionales para modificar el resultado de
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
194 expandir una palabra clave. Ya ha visto el filtro usual
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
195 \tplkwfilt{date}{isodate} en acción con anterioridad para hacer
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
196 legible la fecha.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
197
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
198 A continuación hay una lista de los filtros de Mercurial más
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
199 comunmente usados. Ciertos filtros pueden aplicarse a cualquier
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
200 texto, otros pueden usarse únicamente en circunstancias específicas.
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
201 El nombre de cada filtro está seguido de la indicación de dónde puede
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
202 ser usado y una descripción de su efecto.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
203
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
204 \begin{itemize}
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
205 \item[\tplfilter{addbreaks}] Cualquier texto. Añade una etiqueta XHTML
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
206 ``\Verb+<br/>+'' antes del final de cada línea excepto en la final.
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
207 Por ejemplo, ``\Verb+foo\nbar+'' se convierte en ``\Verb+foo<br/>\nbar+''.
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
208 \item[\tplkwfilt{date}{age}] palabra clave \tplkword{date}. Muestra
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
209 la edad de la fecha, relativa al tiempo actual. Ofrece una cadena como
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
210 ``\Verb+10 minutes+''.
569
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
211 \item[\tplfilter{basename}] Cualquier texto, pero de utilidad sobre
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
212 todo en palabras claves relativas a \tplkword{ficheros}. Trata el
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
213 texto como una ruta, retornando el nombre base. Por ejemplo,
012631b248de translated some templates chapter paragraphs
Igor Támara <igor@tamarapatino.org>
parents: 501
diff changeset
214 ``\Verb+foo/bar/baz+'', se convierte en ``\Verb+baz+''.
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
215 \item[\tplkwfilt{date}{date}] \tplkword{date} palabra clave. Mostrar
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
216 la fecha en un formato similar a la orden \tplkword{date} de
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
217 in a similar format to the Unix, pero con la zona horaria incluída.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
218 Una cadena como ``\Verb+Mon Sep 04 15:13:13 2006 -0700+''.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
219 \item[\tplkwfilt{author}{domain}] Cualquier texto, pero de mayor
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
220 utilidad para la palabra clave \tplkword{author}. Encuentra la
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
221 primera cadena que luce como una dirección de correo electrónico, y
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
222 extrae solamente el componente del dominio. Por ejemplo, de
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
223 ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' se extrae
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
224 ``\Verb+serpentine.com+''.
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
225 \item[\tplkwfilt{author}{email}] Cualquier texto, pero de mayor
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
226 utilidad para la palabra clave \tplkword{author}. Extrae la primera
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
227 cadena que luce como una dirección de correo. Por ejemplo, de
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
228 ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' extrae
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
229 ``\Verb+bos@serpentine.com+''.
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
230 \item[\tplfilter{escape}] Cualquier texto. Reemplaza los caracteres
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
231 especiales de XML/XHTML: ``\Verb+&+'', ``\Verb+<+'' y ``\Verb+>+''
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
232 con las entidades XML.
624
801442e58e6d changed ". x" to ". X"
Javier Rojas <jerojasro@devnull.li>
parents: 619
diff changeset
233 \item[\tplfilter{fill68}] Cualquier texto. Lograr que el texto ocupe
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
234 las primeras 68 columnas. Es útil emplearlo antes de pasar el texto
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
235 por el filtro \tplfilter{tabindent}, y queremos que aún quepa en una
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
236 ventana de fuente fija y 80 columnas.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
237 \item[\tplfilter{fill76}] Cualquier texto. Lograr que el texto quepa
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
238 en 76 columnas.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
239 \item[\tplfilter{firstline}] Cualquier texto. Mostrar la primera
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
240 línea de texto sin saltos de línea.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
241 \item[\tplkwfilt{date}{hgdate}] \tplkword{date} palabra clave.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
242 Mostrar la fecha como un par de números legibles. Muestra una
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
243 cadena como ``\Verb+1157407993 25200+''.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
244 \item[\tplkwfilt{date}{isodate}] \tplkword{date} palabra clave.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
245 Mostrar la fecha como una cadena de texto en el formato. Muestra
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
246 una cadena como ``\Verb+2006-09-04 15:13:13 -0700+''.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
247 \item[\tplfilter{obfuscate}] Cualquier texto, pero de mayor utilidad
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
248 para la palabra clave \tplkword{author}. Muestra el campo de texto
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
249 como una secuencia de entidades XML. Esto ayuda a eliminar ciertos
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
250 robots estúpidos de adquisición de correo.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
251 \item[\tplkwfilt{author}{person}] Cualquier texto, útil sobre todo
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
252 para la palabra clave \tplkword{author}. Muestra el texto que hay
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
253 antes de la dirección de correo electrónico. Por ejemplo,
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
254 ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' mostraría
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
255 ``\Verb+Bryan O'Sullivan+''.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
256 \item[\tplkwfilt{date}{rfc822date}] \tplkword{date} palabra clave.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
257 Muestra una fecha con el mismo formato que se usa en los encabezados
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
258 de correo. Mostraría una cadena como
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
259 ``\Verb+Mon, 04 Sep 2006 15:13:13 -0700+''.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
260 \item[\tplkwfilt{node}{short}] Hash del conjunto de cambios. Muestra
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
261 la forma corta de un hash de conjunto de cambios,
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
262 of a changeset hash, p.e.~una cadena hexadecimal de 12 bytes.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
263 \item[\tplkwfilt{date}{shortdate}] \tplkword{date} palabra clave.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
264 Mostrar año, mes y día de una fecha. Muestrauna cadena como
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
265 ``\Verb+2006-09-04+''.
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
266 \item[\tplfilter{strip}] Cualquier texto. Elimina todos los espacios
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
267 en blanco al principio y al final de la cadena.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
268 \item[\tplfilter{tabindent}] Cualquier texto. Muestra el texto con
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
269 todas las líneas excepto la primera que comience con el caracter tab.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
270 \item[\tplfilter{urlescape}] Cualquier texto. Escapa todos los
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
271 caracteres que se consideren como ``especiales'' por los parsers de
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
272 URL. Por ejemplo, \Verb+foo bar+ se convierte en \Verb+foo%20bar+.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
273 \item[\tplkwfilt{author}{user}] Cualquier texto, útil sobre todo para
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
274 la palabra clave \tplkword{author}. Retorna el ``usuario'' de una
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
275 dirección de correo. Por ejemplo,
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
276 ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' se convierte en
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
277 ``\Verb+bos+''.
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
278 \end{itemize}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
279
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
280 \begin{figure}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
281 \interaction{template.simple.manyfilters}
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
282 \caption{Filtros de plantilla en acción}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
283 \label{fig:template:filters}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
284 \end{figure}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
285
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
286 \begin{note}
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
287 Si trata de aplicar un filtro a una porción de datos que no puede
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
288 procesarse, Mercurial fallará e imprimirá una excepción de Python.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
289 Por ejemplo, el tratar de usar la salida de la palabra clave
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
290 \tplkword{desc} con el filtro \tplkwfilt{date}{isodate} no resultará
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
291 algo útil.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
292 \end{note}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
293
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
294 \subsection{Combinar filtros}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
295
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
296 Combinar filtros es para generar una salida en la forma como usted lo
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
297 desea es muy sencillo. La cadena de filtros siguientes arman una
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
298 descripción, después aseguran que cabe limpiamente en 68 columnas, y
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
299 las indenta con 8~caracteres (por lo menos en sistemas tipo Unix, en
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
300 los que el tab por convención se extiende en 8~caracteres).
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
301
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
302 \interaction{template.simple.combine}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
303
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
304 Observe el uso de ``\Verb+\t+'' (un caracter tab) en la plantilla para
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
305 forzar que la primera línea se indente; esto es necesario para lograr
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
306 que la primera línea luzca indentada; es necesario debido a que
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
307 \tplkword{tabindent} indenta todas las líneas \emph{excepto} la primera.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
308
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
309 Tenga en cuenta que el orden de los filtros importa. El primer filtro
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
310 se aplica primero al resultado de la palabra clave; el segundo al
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
311 resultado de la aplicación del primer filtro y así sucesivamente. Por
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
312 ejemplo, usar \Verb+fill68|tabindent+ es muy distinto al resultado de
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
313 usar \Verb+tabindent|fill68+.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
314
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
315
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
316 \section{De plantillas a estilos}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
317
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
318 Una plantilla provee una forma rápida y sencilla para dar formato a
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
319 una salida. Las plantillas pueden volvers verbosas, y es útil poder
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
320 darle un nombre a una plantilla. Un fichero de estilo es una
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
321 plantilla con un nombre, almacenado en un fichero.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
322
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
323 Más aún, al usar un fichero de estilo se dispara el poder del motor de
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
324 plantillas en un nivel imposible de alcanzar usando las opción
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
325 \hgopt{log}{--template} desde la línea de órdenes.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
326
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
327
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
328 \subsection{Los ficheros de estilo más sencillos}
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
329
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
330 Nuestro fichero sencillo de estilo contiene una sola línea:
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
331
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
332 \interaction{template.simple.rev}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
333
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
334 Se le indica a Mercurial, ``si está imprimiendo un conjunto de
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
335 cambios, use el texto de la derecha como la plantilla''.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
336
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
337 \subsection{Sintaxis de ficheros de estilo}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
338
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
339 Las reglas de sintaxis para un fichero de estilo son sencillas:
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
340
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
341 \begin{itemize}
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
342 \item El fichero se procesa línea por línea.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
343
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
344 \item Se ignoran el espacio en blanco circundante.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
345
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
346 \item Se omiten las líneas en blanco.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
347
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
348 \item Si una línea comienza con los caracteres ``\texttt{\#}'' o
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
349 ``\texttt{;}'', la línea completa se trata como un comentario, y se
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
350 omite como si fuera vacía.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
351
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
352 \item Una línea comienza con una palabra clave. Esta debe comenzar
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
353 con una caracter alfabético o una raya al piso, y puede contener
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
354 subsecuentemente cualquier caracter alfanumérico o una raya al
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
355 piso. (En notación de expresiones regulares debe coincidir con
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
356 \Verb+[A-Za-z_][A-Za-z0-9_]*+.)
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
357
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
358 \item El próximo elemento debe ser un caracter ``\texttt{=}'', que
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
359 puede estar precedido o seguido por una cantidad arbitraria de
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
360 espacio.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
361
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
362 \item Si el resto de la línea comienza y termina con caracteres
619
bbc5db74bd77 changed many "X(" for "X ("
Javier Rojas <jerojasro@devnull.li>
parents: 615
diff changeset
363 encerrados entre caracteres de comillas (bien sea sencillas o
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
364 dobles), se trata como cuerpo de la plantilla.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
365
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
366 \item Si el resto de la línea \emph{no} comienza con una comilla, se
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
367 trata como el nombre de un fichero; los contenidos de este fichero
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
368 se leerán y se usarán como cuerpo de la plantilla.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
369 \end{itemize}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
370
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
371 \section{Ejemplos de ficheros de estilos}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
372
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
373 Para ilustrar la creación de un fichero de estilo, construiremos
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
374 algunos ejemplos. En lugar de ofrecer un fichero completo de estilo y
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
375 analizarlo, replicaremos el proceso usual de desarrollo de un fichero
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
376 de estilo comenzando con algo muy sencillo, y avanzando por una serie
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
377 de ejemplos sucesivos más completos.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
378
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
379 \subsection{Identificar equivocaciones en ficheros de estilo}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
380
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
381 Si Mercurial encuentra un problema en un fichero de estilo en el cual
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
382 usted está trabajando, imprime un mensaje de error suscinto, cuando
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
383 usted identifique lo que significa, resulta muy útil.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
384
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
385 \interaction{template.svnstyle.syntax.input}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
386
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
387 Tenga en cuenta que \filename{broken.style} trata de definir la
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
388 palabra clave \texttt{changeset}, pero omite dar un contenido para esta.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
389 Cuando se le indica a Mercurial que use este fichero de estilo, se
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
390 queja inmediatamente.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
391
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
392 \interaction{template.svnstyle.syntax.error}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
393
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
394 Este mensaje de error luce intimidante, pero no es muy difícil de
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
395 seguir:
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
396
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
397 \begin{itemize}
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
398 \item El primer componente es la forma como Mercurial dice ``me rindo''.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
399 \begin{codesample4}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
400 \textbf{abort:} broken.style:1: parse error
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
401 \end{codesample4}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
402
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
403 \item A continuación viene el nombre del fichero que contiene el error.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
404 \begin{codesample4}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
405 abort: \textbf{broken.style}:1: parse error
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
406 \end{codesample4}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
407
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
408 \item Siguendo el nombre del fichero viene el número de línea en la
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
409 que se encontró el error.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
410 \begin{codesample4}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
411 abort: broken.style:\textbf{1}: parse error
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
412 \end{codesample4}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
413
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
414 \item Finalmente, la descripción de lo que falló.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
415 \begin{codesample4}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
416 abort: broken.style:1: \textbf{parse error}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
417 \end{codesample4}
619
bbc5db74bd77 changed many "X(" for "X ("
Javier Rojas <jerojasro@devnull.li>
parents: 615
diff changeset
418 La descripción del problema no siempre es clara (como en este caso),
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
419 pero aunque sea críptica, casi siempre es trivial la inspección
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
420 visual de la línea en el fichero de estilo y encontrar lo que está
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
421 mal.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
422 \end{itemize}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
423
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
424 \subsection{Identificar de forma única un repositorio}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
425
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
426 Si desea identificar un repositorio de Mercurial ``de forma única''
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
427 con una cadena corta como identificador, puede usar la primera
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
428 revisión en el repositorio.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
429 \interaction{template.svnstyle.id}
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
430 No es garantía de unicidad, pero no es útill en ciertos casos:
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
431 many cases.
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
432 \begin{itemize}
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
433 \item No funcionará en un repositorio completamente vacío, porque un
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
434 repositorio así no tiene una revisión~zero.
619
bbc5db74bd77 changed many "X(" for "X ("
Javier Rojas <jerojasro@devnull.li>
parents: 615
diff changeset
435 \item Tampoco funcionará en caso (muy raro) cuando el repositorio sea
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
436 una fusión de dos repositorios independientes y tiene los dos
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
437 directorios por ahí.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
438 \end{itemize}
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
439 Hay ciertos casos en los cuales podría colocar el identificador:
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
440 \begin{itemize}
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
441 \item Como una llave en la tabla de una base de datos que administra
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
442 repositorios en un servidor.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
443 \item Como una parte del par \{\emph{ID~repositorio}, \emph{ID~revisión}\}.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
444 Almacene esta información de forma independiente cuando ejecute
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
445 construcciones automatizadas u otras actividades, de forma que pueda
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
446 ``reconstruir'' posteriormente en caso de ser necesario.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
447 \end{itemize}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
448
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
449 \subsection{Mostrando salida parecida a Subversion}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
450
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
451 Intentemos emular la salida usual que usa otro sistema de control de
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
452 revisiones, Subversion.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
453 \interaction{template.svnstyle.short}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
454
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
455 Dado que la salida de Subversion es sencilla, es fácil copiar y pegar
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
456 una porción de su salida en un fichero, y reemplazar el texto
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
457 producido previamente por Subversion con valores base que quisiéramos
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
458 ver expandidos.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
459 \interaction{template.svnstyle.template}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
460
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
461 Esta plantilla difiere en algunos detalles de la salida producida por
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
462 Subversion:
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
463 \begin{itemize}
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
464 \item Subversion imprime una fecha ``legible'' (el ``\texttt{Wed, 27 Sep
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
465 2006}'' en el ejemplo de salida anterior) en paréntesis. El motor
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
466 de plantillas de Mercurial no ofrece una forma sencilla de desplegar
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
467 una fecha en este formato sin imprimir también la hora y la zona horaria.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
468 \item Emulamos las líneas de ``separación'' de subversion con caracteres
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
469 ``\texttt{-}'' en una línea. Usamos la palabra clave
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
470 \tplkword{header} del motor de plantillas para imprimir una línea de
619
bbc5db74bd77 changed many "X(" for "X ("
Javier Rojas <jerojasro@devnull.li>
parents: 615
diff changeset
471 separación como la primera línea de salida (ver más abajo), para
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
472 lograr una salida similara a la de Subversion.
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
473 \item La salida de subversion incluye un conteo en el encabezado del
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
474 número de líneas en el mensaje de consinación. No podemos
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
475 replicarlo en Mercurial; el motor de plantilla no ofrece en la
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
476 actualidad un filtro que cuente la cantidad de objetos que se le
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
477 pasen.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
478 \end{itemize}
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
479 No me tomó más de un minuto o dos de trabajo para reemplazar texto
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
480 literal de un ejemplo de salida de la salida de Subversion con ciertas
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
481 palabras claves y filtros para ofrecer la plantilla anterior. El
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
482 fichero de estilo se refiere sencillamente a la plantilla.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
483 \interaction{template.svnstyle.style}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
484
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
485 Podríamos haber incluído el texto del fichero plantilla directamente
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
486 en el fichero de estilo encerrando entre comillas y reemplazando las
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
487 nuevas líneas con secuencias ``\verb!\n!'', pero haría muy difícil de
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 572
diff changeset
488 leer el fichero de estilos. La facilidad para leer es importante
572
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
489 cuando está decidiendo si un texto pertenece a un fichero de estilo o
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
490 a un fichero de plantilla incluído en el estilo. Si el fichero de
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
491 estilo luce muy grande o complicado, si inserta una pieza de texto
1b8b19825994 finished translation of assigned chapters to ikks
Igor Támara <igor@tamarapatino.org>
parents: 569
diff changeset
492 literal, mejor colóquelo en una plantilla.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
493
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
494 %%% Local Variables:
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
495 %%% mode: latex
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
496 %%% TeX-master: "00book"
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
497 %%% End: