annotate es/mq.tex @ 641:b35930ce7a70

first pass, spell checking
author Javier Rojas <jerojasro@devnull.li>
date Thu, 29 Jan 2009 23:20:01 -0500
parents 7e8ef188c72f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
539
aeda195f54a6 Finally finished translating collab and taking mq and hgext
Igor TAmara <igor@tamarapatino.org>
parents: 435
diff changeset
1 \chapter{Administración de cambios con Colas de Mercurial}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
2 \label{chap:mq}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
3
539
aeda195f54a6 Finally finished translating collab and taking mq and hgext
Igor TAmara <igor@tamarapatino.org>
parents: 435
diff changeset
4 \section{El problema de la administración de parches}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
5 \label{sec:mq:patch-mgmt}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
6
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
7 Un escenario frecuente: usted necesita instalar un paquete de software
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
8 desde las fuentes, pero encuentra un fallo que debe arreglar antes de
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
9 poder comenzar a usarlo. Hace sus cambios, y se olvida del paquete
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
10 por un tiempo, unos meses después necesita actualizar a una nueva
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
11 versión del paquete. Si la nueva versión del paquete todavía tiene el
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
12 fallo, debe extraer su arreglo del árbol de fuentes anteriores y
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
13 aplicarlo a la nueva versión. Una tarea tediosa en la cual es fácil
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
14 equivocarse.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
15
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
16 Este es un caso simple del problema del ``manejo de parches''. Usted
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
17 tiene un árbol de fuentes del ``mantenedor principal'' que no puede
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
18 cambiar: necesita hacer algunos cambios locales sobre el árbol
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
19 principal; y desearía poder mantener tales cambios separados, de forma
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
20 tal que pueda aplicarlos a versiones más nuevas del árbol principal.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
21
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
22 El problema de administración de parches surge en muchas situaciones.
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
23 Probablemente la más visible es cuando un usuario de un proyecto de
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
24 software de fuentes abiertas contribuye con un arreglo de un fallo o
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
25 una nueva característica a los mantenedores del proyecto en la forma
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
26 de un parche.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
27
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
28 Aquellos que distribuyen sistemas operativos que incluyen programas
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
29 abiertos usualmente requieren hacer cambios en los paquetes que
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
30 distribuyen de tal forma que se armen apropiadamente en sus ambientes.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
31
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
32 Cuando hay pocos cambios por mantener, es muy sencillo administrar un
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
33 solo parche con los programas estándar \command{diff} y
579
4e2ebef2c9a4 corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 548
diff changeset
34 \command{patch} (ver la sección~\ref{sec:mq:patch} para ver cómo
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
35 emplear tales herramientas). Cuando la cantidad de cambios comienza a
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
36 crecer, tiene sentido mantener parches como ``porciones de trabajo''
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
37 individual, de forma que cada cambio contiene solamente un arreglo de
579
4e2ebef2c9a4 corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 548
diff changeset
38 un fallo (el parche puede modificar varios ficheros, pero está
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
39 ``haciendo una sola cosa''), y puede tener cierta cantidad de tales
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
40 parches para diferentes fallos y cambios locales. En esta situación,
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
41 si envía un parche que arregla un fallo a los mantenedores principales
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
42 de un paquete y ellos incluyen su arreglo en una publicación
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
43 posterior, puede deshacerse de tal parche cuando se actualice a la
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
44 nueva versión.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
45
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
46 Mantener un solo parche frente a un árbol principal es algo tedioso y
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
47 es fácil equivocarse, pero no es difícil. Aunque, la complejidad del
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
48 problema crece rápidamente a medida que la cantidad de parches que
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
49 tiene que mantener crece. Con más que una pequeña cantidad de
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
50 cambios, entender cuáles ha aplicado se convierte de algo desordenado
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
51 a algo avasallante.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
52
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
53 Afortunadamente Mercurial provee una extensión poderos: Colas de
579
4e2ebef2c9a4 corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 548
diff changeset
54 Mercurial (o simplemente ``MQ''), que simplifica en gran medida el
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
55 problema de administración de parches.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
56
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
57 \section{La prehistoria de las Colas de Mercurial}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
58 \label{sec:mq:history}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
59
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
60 A finales de los 90s, muchos desarrolladores del núcleo de Linux
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
61 comenzaron a mantener ``series de parches'' que modificaron el
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
62 comportamiento del núcleo de Linux. Algunos se enfocaban en
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
63 estabilidad, otros en aumentar las características, y otros un poco
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
64 más especulativos.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
65
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
66 Los tamaños de las series de parches crecieron rápidamente. En el
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
67 2002, Andrew Morton publicó algunos guiones de línea de órdenes que
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
68 estuvo usando para automatizar la tarea de administrar su cola de
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
69 parches. Andrew usó exitósamente tales guiones para administrar
579
4e2ebef2c9a4 corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 548
diff changeset
70 centenas (a veces millares) de parches en el núcleo de Linux.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
71
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
72 \subsection{Trabajar parches con quilt}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
73 \label{sec:mq:quilt}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
74
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
75 A comienzos del 2003, Andreas Gruenbacher y Martin Quinson tomaron la
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
76 aproximación de los guiones de Andrew y publicaron una herramienta
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
77 llamada
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
78 ``patchwork quilt''~\cite{web:quilt}, o simplemente ``quilt''
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
79 (ver~\cite{gruenbacher:2005} el paper que lo describe). Dado que
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
80 quilt automatizaba sustancialmente la administración de parches, fue
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
81 adoptado en gran medida por desarrolladores de programas abiertos.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
82
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
83 Quilt maneja una \emph{pila de parches} sobre un árbol de directorios.
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
84 Para comenzar, usted le indica a quilt que administre un árbol de
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
85 directorios, le indica qué ficheros manejar; Este almacena los nombres
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
86 y los contenidos de estos ficheros. Para arreglar un fallo, usted
579
4e2ebef2c9a4 corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 548
diff changeset
87 crea un nuevo parche (con una sola orden), edita los ficheros que está
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
88 arreglando y ``refresca'' el parche.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
89
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
90 El paso de refresco hace que quilt revise el árbol de directorios;
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
91 actualiza el parche con todos los cambios que usted haya hecho. Puede
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
92 crear otro parche sobre el primero, que hará seguimiento de los
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
93 cambios requeridos para modificar el árbol desde ``el árbol con un
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
94 parch aplicado'' a un ``árbol con dos parches aplicados''.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
95
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
96 Usted puede \emph{elegir} qué cambios desea aplicar al árbol. Si
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
97 ``pop''\ndt{saca} un parche, los cambios hechos por tal parchve
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
98 desapareceŕan del árbol de directorios. Quilt recuerda qué parches ha
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
99 sacado, para que pueda ``introducirlos''\ndt{push} posteriormente, así el
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
100 árbol de directorios se restaurará con las modificaciones que vienen
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
101 del parche. Lo más importante es que puede ejecutar la orden
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
102 ``refresh'' en cualquier momento, y el último parche será
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
103 actualizado. Esto significa que puede, en cualquier momento, cambiar
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
104 qué parches serán aplicados y qué modificaciones hacen ellos.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
105
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
106 Quilt no tiene nada que ver con herramientas de control de versiones,
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
107 y puede trabajar bien sobre un conjunto de fuentes que viene de un
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
108 fichero comprimido y empaquetado o una copia de trabajo de Subversion.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
109
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
110 \subsection{Pasar de trabajo con parches con Quilt hacia Colas de Mercurial}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
111 \label{sec:mq:quilt-mq}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
112
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
113 A mediados de 2005, Chris Mason tomó las características de quilt y
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
114 escribió una extensión que llamó Colas de Mercurial\ndt{Mercurial
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
115 Queues}, que proporcionó un comportamiento a Mercurial al estilo
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
116 quilt.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
117
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
118 La diferencia clave entre quilt y MQ es que quilt no sabe nada acerca
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
119 del sistema de control de revisiones, mientras que MQ está
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
120 \emph{integrado} con Mercurial. Cada parche que usted introduce se
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
121 representa como un conjunto de cambios en Mercurial. Si sustrae un
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
122 parche, el conjunto de cambios desaparece.\ndt{introduce originalmente es
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
123 push y pop es sustraer en este contexto, usaremos el original en inglés
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
124 cuando encontremos que facilita la comprensión}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
125
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
126 Dado que quilt no se preocupa por las herramientas de control de
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
127 revisiones, continúa siendo una porción de software tremendamente útil
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
128 para aquellas situaciones en las cuales no puede usar Mercurial y MQ.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
129
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
130 \section{La gran ventaja de MQ}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
131
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
132 No puedo sobreestimar el valor que MQ ofrece en la unificación de
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
133 parches y el control de revisiones.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
134
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
135 La principal razón por la cual los parches han persistido en el mundo
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
136 del software libre y de fuentes abiertas--a pesar de la creciente
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
137 disponibilidad de herramientas poderosas de control de revisiones-- es
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
138 la \emph{agilidad} que ofrecen.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
139
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
140 Las herramientas tradicionales de control de revisiones llevan un
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
141 registro permanente e irreversible de todo lo que usted hace. A pesar
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
142 de que esto tiene gran valor, también es bastante sutil. Si requiere
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
143 realizar un experimento ((((wild-eyed)))), debe ser cuidadoso en cómo
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
144 lo hace, o puede dejar trazas innecesarias--o peor aún,
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
145 desconcertantes o desestabilizantes--- de los pasos y errores en el
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
146 registro de revisiones de forma permanente.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
147
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
148 En contraste, con la cohesión de MQ con el control de revisiones
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
149 distribuidos y los parches, resulta más sencillo aislar su trabajo.
616
3f32047a3f25 changed all "de el" to "del"
Javier Rojas <jerojasro@devnull.li>
parents: 615
diff changeset
150 Sus parches viven encima del historial de revisiones normales, y
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
151 puede hacer que ellos desaparezcan o reaparezcan cuando lo desee. Si
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
152 no le gusta un parche, puede desecharlo. Si un parche no satisface
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
153 todo lo que usted desea, puede arreglarlo---tantas veces como lo
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
154 requiera, hasta que lo haya refinado lo suficiente hacia sus
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
155 expectativas.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
156
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
157 Por ejemplo, la integración de parches con el control de revisiones
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
158 hace que el entender los parches y revisar sus efectos---y sus
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
159 interacciones con el código en el cuál están enlazados--- sea
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
160 \emph{mucho} más sencillo. Dado que todo parche que se aplique tiene
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
161 un conjunto de cambios asociado, puede usar
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
162 \hgcmdargs{log}{\emph{filename}} para ver qué conjuntos de cambios y
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
163 parches afectaron un fichero. Puede usar la orden \hgext{bisect} para
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
164 hacer una búsqueda binaria sobre todos los conjuntos de cambios y
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
165 parches aplicados para ver dónde se introdujo un fallo o dónde fue
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
166 arreglado. Puede usar la orden \hgcmd{annotate} para ver qué
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
167 conjuntos de cambios o parches modificaron una línea particular de un
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
168 fichero fuente. Y mucho más.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
169
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
170 \section{Entender los parches}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
171 \label{sec:mq:patch}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
172
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
173 Dado que MQ no esconde su naturaleza parche-céntrica, es muy útil para
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
174 entender de qué se tratan los parches, y un poco acerca de las
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
175 herramientas que trabajan con ellos.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
176
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
177 La orden de Unix tradicional \command{diff} compara dos ficheros, e
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
178 imprime una lista de diferencias de sus líneas. La orden
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
179 \command{patch} entiende esas diferencias como \emph{modificaciones}
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
180 para construir un fichero. Vea en la figura~\ref{ex:mq:diff} un
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
181 ejemplo sencillo de tales órdenes en acción.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
182
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
183 \begin{figure}[ht]
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
184 \interaction{mq.dodiff.diff}
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
185 \caption{Uso sencillo de las órdenes \command{diff} y \command{patch}}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
186 \label{ex:mq:diff}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
187 \end{figure}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
188
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
189 El tipo de fichero que \command{diff} genera (y que \command{patch}
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
190 toma como entrada) se llama un ``parche'' o un ``diff''; no hay
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
191 diferencia entre un parche y un diff. (Usaremos el término ``parche'',
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
192 dado que es el que más comunmente se usa.)
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
193
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
194 Un parche puede comenzar con un texto arbitrario; la orden \command{patch}
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
195 ignora este texto, pero MQ lo usa como el mensaje de consignación
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
196 cuando se crean conjuntos de cambios. Para encontrar el inicio del
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
197 contenido de un parche, la orden \command{patch} busca la primera
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
198 línea que comience con la cadena ``\texttt{diff~-}''.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
199
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
200 MQ trabaja con diffs \emph{unificados} (\command{patch} acepta varios
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
201 formatos de diff adicionales, pero MQ no). Un diff unificado contiene
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
202 dos clases de encabezados. El \emph{encabezado de fichero} describe
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
203 el fichero que se está modificando; contiene el nombre del fichero a
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
204 modificar. Cuando \command{patch} ve un nuevo encabezado de fichero,
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
205 busca un fichero con ese nombre para modificarlo.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
206
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
207 Después del encabezaado vienen varios \emph{trozos}. Cada trozo
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
208 comienza con un encabezado; que identifica el rango de líneas del
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
209 fichero que el trozo debe modificar. Después del encabezado, un trozo
579
4e2ebef2c9a4 corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 548
diff changeset
210 comienza y termina con unas pocas líneas (usualmente tres) de texto del
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
211 fichero que no han sido modificadas; las cuales llamamos el
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
212 \emph{contexto} del trozo. Si solamente hay una pequeña cantidad de
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
213 contexto entre trozos sucesivos, \command{diff} no imprime un nuevo
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
214 encabezado para el trozo, continua integrando los trozos, con unas
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
215 líneas de contexto entre las modificaciones.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
216
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
217 Cada línea de contexto comienza con un caracter de espacio. En el
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
218 trozo, si una línea comienza con ``\texttt{-}'' significa ``elimine
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
219 esta línea'', si la línea comienza con un ``\texttt{+}'' significa
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
220 ``inserte esta línea''. Por ejemplo, una línea que se modifica se
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
221 representa con una línea eliminada y una línea insertada.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
222
579
4e2ebef2c9a4 corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 548
diff changeset
223 Retomaremos aspectos más sutiles acerca de parches posteriormente (en
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
224 la sección~\ref{sec:mq:adv-patch}), pero en el momento usted ya
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
225 debería tener suficiente información para usar MQ.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
226
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
227 \section{Comenzar a usar Colas de Mercurial}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
228 \label{sec:mq:start}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
229
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
230 Dado que MQ está implementado como una extensión, debe habilitarla
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
231 explícitamente antes de comenzar a usarla. (No necesita descargar
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
232 nada; MQ viene con la distribución estándar de Mercurial.) Para
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
233 habilitar MQ, edite su fichero \tildefile{.hgrc}, y añada las líneas
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
234 de la figura~\ref{ex:mq:config}.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
235
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
236 \begin{figure}[ht]
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
237 \begin{codesample4}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
238 [extensions]
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
239 hgext.mq =
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
240 \end{codesample4}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
241 \label{ex:mq:config}
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
242 \caption{Líneas a añadir en \tildefile{.hgrc} para habilitar la extensión MQ}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
243 \end{figure}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
244
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
245 Cuando la extensión esté habilitada, aparecerán varios comandos. Para
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
246 verificar que la extensión está trabajando, puede usar \hgcmd{help}
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
247 para ver si la orden \hgxcmd{mq}{qinit} está disponible; vea un
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
248 ejemplo en la figura~\ref{ex:mq:enabled}.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
249
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
250 \begin{figure}[ht]
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
251 \interaction{mq.qinit-help.help}
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
252 \caption{Cómo verificar que MQ está habilitado}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
253 \label{ex:mq:enabled}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
254 \end{figure}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
255
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
256 Puede usar MQ en \emph{cualquier} repositorio de Mercurial, y sus
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
257 comandos solamente operarán con tal repositorio. Para comenzar, basta
579
4e2ebef2c9a4 corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 548
diff changeset
258 con preparar el repositorio con la orden \hgxcmd{mq}{qinit} (ver la
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
259 figura~\ref{ex:mq:qinit}). Esta orden crea un directorio vacío
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
260 llamado \sdirname{.hg/patches}, donde MQ mantendrá sus metadatos. Como
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
261 otras ordenes de Mercurial, la orden \hgxcmd{mq}{qinit} no imprime
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
262 nada cuando es exitosa.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
263
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
264 \begin{figure}[ht]
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
265 \interaction{mq.tutorial.qinit}
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
266 \caption{Preparar un repositorio para usar MQ}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
267 \label{ex:mq:qinit}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
268 \end{figure}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
269
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
270 \begin{figure}[ht]
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
271 \interaction{mq.tutorial.qnew}
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
272 \caption{Crear un nuevo parche}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
273 \label{ex:mq:qnew}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
274 \end{figure}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
275
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
276 \subsection{Crear un nuevo parche}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
277
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
278 Para comenzar a trabajar en un nuevo parche use la orden
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
279 \hgxcmd{mq}{qnew}. Esta orden recibe un argumento, el nombre del
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
280 parche a crear. MQ lo usará como el nombre del fichero en el
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
281 directorio \sdirname{.hg/patches}, como puede apreciarlo en la
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
282 figura~\ref{ex:mq:qnew}.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
283
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
284 También hay otros dos nuevos ficheros en el directorio
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
285 \sdirname{.hg/patches}: \sfilename{series} y \sfilename{status}. El
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
286 fichero \sfilename{series} lista todos los parches de los cuales MQ
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
287 tiene noticia para este repositorio, con un parche por línea.
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
288 Mercurial usa el fichero \sfilename{status} para mantener registros
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
289 interns; da seguimiento a todos los parches que MQ ha \emph{aplicado}
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
290 en el repositorio.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
291
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
292 \begin{note}
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
293 En ciertas ocasiones usted querrá editar el fichero
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
294 \sfilename{series} a mano; por ejemplo, cambiar el orden en que se
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
295 aplican ciertos parches. A pesar de esto, es una mala idea editar
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
296 manualmente el fichero \sfilename{status}, dado que es fácil
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
297 desorientar a MQ acerca de lo que está pasando.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
298 \end{note}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
299
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
300 Una vez que haya creado un nuevo parche, puede editar los ficheros en
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
301 el directorio de trabajo, como lo haría usualmente. Toda las órdenes
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
302 que de a Mercurial, tales como \hgcmd{diff} y \hgcmd{annotate},
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
303 trabajarán de la misma forma como lo han hecho antes.
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
304
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
305 \subsection{Refrescar un parche}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
306
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
307 Cuando usted llega a un punto en el cual desea guardar su trabajo, use
579
4e2ebef2c9a4 corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 548
diff changeset
308 la orden \hgxcmd{mq}{qrefresh} (figura~\ref{ex:mq:qnew}) para
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
309 actualizar el parche en el cual está trabajando. Esta orden almacena
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
310 los cambios que haya hecho al directorio actual de trabajo en su
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
311 parche, y almacena el conjunto de cambios correspondiente que contiene
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
312 los cambios.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
313
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
314 \begin{figure}[ht]
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
315 \interaction{mq.tutorial.qrefresh}
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
316 \caption{Refrescar un parche}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
317 \label{ex:mq:qrefresh}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
318 \end{figure}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
319
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
320 Puede ejecutar la orden \hgxcmd{mq}{qrefresh} tan seguido como quiera,
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
321 y es una buena forma de ``colocar marcas'' a su trabajo. Refresque su
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
322 parche en momentos oportunos; intente un experimento; si el
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
323 experimento no funciona, Use \hgcmd{revert} sobre sus modificaciones
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
324 para volver al refresco anterior.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
325
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
326 \begin{figure}[ht]
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
327 \interaction{mq.tutorial.qrefresh2}
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
328 \caption{Refrescar un parche muchas veces para acumular cambios}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
329 \label{ex:mq:qrefresh2}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
330 \end{figure}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
331
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
332 \subsection{Aplicar un parche tras otro y dar seguimiento}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
333
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
334 Cuando haya terminado de trabajar en un parche, o necesite trabajar en
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
335 otro, puede usar la orden \hgxcmd{mq}{qnew} para crear un nuevo
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
336 parche. Mercurial aplicará este parche sobre su parche anterior.
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
337 Para un ejemplo, ver la figura~\ref{ex:mq:qnew2}. Note que el parche
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
338 contiene los cambios en nuestro parche anterior como parte de su
579
4e2ebef2c9a4 corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 548
diff changeset
339 contexto (lo verá más claramente en la salida de \hgcmd{annotate}).
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
340
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
341 \begin{figure}[ht]
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
342 \interaction{mq.tutorial.qnew2}
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
343 \caption{Aplicar un parche después del primero}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
344 \label{ex:mq:qnew2}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
345 \end{figure}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
346
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
347 Hasta ahora, con excepción de \hgxcmd{mq}{qnew} y
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
348 \hgxcmd{mq}{qrefresh}, hemos sido cuidadosos para aplicar únicamente
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
349 órdenes usuaales de Mercurial. De todas maneras, MQ ofrece muchos
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
350 comandos que son más sencillos de usar cuando esté pensando acerca de
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
351 parches, como se puede ver en la figura~\ref{ex:mq:qseries}:
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
352
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
353 \begin{itemize}
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
354 \item La orden \hgxcmd{mq}{qseries} lista cada parche del cual MQ
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
355 tiene noticia en este repositorio, desde el más antiguo hasta el más
579
4e2ebef2c9a4 corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 548
diff changeset
356 nuevo (El último \emph{creado}).
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
357 \item La orden \hgxcmd{mq}{qapplied} lista cada parche que MQ haya
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
358 \emph{aplicado} en este repositorio, de nuevo, desde el más antiguo
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
359 hasta el más nuevo (El aplicado más recientemente).
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
360 \end{itemize}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
361
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
362 \begin{figure}[ht]
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
363 \interaction{mq.tutorial.qseries}
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
364 \caption{Entender la pila de parches con \hgxcmd{mq}{qseries} y
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
365 \hgxcmd{mq}{qapplied}}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
366 \label{ex:mq:qseries}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
367 \end{figure}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
368
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
369 \subsection{Manipular la pila de parches}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
370
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
371 La discusión previa indicó que debe haber una diferencia entre los
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
372 parches ``conocidos'' y ``aplicados'', y efectivamente la hay. MQ
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
373 puede manejar un parche sin que este haya sido aplicado al
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
374 repositorio.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
375
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
376 Un parche \emph{aplicado} tiene su correspondiente conjunto de cambios
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
377 en el repositorio, y los efectos del parche y el conjunto de cambios
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
378 son visibles en el directorio de trabajo. Puede deshacer la
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
379 aplicación de un parche con la orden \hgxcmd{mq}{qpop}. MQ
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
380 \emph{sabe acerca de}, o maneja un parche sustraído, pero el parche ya
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
381 no tendrá un conjunto de cambios correspondientes en el repositorio, y
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
382 el directorio de trabajo no contendrá los cambios hechos por el
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
383 parche. La figura~\ref{fig:mq:stack} ilustra la diferencia entre
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
384 parches aplicados y seguidos.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
385
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
386 \begin{figure}[ht]
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
387 \centering
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
388 \grafix{mq-stack}
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
389 \caption{Parches aplicados y no aplicados en la pila de parches de MQ}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
390 \label{fig:mq:stack}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
391 \end{figure}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
392
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
393 Puede reaplicar un parche no aplicado o sustraído con la orden
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
394 \hgxcmd{mq}{qpush}. Esto crea un nuevo conjunto de cambios
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
395 correspondiente al parche, y los cambios del parche estarán presentes
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
396 de nuevo en el directorio de trabajo. Vea ejemplos de
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
397 \hgxcmd{mq}{qpop} y \hgxcmd{mq}{qpush} en acción en la
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
398 figura~\ref{ex:mq:qpop}. Vea que hemos sustraído uno o dos parches,
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
399 la salida de\hgxcmd{mq}{qseries} continúa igual, mientras que
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
400 \hgxcmd{mq}{qapplied} ha cambiado.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
401
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
402 \begin{figure}[ht]
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
403 \interaction{mq.tutorial.qpop}
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
404 \caption{Modificar la pila de parches aplicados}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
405 \label{ex:mq:qpop}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
406 \end{figure}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
407
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
408 \subsection{Introducir y sustraer muchos parches}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
409
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
410 Mientras que \hgxcmd{mq}{qpush} y \hgxcmd{mq}{qpop} operan sobre un
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
411 único parche cada vez, puede introducir y sustraer varios parches de
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
412 una vez. La opción \hgxopt{mq}{qpush}{-a} de \hgxcmd{mq}{qpush}
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
413 introduce todos los cambios que no hayan sido aplicados, mientras que
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
414 la opción \hgxopt{mq}{qpop}{-a} de \hgxcmd{mq}{qpop} sustrae todos los
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
415 cambios aplicados. (Vea la sección~\ref{sec:mq:perf} más adelante
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
416 en la cual se explican otras formas de de introducir y sustraer varios
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
417 cambios.)
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
418
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
419 \begin{figure}[ht]
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
420 \interaction{mq.tutorial.qpush-a}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
421 \caption{Pushing all unapplied patches}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
422 \label{ex:mq:qpush-a}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
423 \end{figure}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
424
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
425 \subsection{Medidas de seguridad y cómo saltarlas}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
426
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
427 Muchas órdenes MQ revisan el directorio de trabajo antes de hacer
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
428 cualquier cosa, y fallan si encuentran alguna modificación. Lo hacen
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
429 para garantizar que usted no pierda cambio alguno de los que haya
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
430 hecho, pero que no hayan sido incorporados en algún parche. La
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
431 figura~\ref{ex:mq:add} ilusta esto; la orden \hgxcmd{mq}{qnew} no
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
432 creará un nuevo parche si hay cambios notorios, causados en este caso
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
433 por aplicado la orden \hgcmd{add} a \filename{file3}.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
434
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
435 \begin{figure}[ht]
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
436 \interaction{mq.tutorial.add}
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
437 \caption{Crear un parche a la fuerza}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
438 \label{ex:mq:add}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
439 \end{figure}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
440
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
441 Las órdenes que revisan el directorio actual cuentan con una opción
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
442 ``Se lo que estoy haciendo'', que siempre está nombrada como
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
443 \option{-f}. El significado exacto de \option{-f} depende de la
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
444 orden. Por ejemplo, \hgcmdargs{qnew}{\hgxopt{mq}{qnew}{-f}}
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
445 incorporarán cualquier cambio notorio en el nuevo parche que crea pero
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
446 \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-f}} revertirá las modificaciones a
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
447 cualquier fichero que haya sido afectado por el parche que está siendo
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
448 sustraído. ¡Asegúrese de leer la documentación de la opción \option{-f}
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
449 de cada comando antes de usarla!
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
450
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
451 \subsection{Trabajar con varios parches a la vez}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
452
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
453 La orden \hgxcmd{mq}{qrefresh} siempre refresca el \emph{último}
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
454 parche aplicado. Esto significa que usted puede suspender su trabajo
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
455 en un parche (refrescándolo), sustraerlo o introducirlo para lograr
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
456 que otro parche esté de último y trabajar en \emph{ese} parche por un
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
457 rato.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
458
542
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
459 A continuación un ejemplo que ilustra cómo puede usar esta habilidad.
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
460 Digamos que está desarrollando una nueva característica en dos
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
461 parches. El primero es un cambio en la parte fundamental de su
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
462 programa, y el segundo--sobre el primero---cambia la interfaz de
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
463 usuario para usar el código que ha añadido a la parte fundamental. Si
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
464 ve que hay un fallo en la parte fundamental mientras está trabajando
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
465 en el parche de UI\ndt{Interfaz de Usuario, User Interface en inglés}, es fácil arreglar la parte fundamental.
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
466 Simplemente use \hgxcmd{mq}{qrefresh} sobre el parche de la UI para
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
467 guardar los cambios de su trabajo en progreso, y use \hgxcmd{mq}{qpop}
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
468 para sacar sustraer el parche de la parte fundamental. Arregla el
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
469 fallo sobre la parte fundamental, aplique \hgxcmd{mq}{qrefresh} sobre
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
470 el parche fundamental, y aplique \hgxcmd{mq}{qpush} sobre el parche de
2daeda01fe98 Started mq, please do look the translation terms about push and pop on this context
Igor TAmara <igor@tamarapatino.org>
parents: 539
diff changeset
471 UI para continuar donde había quedado.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
472
543
da4d34e0e250 Translated some more mq paragraphs to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 542
diff changeset
473 \section{Más acerca de parches}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
474 \label{sec:mq:adv-patch}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
475
543
da4d34e0e250 Translated some more mq paragraphs to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 542
diff changeset
476 MQ usa la orden GNU \command{patch} para aplicar los parches, por lo
da4d34e0e250 Translated some more mq paragraphs to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 542
diff changeset
477 tanto es útil conocer ciertos detalles de cómo trabaja
da4d34e0e250 Translated some more mq paragraphs to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 542
diff changeset
478 \command{patch}, y también acerca de los parches.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
479
543
da4d34e0e250 Translated some more mq paragraphs to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 542
diff changeset
480 \subsection{La cantidad de franjas}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
481
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
482 Si ve el encabezado de un parche, notará que la ruta al fichero tiene
543
da4d34e0e250 Translated some more mq paragraphs to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 542
diff changeset
483 un componente adicional al principio, que no está presente en la
da4d34e0e250 Translated some more mq paragraphs to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 542
diff changeset
484 ruta. Esta es una traza de cómo generaba anteriormente los parches la
579
4e2ebef2c9a4 corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 548
diff changeset
485 gente (algunos aún lo hacen, pero es raro con las herramientas de
543
da4d34e0e250 Translated some more mq paragraphs to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 542
diff changeset
486 control de revisiones del actuales).
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
487
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
488 Alicia desempaquetaría un comprimido, editaría sus ficheros, y querría
543
da4d34e0e250 Translated some more mq paragraphs to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 542
diff changeset
489 crear un parche. Por lo tanto ella renombraría su directorio de
619
bbc5db74bd77 changed many "X(" for "X ("
Javier Rojas <jerojasro@devnull.li>
parents: 618
diff changeset
490 trabajo, desempacaría el comprimido de nuevo (para lo cual necesitó el
543
da4d34e0e250 Translated some more mq paragraphs to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 542
diff changeset
491 renombramiento), y usaría las opciones \cmdopt{diff}{-r} y
da4d34e0e250 Translated some more mq paragraphs to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 542
diff changeset
492 \cmdopt{diff}{-N} de \command{diff} para generar recursivamente un
da4d34e0e250 Translated some more mq paragraphs to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 542
diff changeset
493 parche entre el directorio original y el modificado. El resultado
da4d34e0e250 Translated some more mq paragraphs to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 542
diff changeset
494 sería que el nombre del directorio original estaría al principio de
da4d34e0e250 Translated some more mq paragraphs to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 542
diff changeset
495 toda ruta en cada encabezado de fichero, y el nombre del directorio
da4d34e0e250 Translated some more mq paragraphs to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 542
diff changeset
496 modificado estaría al frente de la porción derecha de la ruta del
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
497 fichero.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
498
545
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
499 Como alguien que reciba un parche de Alicia en la red podría obtener
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
500 dos directorios, uno original y el otro modificado con exactamente los
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
501 mismos nombres, la orden \command{patch} tiene la opción
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
502 \cmdopt{patch}{-p} que indica la cantidad de componentes de la ruta
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
503 a eliminar cuando se vaya a aplicar el parche. Este número se
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
504 llama la \emph{cantidad de eliminaciones}.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
505
545
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
506 La opción con ``\texttt{-p1}'' significa ``elimine uno''. Si
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
507 \command{patch} ve un nombre de fichero \filename{foo/bar/baz} en el
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
508 encabezado del fichero, eliminará \filename{foo} y tratará de parchar
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
509 un fichero llamado \filename{bar/baz}. (Hablando estrictamente, la
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
510 cantidad de eliminaciones se refiere a la cantidad de \emph{separadores de
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
511 ruta} (y los componentes que vayan con ellos) a eliminar. Si el
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
512 contador es uno volverá \filename{foo/bar} en \filename{bar}, pero
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
513 \filename{/foo/bar} (note la barra extra) en \filename{foo/bar}.)
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
514
545
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
515 La cantidad a eliminar``estándar'' para parches es uno; casi todos los
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
516 parches contienen un componente inicial de la ruta que necesita ser
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
517 eliminado. La orden \hgcmd{diff} de Mercurial genera nombres de ruta
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
518 de esta forma, y la orden \hgcmd{import} y MQ esperan parches que
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
519 tengan a uno como cuenta de eliminaciones.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
520
545
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
521 Si recibe un parche de alguien de quien desea adicionar adicionar a su
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
522 cola de parches, y el parche necesita una cuenta de eliminación que no
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
523 sea uno, no podrá aplicar \hgxcmd{mq}{qimport} en primera medida,
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
524 porque \hgxcmd{mq}{qimport} no tiene todavía una opción \texttt{-p}
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
525 option (ver~\bug{311}). Lo mejor que puede hacer es aplicar
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
526 \hgxcmd{mq}{qnew} por su cuenta, y después usar \cmdargs{patch}{-p\emph{N}}
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
527 para aplicar tal parche, seguido de \hgcmd{addremove} para tener en
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
528 cuenta cualquier fichero adicionado o eliminado por el parche, seguido
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
529 de \hgxcmd{mq}{qrefresh}. Esta complejidad puede ser innecesaria;
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
530 consulte~\bug{311} para más información.
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
531
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
532 \subsection{Estrategias para aplicar parches}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
533
545
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
534 Cuando \command{patch} aplica un trozo, intenta varias estrategias
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
535 sucesivas que decrecen en precisión para intentar aplicarlo. Esta
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
536 técnica de pruebas y error aveces permite que un parche que fue
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
537 generado contra una versión anterior de un fichero, sea aplicada sobre
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
538 una versión más nueva del mismo.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
539
545
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
540 Primero \command{patch} intenta una correspondencia perfecta donde los
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
541 números de línea, el contexto y el texto a modificar deben coincidir
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
542 perfectamente. Si no lo logra, intenta encontrar una correspondencia
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
543 exacta del contexto, sin tener en cuenta el número de línea. Si es
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
544 exitoso, imprime una línea indicando que el trozo fue aplicado, pero a
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
545 un \emph{corrimiento} del número de línea original.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
546
545
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
547 Si falla la correspondencia por contexto, \command{patch} elimina la
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
548 primera y la última línea del contexto, e intenta una correspondencia
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
549 \emph{reducida} del contexto. Si el trozo con contexto reducido es
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
550 exitoso, imprime un mensaje indicando que aplicó el trozo con un
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
551 \emph{factor difuso} (el número después del factor difuso indica
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
552 cuántas líneas de contexto \command{patch} tuvo que eliminar antes de
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
553 aplicar el parche).
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
554
545
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
555 Cuando ninguna de estas técnicas funciona, \command{patch} imprime un
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
556 mensaje indicando que el trozo en cuestión se desechó. Almacena los
579
4e2ebef2c9a4 corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 548
diff changeset
557 trozos desechados (también llamados ``descartados'') en un fichero con
545
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
558 el mismo nombre, y la extensión \sfilename{.rej} añadida. También
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
559 almacena una copia igual al fichero original con la extensión
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
560 \sfilename{.orig}; la copia del fichero sin extensión contendrá
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
561 cualquier cambio hecho por los trozos que \emph{sí} se aplicaron sin
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
562 problema. Si usted tiene un parche que modifica \filename{foo} con
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
563 seis trozos, y uno de ellos falla al aplicarse, tendrá : un fichero
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
564 original \filename{foo.orig}, un fichero \filename{foo.rej} que
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
565 contiene el trozo, y \filename{foo}, que contiene los cambios que se
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
566 aplicaron por los cinco trozos exitosos.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
567
545
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
568 \subsection{Algunos detalles de la representación de parches}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
569
545
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
570 Hay ciertas cosas útiles por saber acerca de cómo trabaja
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
571 \command{patch} con los ficheros:
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
572 \begin{itemize}
545
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
573 \item Debería ser obvio que \command{patch} no puede manipular
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
574 ficheros binarios.
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
575 \item No se preocupa por el bit ejecutable; crea ficheros nuevos en
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
576 modo lectura, pero no ejecutable.
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
577 \item \command{patch} intenta eliminar un fichero como una diferencia
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
578 entre el fichero a eliminar y un fichero vacío. Y por lo tanto su
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
579 idea de ``Borré este fichero'' debería pensarse como ``toda línea de
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
580 este fichero fue eliminada'' en un parche.
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
581 \item Trata la adición de un fichero como un diff entre un fichero
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
582 vacío y el fichero a ser adicionado. Por lo tanto en un parche su
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
583 idea de ``Añadí este fichero'' se vería como ``toda línea de este
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
584 fichero fue añadida''.
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
585 \item Trata el renombramiento de un fichero como la eliminación del
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
586 nombre anterior y la adición del nuevo nombre. Esto significa que
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
587 los ficheros renombrados dejan un rastro grande en los parches.
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
588 (Tenga en cuenta que Mercurial no trata de inferir cuando los
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
589 ficheros han sido renombrados o copiados en un parche en este
545
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
590 momento.)
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
591 \item \command{patch} no puede representar ficheros vacíos, por lo
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
592 tanto no puede usar un parche para representar la noción ``Añadí
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
593 este fichero vacío al árbol''.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
594 \end{itemize}
545
40ba5d8583c7 Translated some more paragraphs of mq to spanish
Igor TAmara <igor@tamarapatino.org>
parents: 543
diff changeset
595 \subsection{Cuidado con los difusos}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
596
546
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
597 Cuando aplique un trozo con un corrimiento, o con un factor difuso,
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
598 aveces será taotalmente exitoso, tales técnicas inexactas dejan
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
599 claramente la posibilidad de corromper el fichero parchado. Los casos
546
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
600 más típicos involucran aplicar un parche dos veces o en un sitio
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
601 incorrecto del fichero. Si \command{patch} o \hgxcmd{mq}{qpush} llegan
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
602 a mencionar un corrimiento o un factor difuso, debería asegurarse que
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
603 los ficheros modificados estén correctos después del suceso.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
604
546
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
605 Casi siempre es buena idea refrescar un parche que fue aplicado con un
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
606 corrimiento o un factor difuso; refrescar el parche genera nueva
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
607 información de contexto que permitirá aplicarlo limpiamente. Digo
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
608 ``casi siempre,'' no ``siempre'', puesto que en ciertas ocasiones
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
609 refrescar un parche lo hará fallar frente a una revisión diferente del
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
610 fichero. En algunos casos, como por ejemplo, cuando usted está
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
611 manteniendo un parche que debe estar encima de múltiples revisiones de
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
612 un árbol de fuentes, es aceptable tener un parche aplicado algo
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
613 difuso, siempre que haya verificado los resultados del proceso de
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
614 parchar.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
615
546
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
616 \subsection{Manejo de descartes}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
617
546
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
618 Si \hgxcmd{mq}{qpush} falla al aplicar un parche, mostrará un texto de
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
619 error y saldrá. Si ha dejado ficheros \sfilename{.rej}, es mejor
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
620 arreglar los trozos descartados antes de introducir parches
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
621 adicionales o hacer cualquier otra cosa.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
622
546
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
623 Si su parche \emph{solía} aplicarse limpiamente, y ya no lo hace
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
624 porque ha cambiado código subyacente en el cual se basa su parche, las
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
625 Colas de Mercurial pueden ayudar; consulte la sección~\ref{sec:mq:merge}.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
626
546
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
627 Desafortunadamente, no hay grandes técnicas para tratar los trozos
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
628 descartados. Casi siempre deberá consultar el fichero
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
629 \sfilename{.rej} y editar el fichero objetivo, aplicando los trozos
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
630 descartados a mano.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
631
546
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
632 Si es aventurero, Neil Brown, un hacker del núcleo Linux, escribió una
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
633 herramienta llamada \command{wiggle}~\cite{web:wiggle}, que es más
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
634 vigorosa que \command{patch} en su intento de hacer que se aplique un
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
635 parche.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
636
546
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
637 Otro hacker del nucleo Linux, Chris Mason (el autor de las Colas de
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
638 Mercurial), escribió una herramienta similar llamada
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
639 \command{mpatch}~\cite{web:mpatch}, que sigue una aproximación
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
640 sencilla para automatizar la aplicación de trozos descartados por
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
641 \command{patch}. La orden \command{mpatch} puede ayudar con cuatro
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
642 razones comunes por las cuales un parche ha sido descartado:
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
643
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
644 \begin{itemize}
546
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
645 \item El contexto en la mitad de un trozo ha cambiado.
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
646 \item Un trozo ha perdido cierto contexto al principio o al final.
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
647 \item Un trozo largo podría aplicarse mejor---por completo o una
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
648 parte---si estaba cortado en trozos más pequeños.
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
649 \item Un trozo remueve líneas con contenido ligeramente diferente que
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
650 aquellas que están presentes en el fichero.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
651 \end{itemize}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
652
546
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
653 Si usted usa \command{wiggle} o \command{mpatch}, debería ser
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
654 doblemente cuidadoso al revisar sus resultados cuando haya terminado.
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
655 De hecho, \command{mpatch} refuerza este método de revisar por partida
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
656 doble su salida, dejándolo a usted en un programa de fusión cuando la
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
657 herramienta haya terminado su trabajo, de tal forma que usted pueda
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
658 verificar lo que ha hecho y pueda terminar de aplicar cualquier fusión
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
659 faltante.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
660
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
661 \section{maximizar el rendimiento de MQ}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
662 \label{sec:mq:perf}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
663
546
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
664 MQ es muy eficiente al tratar con una gran cantidad de parches. Corrí
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
665 unos experimentos de desempeño a mediados del 2006 para una charla que
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
666 dí en la conferencia EuroPython 2006~\cite{web:europython}. Empleé la
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
667 serie de parches para el núcleo Linux 2.6.17-mm1, que contaba con 1.738
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
668 parches. Los apliqué sobre un repositorio del núcleo de Linux con
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
669 todas las 27.472 revisiones entre 2.6.12-rc2 y 2.6.17.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
670
547
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
671 En mi portátil antiguo y lento, logré aplicar
546
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
672 \hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-a}} a los 1.738 parches en 3.5
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
673 minutos, y \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}} en 30 segundos.
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
674 (En un portátil más nuevo, el tiempo para introducir todos los
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
675 parches, se logró en menos de dos minutos.) Apliqué
579
4e2ebef2c9a4 corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 548
diff changeset
676 \hgxcmd{mq}{qrefresh} sobre uno de los parches más grandes (que hizo
546
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
677 22.779 líneas de cambios en 287 ficheros) en 6,6 segundos.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
678
546
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
679 Claramente, MQ funciona adecuadamente en árboles grandes, y además hay
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
680 unos trucos que pueden emplearse para obtener el máximo desempeño.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
681
546
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
682 En primer lugar, trate de hacer ``en lote'' las operaciones. Cada vez
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
683 que ejecute \hgxcmd{mq}{qpush} o \hgxcmd{mq}{qpop}, tales órdenes
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
684 revisan el directorio de trabajo para asegurarse de que usted no ha
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
685 hecho cambios y ha olvidado ejecutar \hgxcmd{mq}{qrefresh}. En un
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
686 árbol pequeño, el tiempo de esta revisión puede ser mínimo, Pero en
579
4e2ebef2c9a4 corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 548
diff changeset
687 un árbol mediano (con decenas de miles de ficheros), puede tomar un
546
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
688 segundo o más.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
689
546
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
690 Las órdenes \hgxcmd{mq}{qpush} y \hgxcmd{mq}{qpop} le permiten
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
691 introducir o sustraer varios parches en una operación. Puede
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
692 identificar el ``parche destino'' que desee. Cuando aplique
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
693 \hgxcmd{mq}{qpush} con un destino, introducirá tantos parches como sea
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
694 necesario hasta que el especificado esté en el tope de la pila.
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
695 Cuando emplee \hgxcmd{mq}{qpop} con un destino, MQ sustraerá parches
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
696 hasta que el parche destino esté en el tope.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
697
546
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
698 Puede identificar un parche destino con el nombre del parche o con el
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
699 número. Si se refiere al número, los parches se contarán desde cero;
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
700 esto significa que el primer parche es cero, el segundo es uno y así
93e7700c0322 Some more mq paragraphs translated
Igor TAmara <igor@tamarapatino.org>
parents: 545
diff changeset
701 sucesivamente.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
702
547
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
703 \section{Actualiar los parches cuando el código cambia}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
704 \label{sec:mq:merge}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
705
547
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
706 Es común contar con una pila de parches sobre un repositorio que usted
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
707 no modifica directamente. Si está trabajando en cambios de código de
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
708 otros, o en una característica que tarda bastante en desarrollarse
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
709 comparada con la tasa de cambio del código sobre la cual se está
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
710 trabajando, necesitará sincronizarse con el código, y ajustar
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
711 cualquier trozo en sus parches que ya no estén al día. A esto se le
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
712 llama hacer \emph{rebase} a su serie de parches.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
713
547
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
714 La vía más sencilla de hacerlo es con \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}}
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
715 sobre sus parches, después hacer \hgcmd{pull} de los cambios en el
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
716 repositorio, y finalmente hacer
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
717 \hgcmdargs{qpush}{\hgxopt{mq}{qpop}{-a}} con sus parches de nuevo. MQ
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
718 dejará de de introducir parches siempre que llegue a un parche que no se pueda
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
719 aplicar debido a un conflicto, permitiéndole a usted arreglarlo,
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
720 aplicar \hgxcmd{mq}{qrefresh} al parche afectado y continuar
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
721 introduciendo hasta que haya arreglado la pila completa.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
722
547
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
723 Esta aproximación es sencilla y funciona bien si no espera cambios en
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
724 el código original que afecte en gran medida los parches que usted
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
725 esté aplicando. Si su pila de parches toca código que es modificado
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
726 frecuentemente o de forma invasiva sobre el código subyacente,
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
727 arreglar trozos manualmente se vuelve desgastante.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
728
547
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
729 Es posible automatizar de forma parcial el proceso de rebase. Si sus
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
730 parches se aplican limpiamente sobre algunas revisiones del
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
731 repositorio subyacente, MQ puede usar esta información para ayudarle a
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
732 a resolver conflictos entre sus parches y una revisión distinta.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
733
547
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
734 El proceso resulta un poco complejo:
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
735 \begin{enumerate}
547
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
736 \item Para comenzar, haga \hgcmdargs{qpush}{-a} sobre todos los
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
737 parches que usted sepa se aplican limpiamente.
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
738 \item Guarde una copia de seguridad de su directorio de parches con
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
739 \hgcmdargs{qsave}{\hgxopt{mq}{qsave}{-e} \hgxopt{mq}{qsave}{-c}}.
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
740 Esto imprime el nombre del directorio en el cual se han guardado los
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
741 parches. Guardará los parches en un directorio llamado
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
742 \sdirname{.hg/patches.\emph{N}}, donde \texttt{\emph{N}} es un
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
743 entero pequeño. También consigna un ``conjunto de cambios de
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
744 seguridad'' sobre sus parches aplicados; esto es para mantener el
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
745 histórico, y guarda los estados de los ficheros \sfilename{series}
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
746 y \sfilename{status}.
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
747 \item Use \hgcmd{pull} para traer los nuevos cambios en el repositorio
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
748 subyacente. (No ejecute \hgcmdargs{pull}{-u}; vea más adelante por qué.)
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
749 \item Actualice a la nueva revisión punta con
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
750 \hgcmdargs{update}{\hgopt{update}{-C}} para sobreescribir los
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
751 parches que haya introducido.
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
752 \item Fusione todos los parches con \hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-m}
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
753 \hgxopt{mq}{qpush}{-a}}. La opción \hgxopt{mq}{qpush}{-m} de \hgxcmd{mq}{qpush}
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
754 le indica a MQ que haga una fusión que involucra tres fuentes si el
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
755 parche falla al aplicarse.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
756 \end{enumerate}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
757
547
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
758 Durante el \hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-m}}, cada parche en
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
759 el fichero \sfilename{series} se aplica normalmente. Si un parche se
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
760 aplica difusamente o se niea a aplicarse, MQ consulta la cola que
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
761 usted guardó con \hgxcmd{mq}{qsave}, y aplica una fusión de tres con
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
762 el correspondiente conjunto de cambios. Esta fusión usa la maquinaria
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
763 de Mercurial, por lo tanto puede mostrar una herramienta de fusión GUI
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
764 para ayudarle a resolver los problemas.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
765
547
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
766 Cuando termine de resolver los efectos de un parche, MQ refrescará su
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
767 parche basado en el resultado de la fusión.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
768
547
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
769 Al final de este proceso, su repositorio tendrá una cabeza extra de la
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
770 antigua cola de parches, y una copia de la cola de parches anterio
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
771 estará en \sdirname{.hg/patches.\emph{N}}. Puede eliminar la cabeza
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
772 extra con \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a} \hgxopt{mq}{qpop}{-n} patches.\emph{N}}
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
773 o \hgcmd{strip}. Puede eliminar \sdirname{.hg/patches.\emph{N}} una
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
774 vez que esté seguro de que no lo necesita más como copia de seguridad.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
775
547
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
776 \section{Identificar parches}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
777
547
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
778 Las órdenes de MQ le permiten trabajar refiriéndose al nombre del
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
779 parche o al número. Es obvio hacerlo por el nombre; por ejemplo se
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
780 pasa el nombre \filename{foo.patch} a \hgxcmd{mq}{qpush}, que
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
781 introducirá los parches hasta que \filename{foo.patch} se aplique.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
782
547
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
783 Para hacerlo más corto, puede referirse a un parche con un nombre y un
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
784 corrimiento de número; por ejemplo, \texttt{foo.patch-2} significa
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
785 ``dos parches antes de \texttt{foo.patch}'', mientras que
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
786 \texttt{bar.patch+4} significa ``cuatro parches después de \texttt{bar.patch}''.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
787
547
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
788 Referirse a un parche por su índice no es muy diferente. El primer
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
789 parche que se imprime en la salida de \hgxcmd{mq}{qseries} es el
579
4e2ebef2c9a4 corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 548
diff changeset
790 parche cero (si, es el primero en los sistemas que comienzan su conteo
547
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
791 en cero); el segundo parche es uno y así sucesivamente.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
792
547
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
793 MQ facilita el trabajo cuando está usando órdenes normales de
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
794 Mercurial. Cada comando que acepte Identificadores de conjuntos de
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
795 cambios también aceptará el nombre de un parche aplicado. MQ aumenta
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 616
diff changeset
796 las etiquetas normalmente en el repositorio con un distintivo para cada
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 616
diff changeset
797 parche aplicado. Adicionalmente, las etiquetas especiales \index{tags!special tag
547
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
798 names!\texttt{qbase}}\texttt{qbase} y \index{tags!special tag
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
799 names!\texttt{qtip}}\texttt{qtip} identifican los parches
c17848cfbf75 Translated a few more MQ paragraphs
Igor TAmara <igor@tamarapatino.org>
parents: 546
diff changeset
800 ``primero'' y último, respectivamente.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
801
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
802 Junto con las capacidades de Mercurial para etiquetar, estas adiciones
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
803 hacen que trabajar con parches sea muy sencillo.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
804 \begin{itemize}
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
805 \item ¿Desea enviar una bomba de parches a una lista de correo con los
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
806 últimos cambios que ha hecho?
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
807 \begin{codesample4}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
808 hg email qbase:qtip
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
809 \end{codesample4}
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
810 (¿No sabe qué es una ``bomba de parches''? Consulte la
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
811 sección~\ref{sec:hgext:patchbomb}.)
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
812 \item ¿Desea ver todos los parches desde que se aplicó
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
813 \texttt{foo.patch} sobre los ficheros de un subdirectorio en su
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
814 árbol?
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
815 \begin{codesample4}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
816 hg log -r foo.patch:qtip \emph{subdir}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
817 \end{codesample4}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
818 \end{itemize}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
819
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
820 Dado que MQ nombra los parches disponibles al resto de Mercurial con
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
821 su maquinaria de etiquetas interna, usted no necesita teclear el
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
822 nombre completo de un parche cuando desea identificarlo por su nombre.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
823
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
824 \begin{figure}[ht]
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
825 \interaction{mq.id.output}
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
826 \caption{Uso de las características de etiquetamiento al trabajar
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
827 con MQ}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
828 \label{ex:mq:id}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
829 \end{figure}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
830
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
831 Otra consecuencia deseable al representar los nombres de parches como
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
832 etiquetas es que cuando ejecute la orden \hgcmd{log}, desplegará el
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
833 nombre del parche como una etiqueta, usualmente con la salida normal.
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
834 Esto facilita distinguir visualmente los parches aplicados de las
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
835 revisiones ``normales''. La figura~\ref{ex:mq:id} muestra algunos
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
836 comandos usuales de Mercurial al trabajar con parches.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
837
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
838 \section{Otra información útil}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
839
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
840 Hay una cantidad de aspectos que hacen que el uso de MQ no representen
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
841 secciones en sí mismas, pero de los cuales es bueno estar
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
842 enterado. Los presentamos en aquí:
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
843
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
844 \begin{itemize}
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
845 \item Usualmente cuando hace \hgxcmd{mq}{qpop} a un parche y vuelve a
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
846 hacerle \hgxcmd{mq}{qpush}, el conjunto de cambios que representa el
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
847 parche después de introducir/sustraer tendrá una \emph{identidad
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
848 distinta} que aquella que representaba el conjunto de cambios
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
849 anteriormente. Consulte la secctión~\ref{sec:mqref:cmd:qpush} para
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
850 obtener información del por qué de esto.
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
851 \item No es una buena idea aplicar \hgcmd{merge} de cambios de otra
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
852 rama con un conjunto de cambios de parches, por lo menos si desea
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
853 mantener la ``información de parches'' de ese conjunto de cambios y
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
854 los conjuntos de cambios que se encuentran por debajo en la pila de
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
855 parches. Si intenta hacerlo, parecerá que ha sido exitoso, pero MQ
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
856 se confundirá.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
857 \end{itemize}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
858
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
859 \section{Administrar parches en un repositorio}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
860 \label{sec:mq:repo}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
861
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
862 Dado que el directorio \sdirname{.hg/patches} de MQ reside fuera del
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
863 repositorio de trabajo de Mercurial, el repositorio ``subyacente'' de
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
864 Mercurial no sabe nada acerca de la administración o presencia de
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
865 parches.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
866
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
867 Esto presenta la interesante posibilidad de administrar los contenidos
616
3f32047a3f25 changed all "de el" to "del"
Javier Rojas <jerojasro@devnull.li>
parents: 615
diff changeset
868 del directorio de parches como un repositorio de Mercurial por su
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
869 cuenta. Puede ser una forma útil de trabajar. Por ejemplo, puede
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
870 trabajar en un parche por un rato, hacerle \hgxcmd{mq}{qrefresh} y
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
871 después hacer \hgcmd{commit} al estado actual del parche. Esto le
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
872 permite ``devolverse'' a esa versión del parche posteriormente.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
873
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
874 Puede también compartir diferentes versiones de la misma pila de
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
875 parches entre varios repositorios subyacentes. Uso esto cuando estoy
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
876 desarrollando una característica del núcleo Linux. Tengo una copia
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
877 original de las fuentes del núcleo para varias arquitecturas, y cloné
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
878 un rpositorio en cada una que contiene los parches en los cuales
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
879 estoy trabajando. Cuando quiero probar un cambio en una arquitectura
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
880 diferente, introduzco mis parches actuales al repositorio de parches
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
881 asociado con el árbol del kernel, sustraigo e introduzco todos mis
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
882 parches, armo y pruebo el núcleo.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
883
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
884 Llevar los parches en un repositorio permite que varios
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
885 desarrolladores puedan trabajar en la misma serie de parches sin
625
7e8ef188c72f removed the anglicism "sobrelapar". Thanks to Mario Palomo
Javier Rojas <jerojasro@devnull.li>
parents: 621
diff changeset
886 sobreponerse, todo sobre la fuente base subyacente que pueden o no
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
887 controlar.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
888
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
889 \subsection{Soporte de MQ para repositorios de parches}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
890
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
891 MQ le ayuda a trabajar con el directorio \sdirname{.hg/patches} como
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
892 un repositorio; cuando usted prepara un repositorio para trabajar con
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
893 parches usando \hgxcmd{mq}{qinit}, puede pasarle la opción
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
894 \hgxopt{mq}{qinit}{-c} para que se cree el directorio
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
895 \sdirname{.hg/patches} como un repositorio de Mercurial.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
896
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
897 \begin{note}
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
898 Si olvida usar la opción \hgxopt{mq}{qinit}{-c} option, puede ir al
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
899 directorio \sdirname{.hg/patches} en cualquier momento y ejecutar
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
900 \hgcmd{init}. No olvide añadir una entrada en el fichero
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
901 \sfilename{status} del fichero \sfilename{.hgignore}, a pesar de que
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
902 (\hgcmdargs{qinit}{\hgxopt{mq}{qinit}{-c}} hace estodo de forma
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
903 automática para usted); usted \emph{seguro} no quiere administrar el
621
4af39acbb3cf changed " ." to "." where needed
Javier Rojas <jerojasro@devnull.li>
parents: 619
diff changeset
904 fichero \sfilename{status}.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
905 \end{note}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
906
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
907 MQ nota convenientemente que el directorio \dirname{.hg/patches}
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
908 es un repositorio, hará \hgcmd{add} automáticamente a cada parche que
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
909 usted cree e importe.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
910
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
911 MQ provee una orden corta, \hgxcmd{mq}{qcommit}, que ejecuta
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
912 \hgcmd{commit} en el directorio \sdirname{.hg/patches}. Lo que ahorra
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
913 tecleo recurrente.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
914
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
915 Finalmente, para administrar convenientemente el directorio de
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
916 parches, puede definir el alias \command{mq} en sistemas Unix. Por
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
917 ejemplo, en sistemas Linux con el intérprete \command{bash}, puede
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
918 incluir el siguiente recorte de código\ndt{snippet} en su fichero
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
919 \tildefile{.bashrc}.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
920
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
921 \begin{codesample2}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
922 alias mq=`hg -R \$(hg root)/.hg/patches'
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
923 \end{codesample2}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
924
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
925 Puede aplicar las órdenes de la forma \cmdargs{mq}{pull} al
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
926 repositorio principal.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
927
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
928 \subsection{Detalles a tener en cuenta}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
929
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
930 El soporte de MQ para trabajar con un repositorio de parches es
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
931 limitado en ciertos aspectos:
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
932
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
933 MQ no puede detectar automáticamente los cambios que haga al
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
934 directorio de parches. Si aplica \hgcmd{pull}, edita manualmente, o
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
935 hace \hgcmd{update} a los parches o el fichero \sfilename{series},
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
936 tendrá que aplicar \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}} y después
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
937 \hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-a}} en el repositorio subyacente
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
938 para que los cambios se reflejen allí. Si olvida hacerlo, puede
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
939 confundir a MQ en cuanto a qué parches se han aplicado.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
940
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
941 \section{Otras herramientas para trabajar con parches}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
942 \label{sec:mq:tools}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
943
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
944 Cuando haya trabajado por cierto tiempo con parches, deseará
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
945 herramientas que le ayuden a entender y manipular los parches con los
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
946 que esté tratando.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
947
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
948 La orden \command{diffstat}~\cite{web:diffstat} genera un histograma
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
949 de modificaciones hechas a cada fichero en un parche. Provee una
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
950 interesante forma de ``dar un vistazo'' al parche---qué ficheros
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
951 afecta, y cuántos cambios introduce a cada fichero y en total. (Me ha
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
952 parecido interesante usar la opción \cmdopt{diffstat}{-p} de
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
953 \command{diffstat}, puesto que de otra forma intentará hacer cosas
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
954 inteligentes con prefijos de ficheros que terminan confundiéndome.)
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
955
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
956 \begin{figure}[ht]
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
957 \interaction{mq.tools.tools}
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
958 \caption{Las órdenes \command{diffstat}, \command{filterdiff}, y \command{lsdiff}}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
959 \label{ex:mq:tools}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
960 \end{figure}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
961
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
962 El paquete \package{patchutils}~\cite{web:patchutils} es
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
963 invaluable. Provee un conjunto de pequeñas utilidades que siguen la
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
964 ``filosofía Unix''; cada una hace una cosa muy bien hecha a un
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
965 parche. La orden \package{patchutils} que más uso es
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
966 \command{filterdiff}, que extrae subconjuntos de un fichero de
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
967 parche. Por ejemplo, dado un parche que modifica centenas de ficheros
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
968 en docenas de directorios, una única invocación de
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
969 \command{filterdiff} puede generear un parche más pequeño que
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
970 solamente toca aquellos ficheros con un patrón. Puede ver otro
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
971 ejemplo en la sección~\ref{mq-collab:tips:interdiff}.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
972
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
973 \section{Buenas prácticas de trabajo con parches}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
974
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
975 En caso de que esté trabajando en una serie de parches para enviar a
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
976 un proyecto de software libre o de fuentes abiertas, o en una serie
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
977 que desea tratar como un conjunto de cambios regular, cuando haya
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
978 terminado, puede usar técnicas sencillas para mantener su trabajo bien
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
979 organizado.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
980
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
981 De nombres descriptivos a sus parches. Un buen nombre para un parche
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
982 podría ser \filename{rework-device-alloc.patch}, porque da de forma
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
983 inmediata una pista del propósito del parche. Los nombres largos no
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
984 deben ser un problema; no los estará tecleando repetidamente, pero
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
985 \emph{estará} ejecutando regularmente órdenes como
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
986 \hgxcmd{mq}{qapplied} y \hgxcmd{mq}{qtop}. Los nombres adecuados son
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
987 especialmente importantes cuando tiene bastantes parches con los
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
988 cuales trabajar, o si está trabajando en diferentes tareas y sus
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
989 parches toman solamente una porción de su atención.
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
990
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
991 Tenga en cuenta en qué parche está trabajando. Use la orden \hgxcmd{mq}{qtop}
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
992 para dar un vistazo al texto de sus parches frecuentemente---por
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
993 ejemplo, use \hgcmdargs{tip}{\hgopt{tip}{-p}})---para asegurarse en
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
994 dónde está ubicado. En distintas oportunidades me sucedió que apliqué
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
995 \hgxcmd{mq}{qrefresh} a un parche distinto al que deseaba hacerlo, y
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
996 usualmente es complejo migrar los cambios al parche correcto después
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
997 de haberlo hecho mal.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
998
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
999 Por este motivo, vale la pena invertir ese poco tiempo para aprender
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1000 cómo usar otras herramientas que describí en la
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1001 sección~\ref{sec:mq:tools}, particularmente \command{diffstat} y
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1002 \command{filterdiff}. La primera le dará una idea de qué cambios está
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1003 haciendo su parche, mientras que la segunda permite seleccionar trozos
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1004 de un parche para colocarlos en otro.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1005
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1006 \section{Recetas de MQ}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1007
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1008 \subsection{Administrar parches ``triviales''}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1009
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1010 Puesto que colocar ficheros en un repositorio de Mercurial es tan
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1011 sencillo, tiene bastante sentido administrar parches de esta forma
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1012 incluso si desea hacer algunos cambios al paquete de ficheros que
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1013 descargó.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1014
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1015 Para comenzar a descargar y desempaqueter un paquete de ficheros, y
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1016 volverlo en un repositorio de Mercurial:
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1017 \interaction{mq.tarball.download}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1018
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1019 Continue creando una pila de parches y haga sus cambios.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1020 \interaction{mq.tarball.qinit}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1021
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1022 Digamos que pasan unas semanas o meses, y el autor del paquete libera
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1023 una nueva versión. Primero se traen sus cambios al repositorio.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1024 \interaction{mq.tarball.newsource}
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1025 La porción que comienza con \hgcmd{locate} mostrada más arriba, borra
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1026 todos los ficheros en el directorio de trabajo, así que la opción
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1027 \hgopt{commit}{--addremove} de \hgcmd{commit} puede indicar qué
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1028 ficheros se han eliminado en la nueva versión del árbol de fuentes.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1029
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1030 Finalmente, puede aplicar sus parches encima del nuevo árbol de fuentes
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1031 \interaction{mq.tarball.repush}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1032
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1033 \subsection{Combinar parches completos}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1034 \label{sec:mq:combine}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1035
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1036 MQ provee la orden \hgxcmd{mq}{qfold} que le permite combinar parches
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1037 enteros. Se ``integran''\ndt{fold} los parches que usted nombre, en
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1038 el orden que especifique, en el último parche aplicado, y concatena
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1039 sus descripciones al final de su descripción. Deberá sustraer los
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1040 cambios para poder integrarlos.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1041
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1042 El orden en el que integre los parches importa. Si el parche
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1043 últimamente aplicado es \texttt{foo}, e integra \hgxcmd{mq}{qfold} \texttt{bar} y
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1044 \texttt{quux} en él, terminará con un parche que tiene el mismo efecto
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1045 que si hubiera aplicado primero \texttt{foo}, y después \texttt{bar},
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1046 seguido de \texttt{quux}.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1047
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1048 \subsection{Fusionar una porción de un parche dentro de otro}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1049
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1050 Fusionar \emph{partes} de un parche dentro de otro es más complejo que
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1051 combinar completamente dos parches.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1052
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1053 Si desea mover cambios de ficheros completos, puede usar las opciones
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1054 \command{filterdiff}'s \cmdopt{filterdiff}{-i} y
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1055 \cmdopt{filterdiff}{-x} para elegir las modificaciones remover de un
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1056 parche, concatenar su salida al final del parche donde desea
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1057 fusionarlo. Usualmente no necesitará modificar el parche del cuál ha
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1058 fusionado los cambios. En cambio, MQ reportará que hay unos trozos
579
4e2ebef2c9a4 corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 548
diff changeset
1059 que se han desechado cuando usted aplique \hgxcmd{mq}{qpush} (de los
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1060 trozos que haya movido al otro parche), y puede sencillamente aplicar
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1061 \hgxcmd{mq}{qrefresh} para eliminar los trozos replicados.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1062
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1063 Si tiene un parche que tiene varios trozos que modifican un fichero, y
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1064 desea mover solamente unos de ellos, el trabajo es un poco más
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1065 enredado, pero puede automatizarlo parcialmente. Use
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1066 \cmdargs{lsdiff}{-nvv} para imprimir algunos metadatos del parche.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1067 \interaction{mq.tools.lsdiff}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1068
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1069 Esta orden imprime tres clases diferentes de números:
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1070 \begin{itemize}
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1071 \item (en la primera columna) un \emph{número de fichero} para
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1072 identificar cada fichero modificado en el parche;
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1073 \item (En la siguiente línea, indentado) el número de línea dentro de
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1074 un fichero modificado donde comienza el trozo; y
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1075 \item (en la misma línea) un \emph{número de trozo} que identifica el
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1076 trozo.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1077 \end{itemize}
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1078
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1079 Tendrá que hacer una inspección visual, y leer el parche para
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1080 identificar los números de fichero y trozo que desea, pero puede pasar
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1081 posteriormente a las opciones \cmdopt{filterdiff}{--files} y
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1082 \cmdopt{filterdiff}{--hunks} de \command{filterdiff}, para seleccionar
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1083 exactamente el fichero y el trozo que desea extraer.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1084
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1085 Cuando tenga el trozo, puede concatenarlo al final de su parche
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1086 objetivo y continuar como en la sección~\ref{sec:mq:combine}.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1087
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1088 \section{Diferencias entre quilt y MQ}
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1089
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1090 Si le es familiar quilt, MQ provee un conjunto similar de órdenes. Hay
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1091 algunas diferencias en cómo funcionan.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1092
548
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1093 Debe haber notado que la mayoría de comandos de quilt tienen su
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1094 contraparte en MQ, que simplemente comienzan con ``\texttt{q}''. Las
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1095 excepciones son las órdenes \texttt{add} y \texttt{remove} de quilt,
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1096 que realmente son las órdenes \hgcmd{add} y \hgcmd{remove} de
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1097 Mercurial. No hay un equivalente en MQ para la orden
9b3cc9f398f9 Finished MQ chapter translation
Igor TAmara <igor@tamarapatino.org>
parents: 547
diff changeset
1098 \texttt{edit} de quilt.
435
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1099
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1100 %%% Local Variables:
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1101 %%% mode: latex
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1102 %%% TeX-master: "00book"
7e52f0cc4516 changed es/hgext.tex
jerojasro@localhost
parents: 432
diff changeset
1103 %%% End: