hgbook
view es/mq-ref.tex @ 488:419853691d11
Translated some paragraphs fixed term fold
author | Igor Támara <igor@tamarapatino.org> |
---|---|
date | Tue Jan 06 23:07:32 2009 -0500 (2009-01-06) |
parents | f8614aad2cbb |
children | 26fb9b724588 |
line source
1 \chapter{Referencia de las Colas de Mercurial}
2 \label{chap:mqref}
4 \section{Referencia de órdenes MQ}
5 \label{sec:mqref:cmdref}
7 Si desea dar un vistazo a las órdenes que ofrece MQ, use la orden
8 \hgcmdargs{help}{mq}.
10 \subsection{\hgxcmd{mq}{qapplied}---imprimir los parches aplicados}
12 La orden \hgxcmd{mq}{qapplied} imprime la pila actual de parches
13 aplicados. Los parches se imprimen en orden de antigüedad, primero
14 los más antiguos y después los más recientes, por lo tanto el último
15 parche de la lista es el que está en el ``tope''.
17 \subsection{\hgxcmd{mq}{qcommit}---consignar cambios en la cola del repositorio}
19 La orden \hgxcmd{mq}{qcommit} consigna cualquier cambio sobresaliente
20 en el repositorio \sdirname{.hg/patches}. Esta orden solamente
21 funciona si el directorio \sdirname{.hg/patches} es un repositorio,
22 p.e.~usted creó el directorio con
23 \hgcmdargs{qinit}{\hgxopt{mq}{qinit}{-c}} o ejecutó
24 \hgcmd{init} en el directorio después de correr \hgxcmd{mq}{qinit}.
26 Esta orden es un atajo para \hgcmdargs{commit}{--cwd .hg/patches}.
28 \subsection{\hgxcmd{mq}{qdelete}---eliminar un parche del fichero
29 \sfilename{series}}
31 La orden \hgxcmd{mq}{qdelete} elimina la entrada del fichero
32 \sfilename{series} para el parche en el directorio
33 \sdirname{.hg/patches}. No sca el parche si ha sido aplicado. De
34 forma predeterminada no borra el fichero del parche; use la opción
35 \hgxopt{mq}{qdel}{-f} para hacerlo.
37 Opciones:
38 \begin{itemize}
39 \item[\hgxopt{mq}{qdel}{-f}] Elimina el fichero del parche.
40 \end{itemize}
42 \subsection{\hgxcmd{mq}{qdiff}---imprimir la diferencia del último
43 parche aplicado}
45 La orden \hgxcmd{mq}{qdiff} imprime un diff del parche más
46 recientemente aplicado. Es equivalente a \hgcmdargs{diff}{-r-2:-1}.
48 \subsection{\hgxcmd{mq}{qfold}---fusionar (``integrar'') varios parches en
49 uno solo}
51 La orden \hgxcmd{mq}{qfold} fusiona muchos parches en el último parche
52 aplicado, de tal forma que el último parche aplicado es la unión de
53 todos los cambios de los parches en cuestión.
55 Los parches a fusionar no deben haber sido aplicados;
56 \hgxcmd{mq}{qfold} saldrá indicando un error si alguno ha sido
57 aplicado. El orden en el cual los parches se pliegan es
58 significativo; \hgcmdargs{qfold}{a b} significa ``aplique el parche
59 más reciente, seguido de \texttt{a}, y seguido de \texttt{b}''.
61 Los comentarios de los parches integrados se colocan al final de los
62 comentarios del parche destino, con cada bloque de comentarios
63 separado con tres asteriscos(``\texttt{*}''). Se usa la opción
64 \hgxopt{mq}{qfold}{-e} para editar el mensaje de consignación para el
65 conjunto de cambios/parches después de completarse el pliegue.
67 Opciones:
68 \begin{itemize}
69 \item[\hgxopt{mq}{qfold}{-e}] Edita el mensaje de consignación y la
70 descripción del parche del parche que se ha integrado.
71 \item[\hgxopt{mq}{qfold}{-l}] Usa los contenidos del fichero dado como
72 el nuevo mensaje de consignación y descripción del parche para el
73 parche a integrar.
74 \item[\hgxopt{mq}{qfold}{-m}] Usa el texto dado como el mensaje de
75 consignación y descripción del parche para el parche integrado.
76 \end{itemize}
78 \subsection{\hgxcmd{mq}{qheader}---desplegar el encabezado/descripción
79 de un parche}
81 La orden \hgxcmd{mq}{qheader} imprime el encabezado o descripción de
82 un parche. De forma predeterminada, imprime el encabezado del último
83 parche aplicado. Si se da un argumento, imprime el encabezado del
84 parche referenciado.
86 \subsection{\hgxcmd{mq}{qimport}---importar el parche de un tercero en
87 la cola}
89 La orden \hgxcmd{mq}{qimport} añade una entrada de un parche externo
90 al fichero \sfilename{series} y copia el parche en el directorio
91 \sdirname{.hg/patches}. Añade la entrada inmediatamente después del
92 último parche aplicado, pero no introduce el parche.
94 Si el directorio \sdirname{.hg/patches} es un repositorio,
95 \hgxcmd{mq}{qimport} automáticamente hace un \hgcmd{add} del parche
96 importado.
98 \subsection{\hgxcmd{mq}{qinit}---preparar un repositorio para trabajar
99 con MQ}
101 La orden \hgxcmd{mq}{qinit} prepara un repositorio para trabajar con
102 MQ. Crea un directorio llamado \sdirname{.hg/patches}.
104 Opciones:
105 \begin{itemize}
106 \item[\hgxopt{mq}{qinit}{-c}] Crea \sdirname{.hg/patches} como un
107 repositorio por sí mismo. También crea un fichero
108 \sfilename{.hgignore} que ignorará el fichero \sfilename{status}.
109 \end{itemize}
111 Cuando el directorio \sdirname{.hg/patches} es un repositorio, las órdenes
112 \hgxcmd{mq}{qimport} y \hgxcmd{mq}{qnew} hacen \hgcmd{add}
113 automáticamente a los parches nuevos.
115 \subsection{\hgxcmd{mq}{qnew}---crear un parche nuevo}
117 La orden \hgxcmd{mq}{qnew} crea un parche nuevo. Exige un argumento,
118 el nombre que se usará para tal parche. El parche recién creado está
119 vacío inicialmente. Se añade al fichero \sfilename{series} después
120 del último parche aplicado, y se introduce en el tope de ese parche.
122 Si \hgxcmd{mq}{qnew} encuentra ficheros modificados en el directorio
123 de trabajo, rehusará crear un parche nuevo a meos que se emplee
124 \hgxopt{mq}{qnew}{-f} la opción(ver más adelante). Este
125 comportamiento le permite hacer \hgxcmd{mq}{qrefresh} al último parche
126 aplicado antes de aplicar un parche nuevo encima de este.
128 Opciones:
129 \begin{itemize}
130 \item[\hgxopt{mq}{qnew}{-f}] Crea un parche nuevo si los contenidos
131 del directorio actual han sido modificados. Cualquier modificación
132 significativa se añade al parche recientemente creado, de tal forma
133 que al finalizar la orden, el directorio de trabajo no lucirá
134 modificado.
135 \item[\hgxopt{mq}{qnew}{-m}] Usa el texto dado como el mensaje de
136 consignación. Este texto se almacenará al principio del fichero del
137 parche, antes de los datos del parche.
138 \end{itemize}
140 \subsection{\hgxcmd{mq}{qnext}---print the name of the next patch}
142 The \hgxcmd{mq}{qnext} command prints the name name of the next patch in
143 the \sfilename{series} file after the topmost applied patch. This
144 patch will become the topmost applied patch if you run \hgxcmd{mq}{qpush}.
146 \subsection{\hgxcmd{mq}{qpop}---pop patches off the stack}
148 The \hgxcmd{mq}{qpop} command removes applied patches from the top of the
149 stack of applied patches. By default, it removes only one patch.
151 This command removes the changesets that represent the popped patches
152 from the repository, and updates the working directory to undo the
153 effects of the patches.
155 This command takes an optional argument, which it uses as the name or
156 index of the patch to pop to. If given a name, it will pop patches
157 until the named patch is the topmost applied patch. If given a
158 number, \hgxcmd{mq}{qpop} treats the number as an index into the entries in
159 the series file, counting from zero (empty lines and lines containing
160 only comments do not count). It pops patches until the patch
161 identified by the given index is the topmost applied patch.
163 The \hgxcmd{mq}{qpop} command does not read or write patches or the
164 \sfilename{series} file. It is thus safe to \hgxcmd{mq}{qpop} a patch that
165 you have removed from the \sfilename{series} file, or a patch that you
166 have renamed or deleted entirely. In the latter two cases, use the
167 name of the patch as it was when you applied it.
169 By default, the \hgxcmd{mq}{qpop} command will not pop any patches if the
170 working directory has been modified. You can override this behaviour
171 using the \hgxopt{mq}{qpop}{-f} option, which reverts all modifications in
172 the working directory.
174 Options:
175 \begin{itemize}
176 \item[\hgxopt{mq}{qpop}{-a}] Pop all applied patches. This returns the
177 repository to its state before you applied any patches.
178 \item[\hgxopt{mq}{qpop}{-f}] Forcibly revert any modifications to the
179 working directory when popping.
180 \item[\hgxopt{mq}{qpop}{-n}] Pop a patch from the named queue.
181 \end{itemize}
183 The \hgxcmd{mq}{qpop} command removes one line from the end of the
184 \sfilename{status} file for each patch that it pops.
186 \subsection{\hgxcmd{mq}{qprev}---print the name of the previous patch}
188 The \hgxcmd{mq}{qprev} command prints the name of the patch in the
189 \sfilename{series} file that comes before the topmost applied patch.
190 This will become the topmost applied patch if you run \hgxcmd{mq}{qpop}.
192 \subsection{\hgxcmd{mq}{qpush}---push patches onto the stack}
193 \label{sec:mqref:cmd:qpush}
195 The \hgxcmd{mq}{qpush} command adds patches onto the applied stack. By
196 default, it adds only one patch.
198 This command creates a new changeset to represent each applied patch,
199 and updates the working directory to apply the effects of the patches.
201 The default data used when creating a changeset are as follows:
202 \begin{itemize}
203 \item The commit date and time zone are the current date and time
204 zone. Because these data are used to compute the identity of a
205 changeset, this means that if you \hgxcmd{mq}{qpop} a patch and
206 \hgxcmd{mq}{qpush} it again, the changeset that you push will have a
207 different identity than the changeset you popped.
208 \item The author is the same as the default used by the \hgcmd{commit}
209 command.
210 \item The commit message is any text from the patch file that comes
211 before the first diff header. If there is no such text, a default
212 commit message is used that identifies the name of the patch.
213 \end{itemize}
214 If a patch contains a Mercurial patch header (XXX add link), the
215 information in the patch header overrides these defaults.
217 Options:
218 \begin{itemize}
219 \item[\hgxopt{mq}{qpush}{-a}] Push all unapplied patches from the
220 \sfilename{series} file until there are none left to push.
221 \item[\hgxopt{mq}{qpush}{-l}] Add the name of the patch to the end
222 of the commit message.
223 \item[\hgxopt{mq}{qpush}{-m}] If a patch fails to apply cleanly, use the
224 entry for the patch in another saved queue to compute the parameters
225 for a three-way merge, and perform a three-way merge using the
226 normal Mercurial merge machinery. Use the resolution of the merge
227 as the new patch content.
228 \item[\hgxopt{mq}{qpush}{-n}] Use the named queue if merging while pushing.
229 \end{itemize}
231 The \hgxcmd{mq}{qpush} command reads, but does not modify, the
232 \sfilename{series} file. It appends one line to the \hgcmd{status}
233 file for each patch that it pushes.
235 \subsection{\hgxcmd{mq}{qrefresh}---update the topmost applied patch}
237 The \hgxcmd{mq}{qrefresh} command updates the topmost applied patch. It
238 modifies the patch, removes the old changeset that represented the
239 patch, and creates a new changeset to represent the modified patch.
241 The \hgxcmd{mq}{qrefresh} command looks for the following modifications:
242 \begin{itemize}
243 \item Changes to the commit message, i.e.~the text before the first
244 diff header in the patch file, are reflected in the new changeset
245 that represents the patch.
246 \item Modifications to tracked files in the working directory are
247 added to the patch.
248 \item Changes to the files tracked using \hgcmd{add}, \hgcmd{copy},
249 \hgcmd{remove}, or \hgcmd{rename}. Added files and copy and rename
250 destinations are added to the patch, while removed files and rename
251 sources are removed.
252 \end{itemize}
254 Even if \hgxcmd{mq}{qrefresh} detects no changes, it still recreates the
255 changeset that represents the patch. This causes the identity of the
256 changeset to differ from the previous changeset that identified the
257 patch.
259 Options:
260 \begin{itemize}
261 \item[\hgxopt{mq}{qrefresh}{-e}] Modify the commit and patch description,
262 using the preferred text editor.
263 \item[\hgxopt{mq}{qrefresh}{-m}] Modify the commit message and patch
264 description, using the given text.
265 \item[\hgxopt{mq}{qrefresh}{-l}] Modify the commit message and patch
266 description, using text from the given file.
267 \end{itemize}
269 \subsection{\hgxcmd{mq}{qrename}---rename a patch}
271 The \hgxcmd{mq}{qrename} command renames a patch, and changes the entry for
272 the patch in the \sfilename{series} file.
274 With a single argument, \hgxcmd{mq}{qrename} renames the topmost applied
275 patch. With two arguments, it renames its first argument to its
276 second.
278 \subsection{\hgxcmd{mq}{qrestore}---restore saved queue state}
280 XXX No idea what this does.
282 \subsection{\hgxcmd{mq}{qsave}---save current queue state}
284 XXX Likewise.
286 \subsection{\hgxcmd{mq}{qseries}---print the entire patch series}
288 The \hgxcmd{mq}{qseries} command prints the entire patch series from the
289 \sfilename{series} file. It prints only patch names, not empty lines
290 or comments. It prints in order from first to be applied to last.
292 \subsection{\hgxcmd{mq}{qtop}---print the name of the current patch}
294 The \hgxcmd{mq}{qtop} prints the name of the topmost currently applied
295 patch.
297 \subsection{\hgxcmd{mq}{qunapplied}---print patches not yet applied}
299 The \hgxcmd{mq}{qunapplied} command prints the names of patches from the
300 \sfilename{series} file that are not yet applied. It prints them in
301 order from the next patch that will be pushed to the last.
303 \subsection{\hgcmd{strip}---remove a revision and descendants}
305 The \hgcmd{strip} command removes a revision, and all of its
306 descendants, from the repository. It undoes the effects of the
307 removed revisions from the repository, and updates the working
308 directory to the first parent of the removed revision.
310 The \hgcmd{strip} command saves a backup of the removed changesets in
311 a bundle, so that they can be reapplied if removed in error.
313 Options:
314 \begin{itemize}
315 \item[\hgopt{strip}{-b}] Save unrelated changesets that are intermixed
316 with the stripped changesets in the backup bundle.
317 \item[\hgopt{strip}{-f}] If a branch has multiple heads, remove all
318 heads. XXX This should be renamed, and use \texttt{-f} to strip revs
319 when there are pending changes.
320 \item[\hgopt{strip}{-n}] Do not save a backup bundle.
321 \end{itemize}
323 \section{MQ file reference}
325 \subsection{The \sfilename{series} file}
327 The \sfilename{series} file contains a list of the names of all
328 patches that MQ can apply. It is represented as a list of names, with
329 one name saved per line. Leading and trailing white space in each
330 line are ignored.
332 Lines may contain comments. A comment begins with the ``\texttt{\#}''
333 character, and extends to the end of the line. Empty lines, and lines
334 that contain only comments, are ignored.
336 You will often need to edit the \sfilename{series} file by hand, hence
337 the support for comments and empty lines noted above. For example,
338 you can comment out a patch temporarily, and \hgxcmd{mq}{qpush} will skip
339 over that patch when applying patches. You can also change the order
340 in which patches are applied by reordering their entries in the
341 \sfilename{series} file.
343 Placing the \sfilename{series} file under revision control is also
344 supported; it is a good idea to place all of the patches that it
345 refers to under revision control, as well. If you create a patch
346 directory using the \hgxopt{mq}{qinit}{-c} option to \hgxcmd{mq}{qinit}, this
347 will be done for you automatically.
349 \subsection{The \sfilename{status} file}
351 The \sfilename{status} file contains the names and changeset hashes of
352 all patches that MQ currently has applied. Unlike the
353 \sfilename{series} file, this file is not intended for editing. You
354 should not place this file under revision control, or modify it in any
355 way. It is used by MQ strictly for internal book-keeping.
357 %%% Local Variables:
358 %%% mode: latex
359 %%% TeX-master: "00book"
360 %%% End: