##// END OF EJS Templates
patchbomb: move command option help from the extension (patchbomb) to the command (email)
timeless -
r12749:338b4b61 default
parent child Browse files
Show More
@@ -22,10 +22,6 b' Each message refers to the first in the '
22 22 and References headers, so they will show up as a sequence in threaded
23 23 mail and news readers, and in mail archives.
24 24
25 With the -d/--diffstat or -c/--confirm options, you will be presented
26 with a final summary of all messages and asked for confirmation before
27 the messages are sent.
28
29 25 To configure other defaults, add a section like this to your hgrc
30 26 file::
31 27
@@ -42,30 +38,6 b' override global ``[email]`` address sett'
42 38 Then you can use the :hg:`email` command to mail a series of
43 39 changesets as a patchbomb.
44 40
45 To avoid sending patches prematurely, it is a good idea to first run
46 the :hg:`email` command with the "-n" option (test only). You will be
47 prompted for an email recipient address, a subject and an introductory
48 message describing the patches of your patchbomb. Then when all is
49 done, patchbomb messages are displayed. If the PAGER environment
50 variable is set, your pager will be fired up once for each patchbomb
51 message, so you can verify everything is alright.
52
53 The -m/--mbox option is also very useful. Instead of previewing each
54 patchbomb message in a pager or sending the messages directly, it will
55 create a UNIX mailbox file with the patch emails. This mailbox file
56 can be previewed with any mail user agent which supports UNIX mbox
57 files, e.g. with mutt::
58
59 % mutt -R -f mbox
60
61 When you are previewing the patchbomb messages, you can use ``formail``
62 (a utility that is commonly installed as part of the procmail
63 package), to send each message out::
64
65 % formail -s sendmail -bm -t < mbox
66
67 That should be all. Now your patchbomb is on its way out.
68
69 41 You can also either configure the method option in the email section
70 42 to be a sendmail compatible mailer or fill out the [smtp] section so
71 43 that the patchbomb extension can automatically send patchbombs
@@ -184,10 +156,16 b' def patchbomb(ui, repo, *revs, **opts):'
184 156 Each patch email has a Subject line of "[PATCH M of N] ...", using
185 157 the first line of the changeset description as the subject text.
186 158 The message contains two or three parts. First, the changeset
187 description. Next, (optionally) if the diffstat program is
188 installed and -d/--diffstat is used, the result of running
189 diffstat on the patch. Finally, the patch itself, as generated by
190 :hg:`export`.
159 description.
160
161 With the -d/--diffstat option, if the diffstat program is
162 installed, the result of running diffstat on the patch is inserted.
163
164 Finally, the patch itself, as generated by :hg:`export`.
165
166 With the -d/--diffstat or -c/--confirm options, you will be presented
167 with a final summary of all messages and asked for confirmation before
168 the messages are sent.
191 169
192 170 By default the patch is included as text in the email body for
193 171 easy reviewing. Using the -a/--attach option will instead create
@@ -202,6 +180,19 b' def patchbomb(ui, repo, *revs, **opts):'
202 180 single email containing a binary Mercurial bundle as an attachment
203 181 will be sent.
204 182
183 With -m/--mbox, instead of previewing each patchbomb message in a
184 pager or sending the messages directly, it will create a UNIX
185 mailbox file with the patch emails. This mailbox file can be
186 previewed with any mail user agent which supports UNIX mbox
187 files.
188
189 With -n/--test, all steps will run, but mail will not be sent.
190 You will be prompted for an email recipient address, a subject and
191 an introductory message describing the patches of your patchbomb.
192 Then when all is done, patchbomb messages are displayed. If the
193 PAGER environment variable is set, your pager will be fired up once
194 for each patchbomb message, so you can verify everything is alright.
195
205 196 Examples::
206 197
207 198 hg email -r 3000 # send patch 3000 only
@@ -219,6 +210,12 b' def patchbomb(ui, repo, *revs, **opts):'
219 210 hg email -b -r 3000 # bundle of all ancestors of 3000 not in default
220 211 hg email -b -r 3000 DEST # bundle of all ancestors of 3000 not in DEST
221 212
213 hg email -o -m mbox && # generate an mbox file...
214 mutt -R -f mbox # ... and view it with mutt
215 hg email -o -m mbox && # generate an mbox file ...
216 formail -s sendmail \ # ... and use formail to send from the mbox
217 -bm -t < mbox # ... using sendmail
218
222 219 Before using this command, you will need to enable email in your
223 220 hgrc. See the [email] section in hgrc(5) for details.
224 221 '''
General Comments 0
You need to be logged in to leave comments. Login now