annotate es/branch.tex @ 618:a529952fce96

changed "un tag" to "una etiqueta". Same thing for "unos tags" "un tag" "el tag" "los tags" "de tag" "de tags"
author Javier Rojas <jerojasro@devnull.li>
date Sun, 18 Jan 2009 22:21:43 -0500
parents 4bfe08b3c3e4
children bbc5db74bd77
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
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
5 Mercurial ofrece varios mecanismos que le permitirán administrar un
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
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
17 las etapas del proyecto como las liberaciones de una
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
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
19 diferentes fases de un proyecto, y como puede ayudar Mercurial a
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
20 independizar y administrar tal trabajo.
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
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
24 Cuando se decide a 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
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
51 Puede usar la orden \hgcmd{tags} para observar 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
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
53 primero con su nombre, después el número de revisión y finalmente con
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}
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
56 Note que \texttt{tip} aparece en la lista de \hgcmd{tags}. la etiqueta
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
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
58 la revisión más nueva en el repositorio.
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
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
61 inverso, por número de revisión. Lo que significa usualmente que las etiquetas más recientes se listan antes que las más antiguas. También
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
62 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
63 etiqueta listada al desplegar la orden \hgcmd{tags}.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
64
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
65 Cuando ejecuta \hgcmd{log}, se desplegará la revisión que tenga las etiquetas asociados a ella, se imprimirán tales etiquetas.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
66 \interaction{tag.log}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
67
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
68 Siempre que requiera indicar un ~ID de revisión a una orden de
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
69 Mercurial, aceptará un nombre de etiqueta en su lugar. Internamente,
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
70 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
71 correspondiente, y lo usará.
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
72 \interaction{tag.log.v1.0}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
73
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
74 No hay límites en la cantidad de etiquetas por reposirorio, o la cantidad
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
75 de etiquetas que una misma revisión pueda tener. Siendo prácticos, no es
429
8bedea2b8d60 continuing translating branches
Igor TAmara <igor@tamarapatino.org>
parents: 423
diff changeset
76 muy buena idea tener ``demasiados'' (la cantidad variará de un
8bedea2b8d60 continuing translating branches
Igor TAmara <igor@tamarapatino.org>
parents: 423
diff changeset
77 proyecto a otro), debido a que la intención es ayudarle a encontrar
8bedea2b8d60 continuing translating branches
Igor TAmara <igor@tamarapatino.org>
parents: 423
diff changeset
78 revisiones. Si tiene demasiados tags, la facilidad para identificar
8bedea2b8d60 continuing translating branches
Igor TAmara <igor@tamarapatino.org>
parents: 423
diff changeset
79 revisiones disminuirá rápidamente.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
80
429
8bedea2b8d60 continuing translating branches
Igor TAmara <igor@tamarapatino.org>
parents: 423
diff changeset
81 Por ejemplo, si su proyecto tiene etapas(milestones) frecuentes en pocos
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
82 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
83 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
84 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
85 introduciendo mucho ruido si se usara una etiqueta para cada generación
429
8bedea2b8d60 continuing translating branches
Igor TAmara <igor@tamarapatino.org>
parents: 423
diff changeset
86 exitosa. Más bien, podría usar tags para generaciones fallidas (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
87 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
88 llevar cuenta de la posibilidad de generación de binarios.
8bedea2b8d60 continuing translating branches
Igor TAmara <igor@tamarapatino.org>
parents: 423
diff changeset
89
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
90
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
91 Si desea eliminar una etiqueta que no desea, use
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
92 \hgcmdargs{tag}{--remove}.
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
93 \interaction{tag.remove}
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
94 También puede modificar una etiqueta en cualquier momento para que
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
95 identifique una revisión distinta, basta con aplicar una nueva orden
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
96 \hgcmd{tag}. Deberá usar la opción \hgopt{tag}{-f} para indicarle a
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
97 Mercurial que desea actualizar la etiqueta \emph{en serio}.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
98 \interaction{tag.replace}
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
99 De todas maneras habrá un registro permanente de la antigua identidad
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
100 del tag, pero Mercurial no la usará. Por lo tanto no hay castigo al
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
101 marcar con una etiqueta una revisión incorrecta; lo único que debe hacer es
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
102 mover la etiqueta hacia la revisión correcta tan pronto como localice el
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
103 error.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
104
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
105 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
106 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
107 llamado \sfilename{.hgtags}. Cuando invoca la orden \hgcmd{tag},
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
108 Mercurial modifica este fichero, y automáticamente hace consignación del
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
109 cambio al mismo. Esto significa que cada vez que ejecuta \hgcmd{tag},
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
110 verá el conjunto de cambios correspondiente en la salida de \hgcmd{log}.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
111 \interaction{tag.tip}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
112
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
113 \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
114
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
115 Es usual no tener que preocuparse por el fichero \sfilename{.hgtags},
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
116 pero aveces 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
117 fichero es sencillo: Consiste de una serie de líneas. Cada línea
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
118 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
119 seguido por el nombre de una etiqueta.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
120
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
121 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
122 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
123 el fichero \sfilename{.hgtags}:
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
124 cuando Mercurial parsea las etiquetas en el repositorio \emph{nunca}
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
125 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
126 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
127
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
128 Una consecuencia desafortunada de este diseño es que usted no puede
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
129 verificar que su fichero \sfilename{.hgtags} fusionado es correcto hasta
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
130 \emph{después} de haber consignado(hecho commit). Así que si se
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
131 encuentra resolviendo un conflicto en \sfilename{.hgtags} durante una
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
132 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
133 consignar. Si encuentra un error en el fichero \sfilename{.hgtags},
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
134 reportará el lugar del error, que podrá arreglar y después
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
135 consignar. Posteriormente ejecute de nuevo la orden \hgcmd{tags} para
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
136 asegurar que su arreglo fue correctamente aplicado.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
137
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
138 \subsection{Tags y clonado}
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
139
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
140 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
141 \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
142 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
143 tendrá historial posterior a la revisión que usted haya
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
144 especificado. Esta forma de interactuar puede sorprender a los
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
145 desprevenidos.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
146
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
147 Recuerde que una etiqueta se almacena como una revisión al fichero
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
148 \sfilename{.hgtags}, consecuente con esto, cuando crea una etiqueta, el
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
149 conjunto de cambios en el cual este se almacena necesariamente se
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
150 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
151 \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
152 \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
153 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
154 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
155 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
156
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
157 \subsection{Cuando las etiquetas permanentes son demasiado}
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
158
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
159 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
160 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
161 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
162 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
163 revisión \texttt{4237e45506ee} es realmente \texttt{v2.0.2}. Si está
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
164 tratando de encontrar un bug sutil, posiblemente desearía colocar una
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
165 etiqueta recordándole algo como ``Ana vio los síntomas con esta revisión''.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
166
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
167 Para estos casos, lo que posiblemente desearía serían tags
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
168 \emph{locales}. Puede crear una etiqueta local con la opción \hgopt{tag}{-l}
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
169 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
170 \sfilename{.hg/localtags}. A diferencia de \sfilename{.hgtags},
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
171 \sfilename{.hg/localtags} no está controlado por revisiones.
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
172 Cualquier tag que usted cree usando \hgopt{tag}{-l} se mantendrá
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
173 localmente en el repositorio en el que esté trabajando en ese momento.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
174
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
175 \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
176
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
177 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
178 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
179 en desarrollo al mismo tiempo.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
180
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
181 Puede haber prisa por una nueva versión ``principal''; Un nueva
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
182 versión con un rreglo de fallo a la última versión; y una versión de
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
183 ``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
184 modo de mantenimiento.
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
185
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
186 Usualmente la gente se refiere a esas direcciones
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
187 concurrentes de desarrollo es como ``ramas''. Aunque hemos visto que
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
188 en variadas ocasiones Mercurial trata a \emph{toda el historial} como
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
189 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
190 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
191 un nombre.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
192 \begin{itemize}
430
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
193 \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
194 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
195 ellas en sus conversaciones.
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
196 \item ``El cuadro pequeño'' Las ramas son artefactos de las
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
197 actividades diarias de al desarrollar y fusionar cambios. Exponen la
3502b859cfe4 Minor advance on branches chapter
Igor TAmara <igor@tamarapatino.org>
parents: 429
diff changeset
198 narrativa de cómo se desarrolló el código.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
199 \end{itemize}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
200
436
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
201 \section{Administrar ramas en repositorios estilo gran cuadro}
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
202
436
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
203 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
204 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
205 repositorio compartido existente ---llamémoslo
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
206 \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
207 prepararse para versiones de mantenimiento futuras a partir de la
618
a529952fce96 changed "un tag" to "una etiqueta". Same thing for
Javier Rojas <jerojasro@devnull.li>
parents: 617
diff changeset
208 versión~1.0 marcando con una etiqueta en 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
209 \interaction{branch-repo.tag}
436
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
210 Ahora puede clonar un repositorio compartido nuevo
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
211 \texttt{myproject-1.0.1} con tal tag.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
212 \interaction{branch-repo.clone}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
213
436
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
214 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
215 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
216 camino, ellos clonarían el repositorio \texttt{myproject-1.0.1},
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
217 harían sus cambios y los publicarían(con push).
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
218 \interaction{branch-repo.bugfix}
436
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
219 Mientras tanto, el desarrollo para la siguiente versión mayor puede
0aa96b0ffb65 Spanish version able to generate pdf and html
Igor TAmara <igor@tamarapatino.org>
parents: 430
diff changeset
220 continuar asilada e incólume, en el repositorio \texttt{myproject}.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
221 \interaction{branch-repo.new}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
222
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
223 \section{No repita trabajo: fusión entre ramas}
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
224
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
225 En muchos casos, cuando tiene un fallo para arreglar en una rama de
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
226 mantenimiento, es muy probable que el fallo esté también en la rama
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
227 principal( y posiblemente en otras ramas de mantenimiento
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
228 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
229 mismo fallo muchas veces, por tanto, veremos varias alternativas con
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
230 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
231 sin duplicar su trabajo.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
232
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
233 En el caso más sencillo, basta con jalar los cambios de la rama de
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
234 mantenimiento a la rama obetivo en su clon local.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
235 \interaction{branch-repo.pull}
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
236 A continuación deberá mezclar las cabezas de las dos ramas, y publicar
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
237 de nuevo a la rama principal.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
238 \interaction{branch-repo.merge}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
239
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
240 \section{Nombrar ramas dentro de un repositorio}
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
241
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
242 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
243 ramas en los repositorios. Es fácil de entender gracias a su
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
244 facilidad; y es difícil cometer errores. Hay una relación uno a uno
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
245 entre las ramas y los directorios con los que está trabajando en su
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
246 sistema. Esto le permite usar emplear herramientas usuales(para los
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
247 nuevos a Mercurial) para trabajar con los ficheros dentro de su
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
248 rama/repositorio.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
249
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
250 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
251 colaboradores también), puede considerar otra alternativa para
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
252 administrar las ramas. He mencionador con anterioridad la distinción a
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
253 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
254 cuadro''. Mientras que Mercurial trabaja con muchas ramas del estilo
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
255 ``cuadro pequeño'' en el repositorio todo el tiempo(por ejemplo cuando
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
256 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
257 trabajar con varias ramas del ``cuadro grande''.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
258
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
259 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
260 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
261 existe una rama llamada \texttt{default}. Incluso antes de que
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
262 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
263 rama \texttt{default} si los busca.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
264
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
265 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
266 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
267 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
268 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
269 \texttt{default}.
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
270
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
271 Use la orden \hgcmd{branches} para comenzar a trabajar con ramas
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
272 nombradas. Esta orden mostrará las ramas presentes en su repositorio,
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
273 indicándole en qué conjunto de cambios está cada una.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
274 \interaction{branch-named.branches}
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
275 Dado que todavía no ha creado ramas nombradas, la única que verá sería
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
276 \texttt{default}.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
277
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
278 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
279 \hgcmd{branch}, sin argumento alguno. Le informará en qué rama se
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
280 encuentra el padre del conjunto actual de cambios.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
281 \interaction{branch-named.branch}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
282
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
283 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
284 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
285 que desea crear.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
286 \interaction{branch-named.create}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
287
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
288 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
289 la orden \hgcmd{branch}. ¿Qué reportan las ordenes \hgcmd{status} y
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
290 \hgcmd{tip} commands report?
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
291 \interaction{branch-named.status}
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 614
diff changeset
292 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
293 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
294 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
295 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
296
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
297 Cuando consigna un cambio, Mercurial alamacena el nombre de la rama en
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
298 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
299 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
300 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
301 desplieguen la misma clase de información.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
302 \interaction{branch-named.commit}
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
303 Las órdenes del tipo \hgcmd{log} imprimirán el nombre de la rama de
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
304 cualquier conjunto de cambios que no estén en la rama
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
305 \texttt{default}. Como resultado, si nunca usa ramas nombradas, nunca
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
306 verá esta información.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
307
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
308 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
309 nombre, todas las consignaciones subsecuentes que desciendan de ese
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
310 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
311 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
312 \interaction{branch-named.rebranch}
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
313 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
314 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
315 regla, solamente una observación.)
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
316
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
317 \section{Tratamiento de varias ramas nombradas en un repositorio}
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
318
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
319 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
320 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
321 invoque una orden como \hgcmd{update} o \hgcmdargs{pull}{-u}. Se
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
322 actualizará su directorio de trabajo actual al tip de esta rama, sin
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
323 importar cuál sea el tip ``a lo largo del repositorio'' . Para
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
324 actualiar a una revisión que está en una rama con distinto nombre,
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
325 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
326
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
327 Este comportamiento puede ser sutil, veámoslo en acción. Primero,
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
328 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
329 nuestro repositorio.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
330 \interaction{branch-named.parents}
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
331 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
332 llamada \hgcmd{foo}.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
333
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
334 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
335 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
336 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
337 atrás en nuestro historial de cambios.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
338 \interaction{branch-named.update-switchy}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
339
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
340 Si volvemos a la rama \texttt{foo} e invocamos la orden \hgcmd{update},
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
341 nos mantendrá en \texttt{foo}, sin movernos al tipo de \texttt{bar}.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
342 \interaction{branch-named.update-nothing}
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 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
345 cabeza.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
346 \interaction{branch-named.foo-commit}
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 \section{Nombres de ramas y fusiones}
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
349
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
350 Posiblemente ha notado que las fusiones en Mercurial no son simétricas.
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
351 Supongamos que su repositorio tiene dos cabezas, 17 and 23. Si yo invoco
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
352 \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
353 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
354 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
355 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
356
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
357 Esto afecta com elige Mercurial el nombre de la rama cuando hace
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
358 fusión. Después de una fusión Mercurial mantendrá el nombre de la
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
359 rama del primer padre cuando consigne el resultado de una fusión. Si
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
360 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
361 \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
362 después de fusionar.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
363
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
364 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
365 el mismo nombre de rama. Digamos que estoy trabajando en la rama
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
366 \texttt{foo}, y usted también. Consignamos cambios distintos; Yo jalo
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
367 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
368 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
369 en la rama \texttt{foo} como usted esperaría.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
370
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
371 Pero si estoy trabajando en la rama \texttt{bar}, y fusiono el trabajo
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
372 desde la rama \texttt{foo}, el resultado permanecerá en la rama
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
373 \texttt{bar}.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
374 \interaction{branch-named.merge}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
375
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
376 En un ejemplo más concreo, si yo estoy trabajando en la rama
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
377 \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
378 rama \texttt{estable}, Mercurial elegirá el nombre de rama ``correcto''
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
379 (\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
380
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
381 \section{Normalmente es útil nombrar ramas}
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
382
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
383 No debería considerar que las ramas nombradas son aplicables
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
384 únicamente en situaciones con muchas ramas de larga-vida cohabitando
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
385 en un mismo repositorio. Son muy útiles incluso en los casos de
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
386 una-rama-por-repositorio.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
387
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
388 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
389 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
390 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
391 historial de un proyecto ramificado de larga vida.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
392
441
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
393 Si está trabajando con repositorios compartidos, puede configurar el gancho
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
394 \hook{pretxnchangegroup} para que cada uno bloquee los cambios con
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
395 nombres de rama ``incorrectos'' que están por adicionarse. Este
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
396 provee una defensa sencilla pero efectiva para evitar que la gente
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
397 accidentalmente publique cambios de una rama ``super nueva'' a la rama
6e427210bfe0 branches chapter translation finished
Igor TAmara <igor@tamarapatino.org>
parents: 436
diff changeset
398 ``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
399 un repositorio compartido de \hgrc.
423
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
400 \begin{codesample2}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
401 [hooks]
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
402 pretxnchangegroup.branch = hg heads --template '{branches} ' | grep mybranch
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
403 \end{codesample2}
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
404
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
405 %%% Local Variables:
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
406 %%% mode: latex
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
407 %%% TeX-master: "00book"
1afa6cce993d Starting to translate branch chapter
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
408 %%% End: