annotate es/branch.tex @ 825:d7d09cda83d2

Add paragraph IDs
author Bryan O'Sullivan <bos@serpentine.com>
date Sun, 03 May 2009 19:23:31 -0700
parents 22af452c6c59
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
614
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
1 %% vim: tw=70 encoding=utf8
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
2 \chapter{Administración de versiones y desarrollo ramificado}
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
3 \label{chap:branch}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
4
630
d2b1369e58d0 passed the file through spell check
Javier Rojas <jerojasro@devnull.li>
parents: 624
diff changeset
5 Mercurial ofrece varios mecanismos que le permiten administrar un
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
6 proyecto que avanza en múltiples frentes simultáneamente. Para
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
7 entender estos mecanismos, demos un vistazo a la estructura usual de
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
8 un proyecto de software.
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
9
614
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
10 Muchos proyectos de software liberan una versión ``mayor'' que contiene
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
11 nuevas características substanciales. En paralelo, pueden liberar
614
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
12 versiones ``menores''. Usualmente éstas son idénticas a las
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
13 versiones mayores en las cuales están basadas, pero con arreglos para
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
14 algunos fallos.
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
15
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
16 En este capítulo, comenzaremos hablando de cómo mantener registro de
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
17 etapas del proyecto como las liberaciones de una
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
18 versión. Continuaremos hablando del flujo de trabajo entre las
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
19 diferentes fases de un proyecto, y cómo puede ayudar Mercurial a
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
20 aislar y administrar tal trabajo.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
21
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
22 \section{Dar un nombre persistente a una revisión}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
23
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
24 Cuando usted decide otorgar a una revisión el nombre particular de una
614
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
25 ``versión'', es buena idea grabar la identidad de tal revisión.
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
26 Esto le permitirá reproducir dicha versión en una fecha posterior,
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
27 para cualquiera que sea el
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
28 propósito que se tenga en ese momento (reproducir un fallo, portar
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
29 a una nueva plataforma, etc).
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
30 \interaction{tag.init}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
31
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
32 Mercurial le permite dar un nombre permanente a cualquier revisión
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
33 usando la orden \hgcmd{tag}. Sin causa de sorpresa, esos nombres se llaman
614
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
34 ``tags'' (etiquetas).
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
35 \interaction{tag.tag}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
36
614
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
37 Una etiqueta no es más que un ``nombre simbólico'' para una revisión. Las
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
38 etiquetas existen únicamente para su conveniencia, brindándole una forma
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
39 permanente y sencilla de referirse a una revisión; Mercurial no
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
40 interpreta de ninguna manera los nombres de las etiquetas que usted use.
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
41 Mercurial tampoco impone restricción alguna al nombre de una etiqueta, más
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
42 allá de lo necesario para asegurar que una etiqueta pueda procesarse sin
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
43 ambigüedades. El nombre de una etiqueta no puede tener ninguno de los
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
44 siguientes caracteres:
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
45 \begin{itemize}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
46 \item Dos puntos (ASCII 58, ``\texttt{:}'')
614
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
47 \item Retorno de carro (return) (ASCII 13, ``\Verb+\r+'')
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
48 \item Nueva línea (ASCII 10, ``\Verb+\n+'')
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
49 \end{itemize}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
50
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
51 Puede usar la orden \hgcmd{tags} para ver las etiquetas presentes en
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
52 su repositorio. Al desplegarse, cada revisión marcada se identifica
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
53 primero con su nombre, después con el número de revisión y finalmente con
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
54 un hash único de la revisión.
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
55 \interaction{tag.tags}
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
56 Note que \texttt{tip} aparece en en listado generado por \hgcmd{tags}. La etiqueta
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
57 \texttt{tip} es una etiqueta ``flotante'' especial, que identifica siempre
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
58 la revisión más reciente en el repositorio.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
59
614
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
60 Al desplegar la orden \hgcmd{tags}, las etiquetas se listan en orden
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
61 inverso, por número de revisión. Lo que significa usualmente que las
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
62 etiquetas más recientes se listan antes que las más antiguas. También
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
63 significa que la etiqueta \texttt{tip} siempre aparecerá como primera
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
64 etiqueta listada al desplegar la orden \hgcmd{tags}.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
65
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
66 Cuando usted ejecuta \hgcmd{log}, si se muestra una revisión que tenga
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
67 etiquetas asociadas a ella, se imprimirán tales etiquetas.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
68 \interaction{tag.log}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
69
630
d2b1369e58d0 passed the file through spell check
Javier Rojas <jerojasro@devnull.li>
parents: 624
diff changeset
70 Siempre que requiera indicar un~ID de revisión a una orden de
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
71 Mercurial, aceptará un nombre de etiqueta en su lugar. Internamente,
630
d2b1369e58d0 passed the file through spell check
Javier Rojas <jerojasro@devnull.li>
parents: 624
diff changeset
72 Mercurial traducirá su nombre de etiqueta en el~ID de revisión
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
73 correspondiente, y lo usará.
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
74 \interaction{tag.log.v1.0}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
75
630
d2b1369e58d0 passed the file through spell check
Javier Rojas <jerojasro@devnull.li>
parents: 624
diff changeset
76 No hay límites en la cantidad de etiquetas por repositorio, o la cantidad
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
77 de etiquetas que una misma revisión pueda tener. Siendo prácticos, no es
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
78 muy buena idea tener ``demasiadas'' (la cantidad variará de un
429
8bedea2b8d60 continuing translating branches
Igor TAmara <igor@tamarapatino.org>
parents: 423
diff changeset
79 proyecto a otro), debido a que la intención es ayudarle a encontrar
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
80 revisiones. Si tiene demasiadas etiquetas, la facilidad de usarlas
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
81 para identificar revisiones disminuirá rápidamente.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
82
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
83 Por ejemplo, si su proyecto tiene etapas (milestones) frecuentes, de pocos
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
84 días, es perfectamente razonable asignarle una etiqueta a cada una de
429
8bedea2b8d60 continuing translating branches
Igor TAmara <igor@tamarapatino.org>
parents: 423
diff changeset
85 ellas. Pero si tiene un sistema de construcción automática de binarios
8bedea2b8d60 continuing translating branches
Igor TAmara <igor@tamarapatino.org>
parents: 423
diff changeset
86 que asegura que cada revisión puede generarse limpiamente, estaría
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
87 introduciendo mucho ruido si se usara una etiqueta para cada generación
632
871a245975e4 finished initial revision. On to proofreading
Javier Rojas <jerojasro@devnull.li>
parents: 631
diff changeset
88 exitosa. Más bien, podría usar tags para generaciones fallidas
871a245975e4 finished initial revision. On to proofreading
Javier Rojas <jerojasro@devnull.li>
parents: 631
diff changeset
89 (\textexclamdown en
614
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
90 caso de que estas sean raras!), o simplemente evitar las etiquetas para
429
8bedea2b8d60 continuing translating branches
Igor TAmara <igor@tamarapatino.org>
parents: 423
diff changeset
91 llevar cuenta de la posibilidad de generación de binarios.
8bedea2b8d60 continuing translating branches
Igor TAmara <igor@tamarapatino.org>
parents: 423
diff changeset
92
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
93
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
94 Si quiere eliminar una etiqueta que no desea, use
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
95 \hgcmdargs{tag}{--remove}.
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
96 \interaction{tag.remove}
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
97 También puede modificar una etiqueta en cualquier momento, para que
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
98 identifique una revisión distinta, simplemente usando una nueva orden
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
99 \hgcmd{tag}. Deberá usar la opción \hgopt{tag}{-f} para indicarle a
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
100 Mercurial que \emph{realmente} desea actualizar la etiqueta.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
101 \interaction{tag.replace}
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
102 De todas maneras habrá un registro permanente de la antigua identidad
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
103 de la etiqueta, pero Mercurial no la usará. Por lo tanto no hay
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
104 problema al marcar con una etiqueta una revisión incorrecta; lo único
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
105 que debe hacer es mover la etiqueta hacia la revisión correcta tan
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
106 pronto como localice el error.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
107
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
108 Mercurial almacena las etiquetas en un fichero controlado por revisiones en
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
109 su repositorio. Si ha creado etiquetas, las encontrará en un fichero
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
110 llamado \sfilename{.hgtags}. Cuando invoca la orden \hgcmd{tag},
632
871a245975e4 finished initial revision. On to proofreading
Javier Rojas <jerojasro@devnull.li>
parents: 631
diff changeset
111 Mercurial modifica este fichero, y hace la consignación del cambio al
871a245975e4 finished initial revision. On to proofreading
Javier Rojas <jerojasro@devnull.li>
parents: 631
diff changeset
112 mismo automáticamente. Esto significa que cada vez que ejecuta
871a245975e4 finished initial revision. On to proofreading
Javier Rojas <jerojasro@devnull.li>
parents: 631
diff changeset
113 \hgcmd{tag}, verá un conjunto de cambios correspondiente en la salida
871a245975e4 finished initial revision. On to proofreading
Javier Rojas <jerojasro@devnull.li>
parents: 631
diff changeset
114 de \hgcmd{log}.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
115 \interaction{tag.tip}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
116
614
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
117 \subsection{Manejo de conflictos entre etiquetas durante una fusión}
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
118
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
119 Usualmente no tendrá que preocuparse por el fichero \sfilename{.hgtags},
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
120 pero a veces hace su aparición durante una fusión. El formato del
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
121 fichero es sencillo: Consiste de una serie de líneas. Cada línea
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
122 comienza con un hash de conjunto de cambios, seguido por un espacio,
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
123 seguido por el nombre de una etiqueta.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
124
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
125 Si está resolviendo un conflicto en el fichero \sfilename{.hgtags}
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
126 durante una fusión, hay un detalle para tener en cuenta al modificar
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
127 el fichero \sfilename{.hgtags}:
632
871a245975e4 finished initial revision. On to proofreading
Javier Rojas <jerojasro@devnull.li>
parents: 631
diff changeset
128 cuando Mercurial procesa las etiquetas en el repositorio, \emph{nunca}
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
129 lee la copia de trabajo del fichero \sfilename{.hgtags}. En cambio,
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
130 lee la versión \emph{consignada más reciente} del fichero.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
131
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
132 Una consecuencia desafortunada de este diseño es que usted no puede
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
133 verificar que su fichero \sfilename{.hgtags} fusionado sea correcto hasta
630
d2b1369e58d0 passed the file through spell check
Javier Rojas <jerojasro@devnull.li>
parents: 624
diff changeset
134 \emph{después} de haber consignado un cambio. Así que si se
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
135 encuentra resolviendo un conflicto en \sfilename{.hgtags} durante una
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
136 fusión, asegúrese de ejecutar la orden \hgcmd{tags} después de
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
137 consignar. Si encuentra un error en el fichero \sfilename{.hgtags},
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
138 la orden reportará el lugar del error, que podrá arreglar y después
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
139 consignar. Posteriormente ejecute de nuevo la orden \hgcmd{tags} para
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
140 asegurarse de que su arreglo fue aplicado correctamente .
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
141
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
142 \subsection{Etiquetas y clonado}
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
143
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
144 Puede haber notado que la orden \hgcmd{clone} tiene la opción
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
145 \hgopt{clone}{-r} que le permite clonar una copia exacta del
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
146 repositorio hasta un conjunto de cambios específico. El nuevo clon no
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
147 tendrá historial posterior a la revisión que usted haya
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
148 especificado. Esto tiene una interacción con etiquetas que puede
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
149 sorprender a los desprevenidos.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
150
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
151 Recuerde que una etiqueta se almacena como una revisión al fichero
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
152 \sfilename{.hgtags}, así que cuando usted crea una etiqueta, el
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
153 conjunto de cambios en el cual ésta se almacena necesariamente se
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
154 refiere a un conjunto de cambios anterior. Cuando ejecuta
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
155 \hgcmdargs{clone}{-r foo} para clonar un repositorio hasta la etiqueta
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
156 \texttt{foo}, el nuevo clon \emph{no contendrá el historial que creo
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
157 la etiqueta} que usó para clonar el repositorio. El resultado es que tendrá
616
3f32047a3f25 changed all "de el" to "del"
Javier Rojas <jerojasro@devnull.li>
parents: 615
diff changeset
158 exactamente el subconjunto correcto del historial del proyecto en el
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
159 nuevo repositorio, pero, \emph{no} la etiqueta que podría haber esperado.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
160
614
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
161 \subsection{Cuando las etiquetas permanentes son demasiado}
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
162
614
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
163 Dado que las etiquetas de Mercurial están controladas por revisiones y se
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
164 llevan en el historial del proyecto, todas las personas involucradas
614
aa01d35ac59f replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
Javier Rojas <jerojasro@devnull.li>
parents: 441
diff changeset
165 verán las etiquetas que usted haya creado. El hecho de dar nombres a las
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
166 revisiones tiene usos más allá que simplemente hacer notar que la
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
167 revisión \texttt{4237e45506ee} es realmente \texttt{v2.0.2}. Si está
630
d2b1369e58d0 passed the file through spell check
Javier Rojas <jerojasro@devnull.li>
parents: 624
diff changeset
168 tratando de encontrar un fallo sutil, posiblemente desearía colocar una
632
871a245975e4 finished initial revision. On to proofreading
Javier Rojas <jerojasro@devnull.li>
parents: 631
diff changeset
169 etiqueta recordándole algo como ``Ana vio los síntomas en esta revisión''.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
170
633
22af452c6c59 finished revision of branch.tex. beginning revision of daily.tex
Javier Rojas <jerojasro@devnull.li>
parents: 632
diff changeset
171 Para estos casos, lo que usted posiblemente desearía serían etiquetas
22af452c6c59 finished revision of branch.tex. beginning revision of daily.tex
Javier Rojas <jerojasro@devnull.li>
parents: 632
diff changeset
172 \emph{locales}. Puede crear una etiqueta local con la opción~\hgopt{tag}{-l}
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
173 de la orden \hgcmd{tag}. Esto guardará la etiqueta en un fichero llamado
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
174 \sfilename{.hg/localtags}. A diferencia de \sfilename{.hgtags},
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
175 \sfilename{.hg/localtags} no está controlado por revisiones.
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
176 Cualquier etiqueta que usted cree usando \hgopt{tag}{-l} se mantendrá
633
22af452c6c59 finished revision of branch.tex. beginning revision of daily.tex
Javier Rojas <jerojasro@devnull.li>
parents: 632
diff changeset
177 local al repositorio en el que esté trabajando en ese momento.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
178
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
179 \section{El flujo de cambios---El gran cuadro vs. el pequeño}
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
180
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
181 Retomando lo mencionado en el comienzo de un capítulo, pensemos en el
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
182 hecho de que un proyecto tiene muchas piezas concurrentes de trabajo
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
183 en desarrollo al mismo tiempo.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
184
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
185 Puede haber prisa por una nueva versión ``principal''; una nueva
630
d2b1369e58d0 passed the file through spell check
Javier Rojas <jerojasro@devnull.li>
parents: 624
diff changeset
186 versión con un arreglo de fallo a la última versión; y una versión de
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
187 ``mantenimiento correctivo'' a una versión antigua que ha entrado en
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
188 modo de mantenimiento.
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
189
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
190 Usualmente la gente se refiere a esas direcciones
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
191 concurrentes de desarrollo como ``ramas''. Sin embargo, ya hemos visto que
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
192 en varias ocasiones Mercurial trata a \emph{todo el historial} como
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
193 una serie de ramas y fusiones. Realmente lo que tenemos aquí es dos
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
194 ideas que se relacionan periféricamente, pero que en esencia comparten
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
195 un nombre.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
196 \begin{itemize}
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
197 \item ``El gran cuadro'' Las ramas representan un barrido de la
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
198 evolución del proyecto; la gente les da nombres y hablan acerca de
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
199 ellas en sus conversaciones.
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
200 \item ``El cuadro pequeño'' Las ramas son artefactos de las
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
201 actividades diarias de desarrollar y fusionar cambios. Exponen la
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
202 narrativa de cómo se desarrolló el código.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
203 \end{itemize}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
204
436
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
205 \section{Administrar ramas en repositorios estilo gran cuadro}
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
206
436
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
207 En Mercurial la forma más sencilla de aislar una rama del ``gran
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
208 cuadro'' es a través de un repositorio dedicado. Si cuenta con un
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
209 repositorio compartido existente ---llamémoslo
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
210 \texttt{myproject}---que alcanzó la etapa ``1.0'', puede comenzar a
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
211 prepararse para versiones de mantenimiento futuras a partir de la
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
212 versión~1.0 marcando con una etiqueta la revisión con la cual preparó la versión~1.0.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
213 \interaction{branch-repo.tag}
436
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
214 Ahora puede clonar un repositorio compartido nuevo
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
215 \texttt{myproject-1.0.1} con tal etiqueta.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
216 \interaction{branch-repo.clone}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
217
436
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
218 Posteriormente, si alguien necesita trabajar en la reparación de un
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
219 fallo debería dirigirse a la liberación de versión~1.0.1 que viene en
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
220 camino, ellos clonarían el repositorio \texttt{myproject-1.0.1},
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
221 harían sus cambios y los empujarían de vuelta.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
222 \interaction{branch-repo.bugfix}
436
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
223 Mientras tanto, el desarrollo para la siguiente versión mayor puede
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
224 continuar aislado e incólume, en el repositorio \texttt{myproject}.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
225 \interaction{branch-repo.new}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
226
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
227 \section{No repita trabajo: fusión entre ramas}
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
228
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
229 En muchos casos, cuando tiene un fallo para arreglar en una rama de
633
22af452c6c59 finished revision of branch.tex. beginning revision of daily.tex
Javier Rojas <jerojasro@devnull.li>
parents: 632
diff changeset
230 mantenimiento, es muy probable que el fallo también esté en la rama
620
d833640150e2 corrected some more parentheses related typos
Javier Rojas <jerojasro@devnull.li>
parents: 619
diff changeset
231 principal (y posiblemente en otras ramas de mantenimiento
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
232 también). Solamente un desarrollador extraño desearía corregir el
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
233 mismo fallo muchas veces, por tanto, veremos varias alternativas con
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
234 las que Mercurial puede ayudarle a administrar tales arreglos de fallo
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
235 sin duplicar su trabajo.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
236
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
237 En el caso más sencillo, basta con jalar los cambios de la rama de
630
d2b1369e58d0 passed the file through spell check
Javier Rojas <jerojasro@devnull.li>
parents: 624
diff changeset
238 mantenimiento a la rama objetivo en su clon local.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
239 \interaction{branch-repo.pull}
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
240 A continuación deberá mezclar las cabezas de las dos ramas, y empujar
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
241 de nuevo a la rama principal.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
242 \interaction{branch-repo.merge}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
243
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
244 \section{Nombrar ramas dentro de un repositorio}
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
245
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
246 La aproximación correcta en casi todas las oportunidades es aislar las
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
247 ramas en los repositorios. Es fácil de entender gracias a su
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
248 simplicidad; y es difícil cometer errores. Hay una relación uno a uno
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
249 entre las ramas y los directorios con los que está trabajando en su
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
250 sistema. Esto le permite usar emplear herramientas usuales (que no son
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
251 conscientes de Mercurial) para trabajar con los ficheros dentro de una
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
252 rama/repositorio.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
253
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
254 Si se encuentra más en la categoría ``usuario diestro'' (\emph{y} sus
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
255 colaboradores también), puede considerar otra alternativa para
630
d2b1369e58d0 passed the file through spell check
Javier Rojas <jerojasro@devnull.li>
parents: 624
diff changeset
256 administrar las ramas. He mencionado con anterioridad la distinción a
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
257 nivel humano entre las ramas estilo ``cuadro pequeño'' y ``gran
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
258 cuadro''. Mientras que Mercurial trabaja con muchas ramas del estilo
619
bbc5db74bd77 changed many "X(" for "X ("
Javier Rojas <jerojasro@devnull.li>
parents: 618
diff changeset
259 ``cuadro pequeño'' en el repositorio todo el tiempo (por ejemplo cuando
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
260 usted jala cambios, pero antes de fusionarlos), \emph{también} puede
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
261 trabajar con varias ramas del ``cuadro grande''.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
262
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
263 El truco para trabajar de esta forma en Mercurial se logra gracias a
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
264 que puede asignar un \emph{nombre} persistente a una rama. Siempre
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
265 existe una rama llamada \texttt{default}. Incluso antes de que
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
266 empiece a nombrar ramas por su cuenta, puede encontrar indicios de la
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
267 rama \texttt{default} si los busca.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
268
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
269 Por ejemplo, cuando invoca la orden \hgcmd{commit}, y se lanza su
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
270 editor para introducir el mensaje de la consignación, busque la línea
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
271 que contiene el texto ``\texttt{HG: branch default}'' al final. Le
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
272 está indicando que su consignación ocurrirá en la rama llamada
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
273 \texttt{default}.
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
274
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
275 Use la orden \hgcmd{branches} para empezar a trabajar con ramas
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
276 nombradas. Esta orden mostrará las ramas presentes en su repositorio,
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
277 indicándole qué conjunto de cambios es la punta de cada una.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
278 \interaction{branch-named.branches}
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
279 Dado que todavía no ha creado ramas nombradas, la única que verá será
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
280 \texttt{default}.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
281
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
282 Para hallar cuál es la rama ``actual'', invoque la orden
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
283 \hgcmd{branch}, sin argumento alguno. Le informará en qué rama se
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
284 encuentra el padre del conjunto de cambios actual.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
285 \interaction{branch-named.branch}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
286
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
287 Para crear una nueva rama, invoque la orden \hgcmd{branch} de
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
288 nuevo. En esta oportunidad, ofrezca un argumento: el nombre de la rama
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
289 que desea crear.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
290 \interaction{branch-named.create}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
291
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
292 Después de crear la rama, usted podría desear ver el efecto que tuvo
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
293 la orden \hgcmd{branch}. ¿Qué reportan las ordenes \hgcmd{status} y
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
294 \hgcmd{tip}?
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
295 \interaction{branch-named.status}
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
296 Nada cambia en el directorio actual, y no se ha añadido nada al
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
297 historial. Esto sugiere que al ejecutar la orden \hgcmd{branch} no hay
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
298 un efecto permanente; solamente le indica a que nombre de rama usará
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
299 la \emph{próxima} vez que consigne un conjunto de cambios.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
300
630
d2b1369e58d0 passed the file through spell check
Javier Rojas <jerojasro@devnull.li>
parents: 624
diff changeset
301 Cuando consigna un cambio, Mercurial almacena el nombre de la rama en
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
302 la cual consignó. Una vez que haya cambiado de la rama \texttt{default}
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
303 y haya consignado, verá que el nombre de la nueva rama se mostrará
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
304 cuando use la orden \hgcmd{log}, \hgcmd{tip}, y otras órdenes que
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
305 desplieguen la misma clase de información.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
306 \interaction{branch-named.commit}
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
307 Las órdenes del tipo \hgcmd{log} imprimirán el nombre de la rama de
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
308 cualquier conjunto de cambios que no esté en la rama
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
309 \texttt{default}. Como resultado, si nunca usa ramas nombradas, nunca
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
310 verá esta información.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
311
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
312 Una vez que haya nombrado una rama y consignado un cambio con ese
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
313 nombre, todas las consignaciones subsecuentes que desciendan de ese
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
314 cambio heredarán el mismo nombre de rama. Puede cambiar el nombre de
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
315 una rama en cualquier momento con la orden \hgcmd{branch}.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
316 \interaction{branch-named.rebranch}
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
317 Esto es algo que no hará muy seguido en la práctica, debido que los
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
318 nombres de las ramas tienden a tener vidas largas. (Esto no es una
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
319 regla, solamente una observación.)
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
320
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
321 \section{Tratamiento de varias ramas nombradas en un repositorio}
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
322
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
323 Si tiene más de una rama nombrada en un repositorio, Mercurial
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
324 recordará la rama en la cual está su directorio de trabajo cuando
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
325 invoque una orden como \hgcmd{update} o \hgcmdargs{pull}{-u}. Se
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
326 actualizará su directorio de trabajo actual a la punta de esta rama, sin
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
327 importar cuál sea la punta ``a lo largo del repositorio''. Para
630
d2b1369e58d0 passed the file through spell check
Javier Rojas <jerojasro@devnull.li>
parents: 624
diff changeset
328 actualizar a una revisión que está en una rama con distinto nombre,
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
329 puede necesitar la opción \hgopt{update}{-C} de \hgcmd{update}.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
330
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
331 Este comportamiento puede ser sutil, así que veámoslo en acción. Primero,
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
332 recordemos en qué rama estamos trabajando, y qué ramas están en
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
333 nuestro repositorio.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
334 \interaction{branch-named.parents}
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
335 Estamos en la rama \texttt{bar}, pero existe otra rama más antigua
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
336 llamada \hgcmd{foo}.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
337
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
338 Podemos hacer \hgcmd{update} entre los tipos de las ramas \texttt{foo}
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
339 y \texttt{bar} sin necesidad de usar la opción \hgopt{update}{-C},
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
340 puesto que esto solamente implica ir linealmente hacia adelante y
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
341 atrás en nuestro historial de cambios.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
342 \interaction{branch-named.update-switchy}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
343
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
344 Si volvemos a la rama \texttt{foo} e invocamos la orden \hgcmd{update},
631
f7a2c5959d48 further revision
Javier Rojas <jerojasro@devnull.li>
parents: 630
diff changeset
345 nos mantendrá en \texttt{foo}, sin movernos a la punta de \texttt{bar}.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
346 \interaction{branch-named.update-nothing}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
347
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
348 Al consignar un cambio a la rama \texttt{foo} se introducirá una nueva
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
349 cabeza.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
350 \interaction{branch-named.foo-commit}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
351
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
352 \section{Nombres de ramas y fusiones}
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
353
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
354 Posiblemente ha notado que las fusiones en Mercurial no son simétricas.
630
d2b1369e58d0 passed the file through spell check
Javier Rojas <jerojasro@devnull.li>
parents: 624
diff changeset
355 Supongamos que su repositorio tiene dos cabezas, 17 y 23. Si yo invoco
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
356 \hgcmd{update} a 17 y aplico \hgcmd{merge} a 23, Mercurial almacena 17
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
357 como el primer padre de la fusión, y 23 como el segundo. Mientras que
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
358 si hago \hgcmd{update} a 23 y después aplico \hgcmd{merge} con 17,
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
359 grabará a 23 como el primer padre, y 17 como el segundo.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
360
632
871a245975e4 finished initial revision. On to proofreading
Javier Rojas <jerojasro@devnull.li>
parents: 631
diff changeset
361 Esto afecta el cómo elige Mercurial el nombre de la rama cuando usted
871a245975e4 finished initial revision. On to proofreading
Javier Rojas <jerojasro@devnull.li>
parents: 631
diff changeset
362 hace la fusión. Después de una fusión, Mercurial mantendrá el nombre de la
871a245975e4 finished initial revision. On to proofreading
Javier Rojas <jerojasro@devnull.li>
parents: 631
diff changeset
363 rama del primer padre cuando consigne el resultado de la fusión. Si
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
364 el primer nombre de su padre es \texttt{foo}, y fusiona con
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
365 \texttt{bar}, el nombre de la rama continuará siendo \texttt{foo}
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
366 después de fusionar.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
367
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
368 No es inusual que un repositorio contenga varias cabezas, cada una con
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
369 el mismo nombre de rama. Digamos que estoy trabajando en la rama
632
871a245975e4 finished initial revision. On to proofreading
Javier Rojas <jerojasro@devnull.li>
parents: 631
diff changeset
370 \texttt{foo}, y usted también. Consignamos cambios distintos; yo jalo
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
371 sus cambios; Ahora tengo dos cabezas, cada una afirmando estar en la
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
372 rama \texttt{foo}. El resultado de una fusión será una única cabeza
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
373 en la rama \texttt{foo} como usted esperaría.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
374
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
375 Pero si estoy trabajando en la rama \texttt{bar}, y fusiono el trabajo
632
871a245975e4 finished initial revision. On to proofreading
Javier Rojas <jerojasro@devnull.li>
parents: 631
diff changeset
376 de la rama \texttt{foo}, el resultado permanecerá en la rama
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
377 \texttt{bar}.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
378 \interaction{branch-named.merge}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
379
630
d2b1369e58d0 passed the file through spell check
Javier Rojas <jerojasro@devnull.li>
parents: 624
diff changeset
380 En un ejemplo más concreto, si yo estoy trabajando en la rama
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
381 \texttt{bleeding-edge}, y deseo traer los arreglos más recientes de la
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
382 rama \texttt{estable}, Mercurial elegirá el nombre de rama ``correcto''
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
383 (\texttt{bleeding-edge}) cuando yo jale una fusión desde \texttt{estable}.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
384
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
385 \section{Normalmente es útil nombrar ramas}
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
386
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
387 No debería considerar que las ramas nombradas son aplicables
632
871a245975e4 finished initial revision. On to proofreading
Javier Rojas <jerojasro@devnull.li>
parents: 631
diff changeset
388 únicamente en situaciones con muchas ramas de larga vida cohabitando
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
389 en un mismo repositorio. Son muy útiles incluso en los casos de
632
871a245975e4 finished initial revision. On to proofreading
Javier Rojas <jerojasro@devnull.li>
parents: 631
diff changeset
390 una rama por repositorio.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
391
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
392 En el caso más sencillo, dar un nombre a cada rama ofrece un registro
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
393 permanente acerca de en qué conjunto de cambios se generó la rama.
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
394 Esto le ofrece más contexto cuando esté tratando de seguir el
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
395 historial de un proyecto ramificado de larga vida.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
396
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
397 Si está trabajando con repositorios compartidos, puede configurar el gancho
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
398 \hook{pretxnchangegroup} para que cada uno bloquee los cambios con
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
399 nombres de rama ``incorrectos'' que están por adicionarse. Este
632
871a245975e4 finished initial revision. On to proofreading
Javier Rojas <jerojasro@devnull.li>
parents: 631
diff changeset
400 provee una defensa sencilla, pero efectiva, para evitar que la gente
871a245975e4 finished initial revision. On to proofreading
Javier Rojas <jerojasro@devnull.li>
parents: 631
diff changeset
401 publique accidentalmente cambios de una rama ``super nueva'' a la rama
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
402 ``estable''. Tal gancho podría verse de la siguiente forma dentro de
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
403 un repositorio compartido de \hgrc.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
404 \begin{codesample2}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
405 [hooks]
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
406 pretxnchangegroup.branch = hg heads --template '{branches} ' | grep mybranch
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
407 \end{codesample2}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
408
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
409 %%% Local Variables:
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
410 %%% mode: latex
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
411 %%% TeX-master: "00book"
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
412 %%% End: