Debian Codegraph @

doc/html/ext-patchbomb.html

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Docutils 0.21.2: https://docutils.sourceforge.io/" />
7 <title>patchbomb</title>
8 <link rel="stylesheet" href="../style.css" type="text/css" />
9 </head>
10 <body>
11 <div class="document" id="patchbomb">
12 <span id="ext-patchbomb"></span>
13 <h1 class="title">patchbomb</h1>
14
15 <div class="contents htmlonly topic" id="contents">
16 <p class="topic-title"><a class="reference internal" href="#top">Contents</a></p>
17 <ul class="simple">
18 <li><a class="reference internal" href="#description" id="toc-entry-1">Description</a></li>
19 <li><a class="reference internal" href="#commands" id="toc-entry-2">Commands</a><ul>
20 <li><a class="reference internal" href="#change-import-export" id="toc-entry-3">Change import/export</a></li>
21 </ul>
22 </li>
23 </ul>
24 </div>
25 <p>command to send changesets as (a series of) patch emails</p>
26 <div class="section" id="description">
27 <h1><a class="toc-backref" href="#contents">Description</a></h1>
28 <p>The series is started off with a &quot;[PATCH 0 of N]&quot; introduction, which
29 describes the series as a whole.</p>
30 <p>Each patch email has a Subject line of &quot;[PATCH M of N] ...&quot;, using the
31 first line of the changeset description as the subject text. The
32 message contains two or three body parts:</p>
33 <ul class="simple">
34 <li>The changeset description.</li>
35 <li>[Optional] The result of running diffstat on the patch.</li>
36 <li>The patch itself, as generated by <a class="reference external" href="hg-export.html"><tt class="docutils literal">hg export</tt></a>.</li>
37 </ul>
38 <p>Each message refers to the first in the series using the In-Reply-To
39 and References headers, so they will show up as a sequence in threaded
40 mail and news readers, and in mail archives.</p>
41 <p>To configure other defaults, add a section like this to your
42 configuration file:</p>
43 <pre class="literal-block">
44 [email]
45 from = My Name &lt;my&#64;email&gt;
46 to = recipient1, recipient2, ...
47 cc = cc1, cc2, ...
48 bcc = bcc1, bcc2, ...
49 reply-to = address1, address2, ...
50 </pre>
51 <p>Use <tt class="docutils literal">[patchbomb]</tt> as configuration section name if you need to
52 override global <tt class="docutils literal">[email]</tt> address settings.</p>
53 <p>Then you can use the <a class="reference external" href="hg-email.html"><tt class="docutils literal">hg email</tt></a> command to mail a series of
54 changesets as a patchbomb.</p>
55 <p>You can also either configure the method option in the email section
56 to be a sendmail compatible mailer or fill out the [smtp] section so
57 that the patchbomb extension can automatically send patchbombs
58 directly from the commandline. See the [email] and [smtp] sections in
59 hgrc(5) for details.</p>
60 <p>By default, <a class="reference external" href="hg-email.html"><tt class="docutils literal">hg email</tt></a> will prompt for a <tt class="docutils literal">To</tt> or <tt class="docutils literal">CC</tt> header if
61 you do not supply one via configuration or the command line. You can
62 override this to never prompt by configuring an empty value:</p>
63 <pre class="literal-block">
64 [email]
65 cc =
66 </pre>
67 <p>You can control the default inclusion of an introduction message with the
68 <tt class="docutils literal">patchbomb.intro</tt> configuration option. The configuration is always
69 overwritten by command line flags like --intro and --desc:</p>
70 <pre class="literal-block">
71 [patchbomb]
72 intro=auto # include introduction message if more than 1 patch (default)
73 intro=never # never include an introduction message
74 intro=always # always include an introduction message
75 </pre>
76 <p>You can specify a template for flags to be added in subject prefixes. Flags
77 specified by --flag option are exported as <tt class="docutils literal">{flags}</tt> keyword:</p>
78 <pre class="literal-block">
79 [patchbomb]
80 flagtemplate = &quot;{separate(' ',
81 ifeq(branch, 'default', '', branch|upper),
82 flags)}&quot;
83 </pre>
84 <p>You can set patchbomb to always ask for confirmation by setting
85 <tt class="docutils literal">patchbomb.confirm</tt> to true.</p>
86 </div>
87 <div class="section" id="commands">
88 <h1><a class="toc-backref" href="#contents">Commands</a></h1>
89 <div class="section" id="change-import-export">
90 <h2><a class="toc-backref" href="#contents">Change import/export</a></h2>
91 <div class="section" id="email">
92 <h3>email</h3>
93 <p>send changesets by email:</p>
94 <pre class="literal-block">
95 hg email [OPTION]... [DEST]...
96 </pre>
97 <p>By default, diffs are sent in the format generated by
98 <a class="reference external" href="hg-export.html"><tt class="docutils literal">hg export</tt></a>, one per message. The series starts with a &quot;[PATCH 0
99 of N]&quot; introduction, which describes the series as a whole.</p>
100 <p>Each patch email has a Subject line of &quot;[PATCH M of N] ...&quot;, using
101 the first line of the changeset description as the subject text.
102 The message contains two or three parts. First, the changeset
103 description.</p>
104 <p>With the -d/--diffstat option, if the diffstat program is
105 installed, the result of running diffstat on the patch is inserted.</p>
106 <p>Finally, the patch itself, as generated by <a class="reference external" href="hg-export.html"><tt class="docutils literal">hg export</tt></a>.</p>
107 <p>With the -d/--diffstat or --confirm options, you will be presented
108 with a final summary of all messages and asked for confirmation before
109 the messages are sent.</p>
110 <p>By default the patch is included as text in the email body for
111 easy reviewing. Using the -a/--attach option will instead create
112 an attachment for the patch. With -i/--inline an inline attachment
113 will be created. You can include a patch both as text in the email
114 body and as a regular or an inline attachment by combining the
115 -a/--attach or -i/--inline with the --body option.</p>
116 <p>With -B/--bookmark changesets reachable by the given bookmark are
117 selected.</p>
118 <p>With -o/--outgoing, emails will be generated for patches not found
119 in the destination repository (or only those which are ancestors
120 of the specified revisions if any are provided)</p>
121 <p>With -b/--bundle, changesets are selected as for --outgoing, but a
122 single email containing a binary Mercurial bundle as an attachment
123 will be sent. Use the <tt class="docutils literal">patchbomb.bundletype</tt> config option to
124 control the bundle type as with <a class="reference external" href="hg-bundle.html"><tt class="docutils literal">hg bundle <span class="pre">--type</span></tt></a>.</p>
125 <p>With -m/--mbox, instead of previewing each patchbomb message in a
126 pager or sending the messages directly, it will create a UNIX
127 mailbox file with the patch emails. This mailbox file can be
128 previewed with any mail user agent which supports UNIX mbox
129 files.</p>
130 <p>With -n/--test, all steps will run, but mail will not be sent.
131 You will be prompted for an email recipient address, a subject and
132 an introductory message describing the patches of your patchbomb.
133 Then when all is done, patchbomb messages are displayed.</p>
134 <p>In case email sending fails, you will find a backup of your series
135 introductory message in <tt class="docutils literal"><span class="pre">.hg/last-email.txt</span></tt>.</p>
136 <p>The default behavior of this command can be customized through
137 configuration. (See <a class="reference external" href="ext-patchbomb.html"><tt class="docutils literal">hg help patchbomb</tt></a> for details)</p>
138 <p>Examples:</p>
139 <pre class="literal-block">
140 hg email -r 3000 # send patch 3000 only
141 hg email -r 3000 -r 3001 # send patches 3000 and 3001
142 hg email -r 3000:3005 # send patches 3000 through 3005
143 hg email 3000 # send patch 3000 (deprecated)
144
145 hg email -o # send all patches not in default
146 hg email -o DEST # send all patches not in DEST
147 hg email -o -r 3000 # send all ancestors of 3000 not in default
148 hg email -o -r 3000 DEST # send all ancestors of 3000 not in DEST
149
150 hg email -B feature # send all ancestors of feature bookmark
151
152 hg email -b # send bundle of all patches not in default
153 hg email -b DEST # send bundle of all patches not in DEST
154 hg email -b -r 3000 # bundle of all ancestors of 3000 not in default
155 hg email -b -r 3000 DEST # bundle of all ancestors of 3000 not in DEST
156
157 hg email -o -m mbox &amp;&amp; # generate an mbox file...
158 mutt -R -f mbox # ... and view it with mutt
159 hg email -o -m mbox &amp;&amp; # generate an mbox file ...
160 formail -s sendmail \ # ... and use formail to send from the mbox
161 -bm -t &lt; mbox # ... using sendmail
162 </pre>
163 <p>Before using this command, you will need to enable email in your
164 hgrc. See the [email] section in hgrc(5) for details.</p>
165 <p>Options:</p>
166 <table class="docutils option-list" frame="void" rules="none">
167 <col class="option" />
168 <col class="description" />
169 <tbody valign="top">
170 <tr><td class="option-group">
171 <kbd><span class="option">-g</span>, <span class="option">--git</span></kbd></td>
172 <td>use git extended diff format</td></tr>
173 <tr><td class="option-group">
174 <kbd><span class="option">--plain</span></kbd></td>
175 <td>omit hg patch header</td></tr>
176 <tr><td class="option-group">
177 <kbd><span class="option">-o</span>, <span class="option">--outgoing</span></kbd></td>
178 <td>send changes not found in the target repository</td></tr>
179 <tr><td class="option-group">
180 <kbd><span class="option">-b</span>, <span class="option">--bundle</span></kbd></td>
181 <td>send changes not in target as a binary bundle</td></tr>
182 <tr><td class="option-group" colspan="2">
183 <kbd><span class="option">-B</span>, <span class="option">--bookmark <var>&lt;BOOKMARK&gt;</var></span></kbd></td>
184 </tr>
185 <tr><td>&nbsp;</td><td>send changes only reachable by given bookmark</td></tr>
186 <tr><td class="option-group" colspan="2">
187 <kbd><span class="option">--bundlename <var>&lt;NAME&gt;</var></span></kbd></td>
188 </tr>
189 <tr><td>&nbsp;</td><td>name of the bundle attachment file (default: bundle)</td></tr>
190 <tr><td class="option-group" colspan="2">
191 <kbd><span class="option">-r</span>, <span class="option">--rev <var>&lt;REV[+]&gt;</var></span></kbd></td>
192 </tr>
193 <tr><td>&nbsp;</td><td>a revision to send</td></tr>
194 <tr><td class="option-group">
195 <kbd><span class="option">--force</span></kbd></td>
196 <td>run even when remote repository is unrelated (with -b/--bundle)</td></tr>
197 <tr><td class="option-group" colspan="2">
198 <kbd><span class="option">--base <var>&lt;REV[+]&gt;</var></span></kbd></td>
199 </tr>
200 <tr><td>&nbsp;</td><td>a base changeset to specify instead of a destination (with -b/--bundle)</td></tr>
201 <tr><td class="option-group">
202 <kbd><span class="option">--intro</span></kbd></td>
203 <td>send an introduction email for a single patch</td></tr>
204 <tr><td class="option-group">
205 <kbd><span class="option">--body</span></kbd></td>
206 <td>send patches as inline message text (default)</td></tr>
207 <tr><td class="option-group">
208 <kbd><span class="option">-a</span>, <span class="option">--attach</span></kbd></td>
209 <td>send patches as attachments</td></tr>
210 <tr><td class="option-group">
211 <kbd><span class="option">-i</span>, <span class="option">--inline</span></kbd></td>
212 <td>send patches as inline attachments</td></tr>
213 <tr><td class="option-group" colspan="2">
214 <kbd><span class="option">--bcc <var>&lt;EMAIL[+]&gt;</var></span></kbd></td>
215 </tr>
216 <tr><td>&nbsp;</td><td>email addresses of blind carbon copy recipients</td></tr>
217 <tr><td class="option-group" colspan="2">
218 <kbd><span class="option">-c</span>, <span class="option">--cc <var>&lt;EMAIL[+]&gt;</var></span></kbd></td>
219 </tr>
220 <tr><td>&nbsp;</td><td>email addresses of copy recipients</td></tr>
221 <tr><td class="option-group">
222 <kbd><span class="option">--confirm</span></kbd></td>
223 <td>ask for confirmation before sending</td></tr>
224 <tr><td class="option-group">
225 <kbd><span class="option">-d</span>, <span class="option">--diffstat</span></kbd></td>
226 <td>add diffstat output to messages</td></tr>
227 <tr><td class="option-group">
228 <kbd><span class="option">--date <var>&lt;DATE&gt;</var></span></kbd></td>
229 <td>use the given date as the sending date</td></tr>
230 <tr><td class="option-group">
231 <kbd><span class="option">--desc <var>&lt;FILE&gt;</var></span></kbd></td>
232 <td>use the given file as the series description</td></tr>
233 <tr><td class="option-group" colspan="2">
234 <kbd><span class="option">-f</span>, <span class="option">--from <var>&lt;EMAIL&gt;</var></span></kbd></td>
235 </tr>
236 <tr><td>&nbsp;</td><td>email address of sender</td></tr>
237 <tr><td class="option-group">
238 <kbd><span class="option">-n</span>, <span class="option">--test</span></kbd></td>
239 <td>print messages that would be sent</td></tr>
240 <tr><td class="option-group" colspan="2">
241 <kbd><span class="option">-m</span>, <span class="option">--mbox <var>&lt;FILE&gt;</var></span></kbd></td>
242 </tr>
243 <tr><td>&nbsp;</td><td>write messages to mbox file instead of sending them</td></tr>
244 <tr><td class="option-group" colspan="2">
245 <kbd><span class="option">--reply-to <var>&lt;EMAIL[+]&gt;</var></span></kbd></td>
246 </tr>
247 <tr><td>&nbsp;</td><td>email addresses replies should be sent to</td></tr>
248 <tr><td class="option-group" colspan="2">
249 <kbd><span class="option">-s</span>, <span class="option">--subject <var>&lt;TEXT&gt;</var></span></kbd></td>
250 </tr>
251 <tr><td>&nbsp;</td><td>subject of first message (intro or single patch)</td></tr>
252 <tr><td class="option-group" colspan="2">
253 <kbd><span class="option">--in-reply-to <var>&lt;MSGID&gt;</var></span></kbd></td>
254 </tr>
255 <tr><td>&nbsp;</td><td>message identifier to reply to</td></tr>
256 <tr><td class="option-group" colspan="2">
257 <kbd><span class="option">--flag <var>&lt;FLAG[+]&gt;</var></span></kbd></td>
258 </tr>
259 <tr><td>&nbsp;</td><td>flags to add in subject prefixes</td></tr>
260 <tr><td class="option-group" colspan="2">
261 <kbd><span class="option">-t</span>, <span class="option">--to <var>&lt;EMAIL[+]&gt;</var></span></kbd></td>
262 </tr>
263 <tr><td>&nbsp;</td><td>email addresses of recipients</td></tr>
264 <tr><td class="option-group" colspan="2">
265 <kbd><span class="option">-e</span>, <span class="option">--ssh <var>&lt;CMD&gt;</var></span></kbd></td>
266 </tr>
267 <tr><td>&nbsp;</td><td>specify ssh command to use</td></tr>
268 <tr><td class="option-group" colspan="2">
269 <kbd><span class="option">--remotecmd <var>&lt;CMD&gt;</var></span></kbd></td>
270 </tr>
271 <tr><td>&nbsp;</td><td>specify hg command to run on the remote side</td></tr>
272 <tr><td class="option-group">
273 <kbd><span class="option">--insecure</span></kbd></td>
274 <td>do not verify server certificate (ignoring web.cacerts config)</td></tr>
275 </tbody>
276 </table>
277 <p>[+] marked option can be specified multiple times</p>
278 </div>
279 </div>
280 </div>
281 </div>
282 </body>
283 </html>