comparison en/appB-mq-ref.xml @ 749:7e7c47481e4f

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