hgbook
changeset 390:c3a867bba34a
modified definitions to allow optional arguments for the inclusion of images.
This needs to be tested for html generation.
translated up to section 2.2.1 ot tour-merge
This needs to be tested for html generation.
translated up to section 2.2.1 ot tour-merge
author | Javier Rojas <jerojasro@devnull.li> |
---|---|
date | Sun Nov 02 20:08:45 2008 -0500 (2008-11-02) |
parents | 0abd3d78172e |
children | 53b4a0d0052e |
files | es/99defs.tex es/tour-merge.tex |
line diff
1.1 --- a/es/99defs.tex Sun Nov 02 13:54:42 2008 -0500 1.2 +++ b/es/99defs.tex Sun Nov 02 20:08:45 2008 -0500 1.3 @@ -122,7 +122,7 @@ 1.4 1.5 % Graphics inclusion. 1.6 \ifpdf 1.7 - \newcommand{\grafix}[1]{\includegraphics{#1}} 1.8 + \newcommand{\grafix}[2][]{\includegraphics[#1]{#2}} 1.9 \else 1.10 \newcommand{\grafix}[1]{\includegraphics{#1.png}} 1.11 \fi
2.1 --- a/es/tour-merge.tex Sun Nov 02 13:54:42 2008 -0500 2.2 +++ b/es/tour-merge.tex Sun Nov 02 20:08:45 2008 -0500 2.3 @@ -105,98 +105,106 @@ 2.4 2.5 \subsection{Consignar los resultados de la fusión} 2.6 2.7 -Whenever we've done a merge, \hgcmd{parents} will display two parents 2.8 -until we \hgcmd{commit} the results of the merge. 2.9 +Siempre que hacemos una fusión, \hgcmd{parents} mostrará dos padres 2.10 +hasta que consignemos (\hgcmd{commit}) los resultados de la fusión. 2.11 \interaction{tour.merge.commit} 2.12 -We now have a new tip revision; notice that it has \emph{both} of 2.13 -our former heads as its parents. These are the same revisions that 2.14 -were previously displayed by \hgcmd{parents}. 2.15 +Ahora tenemos una nueva revisión de punta; note que tiene \emph{los 2.16 +dos} frentes anteriores como sus padres. Estos son las mismas 2.17 +revisiones que mostró previamente el comando \hgcmd{parents}. 2.18 \interaction{tour.merge.tip} 2.19 -In figure~\ref{fig:tour-merge:merge}, you can see a representation of 2.20 -what happens to the working directory during the merge, and how this 2.21 -affects the repository when the commit happens. During the merge, the 2.22 -working directory has two parent changesets, and these become the 2.23 -parents of the new changeset. 2.24 - 2.25 -\section{Merging conflicting changes} 2.26 - 2.27 -Most merges are simple affairs, but sometimes you'll find yourself 2.28 -merging changes where each modifies the same portions of the same 2.29 -files. Unless both modifications are identical, this results in a 2.30 -\emph{conflict}, where you have to decide how to reconcile the 2.31 -different changes into something coherent. 2.32 +En la figura~\ref{fig:tour-merge:merge} usted puede apreciar una 2.33 +representación de lo que pasa en el directorio de trabajo durante la 2.34 +fusión cuando se hace la consignación. Durante la fusión, el 2.35 +directorio de trabajo tiene dos conjuntos de cambios como sus padres, 2.36 +y éstos se vuelven los padres del nuevo conjunto de cambios. 2.37 + 2.38 +\section{Fusionar cambios con conflictos} 2.39 + 2.40 +La mayoría de las fusiones son algo simple, pero a veces usted se 2.41 +encontrará fusionando cambios donde más de uno de ellos afecta las 2.42 +mismas secciones de los mismos ficheros. A menos que ambas 2.43 +modificaciones sean idénticas, el resultado es un \emph{conflicto}, en 2.44 +donde usted debe decidir cómo reconciliar ambos cambios y producir un 2.45 +resultado coherente. 2.46 2.47 \begin{figure}[ht] 2.48 \centering 2.49 \grafix{tour-merge-conflict} 2.50 - \caption{Conflicting changes to a document} 2.51 + \caption{Cambios con conflictos a un documento} 2.52 \label{fig:tour-merge:conflict} 2.53 \end{figure} 2.54 2.55 -Figure~\ref{fig:tour-merge:conflict} illustrates an instance of two 2.56 -conflicting changes to a document. We started with a single version 2.57 -of the file; then we made some changes; while someone else made 2.58 -different changes to the same text. Our task in resolving the 2.59 -conflicting changes is to decide what the file should look like. 2.60 - 2.61 -Mercurial doesn't have a built-in facility for handling conflicts. 2.62 -Instead, it runs an external program called \command{hgmerge}. This 2.63 -is a shell script that is bundled with Mercurial; you can change it to 2.64 -behave however you please. What it does by default is try to find one 2.65 -of several different merging tools that are likely to be installed on 2.66 -your system. It first tries a few fully automatic merging tools; if 2.67 -these don't succeed (because the resolution process requires human 2.68 -guidance) or aren't present, the script tries a few different 2.69 -graphical merging tools. 2.70 - 2.71 -It's also possible to get Mercurial to run another program or script 2.72 -instead of \command{hgmerge}, by setting the \envar{HGMERGE} 2.73 -environment variable to the name of your preferred program. 2.74 - 2.75 -\subsection{Using a graphical merge tool} 2.76 - 2.77 -My preferred graphical merge tool is \command{kdiff3}, which I'll use 2.78 -to describe the features that are common to graphical file merging 2.79 -tools. You can see a screenshot of \command{kdiff3} in action in 2.80 -figure~\ref{fig:tour-merge:kdiff3}. The kind of merge it is 2.81 -performing is called a \emph{three-way merge}, because there are three 2.82 -different versions of the file of interest to us. The tool thus 2.83 -splits the upper portion of the window into three panes: 2.84 +La figura~\ref{fig:tour-merge:conflict} ilustra un ejemplo con dos 2.85 +cambios generando conflictos en un documento. Empezamos con una sola 2.86 +versión de el fichero; luego hicimos algunos cambios; mientras tanto, 2.87 +alguien más hizo cambios diferentes en el mismo texto. Lo que debemos 2.88 +hacer para resolver el conflicto causado por ambos cambios es decidir 2.89 +cómo debe quedar finalmente el fichero. 2.90 + 2.91 +Mercurial no tiene ninguna utilidad integrada para manejar conflictos. 2.92 +En vez de eso, ejecuta un programa externo llamado \command{hgmerge}. 2.93 +Es un guión de línea de comandos que es instalado junto con Mercurial; 2.94 +usted puede modificarlo para que se comporte como usted lo desee. Por 2.95 +defecto, lo que hace es tratar de encontrar una de varias herramientas 2.96 +para fusionar que es probable que estén instaladas en su sistema. 2.97 +Primero se intenta con unas herramientas para fusionar cambios 2.98 +automáticamente; si esto no tiene éxito (porque la fusión demanda 2.99 +una guía humana) o dichas herramientas no están presentes, el guión 2.100 +intenta con herramientas gráficas para fusionar. 2.101 + 2.102 +También es posible hacer que Mercurial ejecute otro programa o guión 2.103 +en vez de \command{hgmerge}, definiendo la variable de entorno 2.104 +\envar{HGMERGE} con el nombre del programa de su preferencia. 2.105 + 2.106 +\subsection{Usar una herramienta gráfica para fusión} 2.107 + 2.108 +Mi herramienta favorita para hacer fusiones es \command{kdiff3}, y la 2.109 +usaré para describir las características comunes de las herramientas 2.110 +gráficas para hacer fusiones. Puede ver una captura de pantalla de 2.111 +\command{kdiff3} ejecutándose, en la 2.112 +figura~\ref{fig:tour-merge:kdiff3}. El tipo de fusión que la 2.113 +herramienta hace se conoce como \emph{fusión de tres vías}, porque hay 2.114 +tres versiones diferentes del archivo en que estamos interesados. 2.115 +Debido a esto la herramienta divide la parte superior de la ventana en 2.116 +tres paneles. 2.117 \begin{itemize} 2.118 -\item At the left is the \emph{base} version of the file, i.e.~the 2.119 - most recent version from which the two versions we're trying to 2.120 - merge are descended. 2.121 -\item In the middle is ``our'' version of the file, with the contents 2.122 - that we modified. 2.123 -\item On the right is ``their'' version of the file, the one that 2.124 - from the changeset that we're trying to merge with. 2.125 +\item A la izquierda está la revisión \emph{base} del fichero, p.ej.~la 2.126 + versión más reciente de la que descienden las dos versiones que 2.127 + estamos tratando de fusionar. 2.128 +\item En la mitad está ``nuestra'' versión del fichero, con las 2.129 + modificaciones que hemos hecho. 2.130 +\item A la derecha está la versión del fichero de ``ellos'', la que 2.131 + forma parte del conjunto de cambios que estamos tratando de 2.132 + fusionar. 2.133 \end{itemize} 2.134 -In the pane below these is the current \emph{result} of the merge. 2.135 -Our task is to replace all of the red text, which indicates unresolved 2.136 -conflicts, with some sensible merger of the ``ours'' and ``theirs'' 2.137 -versions of the file. 2.138 - 2.139 -All four of these panes are \emph{locked together}; if we scroll 2.140 -vertically or horizontally in any of them, the others are updated to 2.141 -display the corresponding sections of their respective files. 2.142 - 2.143 -\begin{figure}[ht] 2.144 - \centering 2.145 - \grafix{kdiff3} 2.146 - \caption{Using \command{kdiff3} to merge versions of a file} 2.147 +En el panel inferior se encuentra el \emph{resultado} actual de la 2.148 +fusión. Nuestra tarea es reemplazar todo el texto rojo, que muestra 2.149 +los conflictos sin resolver, con una fusión adecuada de ``nuestra'' 2.150 +versión del fichero y la de ``ellos''. 2.151 + 2.152 +Los cuatro paneles están \emph{enlazados}; si avanzamos vertical o 2.153 +horizontalmente en cualquiera de ellos, los otros son actualizados 2.154 +para mostrar las secciones correspondientes del fichero que tengan 2.155 +asociado. 2.156 + 2.157 +\begin{figure}[ht] 2.158 + \centering 2.159 + \grafix[width=\textwidth]{kdiff3} 2.160 + \caption{Usando \command{kdiff3} para fusionar versiones de un 2.161 + fichero} 2.162 \label{fig:tour-merge:kdiff3} 2.163 \end{figure} 2.164 2.165 -For each conflicting portion of the file, we can choose to resolve 2.166 -the conflict using some combination of text from the base version, 2.167 -ours, or theirs. We can also manually edit the merged file at any 2.168 -time, in case we need to make further modifications. 2.169 - 2.170 -There are \emph{many} file merging tools available, too many to cover 2.171 -here. They vary in which platforms they are available for, and in 2.172 -their particular strengths and weaknesses. Most are tuned for merging 2.173 -files containing plain text, while a few are aimed at specialised file 2.174 -formats (generally XML). 2.175 +En cada conflicto del fichero podemos escoger resolverlo usando 2.176 +cualquier combinación del texto de la revisión base, la nuestra, o la 2.177 +de ellos. También podemos editar manualmente el fichero en que queda 2.178 +la fusión, si es necesario hacer cambios adicionales. 2.179 + 2.180 +Hay \emph{muchas} herramientas para fusionar ficheros disponibles. Se 2.181 +diferencian en las plataformas para las que están disponibles, y en 2.182 +sus fortalezas y debilidades particulares. La mayoría están afinadas 2.183 +para fusionar texto plano, mientras que otras están pensadas para 2.184 +formatos de archivos especializados (generalmente XML). 2.185 2.186 \subsection{A worked example} 2.187