annotate es/tour-basic.tex @ 729:ccda4952e5f3

Update Chinese translation
author Dongsheng Song <dongsheng.song@gmail.com>
date Thu, 12 Mar 2009 17:12:18 +0800 (2009-03-12)
parents 9da096de3c52
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
1 \chapter{Una gira de Mercurial: lo b叩sico}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
2 \label{chap:tour-basic}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
3
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
4 \section{Instalar Mercurial en su sistema}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
5 \label{sec:tour:install}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
6 Hay paquetes binarios precompilados de Mercurial disponibles para cada
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
7 sistema operativo popular. Esto hace f叩cil empezar a usar Mercurial
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
8 en su computador inmediatamente.
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
9
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
10 \subsection{Linux}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
11
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
12 Dado que cada distribuci坦n de Linux tiene sus propias herramientas de
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
13 manejo de paquetes, pol鱈ticas, y ritmos de desarrollo, es dif鱈cil dar
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
14 un conjunto exhaustivo de instrucciones sobre c坦mo instalar el paquete
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
15 de Mercurial. La versi坦n de Mercurial que usted tenga a disposici坦n
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
16 puede variar dependiendo de qu辿 tan activa sea la persona que mantiene
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
17 el paquete para su distribuci坦n.
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
18
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
19 Para mantener las cosas simples, me enfocar辿 en instalar Mercurial
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
20 desde la l鱈nea de comandos en las distribuciones de Linux m叩s
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
21 populares. La mayor鱈a de estas distribuciones proveen administradores
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
22 de paquetes gr叩ficos que le permitir叩n instalar Mercurial con un solo
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
23 clic; el nombre de paquete a buscar es \texttt{mercurial}.
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
24
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
25 \begin{itemize}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
26 \item[Debian]
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
27 \begin{codesample4}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
28 apt-get install mercurial
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
29 \end{codesample4}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
30
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
31 \item[Fedora Core]
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
32 \begin{codesample4}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
33 yum install mercurial
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
34 \end{codesample4}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
35
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
36 \item[Gentoo]
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
37 \begin{codesample4}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
38 emerge mercurial
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
39 \end{codesample4}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
40
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
41 \item[OpenSUSE]
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
42 \begin{codesample4}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
43 yum install mercurial
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
44 \end{codesample4}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
45
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
46 \item[Ubuntu] El paquete de Mercurial de Ubuntu est叩 basado en el de
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
47 Debian. Para instalarlo, ejecute el siguiente comando.
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
48 \begin{codesample4}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
49 apt-get install mercurial
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
50 \end{codesample4}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
51 El paquete de Mercurial para Ubuntu tiende a atrasarse con respecto
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
52 a la versi坦n de Debian por un margen de tiempo considerable
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
53 (al momento de escribir esto, 7 meses), lo que en algunos casos
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
54 significar叩 que usted puede encontrarse con problemas que ya habr叩n
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
55 sido resueltos en el paquete de Debian.
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
56 \end{itemize}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
57
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
58 \subsection{Solaris}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
59
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
60 SunFreeWare, en \url{http://www.sunfreeware.com}, es una buena fuente
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
61 para un gran n炭mero de paquetes compilados para Solaris para las
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
62 arquitecturas Intel y Sparc de 32 y 64 bits, incluyendo versiones
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
63 actuales de Mercurial.
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
64
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
65 \subsection{Mac OS X}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
66
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
67 Lee Cantey publica un instalador de Mercurial para Mac OS~X en
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
68 \url{http://mercurial.berkwood.com}. Este paquete funciona en tanto
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
69 en Macs basados en Intel como basados en PowerPC. Antes de que pueda
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
70 usarlo, usted debe instalar una versi坦n compatible de Universal
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
71 MacPython~\cite{web:macpython}. Esto es f叩cil de hacer; simplemente
600
05742420768e corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 478
diff changeset
72 siga las instrucciones del sitio de Lee.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
73
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
74 Tambi辿n es posible instalar Mercurial usando Fink o MacPorts, dos
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
75 administradores de paquetes gratuitos y populares para Mac OS X. Si
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
76 usted tiene Fink, use \command{sudo apt-get install mercurial-py25}.
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
77 Si usa MacPorts, \command{sudo port install mercurial}.
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
78
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
79 \subsection{Windows}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
80
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
81 Lee Cantey publica un instalador de Mercurial para Windows en
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
82 \url{http://mercurial.berkwood.com}. Este paquete no tiene
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
83 % TODO traducci坦n de it just works. Agreed?
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
84 dependencias externas; ``simplemente funciona''.
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
85
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
86 \begin{note}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
87 La versi坦n de Windows de Mercurial no convierte autom叩ticamente
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
88 los fines de l鱈nea entre estilos Windows y Unix. Si usted desea
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
89 compartir trabajo con usuarios de Unix, deber叩 hacer un trabajo
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
90 adicional de configuraci坦n. XXX Terminar esto.
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
91 \end{note}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
92
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
93 \section{Arrancando}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
94
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
95 Para empezar, usaremos el comando \hgcmd{version} para revisar si
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
96 Mercurial est叩 instalado adecuadamente. La informaci坦n de la versi坦n
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
97 que es impresa no es tan importante; lo que nos importa es si imprime
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
98 algo en absoluto.
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
99
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
100 \interaction{tour.version}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
101
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
102 % TODO builtin-> integrado?
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
103 \subsection{Ayuda integrada}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
104
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
105 Mercurial provee un sistema de ayuda integrada. Esto es invaluable
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
106 para 辿sas ocasiones en la que usted est叩 atorado tratando de recordar
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
107 c坦mo ejecutar un comando. Si est叩 completamente atorado, simplemente
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
108 ejecute \hgcmd{help}; esto imprimir叩 una breve lista de comandos,
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
109 junto con una descripci坦n de qu辿 hace cada uno. Si usted solicita
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
110 ayuda sobre un comando espec鱈fico (como abajo), se imprime informaci坦n
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
111 m叩s detallada.
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
112 \interaction{tour.help}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
113 Para un nivel m叩s impresionante de detalle (que usted no va a
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
114 necesitar usualmente) ejecute \hgcmdargs{help}{\hggopt{-v}}. La opci坦n
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
115 \hggopt{-v} es la abreviaci坦n para \hggopt{--verbose}, y le indica a
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
116 Mercurial que imprima m叩s informaci坦n de lo que har鱈a usualmente.
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
117
451
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
118 \section{Trabajar con un repositorio}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
119
451
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
120 En Mercurial, todo sucede dentro de un \emph{repositorio}. El
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
121 repositorio para un proyecto contiene todos los ficheros que
451
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
122 ``pertenecen a'' 辿se proyecto, junto con un registro hist坦rico de los
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
123 ficheros de ese proyecto.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
124
451
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
125 No hay nada particularmente m叩gico acerca de un repositorio; es
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
126 simplemente un 叩rbol de directorios en su sistema de ficheros que
451
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
127 Mercurial trata como especial. Usted puede renombrar o borrar un
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
128 repositorio en el momento que lo desee, usando bien sea la l鱈nea de
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
129 comandos o su explorador de ficheros.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
130
451
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
131 \subsection{Hacer una copia local de un repositorio}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
132
451
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
133 \emph{Copiar} un repositorio es s坦lo ligeramente especial. Aunque
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
134 usted podr鱈a usar un programa normal de copia de ficheros para hacer
451
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
135 una copia del repositorio, es mejor usar el comando integrado que
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
136 Mercurial ofrece. Este comando se llama \hgcmd{clone}\ndt{Del t辿rmino
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
137 ``clonar'' en ingl辿s.}, porque crea una copia id辿ntica de un
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
138 repositorio existente.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
139 \interaction{tour.clone}
451
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
140 Si nuestro clonado tiene 辿xito, deber鱈amos tener un directorio local
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
141 llamado \dirname{hello}. Este directorio contendr叩 algunos ficheros.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
142 \interaction{tour.ls}
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
143 Estos ficheros tienen el mismo contenido e historial en nuestro
451
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
144 repositorio y en el repositorio que clonamos.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
145
451
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
146 Cada repositorio Mercurial est叩 completo, es autocontenido e
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 600
diff changeset
147 independiente. Contiene su propia copia de los ficheros y el historial
451
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
148 de un proyecto. Un repositorio clonado recuerda la ubicaci坦n de la que
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
149 fue clonado, pero no se comunica con ese repositorio, ni con ning炭n
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
150 otro, a menos que usted le indique que lo haga.
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
151
9f460a706292 translated a few sections from tour-basic.tex
jerojasro@localhost
parents: 442
diff changeset
152 Lo que esto significa por ahora es que somos libres de experimentar
454
5e325122bea5 translated 2 paragraphs
jerojasro@localhost
parents: 451
diff changeset
153 con nuestro repositorio, con la tranquilidad de saber que es una
5e325122bea5 translated 2 paragraphs
jerojasro@localhost
parents: 451
diff changeset
154 % TODO figure out what to say instead of sandbox
5e325122bea5 translated 2 paragraphs
jerojasro@localhost
parents: 451
diff changeset
155 ``caja de arena'' privada que no afectar叩 a nadie m叩s.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
156
454
5e325122bea5 translated 2 paragraphs
jerojasro@localhost
parents: 451
diff changeset
157 \subsection{Qu辿 hay en un repositorio?}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
158
454
5e325122bea5 translated 2 paragraphs
jerojasro@localhost
parents: 451
diff changeset
159 Cuando miramos en detalle dentro de un repositorio, podemos ver que
5e325122bea5 translated 2 paragraphs
jerojasro@localhost
parents: 451
diff changeset
160 contiene un directorio llamado \dirname{.hg}. Aqu鱈 es donde Mercurial
5e325122bea5 translated 2 paragraphs
jerojasro@localhost
parents: 451
diff changeset
161 mantiene todos los metadatos del repositorio.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
162 \interaction{tour.ls-a}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
163
454
5e325122bea5 translated 2 paragraphs
jerojasro@localhost
parents: 451
diff changeset
164 Los contenidos del directorio \dirname{.hg} y sus subdirectorios son
5e325122bea5 translated 2 paragraphs
jerojasro@localhost
parents: 451
diff changeset
165 exclusivos de Mercurial. Usted es libre de hacer lo que desee con
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
166 cualquier otro fichero o directorio en el repositorio.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
167
456
dae36f024e14 some paragraphs translated, added a couple of rules-of-thumb for translation of terms
Javier Rojas <jerojasro@devnull.li>
parents: 454
diff changeset
168 Para introducir algo de terminolog鱈a, el directorio \dirname{.hg} es
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
169 el repositorio ``real'', y todos los ficheros y directorios que
456
dae36f024e14 some paragraphs translated, added a couple of rules-of-thumb for translation of terms
Javier Rojas <jerojasro@devnull.li>
parents: 454
diff changeset
170 coexisten con 辿l est叩n en el \emph{directorio de trabajo}. Una forma
dae36f024e14 some paragraphs translated, added a couple of rules-of-thumb for translation of terms
Javier Rojas <jerojasro@devnull.li>
parents: 454
diff changeset
171 sencilla de recordar esta distinci坦n es que el \emph{repositorio}
dae36f024e14 some paragraphs translated, added a couple of rules-of-thumb for translation of terms
Javier Rojas <jerojasro@devnull.li>
parents: 454
diff changeset
172 contiene el \emph{historial} de su proyecto, mientras que el
dae36f024e14 some paragraphs translated, added a couple of rules-of-thumb for translation of terms
Javier Rojas <jerojasro@devnull.li>
parents: 454
diff changeset
173 \emph{directorio de trabajo} contiene una \emph{instant叩nea} de su
dae36f024e14 some paragraphs translated, added a couple of rules-of-thumb for translation of terms
Javier Rojas <jerojasro@devnull.li>
parents: 454
diff changeset
174 proyecto en un punto particular del historial.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
175
456
dae36f024e14 some paragraphs translated, added a couple of rules-of-thumb for translation of terms
Javier Rojas <jerojasro@devnull.li>
parents: 454
diff changeset
176 \section{Vistazo r叩pido al historial}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
177
456
dae36f024e14 some paragraphs translated, added a couple of rules-of-thumb for translation of terms
Javier Rojas <jerojasro@devnull.li>
parents: 454
diff changeset
178 Una de las primeras cosas que se desea hacer con un repositorio nuevo,
600
05742420768e corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 478
diff changeset
179 poco conocido, es conocer su historial. El comando \hgcmd{log} nos
456
dae36f024e14 some paragraphs translated, added a couple of rules-of-thumb for translation of terms
Javier Rojas <jerojasro@devnull.li>
parents: 454
diff changeset
180 permite ver el mismo.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
181 \interaction{tour.log}
457
15a6b61335aa translated a couple of paragraphs, and updated the table of works in progress
Javier Rojas <jerojasro@devnull.li>
parents: 456
diff changeset
182 Por defecto este programa imprime un p叩rrafo breve por cada cambio al
15a6b61335aa translated a couple of paragraphs, and updated the table of works in progress
Javier Rojas <jerojasro@devnull.li>
parents: 456
diff changeset
183 proyecto que haya sido grabado. Dentro de la terminolog鱈a de
600
05742420768e corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 478
diff changeset
184 Mercurial, cada uno de estos eventos es llamado \emph{conjunto de
457
15a6b61335aa translated a couple of paragraphs, and updated the table of works in progress
Javier Rojas <jerojasro@devnull.li>
parents: 456
diff changeset
185 cambios}, porque pueden contener un registro de cambios a varios
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
186 ficheros.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
187
457
15a6b61335aa translated a couple of paragraphs, and updated the table of works in progress
Javier Rojas <jerojasro@devnull.li>
parents: 456
diff changeset
188 Los campos de la salida de \hgcmd{log} son los siguientes.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
189 \begin{itemize}
457
15a6b61335aa translated a couple of paragraphs, and updated the table of works in progress
Javier Rojas <jerojasro@devnull.li>
parents: 456
diff changeset
190 \item[\texttt{changeset}]\hspace{-0.5em}\ndt{Conjunto de cambios.} Este campo
15a6b61335aa translated a couple of paragraphs, and updated the table of works in progress
Javier Rojas <jerojasro@devnull.li>
parents: 456
diff changeset
191 tiene un n炭mero, seguido por un
15a6b61335aa translated a couple of paragraphs, and updated the table of works in progress
Javier Rojas <jerojasro@devnull.li>
parents: 456
diff changeset
192 % TODO digo mejor seguido por un dos puntos ? string =>
15a6b61335aa translated a couple of paragraphs, and updated the table of works in progress
Javier Rojas <jerojasro@devnull.li>
parents: 456
diff changeset
193 % cadena?
15a6b61335aa translated a couple of paragraphs, and updated the table of works in progress
Javier Rojas <jerojasro@devnull.li>
parents: 456
diff changeset
194 \texttt{:}, seguido por una cadena hexadecimal. Ambos son
15a6b61335aa translated a couple of paragraphs, and updated the table of works in progress
Javier Rojas <jerojasro@devnull.li>
parents: 456
diff changeset
195 \emph{identificadores} para el conjunto de cambios. Hay dos
15a6b61335aa translated a couple of paragraphs, and updated the table of works in progress
Javier Rojas <jerojasro@devnull.li>
parents: 456
diff changeset
196 identificadores porque el n炭mero es m叩s corto y m叩s f叩cil de
15a6b61335aa translated a couple of paragraphs, and updated the table of works in progress
Javier Rojas <jerojasro@devnull.li>
parents: 456
diff changeset
197 recordar que la cadena hexadecimal.
15a6b61335aa translated a couple of paragraphs, and updated the table of works in progress
Javier Rojas <jerojasro@devnull.li>
parents: 456
diff changeset
198
15a6b61335aa translated a couple of paragraphs, and updated the table of works in progress
Javier Rojas <jerojasro@devnull.li>
parents: 456
diff changeset
199 \item[\texttt{user}]\hspace{-0.5em}\ndt{Usuario.} La identidad de la
15a6b61335aa translated a couple of paragraphs, and updated the table of works in progress
Javier Rojas <jerojasro@devnull.li>
parents: 456
diff changeset
200 persona que cre坦 el conjunto de cambios. Este es un campo en el
15a6b61335aa translated a couple of paragraphs, and updated the table of works in progress
Javier Rojas <jerojasro@devnull.li>
parents: 456
diff changeset
201 que se puede almacenar cualquier valor, pero en la mayor鱈a de los
15a6b61335aa translated a couple of paragraphs, and updated the table of works in progress
Javier Rojas <jerojasro@devnull.li>
parents: 456
diff changeset
202 casos contiene el nombre de una persona y su direcci坦n de correo
15a6b61335aa translated a couple of paragraphs, and updated the table of works in progress
Javier Rojas <jerojasro@devnull.li>
parents: 456
diff changeset
203 electr坦nico.
15a6b61335aa translated a couple of paragraphs, and updated the table of works in progress
Javier Rojas <jerojasro@devnull.li>
parents: 456
diff changeset
204
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
205 \item[\texttt{date}]\hspace{-0.5em}\ndt{Fecha.} La fecha y hora en la
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
206 que el conjunto de cambios fue creado, y la zona horaria en la que
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
207 fue creado. (La fecha y hora son locales a dicha zona horaria;
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
208 ambos muestran la fecha y hora para la persona que cre坦 el
600
05742420768e corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 478
diff changeset
209 conjunto de cambios).
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
210
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
211 \item[\texttt{summary}]\hspace{-0.5em}\ndt{Sumario.}
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
212 La primera l鱈nea del texto que us坦 la persona que cre坦 el conjunto
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
213 de cambios para describir el mismo.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
214 \end{itemize}
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
215 El texto impreso por \hgcmd{log} es s坦lo un sumario; omite una gran
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
216 cantidad de detalles.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
217
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
218 La figura~\ref{fig:tour-basic:history} es una representaci坦n
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
219 gr叩fica del historial del repositorio \dirname{hello}, para hacer m叩s
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
220 f叩cil ver en qu辿 direcci坦n est叩 ``fluyendo'' el historial. Volveremos
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
221 a esto varias veces en este cap鱈tulo y en los siguientes.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
222
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
223 \begin{figure}[ht]
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
224 \centering
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
225 \grafix{tour-history}
600
05742420768e corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 478
diff changeset
226 \caption{Historial gr叩fico del repositorio \dirname{hello}}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
227 \label{fig:tour-basic:history}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
228 \end{figure}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
229
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
230 \subsection{Conjuntos de cambios, revisiones, y comunic叩ndose con
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
231 otras personas}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
232
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
233 %TODO sloppy => desordenado ? TODO hablar del ingl辿s? o de espa単ol?
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
234 Ya que el ingl辿s es un lenguaje notablemente desordenado, y el 叩rea de
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
235 ciencias de la computaci坦n tiene una notable historia de confusi坦n de
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
236 % TODO insertar ? al rev辿s. no s辿 c坦mo en un teclado de estos.
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
237 t辿rminos (porqu辿 usar s坦lo un t辿rmino cuando cuatro pueden servir?),
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
238 el control de revisiones tiene una variedad de frases y palabras que
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
239 tienen el mismo significado. Si usted habla acerca del historial de
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
240 Mercurial con alguien, encontrar叩 que la expresi坦n ``conjunto de
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
241 cambios'' es abreviada a menudo como ``cambio'' o (por escrito)
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
242 ``cset''\ndt{Abreviatura para la expresi坦n ``changeset'' en ingl辿s.},
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
243 y algunas veces un se hace referencia a un conjunto de cambios como
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
244 una ``revisi坦n'' o ``rev''\ndt{De nuevo, como abreviaci坦n para el
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
245 t辿rmino en ingl辿s para ``revisi坦n'' (``revision'').}.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
246
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
247 Si bien no es relevante qu辿 \emph{palabra} use usted para referirse al
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
248 concepto ``conjunto de cambios'', el \emph{identificador} que usted
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
249 use para referise a ``un \emph{conjunto de cambios} particular'' es
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
250 muy importante. Recuerde que el campo \texttt{changeset} en la salida
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
251 de \hgcmd{log} identifica un conjunto de cambios usando tanto un
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
252 n炭mero como una cadena hexadecimal.
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
253
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
254 \begin{itemize}
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
255 \item El n炭mero de revisi坦n \emph{s坦lo es v叩lido dentro del
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
256 repositorio}.
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
257 \item Por otro lado, la cadena hexadecimal es el
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
258 \emph{identificador permanente e inmutable} que siempre
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
259 identificar叩 辿se conjunto de cambios en \emph{todas} las
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
260 copias del repositorio.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
261 \end{itemize}
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
262 La diferencia es importante. Si usted le env鱈a a alguien un correo
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
263 electr坦nico hablando acerca de la ``revisi坦n~33'', hay una
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
264 probabilidad alta de que la revisi坦n~33 de esa persona \emph{no sea la
600
05742420768e corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 478
diff changeset
265 misma suya}. Esto sucede porque el n炭mero de revisi坦n depende del
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
266 orden en que llegan los cambios al repositorio, y no hay ninguna
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
267 garant鱈a de que los mismos cambios llegar叩n en el mismo orden en
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
268 diferentes repositorios. Tres cambios dados $a,b,c$ pueden aparecer en
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
269 un repositorio como $0,1,2$, mientras que en otro aparecen como
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
270 $1,0,2$.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
271
461
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
272 Mercurial usa los n炭meros de revisi坦n simplemente como una abreviaci坦n
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
273 conveniente. Si usted necesita hablar con alguien acerca de un
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
274 conjunto de cambios, o llevar el registro de un conjunto de cambios
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
275 por alguna otra raz坦n (por ejemplo, en un reporte de fallo), use el
90b67ac5862b translated up to section 1.4.1
Javier Rojas <jerojasro@devnull.li>
parents: 457
diff changeset
276 identificador hexadecimal.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
277
462
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
278 \subsection{Ver revisiones espec鱈ficas}
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
279
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
280 Para reducir la salida de \hgcmd{log} a una sola revisi坦n, use la
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
281 opci坦n \hgopt{log}{-r} (o \hgopt{log}{--rev}). Puede usar un n炭mero
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
282 de revisi坦n o un identificador hexadecimal de conjunto de cambios, y
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
283 puede pasar tantas revisiones como desee.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
284
462
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
285 \interaction{tour.log-r}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
286
462
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
287 Si desea ver el historial de varias revisiones sin tener que mencionar
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
288 cada una de ellas, puede usar la \emph{notaci坦n de rango}; esto le
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
289 permite expresar el concepto ``quiero ver todas las revisiones entre
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
290 $a$ y $b$, inclusive''.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
291 \interaction{tour.log.range}
462
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
292 Mercurial tambi辿n respeta el orden en que usted especifica las
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
293 revisiones, as鱈 que \hgcmdargs{log}{-r 2:4} muestra $2,3,4$ mientras
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
294 que \hgcmdargs{log}{-r 4:2} muestra $4,3,2$.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
295
462
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
296 \subsection{Informaci坦n m叩s detallada}
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
297 Aunque la informaci坦n presentada por \hgcmd{log} es 炭til si usted sabe
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
298 de antemano qu辿 est叩 buscando, puede que necesite ver una descripci坦n
600
05742420768e corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 478
diff changeset
299 completa del cambio, o una lista de los ficheros que cambiaron, si
462
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
300 est叩 tratando de averiguar si un conjunto de cambios dado es el que
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
301 usted est叩 buscando. La opci坦n \hggopt{-v} (or \hggopt{--verbose}) del
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
302 comando \hgcmd{log} le da este nivel extra de detalle.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
303 \interaction{tour.log-v}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
304
462
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
305 Si desea ver tanto la descripci坦n como el contenido de un cambio,
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
306 a単ada la opci坦n \hgopt{log}{-p} (o \hgopt{log}{--patch}). Esto muestra
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
307 % TODO qu辿 hacemos con diff unificado? convervarlo, por ser la
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
308 % acepci坦n usual?
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
309 el contenido de un cambio como un \emph{diff unificado} (si usted
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
310 nunca ha visto un diff unificado antes, vea la
e8a5068c7605 finished section 1.5
Javier Rojas <jerojasro@devnull.li>
parents: 461
diff changeset
311 secci坦n~\ref{sec:mq:patch} para un vistazo global).
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
312 \interaction{tour.log-vp}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
313
463
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
314 \section{Todo acerca de las opciones para comandos}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
315
463
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
316 Tomemos un breve descanso de la tarea de explorar los comandos de
464
5c676825e7a1 corrected typo and grammar error
Javier Rojas <jerojasro@devnull.li>
parents: 463
diff changeset
317 Mercurial para hablar de un patr坦n en la manera en que trabajan; ser叩
463
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
318 炭til tener esto en mente a medida que avanza nuestra gira.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
319
464
5c676825e7a1 corrected typo and grammar error
Javier Rojas <jerojasro@devnull.li>
parents: 463
diff changeset
320 Mercurial tiene un enfoque directo y consistente en el manejo de las
463
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
321 opciones que usted le puede pasar a los comandos. Se siguen las
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
322 convenciones para opciones que son comunes en sistemas Linux y Unix
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
323 modernos.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
324 \begin{itemize}
463
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
325 \item Cada opci坦n tiene un nombre largo. Por ejemplo, el comando
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
326 \hgcmd{log} acepta la opci坦n \hgopt{log}{--rev}, como ya hemos
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
327 visto.
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
328 \item Muchas opciones tienen tambi辿n un nombre corto. En vez de
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
329 \hgopt{log}{--rev}, podemos usar \hgopt{log}{-r}. (El motivo para
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
330 que algunas opciones no tengan nombres cortos es que dichas
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
331 opciones se usan rara vez.)
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
332 \item Las opciones largas empiezan con dos guiones (p.ej.~\hgopt{log}{--rev}),
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
333 mientras que las opciones cortas empiezan con uno (e.g.~\hgopt{log}{-r}).
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
334 \item El nombre y uso de las opciones es consistente en todos los
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
335 comandos. Por ejemplo, cada comando que le permite pasar un ID de
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
336 conjunto de cambios o un n炭mero de revisi坦n acepta tanto la opci坦n
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
337 \hgopt{log}{-r} como la \hgopt{log}{--rev}.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
338 \end{itemize}
463
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
339 En los ejemplos en este libro, uso las opciones cortas en vez de las
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
340 largas. Esto s坦lo muestra mis preferencias, as鱈 que no le d辿
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
341 significado especial a eso.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
342
463
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
343 Muchos de los comandos que generan salida de alg炭n tipo mostrar叩n m叩s
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
344 salida cuando se les pase la opci坦n \hggopt{-v} (o
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
345 \hggopt{--verbose}\ndt{Prolijo.}), y menos cuando se les pase la opci坦n \hggopt{-q}
932c10e8c225 now, this has section 1.5 finished. Last commit had 1.4. Typo in commit message
Javier Rojas <jerojasro@devnull.li>
parents: 462
diff changeset
346 (o \hggopt{--quiet}\ndt{Silencioso.}).
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
347
465
6c5ec67f47f9 translated a couple of paragraphs of section 1.6
Javier Rojas <jerojasro@devnull.li>
parents: 464
diff changeset
348 \section{Hacer y repasar cambios}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
349
465
6c5ec67f47f9 translated a couple of paragraphs of section 1.6
Javier Rojas <jerojasro@devnull.li>
parents: 464
diff changeset
350 Ahora que tenemos una comprensi坦n adecuada sobre c坦mo revisar el
6c5ec67f47f9 translated a couple of paragraphs of section 1.6
Javier Rojas <jerojasro@devnull.li>
parents: 464
diff changeset
351 historial en Mercurial, hagamos algunos cambios y veamos c坦mo
6c5ec67f47f9 translated a couple of paragraphs of section 1.6
Javier Rojas <jerojasro@devnull.li>
parents: 464
diff changeset
352 examinarlos.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
353
465
6c5ec67f47f9 translated a couple of paragraphs of section 1.6
Javier Rojas <jerojasro@devnull.li>
parents: 464
diff changeset
354 Lo primero que haremos ser叩 aislar nuestro experimento en un
6c5ec67f47f9 translated a couple of paragraphs of section 1.6
Javier Rojas <jerojasro@devnull.li>
parents: 464
diff changeset
355 repositorio propio. Usaremos el comando \hgcmd{clone}, pero no hace
600
05742420768e corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 478
diff changeset
356 falta clonar una copia del repositorio remoto. Como ya contamos con
465
6c5ec67f47f9 translated a couple of paragraphs of section 1.6
Javier Rojas <jerojasro@devnull.li>
parents: 464
diff changeset
357 una copia local del mismo, podemos clonar esa. Esto es mucho m叩s
6c5ec67f47f9 translated a couple of paragraphs of section 1.6
Javier Rojas <jerojasro@devnull.li>
parents: 464
diff changeset
358 r叩pido que clonar a trav辿s de la red, y en la mayor鱈a de los casos
6c5ec67f47f9 translated a couple of paragraphs of section 1.6
Javier Rojas <jerojasro@devnull.li>
parents: 464
diff changeset
359 clonar un repositorio local usa menos espacio en disco tambi辿n.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
360 \interaction{tour.reclone}
467
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
361 A manera de recomendaci坦n, es considerado buena pr叩ctica mantener una
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
362 copia ``pr鱈stina'' de un repositorio remoto a mano, del cual usted
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
363 puede hacer clones temporales para crear cajas de arena para cada
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
364 tarea en la que desee trabajar. Esto le permite trabajar en m炭ltiples
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
365 tareas en paralelo, teniendo cada una de ellas aislada de las otras
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
366 hasta que est辿n completas y usted est辿 listo para integrar los cambios
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
367 de vuelta. Como los clones locales son tan baratos, clonar y destruir
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
368 repositorios no consume demasiados recursos, lo que facilita hacerlo
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
369 en cualquier momento.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
370
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
371 En nuestro repositorio \dirname{my-hello}, hay un fichero
467
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
372 \filename{hello.c} que contiene el cl叩sico programa ``hello,
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
373 world''\ndt{Hola, mundo.}. Usaremos el cl叩sico y venerado comando
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
374 \command{sed} para editar este fichero y hacer que imprima una segunda
467
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
375 l鱈nea de salida. (Estoy usando el comando \command{sed} para hacer
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
376 esto s坦lo porque es f叩cil escribir un ejemplo automatizado con 辿l.
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
377 Dado que usted no tiene esta restricci坦n, probablemente no querr叩 usar
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
378 \command{sed}; use su editor de texto preferido para hacer lo mismo).
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
379 \interaction{tour.sed}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
380
467
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
381 El comando \hgcmd{status} de Mercurial nos dice lo que Mercurial sabe
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
382 acerca de los ficheros en el repositorio.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
383 \interaction{tour.status}
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
384 El comando \hgcmd{status} no imprime nada para algunos ficheros, s坦lo
467
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
385 una l鱈nea empezando con ``\texttt{M}'' para el fichero
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
386 \filename{hello.c}. A menos que usted lo indique expl鱈citamente,
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
387 \hgcmd{status} no imprimir叩 nada respecto a los ficheros que no han
467
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
388 sido modificados.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
389
467
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
390 La ``\texttt{M}'' indica que Mercurial se dio cuenta de que nosotros
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
391 modificamos \filename{hello.c}. No tuvimos que \emph{decirle} a
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
392 Mercurial que 鱈bamos a modificar ese fichero antes de hacerlo, o que
467
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
393 lo modificamos una vez terminamos de hacerlo; 辿l fue capaz de darse
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
394 cuenta de esto por s鱈 mismo.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
395
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
396 Es algo 炭til saber que hemos modificado el fichero \filename{hello.c},
467
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
397 pero preferir鱈amos saber exactamente \emph{qu辿} cambios hicimos.
1d31f4902e62 translated up to section 1.6 (included)
Javier Rojas <jerojasro@devnull.li>
parents: 465
diff changeset
398 Para averiguar esto, usamos el comando \hgcmd{diff}.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
399 \interaction{tour.diff}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
400
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
401 \section{Grabar cambios en un nuevo conjunto de cambios}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
402
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
403 Podemos modificar, compilar y probar nuestros cambios, y usar
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
404 \hgcmd{status} y \hgcmd{diff} para revisar los mismos, hasta que
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
405 estemos satisfechos con los resultados y lleguemos a un momento en el
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
406 que sea natural que querramos guardar nuestro trabajo en un nuevo
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
407 conjunto de cambios.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
408
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
409 El comando \hgcmd{commit} nos permite crear un nuevo conjunto de
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
410 cambios. Nos referiremos usualmente a esto como ``hacer una consigna''
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
411 o consignar.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
412
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
413 \subsection{Definir un nombre de usuario}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
414
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
415 Cuando usted trata de ejecutar \hgcmd{commit}\ndt{Hacer una
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
416 consignaci坦n} por primera vez, no est叩 garantizado que lo logre.
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
417 Mercurial registra su nombre y direcci坦n en cada cambio que usted
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
418 consigna, para que m叩s adelante otros puedan saber qui辿n es el
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
419 responsable de cada cambio. Mercurial trata de encontrar un nombre de
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
420 % TODO consigna o consignaci坦n?
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
421 usuario adecuado con el cual registrar la consignaci坦n. Se intenta con
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
422 cada uno de los siguientes m辿todos, en el orden presentado.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
423 \begin{enumerate}
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
424 \item Si usted pasa la opci坦n \hgopt{commit}{-u} al comando \hgcmd{commit}
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
425 en la l鱈nea de comandos, seguido de un nombre de usuario, se le da a
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
426 esto la m叩xima precedencia.
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
427 \item A continuaci坦n se revisa si usted ha definido la variable de
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
428 entorno \envar{HGUSER}.
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
429 \item Si usted crea un fichero en su directorio personal llamado
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
430 \sfilename{.hgrc}, con una entrada \rcitem{ui}{username}, se usa
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
431 luego. Para revisar c坦mo debe verse este fichero, refi辿rase a la
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
432 secci坦n~\ref{sec:tour-basic:username} m叩s abajo.
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
433 \item Si usted ha definido la variable de entorno \envar{EMAIL}, ser叩
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
434 usada a continuaci坦n.
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
435 \item Mercurial le pedir叩 a su sistema buscar su nombre de usuario
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
436 % TODO host => m叩quina
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
437 local, y el nombre de m叩quina, y construir叩 un nombre de usuario a
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
438 partir de estos componentes. Ya que esto generalmente termina
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
439 generando un nombre de usuario no muy 炭til, se imprimir叩 una
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
440 advertencia si es necesario hacerlo.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
441 \end{enumerate}
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
442 Si todos estos procedimientos fallan, Mercurial fallar叩, e imprimir叩
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
443 un mensaje de error. En este caso, no le permitir叩 hacer la
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
444 consignaci坦n hasta que usted defina un nombre de usuario.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
445
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
446 Trate de ver la variable de entorno \envar{HGUSER} y la opci坦n
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
447 \hgopt{commit}{-u} del comando \hgcmd{commit} como formas de
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
448 \emph{hacer caso omiso} de la selecci坦n de nombre de usuario que
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
449 Mercurial hace normalmente. Para uso normal, la manera m叩s simple y
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
450 sencilla de definir un nombre de usuario para usted es crear un
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
451 fichero \sfilename{.hgrc}; los detalles se encuentran m叩s adelante.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
452
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
453 \subsubsection{Crear el fichero de configuraci坦n de Mercurial}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
454 \label{sec:tour-basic:username}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
455
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
456 Para definir un nombre de usuario, use su editor de texto favorito
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
457 para crear un fichero llamado \sfilename{.hgrc} en su directorio
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
458 personal. Mercurial usar叩 este fichero para obtener las
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
459 configuraciones personalizadas que usted haya hecho. El contenido
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
460 inicial de su fichero \sfilename{.hgrc} deber鱈a verse as鱈.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
461 \begin{codesample2}
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
462 # Este es un fichero de configuraci坦n de Mercurial.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
463 [ui]
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
464 username = Primernombre Apellido <correo.electronico@dominio.net>
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
465 \end{codesample2}
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
466 La l鱈nea ``\texttt{[ui]}'' define una \emph{section} del fichero de
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
467 configuraci坦n, as鱈 que usted puede leer la l鱈nea ``\texttt{username =
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
468 ...}'' como ``defina el valor del elemento \texttt{username} en la
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
469 secci坦n \texttt{ui}''.
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
470 Una secci坦n continua hasta que empieza otra nueva, o se llega al final
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
471 del fichero. Mercurial ignora las l鱈neas vac鱈as y considera cualquier
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
472 texto desde el caracter ``\texttt{\#}'' hasta el final de la l鱈nea
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
473 como un comentario.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
474
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
475 \subsubsection{Escoger un nombre de usuario}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
476
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
477 Usted puede usar el texto que desee como el valor del campo de
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
478 configuraci坦n \texttt{username}, ya que esta informaci坦n ser叩 le鱈da
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
479 por otras personas, e interpretada por Mercurial. La convenci坦n que
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
480 sigue la mayor鱈a de la gente es usar su nombre y direcci坦n de correo,
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
481 como en el ejemplo anterior.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
482
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
483 \begin{note}
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
484 % TODO web
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
485 El servidor web integrado de Mercurial ofusca las direcciones de
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
486 correo, para dificultar la tarea de las herramientas de
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
487 recolecci坦n de direcciones de correo que usan los
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
488 spammers\ndt{Personas que env鱈an correo no solicitado, tambi辿n
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
489 conocido como correo basura}. Esto reduce la probabilidad de que
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
490 usted empiece a recibir m叩s correo basura si publica un
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
491 repositorio en la red.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
492 \end{note}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
493
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
494 \subsection{Escribir un mensaje de consignaci坦n}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
495
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
496 Cuando consignamos un cambio, Mercurial nos ubica dentro de un editor
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
497 de texto, para ingresar un mensaje que describa las modificaciones que
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
498 hemos introducido en este conjunto de cambios. Esto es conocido como
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
499 un \emph{mensaje de consignaci坦n}. Ser叩 un registro de lo que hicimos
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
500 y porqu辿 lo hicimos, y ser叩 impreso por \hgcmd{log} una vez hayamos
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
501 hecho la consignaci坦n.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
502 \interaction{tour.commit}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
503
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
504 El editor en que \hgcmd{commit} nos ubica contendr叩 una l鱈nea vac鱈a,
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
505 seguida de varias l鱈neas que empiezan con la cadena ``\texttt{HG:}''.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
506 \begin{codesample2}
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
507 \emph{l鱈nea vac鱈a}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
508 HG: changed hello.c
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
509 \end{codesample2}
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
510 Mercurial ignora las l鱈neas que empiezan con ``\texttt{HG:}''; s坦lo
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
511 las usa para indicarnos para cu叩les ficheros est叩 registrando los
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
512 cambios. Modificar o borrar estas l鱈neas no tiene ning炭n efecto.
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
513
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
514 \subsection{Escribir un buen mensaje de consignaci坦n}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
515
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
516 Ya que por defecto \hgcmd{log} s坦lo muestra la primera l鱈nea de un
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
517 mensaje de consignaci坦n, lo mejor es escribir un mensaje cuya primera
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
518 l鱈nea tenga significado por s鱈 misma. A continuaci坦n se encuentra un
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
519 ejemplo de un mensaje de consignaci坦n que \emph{no} sigue esta
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
520 pauta, y debido a ello tiene un sumario que no es legible.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
521 \begin{codesample2}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
522 changeset: 73:584af0e231be
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
523 user: Persona Censurada <persona.censurada@ejemplo.org>
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
524 date: Tue Sep 26 21:37:07 2006 -0700
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
525 summary: se incluye buildmeister/commondefs. A単ade un m坦dulo
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
526 \end{codesample2}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
527
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
528 Con respecto al resto del contenido del mensaje de consignaci坦n, no
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
529 hay reglas estrictas-y-r叩pidas. Mercurial no interpreta ni le da
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
530 importancia a los contenidos del mensaje de consignaci坦n, aunque es
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
531 posible que su proyecto tenga pol鱈ticas que definan una manera
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
532 particular de escribirlo.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
533
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
534 Mi preferencia personal es usar mensajes de consignaci坦n cortos pero
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
535 informativos, que me digan algo que no puedo inferir con una mirada
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
536 r叩pida a la salida de \hgcmdargs{log}{--patch}.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
537
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
538 \subsection{Cancelar una consignaci坦n}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
539
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
540 Si usted decide que no desea hacer la consignaci坦n mientras est叩
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
541 editando el mensaje de la misma, simplemente cierre su editor sin
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
542 guardar los cambios al fichero que est叩 editando. Esto har叩 que no
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
543 pase nada ni en el repositorio ni en el directorio de trabajo.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
544
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
545 Si ejecutamos el comando \hgcmd{commit} sin ning炭n argumento, se
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
546 registran todos los cambios que hemos hecho, como lo indican
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
547 \hgcmd{status} y \hgcmd{diff}.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
548
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
549 \subsection{Admirar nuestro trabajo}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
550
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
551 Una vez hemos terminado la consignaci坦n, podemos usar el comando
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
552 \hgcmd{tip}\ndt{Punta.} para mostrar el conjunto de cambios que acabamos de crear.
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
553 La salida de este comando es id辿ntica a la de \hgcmd{log}, pero s坦lo
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
554 muestra la revisi坦n m叩s reciente en el repositorio.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
555 \interaction{tour.tip}
470
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
556 Nos referimos a la revisi坦n m叩s reciente en el repositorio como la
0801d625fabe translated up to section 1.8
Javier Rojas <jerojasro@devnull.li>
parents: 467
diff changeset
557 revisi坦n de punta, o simplemente la punta.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
558
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
559 \section{Compartir cambios}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
560
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
561 Anteriormente mencionamos que los repositorios en Mercurial est叩n auto
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
562 contenidos. Esto quiere decir que el conjunto de cambios que acabamos
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
563 de crear s坦lo existe en nuestro repositorio \dirname{my-hello}. Veamos
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
564 unas cuantas formas de propagar este cambio a otros repositorios.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
565
471
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
566 \subsection{Jalar cambios desde otro repositorio}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
567 \label{sec:tour:pull}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
568
471
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
569 Para empezar, clonemos nuestro repositorio \dirname{hello} original,
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
570 el cual no contiene el cambio que acabamos de consignar. Llamaremos a
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
571 este repositorio temporal \dirname{hello-pull}.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
572 \interaction{tour.clone-pull}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
573
471
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
574 Usaremos el comando \hgcmd{pull} para traer los cambios de
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
575 \dirname{my-hello} y ponerlos en \dirname{hello-pull}. Sin embargo,
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
576 traer cambios desconocidos y aplicarlos en un repositorio es una
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
577 perspectiva que asusta al menos un poco. Mercurial cuenta con el
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
578 comando \hgcmd{incoming}\ndt{Entrante, o cambios entrantes.} para
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
579 decirnos qu辿 cambios \emph{jalar鱈a} el comando \hgcmd{pull} al
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
580 repositorio, sin jalarlos.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
581 \interaction{tour.incoming}
471
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
582 (Por supuesto, alguien podr鱈a enviar m叩s conjuntos de cambios al
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
583 repositorio en el tiempo que pasa entre la ejecuci坦n de
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
584 \hgcmd{incoming} y la ejecuci坦n de \hgcmd{pull} para jalar los
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
585 cambios, as鱈 que es posible que terminemos jalando cambios que no
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
586 esper叩bamos.)
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
587
471
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
588 Traer cambios al repositorio simplemente es cuesti坦n de ejecutar el
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
589 comando \hgcmd{pull}, indic叩ndole de qu辿 repositorio debe jalarlos.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
590 \interaction{tour.pull}
471
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
591 Como puede verse por las salidas antes-y-despu辿s de \hgcmd{tip}, hemos
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
592 jalado exitosamente los cambios en nuestro repositorio. A炭n falta un
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
593 paso para que podamos ver estos cambios en nuestro directorio de
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
594 trabajo.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
595
471
b73654de597e translated up to section 1.8.6 and updated the project status
Javier Rojas <jerojasro@devnull.li>
parents: 470
diff changeset
596 \subsection{Actualizar el directorio de trabajo}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
597
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
598 Hasta ahora hemos pasado por alto la relaci坦n entre un repositorio y
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
599 su directorio de trabajo. El comando \hgcmd{pull} que ejecutamos en la
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
600 secci坦n~\ref{sec:tour:pull} trajo los cambios al repositorio, pero si
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
601 revisamos, no hay rastro de esos cambios en el directorio de trabajo.
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
602 Esto pasa porque \hgcmd{pull} (por defecto) no modifica el directorio de
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
603 trabajo. En vez de eso, usamos el comando
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
604 \hgcmd{update}\ndt{Actualizar.} para hacerlo.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
605 \interaction{tour.update}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
606
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
607 Puede parecer algo raro que \hgcmd{pull} no actualice el directorio de
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
608 trabajo autom叩ticamente. De hecho, hay una buena raz坦n para esto:
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
609 usted puede usar \hgcmd{update} para actualizar el directorio de
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
610 trabajo al estado en que se encontraba en \emph{cualquier revisi坦n}
600
05742420768e corrected some typos
Javier Rojas <jerojasro@devnull.li>
parents: 478
diff changeset
611 del historial del repositorio. Si usted hubiera actualizado el
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
612 directorio de trabajo a una revisi坦n anterior---digamos, para buscar
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
613 el origen de un fallo---y hubiera corrido un \hgcmd{pull} que hubiera
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
614 actualizado el directorio de trabajo autom叩ticamente a la nueva
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
615 revisi坦n, puede que no estuviera particularmente contento.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
616
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
617 Sin embargo, como jalar-y-actualizar es una secuencia de operaciones
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
618 muy com炭n, Mercurial le permite combinarlas al pasar la opci坦n
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
619 \hgopt{pull}{-u}
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
620 a \hgcmd{pull}.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
621 \begin{codesample2}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
622 hg pull -u
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
623 \end{codesample2}
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
624 Si mira de vuelta la salida de \hgcmd{pull} en la
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
625 secci坦n~\ref{sec:tour:pull} cuando lo ejecutamos sin la opci坦n \hgopt{pull}{-u},
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
626 ver叩 que el comando imprimi坦 un amable recordatorio de que tenemos que
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
627 encargarnos expl鱈citamente de actualizar el directorio de trabajo:
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
628 \begin{codesample2}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
629 (run 'hg update' to get a working copy)
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
630 \end{codesample2}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
631
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
632 Para averiguar en qu辿 revisi坦n se encuentra el directorio de trabajo,
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
633 use el comando \hgcmd{parents}.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
634 \interaction{tour.parents}
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
635 Si mira de nuevo la figura~\ref{fig:tour-basic:history}, ver叩 flechas
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
636 conectando cada conjunto de cambios. En cada caso, el nodo del que la flecha
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
637 \emph{sale} es un padre, y el nodo al que la flecha \emph{llega} es
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
638 su hijo. El directorio de trabajo tiene un padre exactamente de la
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
639 misma manera; 辿se es el conjunto de cambios que contiene actualmente
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
640 el directorio de trabajo.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
641
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
642 Para actualizar el conjunto de trabajo a una revisi坦n particular, pase
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
643 un n炭mero de revisi坦n o un ID de conjunto de cambios al comando
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
644 \hgcmd{update}.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
645 \interaction{tour.older}
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
646 Si no indica expl鱈citamente una revisi坦n, \hgcmd{update} actualizar叩
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
647 hasta la revisi坦n de punta, como se vio en la segunda llamada a
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
648 \hgcmd{update} en el ejemplo anterior.
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
649
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
650 \subsection{Empujar cambios a otro repositorio}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
651
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
652 Mercurial nos permite empujar cambios a otro repositorio, desde el
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
653 % TODO cambi辿 "visitando" por "usando"
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
654 repositorio que estemos usando actualmente. De la misma forma que en
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
655 el ejemplo de \hgcmd{pull} arriba, crearemos un repositorio temporal
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
656 para empujar all鱈 nuestros cambios.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
657 \interaction{tour.clone-push}
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
658 El comando \hgcmd{outgoing}\ndt{Saliente. Cambios salientes.} nos dice
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
659 qu辿 cambios ser鱈an empujados en el otro repositorio.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
660 \interaction{tour.outgoing}
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
661 Y el comando \hgcmd{push} se encarga de empujar dichos cambios.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
662 \interaction{tour.push}
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
663 Al igual que \hgcmd{pull}, el comando \hgcmd{push} no actualiza el
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
664 directorio de trabajo del repositorio en el que estamos empujando los
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
665 cambios. (A diferencia de \hgcmd{pull}, \hgcmd{push} no ofrece la
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
666 opci坦n \texttt{-u} para actualizar el directorio de trabajo del otro
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
667 repositorio.)
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
668
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
669 % TODO poner interrogante de apertura
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
670 Qu辿 pasa si tratamos de jalar o empujar cambios y el repositorio
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
671 receptor ya tiene esos cambios? Nada emocionante.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
672 \interaction{tour.push.nothing}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
673
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
674 \subsection{Compartir cambios a trav辿s de una red}
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
675
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
676 Los comandos que hemos presentando en las pocas secciones anteriores
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
677 no est叩n limitados a trabajar con repositorios locales. Cada uno de
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
678 ellos funciona exactamente de la misma manera a trav辿s de una conexi坦n
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
679 % TODO poner ndt para URL
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
680 de red. Simplemente pase una URL en vez de una ruta local.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
681 \interaction{tour.outgoing.net}
478
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
682 En este ejemplo, podemos ver qu辿 cambios empujar鱈amos al repositorio
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
683 remoto, aunque, de manera entendible, el repositorio remoto est叩
dbc78b312fc0 finished translation of tour-basic
Javier Rojas <jerojasro@devnull.li>
parents: 471
diff changeset
684 configurado para no permitir a usuarios an坦nimos empujar cambios a 辿l.
442
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
685 \interaction{tour.push.net}
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
686
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
687 %%% Local Variables:
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
688 %%% mode: latex
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
689 %%% TeX-master: "00book"
2fb78d342e07 changed es/Leame.1st
jerojasro@localhost
parents: 432
diff changeset
690 %%% End: