hgbook

diff es/tour-merge.tex @ 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
author Javier Rojas <jerojasro@devnull.li>
date Sun Nov 02 20:08:45 2008 -0500 (2008-11-02)
parents 0abd3d78172e
children 53b4a0d0052e
line diff
     1.1 --- a/es/tour-merge.tex	Sun Nov 02 13:54:42 2008 -0500
     1.2 +++ b/es/tour-merge.tex	Sun Nov 02 20:08:45 2008 -0500
     1.3 @@ -105,98 +105,106 @@
     1.4  
     1.5  \subsection{Consignar los resultados de la fusión}
     1.6  
     1.7 -Whenever we've done a merge, \hgcmd{parents} will display two parents
     1.8 -until we \hgcmd{commit} the results of the merge.
     1.9 +Siempre que hacemos una fusión, \hgcmd{parents} mostrará dos padres
    1.10 +hasta que consignemos (\hgcmd{commit}) los resultados de la fusión.
    1.11  \interaction{tour.merge.commit}
    1.12 -We now have a new tip revision; notice that it has \emph{both} of
    1.13 -our former heads as its parents.  These are the same revisions that
    1.14 -were previously displayed by \hgcmd{parents}.
    1.15 +Ahora tenemos una nueva revisión de punta; note que tiene \emph{los
    1.16 +dos} frentes anteriores como sus padres. Estos son las mismas
    1.17 +revisiones que mostró previamente el comando \hgcmd{parents}.
    1.18  \interaction{tour.merge.tip}
    1.19 -In figure~\ref{fig:tour-merge:merge}, you can see a representation of
    1.20 -what happens to the working directory during the merge, and how this
    1.21 -affects the repository when the commit happens.  During the merge, the
    1.22 -working directory has two parent changesets, and these become the
    1.23 -parents of the new changeset.
    1.24 -
    1.25 -\section{Merging conflicting changes}
    1.26 -
    1.27 -Most merges are simple affairs, but sometimes you'll find yourself
    1.28 -merging changes where each modifies the same portions of the same
    1.29 -files.  Unless both modifications are identical, this results in a
    1.30 -\emph{conflict}, where you have to decide how to reconcile the
    1.31 -different changes into something coherent.
    1.32 +En la figura~\ref{fig:tour-merge:merge} usted puede apreciar una
    1.33 +representación de lo que pasa en el directorio de trabajo durante la
    1.34 +fusión cuando se hace la consignación. Durante la fusión, el
    1.35 +directorio de trabajo tiene dos conjuntos de cambios como sus padres,
    1.36 +y éstos se vuelven los padres del nuevo conjunto de cambios.
    1.37 +
    1.38 +\section{Fusionar cambios con conflictos}
    1.39 +
    1.40 +La mayoría de las fusiones son algo simple, pero a veces usted se
    1.41 +encontrará fusionando cambios donde más de uno de ellos afecta las
    1.42 +mismas secciones de los mismos ficheros. A menos que ambas
    1.43 +modificaciones sean idénticas, el resultado es un \emph{conflicto}, en
    1.44 +donde usted debe decidir cómo reconciliar ambos cambios y producir un
    1.45 +resultado coherente.
    1.46  
    1.47  \begin{figure}[ht]
    1.48    \centering
    1.49    \grafix{tour-merge-conflict}
    1.50 -  \caption{Conflicting changes to a document}
    1.51 +  \caption{Cambios con conflictos a un documento}
    1.52    \label{fig:tour-merge:conflict}
    1.53  \end{figure}
    1.54  
    1.55 -Figure~\ref{fig:tour-merge:conflict} illustrates an instance of two
    1.56 -conflicting changes to a document.  We started with a single version
    1.57 -of the file; then we made some changes; while someone else made
    1.58 -different changes to the same text.  Our task in resolving the
    1.59 -conflicting changes is to decide what the file should look like.
    1.60 -
    1.61 -Mercurial doesn't have a built-in facility for handling conflicts.
    1.62 -Instead, it runs an external program called \command{hgmerge}.  This
    1.63 -is a shell script that is bundled with Mercurial; you can change it to
    1.64 -behave however you please.  What it does by default is try to find one
    1.65 -of several different merging tools that are likely to be installed on
    1.66 -your system.  It first tries a few fully automatic merging tools; if
    1.67 -these don't succeed (because the resolution process requires human
    1.68 -guidance) or aren't present, the script tries a few different
    1.69 -graphical merging tools.
    1.70 -
    1.71 -It's also possible to get Mercurial to run another program or script
    1.72 -instead of \command{hgmerge}, by setting the \envar{HGMERGE}
    1.73 -environment variable to the name of your preferred program.
    1.74 -
    1.75 -\subsection{Using a graphical merge tool}
    1.76 -
    1.77 -My preferred graphical merge tool is \command{kdiff3}, which I'll use
    1.78 -to describe the features that are common to graphical file merging
    1.79 -tools.  You can see a screenshot of \command{kdiff3} in action in
    1.80 -figure~\ref{fig:tour-merge:kdiff3}.  The kind of merge it is
    1.81 -performing is called a \emph{three-way merge}, because there are three
    1.82 -different versions of the file of interest to us.  The tool thus
    1.83 -splits the upper portion of the window into three panes:
    1.84 +La figura~\ref{fig:tour-merge:conflict} ilustra un ejemplo con dos
    1.85 +cambios generando conflictos en un documento. Empezamos con una sola
    1.86 +versión de el fichero; luego hicimos algunos cambios; mientras tanto,
    1.87 +alguien más  hizo cambios diferentes en el mismo texto. Lo que debemos
    1.88 +hacer para resolver el conflicto causado por ambos cambios es decidir
    1.89 +cómo debe quedar finalmente el fichero.
    1.90 +
    1.91 +Mercurial no tiene ninguna utilidad integrada para manejar conflictos.
    1.92 +En vez de eso, ejecuta un programa externo llamado \command{hgmerge}.
    1.93 +Es un guión de línea de comandos que es instalado junto con Mercurial;
    1.94 +usted puede modificarlo para que se comporte como usted lo desee. Por
    1.95 +defecto, lo que hace es tratar de encontrar una de varias herramientas
    1.96 +para fusionar que es probable que estén instaladas en su sistema.
    1.97 +Primero se intenta con unas herramientas para fusionar cambios
    1.98 +automáticamente; si esto no tiene éxito (porque la fusión demanda
    1.99 +una guía humana) o dichas herramientas no están presentes, el guión
   1.100 +intenta con herramientas gráficas para fusionar.
   1.101 +
   1.102 +También es posible hacer que Mercurial ejecute otro programa o guión
   1.103 +en vez de \command{hgmerge}, definiendo la variable de entorno
   1.104 +\envar{HGMERGE} con el nombre del programa de su preferencia.
   1.105 +
   1.106 +\subsection{Usar una herramienta gráfica para fusión}
   1.107 +
   1.108 +Mi herramienta favorita para hacer fusiones es \command{kdiff3}, y la
   1.109 +usaré para describir las características comunes de las herramientas
   1.110 +gráficas para hacer fusiones. Puede ver una captura de pantalla de
   1.111 +\command{kdiff3} ejecutándose, en la
   1.112 +figura~\ref{fig:tour-merge:kdiff3}.  El tipo de fusión que la
   1.113 +herramienta hace se conoce como \emph{fusión de tres vías}, porque hay
   1.114 +tres versiones diferentes del archivo en que estamos interesados.
   1.115 +Debido a esto la herramienta divide la parte superior de la ventana en
   1.116 +tres paneles.
   1.117  \begin{itemize}
   1.118 -\item At the left is the \emph{base} version of the file, i.e.~the
   1.119 -  most recent version from which the two versions we're trying to
   1.120 -  merge are descended.
   1.121 -\item In the middle is ``our'' version of the file, with the contents
   1.122 -  that we modified.
   1.123 -\item On the right is ``their'' version of the file, the one that
   1.124 -  from the changeset that we're trying to merge with.
   1.125 +\item A la izquierda está la revisión \emph{base} del fichero, p.ej.~la
   1.126 +    versión más reciente de la que descienden las dos versiones que
   1.127 +    estamos tratando de fusionar.
   1.128 +\item En la mitad está ``nuestra'' versión del fichero, con las
   1.129 +    modificaciones que hemos hecho.
   1.130 +\item A la derecha está la versión del fichero de ``ellos'', la que
   1.131 +    forma parte del conjunto de cambios que estamos tratando de
   1.132 +    fusionar.
   1.133  \end{itemize}
   1.134 -In the pane below these is the current \emph{result} of the merge.
   1.135 -Our task is to replace all of the red text, which indicates unresolved
   1.136 -conflicts, with some sensible merger of the ``ours'' and ``theirs''
   1.137 -versions of the file.
   1.138 -
   1.139 -All four of these panes are \emph{locked together}; if we scroll
   1.140 -vertically or horizontally in any of them, the others are updated to
   1.141 -display the corresponding sections of their respective files.
   1.142 -
   1.143 -\begin{figure}[ht]
   1.144 -  \centering
   1.145 -  \grafix{kdiff3}
   1.146 -  \caption{Using \command{kdiff3} to merge versions of a file}
   1.147 +En el panel inferior se encuentra el \emph{resultado} actual de la
   1.148 +fusión. Nuestra tarea es reemplazar todo el texto rojo, que muestra
   1.149 +los conflictos sin resolver, con una fusión adecuada de ``nuestra''
   1.150 +versión del fichero y la de ``ellos''.
   1.151 +
   1.152 +Los cuatro paneles están \emph{enlazados}; si avanzamos vertical o
   1.153 +horizontalmente en cualquiera de ellos, los otros son actualizados
   1.154 +para mostrar las secciones correspondientes del fichero que tengan
   1.155 +asociado.
   1.156 +
   1.157 +\begin{figure}[ht]
   1.158 +  \centering
   1.159 +  \grafix[width=\textwidth]{kdiff3}
   1.160 +  \caption{Usando \command{kdiff3} para fusionar versiones de un
   1.161 +  fichero}
   1.162    \label{fig:tour-merge:kdiff3}
   1.163  \end{figure}
   1.164  
   1.165 -For each conflicting portion of the file, we can choose to resolve
   1.166 -the conflict using some combination of text from the base version,
   1.167 -ours, or theirs.  We can also manually edit the merged file at any
   1.168 -time, in case we need to make further modifications.
   1.169 -
   1.170 -There are \emph{many} file merging tools available, too many to cover
   1.171 -here.  They vary in which platforms they are available for, and in
   1.172 -their particular strengths and weaknesses.  Most are tuned for merging
   1.173 -files containing plain text, while a few are aimed at specialised file
   1.174 -formats (generally XML).
   1.175 +En cada conflicto del fichero podemos escoger resolverlo usando
   1.176 +cualquier combinación del texto de la revisión base, la nuestra, o la
   1.177 +de ellos. También podemos editar manualmente el fichero en que queda
   1.178 +la fusión, si es necesario hacer cambios adicionales.
   1.179 +
   1.180 +Hay \emph{muchas} herramientas para fusionar ficheros disponibles. Se
   1.181 +diferencian en las plataformas para las que están disponibles, y en
   1.182 +sus fortalezas y debilidades particulares. La mayoría están afinadas
   1.183 +para fusionar texto plano, mientras que otras están pensadas para
   1.184 +formatos de archivos especializados (generalmente XML).
   1.185  
   1.186  \subsection{A worked example}
   1.187