Mercurial > hgbook
comparison en/mq-ref.tex @ 234:30e97616d808
Tag all MQ command options as belonging to the mq extension.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Sun, 27 May 2007 09:43:16 -0700 |
parents | 696b1e0c01df |
children | e45d3f0d8da6 |
comparison
equal
deleted
inserted
replaced
233:696b1e0c01df | 234:30e97616d808 |
---|---|
16 \subsection{\hgxcmd{mq}{qcommit}---commit changes in the queue repository} | 16 \subsection{\hgxcmd{mq}{qcommit}---commit changes in the queue repository} |
17 | 17 |
18 The \hgxcmd{mq}{qcommit} command commits any outstanding changes in the | 18 The \hgxcmd{mq}{qcommit} command commits any outstanding changes in the |
19 \sdirname{.hg/patches} repository. This command only works if the | 19 \sdirname{.hg/patches} repository. This command only works if the |
20 \sdirname{.hg/patches} directory is a repository, i.e.~you created the | 20 \sdirname{.hg/patches} directory is a repository, i.e.~you created the |
21 directory using \hgcmdargs{qinit}{\hgopt{qinit}{-c}} or ran | 21 directory using \hgcmdargs{qinit}{\hgxopt{mq}{qinit}{-c}} or ran |
22 \hgcmd{init} in the directory after running \hgxcmd{mq}{qinit}. | 22 \hgcmd{init} in the directory after running \hgxcmd{mq}{qinit}. |
23 | 23 |
24 This command is shorthand for \hgcmdargs{commit}{--cwd .hg/patches}. | 24 This command is shorthand for \hgcmdargs{commit}{--cwd .hg/patches}. |
25 | 25 |
26 \subsection{\hgxcmd{mq}{qdelete}---delete a patch from the | 26 \subsection{\hgxcmd{mq}{qdelete}---delete a patch from the |
27 \sfilename{series} file} | 27 \sfilename{series} file} |
28 | 28 |
29 The \hgxcmd{mq}{qdelete} command removes the entry for a patch from the | 29 The \hgxcmd{mq}{qdelete} command removes the entry for a patch from the |
30 \sfilename{series} file in the \sdirname{.hg/patches} directory. It | 30 \sfilename{series} file in the \sdirname{.hg/patches} directory. It |
31 does not pop the patch if the patch is already applied. By default, | 31 does not pop the patch if the patch is already applied. By default, |
32 it does not delete the patch file; use the \hgopt{qdel}{-f} option to | 32 it does not delete the patch file; use the \hgxopt{mq}{qdel}{-f} option to |
33 do that. | 33 do that. |
34 | 34 |
35 Options: | 35 Options: |
36 \begin{itemize} | 36 \begin{itemize} |
37 \item[\hgopt{qdel}{-f}] Delete the patch file. | 37 \item[\hgxopt{mq}{qdel}{-f}] Delete the patch file. |
38 \end{itemize} | 38 \end{itemize} |
39 | 39 |
40 \subsection{\hgxcmd{mq}{qdiff}---print a diff of the topmost applied patch} | 40 \subsection{\hgxcmd{mq}{qdiff}---print a diff of the topmost applied patch} |
41 | 41 |
42 The \hgxcmd{mq}{qdiff} command prints a diff of the topmost applied patch. | 42 The \hgxcmd{mq}{qdiff} command prints a diff of the topmost applied patch. |
53 significant; \hgcmdargs{qfold}{a b} means ``apply the current topmost | 53 significant; \hgcmdargs{qfold}{a b} means ``apply the current topmost |
54 patch, followed by \texttt{a}, followed by \texttt{b}''. | 54 patch, followed by \texttt{a}, followed by \texttt{b}''. |
55 | 55 |
56 The comments from the folded patches are appended to the comments of | 56 The comments from the folded patches are appended to the comments of |
57 the destination patch, with each block of comments separated by three | 57 the destination patch, with each block of comments separated by three |
58 asterisk (``\texttt{*}'') characters. Use the \hgopt{qfold}{-e} | 58 asterisk (``\texttt{*}'') characters. Use the \hgxopt{mq}{qfold}{-e} |
59 option to edit the commit message for the combined patch/changeset | 59 option to edit the commit message for the combined patch/changeset |
60 after the folding has completed. | 60 after the folding has completed. |
61 | 61 |
62 Options: | 62 Options: |
63 \begin{itemize} | 63 \begin{itemize} |
64 \item[\hgopt{qfold}{-e}] Edit the commit message and patch description | 64 \item[\hgxopt{mq}{qfold}{-e}] Edit the commit message and patch description |
65 for the newly folded patch. | 65 for the newly folded patch. |
66 \item[\hgopt{qfold}{-l}] Use the contents of the given file as the new | 66 \item[\hgxopt{mq}{qfold}{-l}] Use the contents of the given file as the new |
67 commit message and patch description for the folded patch. | 67 commit message and patch description for the folded patch. |
68 \item[\hgopt{qfold}{-m}] Use the given text as the new commit message | 68 \item[\hgxopt{mq}{qfold}{-m}] Use the given text as the new commit message |
69 and patch description for the folded patch. | 69 and patch description for the folded patch. |
70 \end{itemize} | 70 \end{itemize} |
71 | 71 |
72 \subsection{\hgxcmd{mq}{qheader}---display the header/description of a patch} | 72 \subsection{\hgxcmd{mq}{qheader}---display the header/description of a patch} |
73 | 73 |
91 The \hgxcmd{mq}{qinit} command prepares a repository to work with MQ. It | 91 The \hgxcmd{mq}{qinit} command prepares a repository to work with MQ. It |
92 creates a directory called \sdirname{.hg/patches}. | 92 creates a directory called \sdirname{.hg/patches}. |
93 | 93 |
94 Options: | 94 Options: |
95 \begin{itemize} | 95 \begin{itemize} |
96 \item[\hgopt{qinit}{-c}] Create \sdirname{.hg/patches} as a repository | 96 \item[\hgxopt{mq}{qinit}{-c}] Create \sdirname{.hg/patches} as a repository |
97 in its own right. Also creates a \sfilename{.hgignore} file that | 97 in its own right. Also creates a \sfilename{.hgignore} file that |
98 will ignore the \sfilename{status} file. | 98 will ignore the \sfilename{status} file. |
99 \end{itemize} | 99 \end{itemize} |
100 | 100 |
101 When the \sdirname{.hg/patches} directory is a repository, the | 101 When the \sdirname{.hg/patches} directory is a repository, the |
109 is created empty by default. It is added to the \sfilename{series} | 109 is created empty by default. It is added to the \sfilename{series} |
110 file after the current topmost applied patch, and is immediately | 110 file after the current topmost applied patch, and is immediately |
111 pushed on top of that patch. | 111 pushed on top of that patch. |
112 | 112 |
113 If \hgxcmd{mq}{qnew} finds modified files in the working directory, it will | 113 If \hgxcmd{mq}{qnew} finds modified files in the working directory, it will |
114 refuse to create a new patch unless the \hgopt{qnew}{-f} option is | 114 refuse to create a new patch unless the \hgxopt{mq}{qnew}{-f} option is |
115 used (see below). This behaviour allows you to \hgxcmd{mq}{qrefresh} your | 115 used (see below). This behaviour allows you to \hgxcmd{mq}{qrefresh} your |
116 topmost applied patch before you apply a new patch on top of it. | 116 topmost applied patch before you apply a new patch on top of it. |
117 | 117 |
118 Options: | 118 Options: |
119 \begin{itemize} | 119 \begin{itemize} |
120 \item[\hgopt{qnew}{-f}] Create a new patch if the contents of the | 120 \item[\hgxopt{mq}{qnew}{-f}] Create a new patch if the contents of the |
121 working directory are modified. Any outstanding modifications are | 121 working directory are modified. Any outstanding modifications are |
122 added to the newly created patch, so after this command completes, | 122 added to the newly created patch, so after this command completes, |
123 the working directory will no longer be modified. | 123 the working directory will no longer be modified. |
124 \item[\hgopt{qnew}{-m}] Use the given text as the commit message. | 124 \item[\hgxopt{mq}{qnew}{-m}] Use the given text as the commit message. |
125 This text will be stored at the beginning of the patch file, before | 125 This text will be stored at the beginning of the patch file, before |
126 the patch data. | 126 the patch data. |
127 \end{itemize} | 127 \end{itemize} |
128 | 128 |
129 \subsection{\hgxcmd{mq}{qnext}---print the name of the next patch} | 129 \subsection{\hgxcmd{mq}{qnext}---print the name of the next patch} |
155 have renamed or deleted entirely. In the latter two cases, use the | 155 have renamed or deleted entirely. In the latter two cases, use the |
156 name of the patch as it was when you applied it. | 156 name of the patch as it was when you applied it. |
157 | 157 |
158 By default, the \hgxcmd{mq}{qpop} command will not pop any patches if the | 158 By default, the \hgxcmd{mq}{qpop} command will not pop any patches if the |
159 working directory has been modified. You can override this behaviour | 159 working directory has been modified. You can override this behaviour |
160 using the \hgopt{qpop}{-f} option, which reverts all modifications in | 160 using the \hgxopt{mq}{qpop}{-f} option, which reverts all modifications in |
161 the working directory. | 161 the working directory. |
162 | 162 |
163 Options: | 163 Options: |
164 \begin{itemize} | 164 \begin{itemize} |
165 \item[\hgopt{qpop}{-a}] Pop all applied patches. This returns the | 165 \item[\hgxopt{mq}{qpop}{-a}] Pop all applied patches. This returns the |
166 repository to its state before you applied any patches. | 166 repository to its state before you applied any patches. |
167 \item[\hgopt{qpop}{-f}] Forcibly revert any modifications to the | 167 \item[\hgxopt{mq}{qpop}{-f}] Forcibly revert any modifications to the |
168 working directory when popping. | 168 working directory when popping. |
169 \item[\hgopt{qpop}{-n}] Pop a patch from the named queue. | 169 \item[\hgxopt{mq}{qpop}{-n}] Pop a patch from the named queue. |
170 \end{itemize} | 170 \end{itemize} |
171 | 171 |
172 The \hgxcmd{mq}{qpop} command removes one line from the end of the | 172 The \hgxcmd{mq}{qpop} command removes one line from the end of the |
173 \sfilename{status} file for each patch that it pops. | 173 \sfilename{status} file for each patch that it pops. |
174 | 174 |
203 If a patch contains a Mercurial patch header (XXX add link), the | 203 If a patch contains a Mercurial patch header (XXX add link), the |
204 information in the patch header overrides these defaults. | 204 information in the patch header overrides these defaults. |
205 | 205 |
206 Options: | 206 Options: |
207 \begin{itemize} | 207 \begin{itemize} |
208 \item[\hgopt{qpush}{-a}] Push all unapplied patches from the | 208 \item[\hgxopt{mq}{qpush}{-a}] Push all unapplied patches from the |
209 \sfilename{series} file until there are none left to push. | 209 \sfilename{series} file until there are none left to push. |
210 \item[\hgopt{qpush}{-l}] Add the name of the patch to the end | 210 \item[\hgxopt{mq}{qpush}{-l}] Add the name of the patch to the end |
211 of the commit message. | 211 of the commit message. |
212 \item[\hgopt{qpush}{-m}] If a patch fails to apply cleanly, use the | 212 \item[\hgxopt{mq}{qpush}{-m}] If a patch fails to apply cleanly, use the |
213 entry for the patch in another saved queue to compute the parameters | 213 entry for the patch in another saved queue to compute the parameters |
214 for a three-way merge, and perform a three-way merge using the | 214 for a three-way merge, and perform a three-way merge using the |
215 normal Mercurial merge machinery. Use the resolution of the merge | 215 normal Mercurial merge machinery. Use the resolution of the merge |
216 as the new patch content. | 216 as the new patch content. |
217 \item[\hgopt{qpush}{-n}] Use the named queue if merging while pushing. | 217 \item[\hgxopt{mq}{qpush}{-n}] Use the named queue if merging while pushing. |
218 \end{itemize} | 218 \end{itemize} |
219 | 219 |
220 The \hgxcmd{mq}{qpush} command reads, but does not modify, the | 220 The \hgxcmd{mq}{qpush} command reads, but does not modify, the |
221 \sfilename{series} file. It appends one line to the \hgcmd{status} | 221 \sfilename{series} file. It appends one line to the \hgcmd{status} |
222 file for each patch that it pushes. | 222 file for each patch that it pushes. |
245 changeset to differ from the previous changeset that identified the | 245 changeset to differ from the previous changeset that identified the |
246 patch. | 246 patch. |
247 | 247 |
248 Options: | 248 Options: |
249 \begin{itemize} | 249 \begin{itemize} |
250 \item[\hgopt{qrefresh}{-e}] Modify the commit and patch description, | 250 \item[\hgxopt{mq}{qrefresh}{-e}] Modify the commit and patch description, |
251 using the preferred text editor. | 251 using the preferred text editor. |
252 \item[\hgopt{qrefresh}{-m}] Modify the commit message and patch | 252 \item[\hgxopt{mq}{qrefresh}{-m}] Modify the commit message and patch |
253 description, using the given text. | 253 description, using the given text. |
254 \item[\hgopt{qrefresh}{-l}] Modify the commit message and patch | 254 \item[\hgxopt{mq}{qrefresh}{-l}] Modify the commit message and patch |
255 description, using text from the given file. | 255 description, using text from the given file. |
256 \end{itemize} | 256 \end{itemize} |
257 | 257 |
258 \subsection{\hgxcmd{mq}{qrename}---rename a patch} | 258 \subsection{\hgxcmd{mq}{qrename}---rename a patch} |
259 | 259 |
334 \sfilename{series} file. | 334 \sfilename{series} file. |
335 | 335 |
336 Placing the \sfilename{series} file under revision control is also | 336 Placing the \sfilename{series} file under revision control is also |
337 supported; it is a good idea to place all of the patches that it | 337 supported; it is a good idea to place all of the patches that it |
338 refers to under revision control, as well. If you create a patch | 338 refers to under revision control, as well. If you create a patch |
339 directory using the \hgopt{qinit}{-c} option to \hgxcmd{mq}{qinit}, this | 339 directory using the \hgxopt{mq}{qinit}{-c} option to \hgxcmd{mq}{qinit}, this |
340 will be done for you automatically. | 340 will be done for you automatically. |
341 | 341 |
342 \subsection{The \sfilename{status} file} | 342 \subsection{The \sfilename{status} file} |
343 | 343 |
344 The \sfilename{status} file contains the names and changeset hashes of | 344 The \sfilename{status} file contains the names and changeset hashes of |