hgbook
changeset 374:c2ff82128ac5
Started translating undo.tex , added mistake and rollback
author | Igor TAmara <igor@tamarapatino.org> |
---|---|
date | Mon Oct 27 13:32:16 2008 -0500 (2008-10-27) |
parents | 48584345e451 |
children | 84944c0ecde6 |
files | es/Leame.1st es/undo.tex |
line diff
1.1 --- a/es/Leame.1st Sun Oct 26 07:47:01 2008 -0500 1.2 +++ b/es/Leame.1st Mon Oct 27 13:32:16 2008 -0500 1.3 @@ -99,7 +99,7 @@ 1.4 || preface.tex || Javier Rojas || 100% || 18/10/2008 || 19/10/2008 || 1.5 || daily.tex || Igor Támara || 100% || 19/10/2008 || 26/10/2008 || 1.6 || tour-basic.tex || Javier Rojas || 31% || 19/10/2008 || || 1.7 -|| undo.tex || Igor Támara || 0% || 26/10/2008 || || 1.8 +|| undo.tex || Igor Támara || 7% || 26/10/2008 || || 1.9 1.10 == Archivos en proceso de revisión == 1.11 ||'''archivo''' || '''revisor''' ||'''Estado'''||'''Inicio'''|| '''Fin''' || 1.12 @@ -142,12 +142,14 @@ 1.13 Hook: Gancho 1.14 Merge: Fusión 1.15 Milestone: Etapa 1.16 + Mistake: Equivocación, cometida por un humano 1.17 Patch: Parche 1.18 Path: Ruta de archivo 1.19 Pull: Jalar 1.20 Push: Publicar 1.21 Release: Versión o liberación de versión 1.22 Revlog: Bitácora de revisiones 1.23 + Roll back: Retroceder, diferente a revert(revertir) o undo(deshacer) 1.24 Snapshot: instantánea 1.25 1.26 ancestry -> ascendencia
2.1 --- a/es/undo.tex Sun Oct 26 07:47:01 2008 -0500 2.2 +++ b/es/undo.tex Mon Oct 27 13:32:16 2008 -0500 2.3 @@ -1,79 +1,80 @@ 2.4 -\chapter{Finding and fixing your mistakes} 2.5 +\chapter{Encontrar y arreglar sus equivocaciones} 2.6 \label{chap:undo} 2.7 2.8 -To err might be human, but to really handle the consequences well 2.9 -takes a top-notch revision control system. In this chapter, we'll 2.10 -discuss some of the techniques you can use when you find that a 2.11 -problem has crept into your project. Mercurial has some highly 2.12 -capable features that will help you to isolate the sources of 2.13 -problems, and to handle them appropriately. 2.14 - 2.15 -\section{Erasing local history} 2.16 - 2.17 -\subsection{The accidental commit} 2.18 - 2.19 -I have the occasional but persistent problem of typing rather more 2.20 -quickly than I can think, which sometimes results in me committing a 2.21 -changeset that is either incomplete or plain wrong. In my case, the 2.22 -usual kind of incomplete changeset is one in which I've created a new 2.23 -source file, but forgotten to \hgcmd{add} it. A ``plain wrong'' 2.24 -changeset is not as common, but no less annoying. 2.25 - 2.26 -\subsection{Rolling back a transaction} 2.27 +Errar es humano, pero tratar adecuadamente las consecuencias requiere 2.28 +un sistema de control de revisiones de primera categoría. En este 2.29 +capítulo, discutiremos algunas técnicas que puede usar cuando 2.30 +encuentra que hay un problema enraizado en su proyecto. Mercurial 2.31 +tiene unas características poderosas que le ayudarán a isolar las 2.32 +fuentes de los problemas, y a dar cuenta de ellas apropiadamente. 2.33 + 2.34 +\section{Borrar la historia local} 2.35 + 2.36 +\subsection{La consignación accidental} 2.37 + 2.38 +Tengo el problema ocasional, pero persistente de teclear más rápido de 2.39 +lo que pienso, que aveces resulta en consignar un conjunto de cambios 2.40 +incompleto o simplemente malo. En mi caso, el conjunto de cambios 2.41 +incompleto consiste en que creé un nuevo archivo fuente, pero olvidé 2.42 +hacerle \hgcmd{add}. Un conjunto de cambios``simplemente malo'' no es 2.43 +tan común, pero sí resulta muy molesto. 2.44 + 2.45 +\subsection{Retroceder una transacción} 2.46 \label{sec:undo:rollback} 2.47 2.48 -In section~\ref{sec:concepts:txn}, I mentioned that Mercurial treats 2.49 -each modification of a repository as a \emph{transaction}. Every time 2.50 -you commit a changeset or pull changes from another repository, 2.51 -Mercurial remembers what you did. You can undo, or \emph{roll back}, 2.52 -exactly one of these actions using the \hgcmd{rollback} command. (See 2.53 -section~\ref{sec:undo:rollback-after-push} for an important caveat 2.54 -about the use of this command.) 2.55 - 2.56 -Here's a mistake that I often find myself making: committing a change 2.57 -in which I've created a new file, but forgotten to \hgcmd{add} it. 2.58 +En la sección~\ref{sec:concepts:txn}, mencioné que Mercurial trata 2.59 +modificación a un repositorio como una \emph{transacción}. Cada vez 2.60 +que consigna un conjunto de cambios o lo jala de otro repositorio, 2.61 +Mercurial recuerda lo que hizo. Puede deshacer, o \emph{retroceder}, 2.62 +exactamente una de tales acciones usando la orden \hgcmd{rollback}. 2.63 +(Ver en la sección~\ref{sec:undo:rollback-after-push} una anotación 2.64 +importante acerca del uso de esta orden.) 2.65 + 2.66 +A continuación una equivocación que me sucede frecuentemente: 2.67 +consignar un cambio en el cual he creado un nuevo fichero, pero he 2.68 +olvidado hacerle \hgcmd{add}. 2.69 \interaction{rollback.commit} 2.70 -Looking at the output of \hgcmd{status} after the commit immediately 2.71 -confirms the error. 2.72 +La salida de \hgcmd{status} después de la consignación confirma 2.73 +inmediatamente este error. 2.74 \interaction{rollback.status} 2.75 -The commit captured the changes to the file \filename{a}, but not the 2.76 -new file \filename{b}. If I were to push this changeset to a 2.77 -repository that I shared with a colleague, the chances are high that 2.78 -something in \filename{a} would refer to \filename{b}, which would not 2.79 -be present in their repository when they pulled my changes. I would 2.80 -thus become the object of some indignation. 2.81 - 2.82 -However, luck is with me---I've caught my error before I pushed the 2.83 -changeset. I use the \hgcmd{rollback} command, and Mercurial makes 2.84 -that last changeset vanish. 2.85 +La consignación capturó los cambios en el archivo \filename{a}, pero 2.86 +no el nuevo fichero \filename{b}. Si yo publicara este conjunto de 2.87 +cambios a un repositorio compartido con un colega, es bastante 2.88 +probable que algo en \filename{a} se refiriera a \filename{b}, el cual 2.89 +podría no estar presente cuando jalen mis cambios del repositorio. Me 2.90 +convertiría el sujeto de cierta indignación. 2.91 + 2.92 +Como sea, la suerte me acompaña---Encontré mi error antes de publicar 2.93 +el conjunto de cambios. Uso la orden \hgcmd{rollback}, y Mercurial 2.94 +hace desaparecer el último conjunto de cambios. 2.95 \interaction{rollback.rollback} 2.96 -Notice that the changeset is no longer present in the repository's 2.97 -history, and the working directory once again thinks that the file 2.98 -\filename{a} is modified. The commit and rollback have left the 2.99 -working directory exactly as it was prior to the commit; the changeset 2.100 -has been completely erased. I can now safely \hgcmd{add} the file 2.101 -\filename{b}, and rerun my commit. 2.102 +El conjunto de cambios ya no está en la historia del repositorio, y el 2.103 +directorio de trabajo cree que el fichero \filename{a} ha sido 2.104 +modificado. La consignación y el retroceso dejaron el directorio de 2.105 +trabajo exactamente como estaban antes de la consignación; el conjunto 2.106 +de cambios ha sido eliminado totlamente. Ahora puedo hacer \hgcmd{add} 2.107 +al fichero \filename{b}, y hacer de nuevo la consignación. 2.108 \interaction{rollback.add} 2.109 2.110 -\subsection{The erroneous pull} 2.111 - 2.112 -It's common practice with Mercurial to maintain separate development 2.113 -branches of a project in different repositories. Your development 2.114 -team might have one shared repository for your project's ``0.9'' 2.115 -release, and another, containing different changes, for the ``1.0'' 2.116 -release. 2.117 - 2.118 -Given this, you can imagine that the consequences could be messy if 2.119 -you had a local ``0.9'' repository, and accidentally pulled changes 2.120 -from the shared ``1.0'' repository into it. At worst, you could be 2.121 -paying insufficient attention, and push those changes into the shared 2.122 -``0.9'' tree, confusing your entire team (but don't worry, we'll 2.123 -return to this horror scenario later). However, it's more likely that 2.124 -you'll notice immediately, because Mercurial will display the URL it's 2.125 -pulling from, or you will see it pull a suspiciously large number of 2.126 -changes into the repository. 2.127 - 2.128 -The \hgcmd{rollback} command will work nicely to expunge all of the 2.129 +\subsection{Erroneamente jalado} 2.130 + 2.131 +Mantener ramas de desarrollo separadas de un proyecto en distintos 2.132 +repositorios es una práctica común con Mercurial. Su equipo de 2.133 +desarrollo puede tener un repositorio compartido para la versión ``0.9'' 2.134 +y otra con cambios distintos para la versión ``1.0''. 2.135 + 2.136 +Con este escenario, puede imaginar las consecuencias si tuviera un 2.137 +repositorio local ``0.9'', y jalara accidentalmente los cambios del 2.138 +repositorio compartido de la versión ``1.0'' en este. En el peor de 2.139 +los casos, por falta de atención, es posible que publique tales 2.140 +cambios en el árbol compartido ``0.9'', confundiendo a todo su equipo 2.141 +de trabajo(pero no se preocupe, volveremos a este terrorífico 2.142 +escenario posteriormente). En todo caso, es muy probable que usted se 2.143 +de cuenta inmediatamente, dado que Mercurial mostrará el URL de donde 2.144 +está jalando, o que vea jalando una sospechosa gran cantidad de 2.145 +cambios en el repositorio. 2.146 + 2.147 +La orden \hgcmd{rollback} command will work nicely to expunge all of the 2.148 changesets that you just pulled. Mercurial groups all changes from 2.149 one \hgcmd{pull} into a single transaction, so one \hgcmd{rollback} is 2.150 all you need to undo this mistake.