rev |
line source |
bos@559
|
1 <!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
|
bos@559
|
2
|
bos@559
|
3 <appendix id="chap:mqref">
|
bos@572
|
4 <?dbhtml filename="mercurial-queues-reference.html"?>
|
bos@559
|
5 <title>Mercurial Queues reference</title>
|
bos@559
|
6
|
bos@559
|
7 <sect1 id="sec:mqref:cmdref">
|
bos@559
|
8 <title>MQ command reference</title>
|
bos@559
|
9
|
bos@584
|
10 <para id="x_5e8">For an overview of the commands provided by MQ, use the
|
bos@559
|
11 command <command role="hg-cmd">hg help mq</command>.</para>
|
bos@559
|
12
|
bos@559
|
13 <sect2>
|
bos@559
|
14 <title><command role="hg-ext-mq">qapplied</command>&emdash;print
|
bos@559
|
15 applied patches</title>
|
bos@559
|
16
|
bos@584
|
17 <para id="x_5e9">The <command role="hg-ext-mq">qapplied</command> command
|
bos@559
|
18 prints the current stack of applied patches. Patches are
|
bos@559
|
19 printed in oldest-to-newest order, so the last patch in the
|
bos@559
|
20 list is the <quote>top</quote> patch.</para>
|
bos@559
|
21
|
bos@559
|
22 </sect2>
|
bos@559
|
23 <sect2>
|
bos@559
|
24 <title><command role="hg-ext-mq">qcommit</command>&emdash;commit
|
bos@559
|
25 changes in the queue repository</title>
|
bos@559
|
26
|
bos@584
|
27 <para id="x_5ea">The <command role="hg-ext-mq">qcommit</command> command
|
bos@559
|
28 commits any outstanding changes in the <filename
|
bos@559
|
29 role="special" class="directory">.hg/patches</filename>
|
bos@559
|
30 repository. This command only works if the <filename
|
bos@559
|
31 role="special" class="directory">.hg/patches</filename>
|
bos@559
|
32 directory is a repository, i.e. you created the directory
|
bos@559
|
33 using <command role="hg-cmd">hg qinit <option
|
bos@559
|
34 role="hg-ext-mq-cmd-qinit-opt">-c</option></command> or
|
bos@559
|
35 ran <command role="hg-cmd">hg init</command> in the directory
|
bos@559
|
36 after running <command
|
bos@559
|
37 role="hg-ext-mq">qinit</command>.</para>
|
bos@559
|
38
|
bos@584
|
39 <para id="x_5eb">This command is shorthand for <command role="hg-cmd">hg
|
bos@559
|
40 commit --cwd .hg/patches</command>.</para>
|
bos@580
|
41 </sect2>
|
bos@580
|
42 <sect2>
|
bos@580
|
43 <title><command
|
bos@559
|
44 role="hg-ext-mq">qdelete</command>&emdash;delete a patch
|
bos@559
|
45 from the <filename role="special">series</filename>
|
dongsheng@651
|
46 file</title>
|
bos@559
|
47
|
bos@584
|
48 <para id="x_5ec">The <command role="hg-ext-mq">qdelete</command> command
|
bos@559
|
49 removes the entry for a patch from the <filename
|
bos@559
|
50 role="special">series</filename> file in the <filename
|
bos@559
|
51 role="special" class="directory">.hg/patches</filename>
|
bos@559
|
52 directory. It does not pop the patch if the patch is already
|
bos@559
|
53 applied. By default, it does not delete the patch file; use
|
bos@559
|
54 the <option role="hg-ext-mq-cmd-qdel-opt">-f</option> option
|
bos@559
|
55 to do that.</para>
|
bos@559
|
56
|
bos@584
|
57 <para id="x_5ed">Options:</para>
|
bos@584
|
58 <itemizedlist>
|
bos@584
|
59 <listitem><para id="x_5ee"><option
|
bos@559
|
60 role="hg-ext-mq-cmd-qdel-opt">-f</option>: Delete the
|
bos@559
|
61 patch file.</para>
|
bos@559
|
62 </listitem></itemizedlist>
|
bos@559
|
63
|
bos@559
|
64 </sect2>
|
bos@559
|
65 <sect2>
|
bos@559
|
66 <title><command role="hg-ext-mq">qdiff</command>&emdash;print a
|
bos@559
|
67 diff of the topmost applied patch</title>
|
bos@559
|
68
|
bos@584
|
69 <para id="x_5ef">The <command role="hg-ext-mq">qdiff</command> command
|
bos@559
|
70 prints a diff of the topmost applied patch. It is equivalent
|
bos@559
|
71 to <command role="hg-cmd">hg diff -r-2:-1</command>.</para>
|
bos@559
|
72
|
bos@559
|
73 </sect2>
|
bos@559
|
74 <sect2>
|
bos@701
|
75 <title><command role="hg-ext-mq">qfold</command>&emdash;move
|
bos@701
|
76 applied patches into repository history</title>
|
bos@701
|
77
|
bos@702
|
78 <para id="x_72d">The <command>hg qfinish</command> command converts the
|
bos@701
|
79 specified applied patches into permanent changes by moving
|
bos@701
|
80 them out of MQ's control so that they will be treated as
|
bos@701
|
81 normal repository history.</para>
|
bos@701
|
82 </sect2>
|
bos@701
|
83
|
bos@701
|
84 <sect2>
|
bos@559
|
85 <title><command role="hg-ext-mq">qfold</command>&emdash;merge
|
bos@559
|
86 (<quote>fold</quote>) several patches into one</title>
|
bos@559
|
87
|
bos@584
|
88 <para id="x_5f0">The <command role="hg-ext-mq">qfold</command> command
|
bos@559
|
89 merges multiple patches into the topmost applied patch, so
|
bos@559
|
90 that the topmost applied patch makes the union of all of the
|
bos@559
|
91 changes in the patches in question.</para>
|
bos@559
|
92
|
bos@584
|
93 <para id="x_5f1">The patches to fold must not be applied; <command
|
bos@559
|
94 role="hg-ext-mq">qfold</command> will exit with an error if
|
bos@559
|
95 any is. The order in which patches are folded is significant;
|
bos@559
|
96 <command role="hg-cmd">hg qfold a b</command> means
|
bos@559
|
97 <quote>apply the current topmost patch, followed by
|
bos@559
|
98 <literal>a</literal>, followed by
|
bos@559
|
99 <literal>b</literal></quote>.</para>
|
bos@559
|
100
|
bos@584
|
101 <para id="x_5f2">The comments from the folded patches are appended to the
|
bos@559
|
102 comments of the destination patch, with each block of comments
|
bos@559
|
103 separated by three asterisk
|
bos@559
|
104 (<quote><literal>*</literal></quote>) characters. Use the
|
bos@559
|
105 <option role="hg-ext-mq-cmd-qfold-opt">-e</option> option to
|
bos@559
|
106 edit the commit message for the combined patch/changeset after
|
bos@559
|
107 the folding has completed.</para>
|
bos@559
|
108
|
bos@584
|
109 <para id="x_5f3">Options:</para>
|
bos@584
|
110 <itemizedlist>
|
bos@584
|
111 <listitem><para id="x_5f4"><option
|
bos@559
|
112 role="hg-ext-mq-cmd-qfold-opt">-e</option>: Edit the
|
bos@559
|
113 commit message and patch description for the newly folded
|
bos@559
|
114 patch.</para>
|
bos@559
|
115 </listitem>
|
bos@584
|
116 <listitem><para id="x_5f5"><option
|
bos@559
|
117 role="hg-ext-mq-cmd-qfold-opt">-l</option>: Use the
|
bos@559
|
118 contents of the given file as the new commit message and
|
bos@559
|
119 patch description for the folded patch.</para>
|
bos@559
|
120 </listitem>
|
bos@584
|
121 <listitem><para id="x_5f6"><option
|
bos@559
|
122 role="hg-ext-mq-cmd-qfold-opt">-m</option>: Use the
|
bos@559
|
123 given text as the new commit message and patch description
|
bos@559
|
124 for the folded patch.</para>
|
bos@559
|
125 </listitem></itemizedlist>
|
bos@559
|
126
|
bos@559
|
127 </sect2>
|
bos@559
|
128 <sect2>
|
bos@559
|
129 <title><command
|
bos@559
|
130 role="hg-ext-mq">qheader</command>&emdash;display the
|
bos@559
|
131 header/description of a patch</title>
|
bos@559
|
132
|
bos@584
|
133 <para id="x_5f7">The <command role="hg-ext-mq">qheader</command> command
|
bos@559
|
134 prints the header, or description, of a patch. By default, it
|
bos@559
|
135 prints the header of the topmost applied patch. Given an
|
bos@559
|
136 argument, it prints the header of the named patch.</para>
|
bos@559
|
137
|
bos@559
|
138 </sect2>
|
bos@559
|
139 <sect2>
|
bos@559
|
140 <title><command role="hg-ext-mq">qimport</command>&emdash;import
|
bos@559
|
141 a third-party patch into the queue</title>
|
bos@559
|
142
|
bos@584
|
143 <para id="x_5f8">The <command role="hg-ext-mq">qimport</command> command
|
bos@559
|
144 adds an entry for an external patch to the <filename
|
bos@559
|
145 role="special">series</filename> file, and copies the patch
|
bos@559
|
146 into the <filename role="special"
|
bos@559
|
147 class="directory">.hg/patches</filename> directory. It adds
|
bos@559
|
148 the entry immediately after the topmost applied patch, but
|
bos@559
|
149 does not push the patch.</para>
|
bos@559
|
150
|
bos@584
|
151 <para id="x_5f9">If the <filename role="special"
|
bos@559
|
152 class="directory">.hg/patches</filename> directory is a
|
bos@559
|
153 repository, <command role="hg-ext-mq">qimport</command>
|
bos@559
|
154 automatically does an <command role="hg-cmd">hg add</command>
|
bos@559
|
155 of the imported patch.</para>
|
bos@559
|
156
|
bos@559
|
157 </sect2>
|
bos@559
|
158 <sect2>
|
bos@559
|
159 <title><command role="hg-ext-mq">qinit</command>&emdash;prepare
|
bos@559
|
160 a repository to work with MQ</title>
|
bos@559
|
161
|
bos@584
|
162 <para id="x_5fa">The <command role="hg-ext-mq">qinit</command> command
|
bos@559
|
163 prepares a repository to work with MQ. It creates a directory
|
bos@559
|
164 called <filename role="special"
|
bos@559
|
165 class="directory">.hg/patches</filename>.</para>
|
bos@559
|
166
|
bos@584
|
167 <para id="x_5fb">Options:</para>
|
bos@584
|
168 <itemizedlist>
|
bos@584
|
169 <listitem><para id="x_5fc"><option
|
bos@559
|
170 role="hg-ext-mq-cmd-qinit-opt">-c</option>: Create
|
bos@559
|
171 <filename role="special"
|
bos@559
|
172 class="directory">.hg/patches</filename> as a repository
|
bos@559
|
173 in its own right. Also creates a <filename
|
bos@559
|
174 role="special">.hgignore</filename> file that will
|
bos@559
|
175 ignore the <filename role="special">status</filename>
|
bos@559
|
176 file.</para>
|
bos@559
|
177 </listitem></itemizedlist>
|
bos@559
|
178
|
bos@584
|
179 <para id="x_5fd">When the <filename role="special"
|
bos@559
|
180 class="directory">.hg/patches</filename> directory is a
|
bos@559
|
181 repository, the <command role="hg-ext-mq">qimport</command>
|
bos@559
|
182 and <command role="hg-ext-mq">qnew</command> commands
|
bos@559
|
183 automatically <command role="hg-cmd">hg add</command> new
|
bos@559
|
184 patches.</para>
|
bos@559
|
185
|
bos@559
|
186 </sect2>
|
bos@559
|
187 <sect2>
|
bos@559
|
188 <title><command role="hg-ext-mq">qnew</command>&emdash;create a
|
bos@559
|
189 new patch</title>
|
bos@559
|
190
|
bos@584
|
191 <para id="x_5fe">The <command role="hg-ext-mq">qnew</command> command
|
bos@559
|
192 creates a new patch. It takes one mandatory argument, the
|
bos@559
|
193 name to use for the patch file. The newly created patch is
|
bos@559
|
194 created empty by default. It is added to the <filename
|
bos@559
|
195 role="special">series</filename> file after the current
|
bos@559
|
196 topmost applied patch, and is immediately pushed on top of
|
bos@559
|
197 that patch.</para>
|
bos@559
|
198
|
bos@584
|
199 <para id="x_5ff">If <command role="hg-ext-mq">qnew</command> finds modified
|
bos@559
|
200 files in the working directory, it will refuse to create a new
|
bos@559
|
201 patch unless the <option
|
bos@559
|
202 role="hg-ext-mq-cmd-qnew-opt">-f</option> option is used
|
bos@672
|
203 (see below). This behavior allows you to <command
|
bos@559
|
204 role="hg-ext-mq">qrefresh</command> your topmost applied
|
bos@559
|
205 patch before you apply a new patch on top of it.</para>
|
bos@559
|
206
|
bos@584
|
207 <para id="x_600">Options:</para>
|
bos@584
|
208 <itemizedlist>
|
bos@584
|
209 <listitem><para id="x_601"><option
|
bos@559
|
210 role="hg-ext-mq-cmd-qnew-opt">-f</option>: Create a new
|
bos@559
|
211 patch if the contents of the working directory are
|
bos@559
|
212 modified. Any outstanding modifications are added to the
|
bos@559
|
213 newly created patch, so after this command completes, the
|
bos@559
|
214 working directory will no longer be modified.</para>
|
bos@559
|
215 </listitem>
|
bos@584
|
216 <listitem><para id="x_602"><option
|
bos@559
|
217 role="hg-ext-mq-cmd-qnew-opt">-m</option>: Use the given
|
bos@559
|
218 text as the commit message. This text will be stored at
|
bos@559
|
219 the beginning of the patch file, before the patch
|
bos@559
|
220 data.</para>
|
bos@559
|
221 </listitem></itemizedlist>
|
bos@559
|
222
|
bos@559
|
223 </sect2>
|
bos@559
|
224 <sect2>
|
bos@559
|
225 <title><command role="hg-ext-mq">qnext</command>&emdash;print
|
bos@559
|
226 the name of the next patch</title>
|
bos@559
|
227
|
bos@584
|
228 <para id="x_603">The <command role="hg-ext-mq">qnext</command> command
|
bos@559
|
229 prints the name name of the next patch in the <filename
|
bos@559
|
230 role="special">series</filename> file after the topmost
|
bos@559
|
231 applied patch. This patch will become the topmost applied
|
bos@559
|
232 patch if you run <command
|
bos@559
|
233 role="hg-ext-mq">qpush</command>.</para>
|
bos@559
|
234
|
bos@559
|
235 </sect2>
|
bos@559
|
236 <sect2>
|
bos@559
|
237 <title><command role="hg-ext-mq">qpop</command>&emdash;pop
|
bos@559
|
238 patches off the stack</title>
|
bos@559
|
239
|
bos@584
|
240 <para id="x_604">The <command role="hg-ext-mq">qpop</command> command
|
bos@559
|
241 removes applied patches from the top of the stack of applied
|
bos@559
|
242 patches. By default, it removes only one patch.</para>
|
bos@559
|
243
|
bos@584
|
244 <para id="x_605">This command removes the changesets that represent the
|
bos@559
|
245 popped patches from the repository, and updates the working
|
bos@559
|
246 directory to undo the effects of the patches.</para>
|
bos@559
|
247
|
bos@584
|
248 <para id="x_606">This command takes an optional argument, which it uses as
|
bos@559
|
249 the name or index of the patch to pop to. If given a name, it
|
bos@559
|
250 will pop patches until the named patch is the topmost applied
|
bos@559
|
251 patch. If given a number, <command
|
bos@559
|
252 role="hg-ext-mq">qpop</command> treats the number as an
|
bos@559
|
253 index into the entries in the series file, counting from zero
|
bos@559
|
254 (empty lines and lines containing only comments do not count).
|
bos@559
|
255 It pops patches until the patch identified by the given index
|
bos@559
|
256 is the topmost applied patch.</para>
|
bos@559
|
257
|
bos@584
|
258 <para id="x_607">The <command role="hg-ext-mq">qpop</command> command does
|
bos@559
|
259 not read or write patches or the <filename
|
bos@559
|
260 role="special">series</filename> file. It is thus safe to
|
bos@559
|
261 <command role="hg-ext-mq">qpop</command> a patch that you have
|
bos@559
|
262 removed from the <filename role="special">series</filename>
|
bos@559
|
263 file, or a patch that you have renamed or deleted entirely.
|
bos@559
|
264 In the latter two cases, use the name of the patch as it was
|
bos@559
|
265 when you applied it.</para>
|
bos@559
|
266
|
bos@584
|
267 <para id="x_608">By default, the <command role="hg-ext-mq">qpop</command>
|
bos@559
|
268 command will not pop any patches if the working directory has
|
bos@672
|
269 been modified. You can override this behavior using the
|
bos@559
|
270 <option role="hg-ext-mq-cmd-qpop-opt">-f</option> option,
|
bos@559
|
271 which reverts all modifications in the working
|
bos@559
|
272 directory.</para>
|
bos@559
|
273
|
bos@584
|
274 <para id="x_609">Options:</para>
|
bos@584
|
275 <itemizedlist>
|
bos@584
|
276 <listitem><para id="x_60a"><option
|
bos@559
|
277 role="hg-ext-mq-cmd-qpop-opt">-a</option>: Pop all
|
bos@559
|
278 applied patches. This returns the repository to its state
|
bos@559
|
279 before you applied any patches.</para>
|
bos@559
|
280 </listitem>
|
bos@584
|
281 <listitem><para id="x_60b"><option
|
bos@559
|
282 role="hg-ext-mq-cmd-qpop-opt">-f</option>: Forcibly
|
bos@559
|
283 revert any modifications to the working directory when
|
bos@559
|
284 popping.</para>
|
bos@559
|
285 </listitem>
|
bos@584
|
286 <listitem><para id="x_60c"><option
|
bos@559
|
287 role="hg-ext-mq-cmd-qpop-opt">-n</option>: Pop a patch
|
bos@559
|
288 from the named queue.</para>
|
bos@559
|
289 </listitem></itemizedlist>
|
bos@559
|
290
|
bos@584
|
291 <para id="x_60d">The <command role="hg-ext-mq">qpop</command> command
|
bos@559
|
292 removes one line from the end of the <filename
|
bos@559
|
293 role="special">status</filename> file for each patch that it
|
bos@559
|
294 pops.</para>
|
bos@559
|
295
|
bos@559
|
296 </sect2>
|
bos@559
|
297 <sect2>
|
bos@559
|
298 <title><command role="hg-ext-mq">qprev</command>&emdash;print
|
bos@559
|
299 the name of the previous patch</title>
|
bos@559
|
300
|
bos@584
|
301 <para id="x_60e">The <command role="hg-ext-mq">qprev</command> command
|
bos@559
|
302 prints the name of the patch in the <filename
|
bos@559
|
303 role="special">series</filename> file that comes before the
|
bos@559
|
304 topmost applied patch. This will become the topmost applied
|
bos@559
|
305 patch if you run <command
|
bos@559
|
306 role="hg-ext-mq">qpop</command>.</para>
|
bos@559
|
307
|
bos@559
|
308 </sect2>
|
bos@559
|
309 <sect2 id="sec:mqref:cmd:qpush">
|
bos@559
|
310 <title><command role="hg-ext-mq">qpush</command>&emdash;push
|
bos@559
|
311 patches onto the stack</title>
|
bos@559
|
312
|
bos@584
|
313 <para id="x_60f">The <command role="hg-ext-mq">qpush</command> command adds
|
bos@559
|
314 patches onto the applied stack. By default, it adds only one
|
bos@559
|
315 patch.</para>
|
bos@559
|
316
|
bos@584
|
317 <para id="x_610">This command creates a new changeset to represent each
|
bos@559
|
318 applied patch, and updates the working directory to apply the
|
bos@559
|
319 effects of the patches.</para>
|
bos@559
|
320
|
bos@584
|
321 <para id="x_611">The default data used when creating a changeset are as
|
bos@559
|
322 follows:</para>
|
bos@559
|
323 <itemizedlist>
|
bos@584
|
324 <listitem><para id="x_612">The commit date and time zone are the current
|
bos@559
|
325 date and time zone. Because these data are used to
|
bos@559
|
326 compute the identity of a changeset, this means that if
|
bos@559
|
327 you <command role="hg-ext-mq">qpop</command> a patch and
|
bos@559
|
328 <command role="hg-ext-mq">qpush</command> it again, the
|
bos@559
|
329 changeset that you push will have a different identity
|
bos@559
|
330 than the changeset you popped.</para>
|
bos@559
|
331 </listitem>
|
bos@584
|
332 <listitem><para id="x_613">The author is the same as the default used by
|
bos@559
|
333 the <command role="hg-cmd">hg commit</command>
|
bos@559
|
334 command.</para>
|
bos@559
|
335 </listitem>
|
bos@584
|
336 <listitem><para id="x_614">The commit message is any text from the patch
|
bos@559
|
337 file that comes before the first diff header. If there is
|
bos@559
|
338 no such text, a default commit message is used that
|
bos@559
|
339 identifies the name of the patch.</para>
|
bos@559
|
340 </listitem></itemizedlist>
|
bos@701
|
341 <para id="x_615">If a patch contains a Mercurial patch header,
|
bos@701
|
342 the information in the patch header overrides these
|
bos@559
|
343 defaults.</para>
|
bos@559
|
344
|
bos@584
|
345 <para id="x_616">Options:</para>
|
bos@584
|
346 <itemizedlist>
|
bos@584
|
347 <listitem><para id="x_617"><option
|
bos@559
|
348 role="hg-ext-mq-cmd-qpush-opt">-a</option>: Push all
|
bos@559
|
349 unapplied patches from the <filename
|
bos@559
|
350 role="special">series</filename> file until there are
|
bos@559
|
351 none left to push.</para>
|
bos@559
|
352 </listitem>
|
bos@584
|
353 <listitem><para id="x_618"><option
|
bos@559
|
354 role="hg-ext-mq-cmd-qpush-opt">-l</option>: Add the name
|
bos@559
|
355 of the patch to the end of the commit message.</para>
|
bos@559
|
356 </listitem>
|
bos@584
|
357 <listitem><para id="x_619"><option
|
bos@559
|
358 role="hg-ext-mq-cmd-qpush-opt">-m</option>: If a patch
|
bos@559
|
359 fails to apply cleanly, use the entry for the patch in
|
bos@559
|
360 another saved queue to compute the parameters for a
|
bos@559
|
361 three-way merge, and perform a three-way merge using the
|
bos@559
|
362 normal Mercurial merge machinery. Use the resolution of
|
bos@559
|
363 the merge as the new patch content.</para>
|
bos@559
|
364 </listitem>
|
bos@584
|
365 <listitem><para id="x_61a"><option
|
bos@559
|
366 role="hg-ext-mq-cmd-qpush-opt">-n</option>: Use the
|
bos@559
|
367 named queue if merging while pushing.</para>
|
bos@559
|
368 </listitem></itemizedlist>
|
bos@559
|
369
|
bos@584
|
370 <para id="x_61b">The <command role="hg-ext-mq">qpush</command> command
|
bos@559
|
371 reads, but does not modify, the <filename
|
bos@559
|
372 role="special">series</filename> file. It appends one line
|
bos@559
|
373 to the <command role="hg-cmd">hg status</command> file for
|
bos@559
|
374 each patch that it pushes.</para>
|
bos@559
|
375
|
bos@559
|
376 </sect2>
|
bos@559
|
377 <sect2>
|
bos@559
|
378 <title><command
|
bos@559
|
379 role="hg-ext-mq">qrefresh</command>&emdash;update the
|
bos@559
|
380 topmost applied patch</title>
|
bos@559
|
381
|
bos@584
|
382 <para id="x_61c">The <command role="hg-ext-mq">qrefresh</command> command
|
bos@559
|
383 updates the topmost applied patch. It modifies the patch,
|
bos@559
|
384 removes the old changeset that represented the patch, and
|
bos@559
|
385 creates a new changeset to represent the modified
|
bos@559
|
386 patch.</para>
|
bos@559
|
387
|
bos@584
|
388 <para id="x_61d">The <command role="hg-ext-mq">qrefresh</command> command
|
bos@559
|
389 looks for the following modifications:</para>
|
bos@559
|
390 <itemizedlist>
|
bos@584
|
391 <listitem><para id="x_61e">Changes to the commit message, i.e. the text
|
bos@559
|
392 before the first diff header in the patch file, are
|
bos@559
|
393 reflected in the new changeset that represents the
|
bos@559
|
394 patch.</para>
|
bos@559
|
395 </listitem>
|
bos@584
|
396 <listitem><para id="x_61f">Modifications to tracked files in the working
|
bos@559
|
397 directory are added to the patch.</para>
|
bos@559
|
398 </listitem>
|
bos@584
|
399 <listitem><para id="x_620">Changes to the files tracked using <command
|
bos@559
|
400 role="hg-cmd">hg add</command>, <command
|
bos@559
|
401 role="hg-cmd">hg copy</command>, <command
|
bos@559
|
402 role="hg-cmd">hg remove</command>, or <command
|
bos@559
|
403 role="hg-cmd">hg rename</command>. Added files and copy
|
bos@559
|
404 and rename destinations are added to the patch, while
|
bos@559
|
405 removed files and rename sources are removed.</para>
|
bos@559
|
406 </listitem></itemizedlist>
|
bos@559
|
407
|
bos@584
|
408 <para id="x_621">Even if <command role="hg-ext-mq">qrefresh</command>
|
bos@559
|
409 detects no changes, it still recreates the changeset that
|
bos@559
|
410 represents the patch. This causes the identity of the
|
bos@559
|
411 changeset to differ from the previous changeset that
|
bos@559
|
412 identified the patch.</para>
|
bos@559
|
413
|
bos@584
|
414 <para id="x_622">Options:</para>
|
bos@584
|
415 <itemizedlist>
|
bos@584
|
416 <listitem><para id="x_623"><option
|
bos@559
|
417 role="hg-ext-mq-cmd-qrefresh-opt">-e</option>: Modify
|
bos@559
|
418 the commit and patch description, using the preferred text
|
bos@559
|
419 editor.</para>
|
bos@559
|
420 </listitem>
|
bos@584
|
421 <listitem><para id="x_624"><option
|
bos@559
|
422 role="hg-ext-mq-cmd-qrefresh-opt">-m</option>: Modify
|
bos@559
|
423 the commit message and patch description, using the given
|
bos@559
|
424 text.</para>
|
bos@559
|
425 </listitem>
|
bos@584
|
426 <listitem><para id="x_625"><option
|
bos@559
|
427 role="hg-ext-mq-cmd-qrefresh-opt">-l</option>: Modify
|
bos@559
|
428 the commit message and patch description, using text from
|
bos@559
|
429 the given file.</para>
|
bos@559
|
430 </listitem></itemizedlist>
|
bos@559
|
431
|
bos@559
|
432 </sect2>
|
bos@559
|
433 <sect2>
|
bos@559
|
434 <title><command role="hg-ext-mq">qrename</command>&emdash;rename
|
bos@559
|
435 a patch</title>
|
bos@559
|
436
|
bos@584
|
437 <para id="x_626">The <command role="hg-ext-mq">qrename</command> command
|
bos@559
|
438 renames a patch, and changes the entry for the patch in the
|
bos@559
|
439 <filename role="special">series</filename> file.</para>
|
bos@559
|
440
|
bos@584
|
441 <para id="x_627">With a single argument, <command
|
bos@559
|
442 role="hg-ext-mq">qrename</command> renames the topmost
|
bos@559
|
443 applied patch. With two arguments, it renames its first
|
bos@559
|
444 argument to its second.</para>
|
bos@559
|
445
|
bos@559
|
446 </sect2>
|
bos@559
|
447 <sect2>
|
bos@559
|
448 <title><command role="hg-ext-mq">qseries</command>&emdash;print
|
bos@559
|
449 the entire patch series</title>
|
bos@559
|
450
|
bos@584
|
451 <para id="x_62a">The <command role="hg-ext-mq">qseries</command> command
|
bos@559
|
452 prints the entire patch series from the <filename
|
bos@559
|
453 role="special">series</filename> file. It prints only patch
|
bos@559
|
454 names, not empty lines or comments. It prints in order from
|
bos@559
|
455 first to be applied to last.</para>
|
bos@559
|
456
|
bos@559
|
457 </sect2>
|
bos@559
|
458 <sect2>
|
bos@559
|
459 <title><command role="hg-ext-mq">qtop</command>&emdash;print the
|
bos@559
|
460 name of the current patch</title>
|
bos@559
|
461
|
bos@584
|
462 <para id="x_62b">The <command role="hg-ext-mq">qtop</command> prints the
|
bos@559
|
463 name of the topmost currently applied patch.</para>
|
bos@559
|
464
|
bos@559
|
465 </sect2>
|
bos@559
|
466 <sect2>
|
bos@559
|
467 <title><command
|
bos@559
|
468 role="hg-ext-mq">qunapplied</command>&emdash;print patches
|
bos@559
|
469 not yet applied</title>
|
bos@559
|
470
|
bos@584
|
471 <para id="x_62c">The <command role="hg-ext-mq">qunapplied</command> command
|
bos@559
|
472 prints the names of patches from the <filename
|
bos@559
|
473 role="special">series</filename> file that are not yet
|
bos@559
|
474 applied. It prints them in order from the next patch that
|
bos@559
|
475 will be pushed to the last.</para>
|
bos@559
|
476
|
bos@559
|
477 </sect2>
|
bos@559
|
478 <sect2>
|
bos@559
|
479 <title><command role="hg-cmd">hg strip</command>&emdash;remove a
|
bos@559
|
480 revision and descendants</title>
|
bos@559
|
481
|
bos@584
|
482 <para id="x_62d">The <command role="hg-cmd">hg strip</command> command
|
bos@559
|
483 removes a revision, and all of its descendants, from the
|
bos@559
|
484 repository. It undoes the effects of the removed revisions
|
bos@559
|
485 from the repository, and updates the working directory to the
|
bos@559
|
486 first parent of the removed revision.</para>
|
bos@559
|
487
|
bos@584
|
488 <para id="x_62e">The <command role="hg-cmd">hg strip</command> command
|
bos@559
|
489 saves a backup of the removed changesets in a bundle, so that
|
bos@559
|
490 they can be reapplied if removed in error.</para>
|
bos@559
|
491
|
bos@584
|
492 <para id="x_62f">Options:</para>
|
bos@584
|
493 <itemizedlist>
|
bos@584
|
494 <listitem><para id="x_630"><option role="hg-opt-strip">-b</option>: Save
|
bos@559
|
495 unrelated changesets that are intermixed with the stripped
|
bos@559
|
496 changesets in the backup bundle.</para>
|
bos@559
|
497 </listitem>
|
bos@584
|
498 <listitem><para id="x_631"><option role="hg-opt-strip">-f</option>: If a
|
bos@701
|
499 branch has multiple heads, remove all heads.</para>
|
bos@559
|
500 </listitem>
|
bos@584
|
501 <listitem><para id="x_632"><option role="hg-opt-strip">-n</option>: Do
|
bos@559
|
502 not save a backup bundle.</para>
|
bos@559
|
503 </listitem></itemizedlist>
|
bos@559
|
504
|
bos@559
|
505 </sect2>
|
bos@559
|
506 </sect1>
|
bos@559
|
507 <sect1>
|
bos@559
|
508 <title>MQ file reference</title>
|
bos@559
|
509
|
bos@559
|
510 <sect2>
|
bos@559
|
511 <title>The <filename role="special">series</filename>
|
bos@559
|
512 file</title>
|
bos@559
|
513
|
bos@584
|
514 <para id="x_633">The <filename role="special">series</filename> file
|
bos@559
|
515 contains a list of the names of all patches that MQ can apply.
|
bos@559
|
516 It is represented as a list of names, with one name saved per
|
bos@559
|
517 line. Leading and trailing white space in each line are
|
bos@559
|
518 ignored.</para>
|
bos@559
|
519
|
bos@584
|
520 <para id="x_634">Lines may contain comments. A comment begins with the
|
bos@559
|
521 <quote><literal>#</literal></quote> character, and extends to
|
bos@559
|
522 the end of the line. Empty lines, and lines that contain only
|
bos@559
|
523 comments, are ignored.</para>
|
bos@559
|
524
|
bos@584
|
525 <para id="x_635">You will often need to edit the <filename
|
bos@559
|
526 role="special">series</filename> file by hand, hence the
|
bos@559
|
527 support for comments and empty lines noted above. For
|
bos@559
|
528 example, you can comment out a patch temporarily, and <command
|
bos@559
|
529 role="hg-ext-mq">qpush</command> will skip over that patch
|
bos@559
|
530 when applying patches. You can also change the order in which
|
bos@559
|
531 patches are applied by reordering their entries in the
|
bos@559
|
532 <filename role="special">series</filename> file.</para>
|
bos@559
|
533
|
bos@584
|
534 <para id="x_636">Placing the <filename role="special">series</filename>
|
bos@559
|
535 file under revision control is also supported; it is a good
|
bos@559
|
536 idea to place all of the patches that it refers to under
|
bos@559
|
537 revision control, as well. If you create a patch directory
|
bos@559
|
538 using the <option role="hg-ext-mq-cmd-qinit-opt">-c</option>
|
bos@559
|
539 option to <command role="hg-ext-mq">qinit</command>, this will
|
bos@559
|
540 be done for you automatically.</para>
|
bos@559
|
541
|
bos@559
|
542 </sect2>
|
bos@559
|
543 <sect2>
|
bos@559
|
544 <title>The <filename role="special">status</filename>
|
bos@559
|
545 file</title>
|
bos@559
|
546
|
bos@584
|
547 <para id="x_637">The <filename role="special">status</filename> file
|
bos@559
|
548 contains the names and changeset hashes of all patches that MQ
|
bos@559
|
549 currently has applied. Unlike the <filename
|
bos@559
|
550 role="special">series</filename> file, this file is not
|
bos@559
|
551 intended for editing. You should not place this file under
|
bos@559
|
552 revision control, or modify it in any way. It is used by MQ
|
bos@559
|
553 strictly for internal book-keeping.</para>
|
bos@559
|
554
|
bos@559
|
555 </sect2>
|
bos@559
|
556 </sect1>
|
bos@559
|
557 </appendix>
|
bos@559
|
558
|
bos@559
|
559 <!--
|
bos@559
|
560 local variables:
|
bos@559
|
561 sgml-parent-document: ("00book.xml" "book" "appendix")
|
bos@559
|
562 end:
|
bos@559
|
563 -->
|