hgbook

changeset 371:0801d625fabe

translated up to section 1.8

updated also the status of the project
author Javier Rojas <jerojasro@devnull.li>
date Sun Oct 26 17:39:41 2008 -0500 (2008-10-26)
parents 716c08767510
children b73654de597e 84944c0ecde6
files es/Leame.1st es/tour-basic.tex
line diff
     1.1 --- a/es/Leame.1st	Sun Oct 26 17:37:42 2008 -0500
     1.2 +++ b/es/Leame.1st	Sun Oct 26 17:39:41 2008 -0500
     1.3 @@ -97,7 +97,7 @@
     1.4  || 00book.tex      || Igor Támara   ||    100%    || 16/10/2008 ||  16/10/2008 ||
     1.5  || branch.tex      || Igor Támara   ||    100%    || 16/10/2008 ||  19/10/2008 ||
     1.6  || preface.tex     || Javier Rojas  ||    100%    || 18/10/2008 ||  19/10/2008 ||
     1.7 -|| tour-basic.tex  || Javier Rojas  ||    60%     || 19/10/2008 ||             ||
     1.8 +|| tour-basic.tex  || Javier Rojas  ||    80%     || 19/10/2008 ||             ||
     1.9  ||      daily.tex  || Igor Támara   ||    73%     || 19/10/2008 ||             ||
    1.10  
    1.11  == Archivos en proceso de revisión ==
     2.1 --- a/es/tour-basic.tex	Sun Oct 26 17:37:42 2008 -0500
     2.2 +++ b/es/tour-basic.tex	Sun Oct 26 17:39:41 2008 -0500
     2.3 @@ -369,10 +369,10 @@
     2.4  repositorios no consume demasiados recursos, lo que facilita hacerlo
     2.5  en cualquier momento.
     2.6  
     2.7 -En nuestro repositorio \dirname{my-hello}, hay un archivo
     2.8 +En nuestro repositorio \dirname{my-hello}, hay un fichero
     2.9  \filename{hello.c} que contiene el clásico programa ``hello,
    2.10  world''\ndt{Hola, mundo.}. Usaremos el clásico y venerado comando
    2.11 -\command{sed} para editar este archivo y hacer que imprima una segunda
    2.12 +\command{sed} para editar este fichero y hacer que imprima una segunda
    2.13  línea de salida. (Estoy usando el comando \command{sed} para hacer
    2.14  esto sólo porque es fácil escribir un ejemplo automatizado con él.
    2.15  Dado que usted no tiene esta restricción, probablemente no querrá usar
    2.16 @@ -380,167 +380,182 @@
    2.17  \interaction{tour.sed}
    2.18  
    2.19  El comando \hgcmd{status} de Mercurial nos dice lo que Mercurial sabe
    2.20 -acerca de los archivos en el repositorio.
    2.21 +acerca de los ficheros en el repositorio.
    2.22  \interaction{tour.status}
    2.23 -El comando \hgcmd{status} no imprime nada para algunos archivos, sólo
    2.24 +El comando \hgcmd{status} no imprime nada para algunos ficheros, sólo
    2.25  una línea empezando con ``\texttt{M}'' para el fichero
    2.26  \filename{hello.c}. A menos que usted lo indique explícitamente,
    2.27 -\hgcmd{status} no imprimirá nada respecto a los archivos que no han
    2.28 +\hgcmd{status} no imprimirá nada respecto a los ficheros que no han
    2.29  sido modificados.
    2.30  
    2.31  La ``\texttt{M}'' indica que Mercurial se dio cuenta de que nosotros
    2.32  modificamos \filename{hello.c}.  No tuvimos que \emph{decirle} a
    2.33 -Mercurial que íbamos a modificar ese archivo antes de hacerlo, o que
    2.34 +Mercurial que íbamos a modificar ese fichero antes de hacerlo, o que
    2.35  lo modificamos una vez terminamos de hacerlo; él fue capaz de darse
    2.36  cuenta de esto por sí mismo.
    2.37  
    2.38 -Es algo útil saber que hemos modificado el archivo \filename{hello.c},
    2.39 +Es algo útil saber que hemos modificado el fichero \filename{hello.c},
    2.40  pero preferiríamos saber exactamente \emph{qué} cambios hicimos.
    2.41  Para averiguar esto, usamos el comando \hgcmd{diff}.
    2.42  \interaction{tour.diff}
    2.43  
    2.44 -\section{Recording changes in a new changeset}
    2.45 -
    2.46 -We can modify files, build and test our changes, and use
    2.47 -\hgcmd{status} and \hgcmd{diff} to review our changes, until we're
    2.48 -satisfied with what we've done and arrive at a natural stopping point
    2.49 -where we want to record our work in a new changeset.
    2.50 -
    2.51 -The \hgcmd{commit} command lets us create a new changeset; we'll
    2.52 -usually refer to this as ``making a commit'' or ``committing''.  
    2.53 -
    2.54 -\subsection{Setting up a username}
    2.55 -
    2.56 -When you try to run \hgcmd{commit} for the first time, it is not
    2.57 -guaranteed to succeed.  Mercurial records your name and address with
    2.58 -each change that you commit, so that you and others will later be able
    2.59 -to tell who made each change.  Mercurial tries to automatically figure
    2.60 -out a sensible username to commit the change with.  It will attempt
    2.61 -each of the following methods, in order:
    2.62 +\section{Grabar cambios en un nuevo conjunto de cambios}
    2.63 +
    2.64 +Podemos modificar, compilar y probar nuestros cambios, y usar
    2.65 +\hgcmd{status} y \hgcmd{diff} para revisar los mismos, hasta que
    2.66 +estemos satisfechos con los resultados y lleguemos a un momento en el
    2.67 +que sea natural que querramos guardar nuestro trabajo en un nuevo
    2.68 +conjunto de cambios.
    2.69 +
    2.70 +El comando \hgcmd{commit} nos permite crear un nuevo conjunto de
    2.71 +cambios. Nos referiremos usualmente a esto como ``hacer una consigna''
    2.72 +o consignar.
    2.73 +
    2.74 +\subsection{Definir un nombre de usuario}
    2.75 +
    2.76 +Cuando usted trata de ejecutar \hgcmd{commit}\ndt{Hacer una
    2.77 +consignación} por primera vez, no está garantizado que lo logre.
    2.78 +Mercurial registra su nombre y dirección en cada cambio que usted
    2.79 +consigna, para que más adelante otros puedan saber quién es el
    2.80 +responsable de cada cambio. Mercurial trata de encontrar un nombre de
    2.81 +% TODO consigna o consignación?
    2.82 +usuario adecuado con el cual registrar la consignación. Se intenta con
    2.83 +cada uno de los siguientes métodos, en el orden presentado.
    2.84  \begin{enumerate}
    2.85 -\item If you specify a \hgopt{commit}{-u} option to the \hgcmd{commit}
    2.86 -  command on the command line, followed by a username, this is always
    2.87 -  given the highest precedence.
    2.88 -\item If you have set the \envar{HGUSER} environment variable, this is
    2.89 -  checked next.
    2.90 -\item If you create a file in your home directory called
    2.91 -  \sfilename{.hgrc}, with a \rcitem{ui}{username} entry, that will be
    2.92 -  used next.  To see what the contents of this file should look like,
    2.93 -  refer to section~\ref{sec:tour-basic:username} below.
    2.94 -\item If you have set the \envar{EMAIL} environment variable, this
    2.95 -  will be used next.
    2.96 -\item Mercurial will query your system to find out your local user
    2.97 -  name and host name, and construct a username from these components.
    2.98 -  Since this often results in a username that is not very useful, it
    2.99 -  will print a warning if it has to do this.
   2.100 +\item Si usted pasa la opción \hgopt{commit}{-u} al comando \hgcmd{commit}
   2.101 +  en la línea de comandos, seguido de un nombre de usuario, se le da a
   2.102 +  esto la máxima precedencia.
   2.103 +\item A continuación se revisa si usted ha definido la variable de
   2.104 +    entorno \envar{HGUSER}.
   2.105 +\item Si usted crea un fichero en su directorio personal llamado
   2.106 +  \sfilename{.hgrc}, con una entrada \rcitem{ui}{username}, se usa
   2.107 +  luego. Para revisar cómo debe verse este fichero, refiérase a la
   2.108 +  sección~\ref{sec:tour-basic:username} más abajo.
   2.109 +\item Si usted ha definido la variable de entorno \envar{EMAIL}, será
   2.110 +    usada a continuación.
   2.111 +\item Mercurial le pedirá a su sistema buscar su nombre de usuario
   2.112 +    % TODO host => máquina
   2.113 +    local, y el nombre de máquina, y construirá un nombre de usuario a
   2.114 +    partir de estos componentes. Ya que esto generalmente termina
   2.115 +    generando un nombre de usuario no muy útil, se imprimirá una
   2.116 +    advertencia si es necesario hacerlo.
   2.117  \end{enumerate}
   2.118 -If all of these mechanisms fail, Mercurial will fail, printing an
   2.119 -error message.  In this case, it will not let you commit until you set
   2.120 -up a username.
   2.121 -
   2.122 -You should think of the \envar{HGUSER} environment variable and the
   2.123 -\hgopt{commit}{-u} option to the \hgcmd{commit} command as ways to
   2.124 -\emph{override} Mercurial's default selection of username.  For normal
   2.125 -use, the simplest and most robust way to set a username for yourself
   2.126 -is by creating a \sfilename{.hgrc} file; see below for details.
   2.127 -
   2.128 -\subsubsection{Creating a Mercurial configuration file}
   2.129 +Si todos estos procedimientos fallan, Mercurial fallará, e imprimirá
   2.130 +un mensaje de error. En este caso, no le permitirá hacer la
   2.131 +consignación hasta que usted defina un nombre de usuario.
   2.132 +
   2.133 +Trate de ver la variable de entorno \envar{HGUSER} y la opción
   2.134 +\hgopt{commit}{-u} del comando \hgcmd{commit} como formas de
   2.135 +\emph{hacer caso omiso} de la selección de nombre de usuario que
   2.136 +Mercurial hace normalmente.  Para uso normal, la manera más simple y
   2.137 +sencilla de definir un nombre de usuario para usted es crear un
   2.138 +fichero \sfilename{.hgrc}; los detalles se encuentran más adelante.
   2.139 +
   2.140 +\subsubsection{Crear el fichero de configuración de Mercurial}
   2.141  \label{sec:tour-basic:username}
   2.142  
   2.143 -To set a user name, use your favourite editor to create a file called
   2.144 -\sfilename{.hgrc} in your home directory.  Mercurial will use this
   2.145 -file to look up your personalised configuration settings.  The initial
   2.146 -contents of your \sfilename{.hgrc} should look like this.
   2.147 +Para definir un nombre de usuario, use su editor de texto favorito
   2.148 +para crear un fichero llamado \sfilename{.hgrc} en su directorio
   2.149 +personal. Mercurial usará este fichero para obtener las
   2.150 +configuraciones personalizadas que usted haya hecho. El contenido
   2.151 +inicial de su fichero \sfilename{.hgrc} debería verse así.
   2.152  \begin{codesample2}
   2.153 -  # This is a Mercurial configuration file.
   2.154 +  # Este es un fichero de configuración de Mercurial.
   2.155    [ui]
   2.156 -  username = Firstname Lastname <email.address@domain.net>
   2.157 +  username = Primernombre Apellido <correo.electronico@dominio.net>
   2.158  \end{codesample2}
   2.159 -The ``\texttt{[ui]}'' line begins a \emph{section} of the config file,
   2.160 -so you can read the ``\texttt{username = ...}'' line as meaning ``set
   2.161 -the value of the \texttt{username} item in the \texttt{ui} section''.
   2.162 -A section continues until a new section begins, or the end of the
   2.163 -file.  Mercurial ignores empty lines and treats any text from
   2.164 -``\texttt{\#}'' to the end of a line as a comment.
   2.165 -
   2.166 -\subsubsection{Choosing a user name}
   2.167 -
   2.168 -You can use any text you like as the value of the \texttt{username}
   2.169 -config item, since this information is for reading by other people,
   2.170 -but for interpreting by Mercurial.  The convention that most people
   2.171 -follow is to use their name and email address, as in the example
   2.172 -above.
   2.173 +La línea ``\texttt{[ui]}'' define una \emph{section} del fichero de
   2.174 +configuración, así que usted puede leer la línea ``\texttt{username =
   2.175 +...}'' como ``defina el valor del elemento \texttt{username} en la
   2.176 +sección \texttt{ui}''.
   2.177 +Una sección continua hasta que empieza otra nueva, o se llega al final
   2.178 +del fichero. Mercurial ignora las líneas vacías y considera cualquier
   2.179 +texto desde el caracter ``\texttt{\#}'' hasta el final de la línea
   2.180 +como un comentario.
   2.181 +
   2.182 +\subsubsection{Escoger un nombre de usuario}
   2.183 +
   2.184 +Usted puede usar el texto que desee como el valor del campo de
   2.185 +configuración \texttt{username}, ya que esta información será leída
   2.186 +por otras personas, e interpretada por Mercurial. La convención que
   2.187 +sigue la mayoría de la gente es usar su nombre y dirección de correo,
   2.188 +como en el ejemplo anterior.
   2.189  
   2.190  \begin{note}
   2.191 -  Mercurial's built-in web server obfuscates email addresses, to make
   2.192 -  it more difficult for the email harvesting tools that spammers use.
   2.193 -  This reduces the likelihood that you'll start receiving more junk
   2.194 -  email if you publish a Mercurial repository on the web.
   2.195 +    % TODO web
   2.196 +    El servidor web integrado de Mercurial ofusca las direcciones de
   2.197 +    correo, para dificultar la tarea de las herramientas de
   2.198 +    recolección de direcciones de correo que usan los
   2.199 +    spammers\ndt{Personas que envían correo no solicitado, también
   2.200 +    conocido como correo basura}. Esto reduce la probabilidad de que
   2.201 +    usted empiece a recibir más correo basura si publica un
   2.202 +    repositorio en la red.
   2.203  \end{note}
   2.204  
   2.205 -\subsection{Writing a commit message}
   2.206 -
   2.207 -When we commit a change, Mercurial drops us into a text editor, to
   2.208 -enter a message that will describe the modifications we've made in
   2.209 -this changeset.  This is called the \emph{commit message}.  It will be
   2.210 -a record for readers of what we did and why, and it will be printed by
   2.211 -\hgcmd{log} after we've finished committing.
   2.212 +\subsection{Escribir un mensaje de consignación}
   2.213 +
   2.214 +Cuando consignamos un cambio, Mercurial nos ubica dentro de un editor
   2.215 +de texto, para ingresar un mensaje que describa las modificaciones que
   2.216 +hemos introducido en este conjunto de cambios. Esto es conocido como
   2.217 +un \emph{mensaje de consignación}. Será un registro de lo que hicimos
   2.218 +y porqué lo hicimos, y será impreso por \hgcmd{log} una vez hayamos
   2.219 +hecho la consignación.
   2.220  \interaction{tour.commit}
   2.221  
   2.222 -The editor that the \hgcmd{commit} command drops us into will contain
   2.223 -an empty line, followed by a number of lines starting with
   2.224 -``\texttt{HG:}''.
   2.225 +El editor en que \hgcmd{commit} nos ubica contendrá una línea vacía,
   2.226 +seguida de varias líneas que empiezan con la cadena ``\texttt{HG:}''.
   2.227  \begin{codesample2}
   2.228 -  \emph{empty line}
   2.229 +  \emph{línea vacía}
   2.230    HG: changed hello.c
   2.231  \end{codesample2}
   2.232 -Mercurial ignores the lines that start with ``\texttt{HG:}''; it uses
   2.233 -them only to tell us which files it's recording changes to.  Modifying
   2.234 -or deleting these lines has no effect.
   2.235 -
   2.236 -\subsection{Writing a good commit message}
   2.237 -
   2.238 -Since \hgcmd{log} only prints the first line of a commit message by
   2.239 -default, it's best to write a commit message whose first line stands
   2.240 -alone.  Here's a real example of a commit message that \emph{doesn't}
   2.241 -follow this guideline, and hence has a summary that is not readable.
   2.242 +Mercurial ignora las líneas que empiezan con ``\texttt{HG:}''; sólo
   2.243 +las usa para indicarnos para cuáles ficheros está registrando los
   2.244 +cambios. Modificar o borrar estas líneas no tiene ningún efecto.
   2.245 +
   2.246 +\subsection{Escribir un buen mensaje de consignación}
   2.247 +
   2.248 +Ya que por defecto \hgcmd{log} sólo muestra la primera línea de un
   2.249 +mensaje de consignación, lo mejor es escribir un mensaje cuya primera
   2.250 +línea tenga significado por sí misma. A continuación se encuentra un
   2.251 +ejemplo de un mensaje de consignación que \emph{no} sigue esta
   2.252 +pauta, y debido a ello tiene un sumario que no es legible.
   2.253  \begin{codesample2}
   2.254    changeset:   73:584af0e231be
   2.255 -  user:        Censored Person <censored.person@example.org>
   2.256 +  user:        Persona Censurada <persona.censurada@ejemplo.org>
   2.257    date:        Tue Sep 26 21:37:07 2006 -0700
   2.258 -  summary:     include buildmeister/commondefs.   Add an exports and install
   2.259 +  summary:     se incluye buildmeister/commondefs.   Añade un módulo
   2.260  \end{codesample2}
   2.261  
   2.262 -As far as the remainder of the contents of the commit message are
   2.263 -concerned, there are no hard-and-fast rules.  Mercurial itself doesn't
   2.264 -interpret or care about the contents of the commit message, though
   2.265 -your project may have policies that dictate a certain kind of
   2.266 -formatting.
   2.267 -
   2.268 -My personal preference is for short, but informative, commit messages
   2.269 -that tell me something that I can't figure out with a quick glance at
   2.270 -the output of \hgcmdargs{log}{--patch}.
   2.271 -
   2.272 -\subsection{Aborting a commit}
   2.273 -
   2.274 -If you decide that you don't want to commit while in the middle of
   2.275 -editing a commit message, simply exit from your editor without saving
   2.276 -the file that it's editing.  This will cause nothing to happen to
   2.277 -either the repository or the working directory.
   2.278 -
   2.279 -If we run the \hgcmd{commit} command without any arguments, it records
   2.280 -all of the changes we've made, as reported by \hgcmd{status} and
   2.281 -\hgcmd{diff}.
   2.282 -
   2.283 -\subsection{Admiring our new handiwork}
   2.284 -
   2.285 -Once we've finished the commit, we can use the \hgcmd{tip} command to
   2.286 -display the changeset we just created.  This command produces output
   2.287 -that is identical to \hgcmd{log}, but it only displays the newest
   2.288 -revision in the repository.
   2.289 +Con respecto al resto del contenido del mensaje de consignación, no
   2.290 +hay reglas estrictas-y-rápidas. Mercurial no interpreta ni le da
   2.291 +importancia a los contenidos del mensaje de consignación, aunque es
   2.292 +posible que su proyecto tenga políticas que definan una manera
   2.293 +particular de escribirlo.
   2.294 +
   2.295 +Mi preferencia personal es usar mensajes de consignación cortos pero
   2.296 +informativos, que me digan algo que no puedo inferir con una mirada
   2.297 +rápida a la salida de \hgcmdargs{log}{--patch}.
   2.298 +
   2.299 +\subsection{Cancelar una consignación}
   2.300 +
   2.301 +Si usted decide que no desea hacer la consignación mientras está
   2.302 +editando el mensaje de la misma, simplemente cierre su editor sin
   2.303 +guardar los cambios al fichero que está editando. Esto hará que no
   2.304 +pase nada ni en el repositorio ni en el directorio de trabajo.
   2.305 +
   2.306 +Si ejecutamos el comando \hgcmd{commit} sin ningún argumento, se
   2.307 +registran todos los cambios que hemos hecho, como lo indican
   2.308 +\hgcmd{status} y \hgcmd{diff}.
   2.309 +
   2.310 +\subsection{Admirar nuestro trabajo}
   2.311 +
   2.312 +Una vez hemos terminado la consignación, podemos usar el comando
   2.313 +\hgcmd{tip}\ndt{Punta.} para mostrar el conjunto de cambios que acabamos de crear.
   2.314 +La salida de este comando es idéntica a la de \hgcmd{log}, pero sólo
   2.315 +muestra la revisión más reciente en el repositorio.
   2.316  \interaction{tour.tip}
   2.317 -We refer to the newest revision in the repository as the tip revision,
   2.318 -or simply the tip.
   2.319 +Nos referimos a la revisión más reciente en el repositorio como la
   2.320 +revisión de punta, o simplemente la punta.
   2.321  
   2.322  \section{Sharing changes}
   2.323