Show More
@@ -10,9 +10,9 b'' | |||
|
10 | 10 | The series is started off with a "[PATCH 0 of N]" introduction, which |
|
11 | 11 | describes the series as a whole. |
|
12 | 12 | |
|
13 |
Each patch email has a Subject line of "[PATCH M of N] ...", using the |
|
|
14 |
line of the changeset description as the subject text. The |
|
|
15 | two or three body parts: | |
|
13 | Each patch email has a Subject line of "[PATCH M of N] ...", using the | |
|
14 | first line of the changeset description as the subject text. The | |
|
15 | message contains two or three body parts: | |
|
16 | 16 | |
|
17 | 17 | The changeset description. |
|
18 | 18 | |
@@ -20,15 +20,16 b' two or three body parts:' | |||
|
20 | 20 | |
|
21 | 21 | The patch itself, as generated by "hg export". |
|
22 | 22 | |
|
23 |
Each message refers to the first in the series using the In-Reply-To |
|
|
24 |
References headers, so they will show up as a sequence in threaded |
|
|
25 | news readers, and in mail archives. | |
|
23 | Each message refers to the first in the series using the In-Reply-To | |
|
24 | and References headers, so they will show up as a sequence in threaded | |
|
25 | mail and news readers, and in mail archives. | |
|
26 | 26 | |
|
27 |
With the -d/--diffstat option, you will be prompted for each changeset |
|
|
28 |
diffstat summary and the changeset summary, so you can be sure |
|
|
29 | the right changes. | |
|
27 | With the -d/--diffstat option, you will be prompted for each changeset | |
|
28 | with a diffstat summary and the changeset summary, so you can be sure | |
|
29 | you are sending the right changes. | |
|
30 | 30 | |
|
31 |
To configure other defaults, add a section like this to your hgrc |
|
|
31 | To configure other defaults, add a section like this to your hgrc | |
|
32 | file:: | |
|
32 | 33 | |
|
33 | 34 | [email] |
|
34 | 35 | from = My Name <my@email> |
@@ -36,35 +37,38 b' To configure other defaults, add a secti' | |||
|
36 | 37 | cc = cc1, cc2, ... |
|
37 | 38 | bcc = bcc1, bcc2, ... |
|
38 | 39 | |
|
39 |
Then you can use the "hg email" command to mail a series of changesets |
|
|
40 | patchbomb. | |
|
40 | Then you can use the "hg email" command to mail a series of changesets | |
|
41 | as a patchbomb. | |
|
41 | 42 | |
|
42 |
To avoid sending patches prematurely, it is a good idea to first run |
|
|
43 |
"email" command with the "-n" option (test only). You will be |
|
|
44 |
email recipient address, a subject and an introductory |
|
|
45 |
patches of your patchbomb. Then when all is |
|
|
46 | displayed. If the PAGER environment variable is set, your pager will be fired | |
|
47 | up once for each patchbomb message, so you can verify everything is alright. | |
|
43 | To avoid sending patches prematurely, it is a good idea to first run | |
|
44 | the "email" command with the "-n" option (test only). You will be | |
|
45 | prompted for an email recipient address, a subject and an introductory | |
|
46 | message describing the patches of your patchbomb. Then when all is | |
|
47 | done, patchbomb messages are displayed. If the PAGER environment | |
|
48 | variable is set, your pager will be fired up once for each patchbomb | |
|
49 | message, so you can verify everything is alright. | |
|
48 | 50 | |
|
49 |
The -m/--mbox option is also very useful. Instead of previewing each |
|
|
50 |
message in a pager or sending the messages directly, it will |
|
|
51 |
mailbox file with the patch emails. This mailbox file |
|
|
52 |
any mail user agent which supports UNIX mbox |
|
|
51 | The -m/--mbox option is also very useful. Instead of previewing each | |
|
52 | patchbomb message in a pager or sending the messages directly, it will | |
|
53 | create a UNIX mailbox file with the patch emails. This mailbox file | |
|
54 | can be previewed with any mail user agent which supports UNIX mbox | |
|
55 | files, e.g. with mutt:: | |
|
53 | 56 | |
|
54 | 57 | % mutt -R -f mbox |
|
55 | 58 | |
|
56 |
When you are previewing the patchbomb messages, you can use `formail' |
|
|
57 |
utility that is commonly installed as part of the procmail |
|
|
58 | each message out:: | |
|
59 | When you are previewing the patchbomb messages, you can use `formail' | |
|
60 | (a utility that is commonly installed as part of the procmail | |
|
61 | package), to send each message out:: | |
|
59 | 62 | |
|
60 | 63 | % formail -s sendmail -bm -t < mbox |
|
61 | 64 | |
|
62 | 65 | That should be all. Now your patchbomb is on its way out. |
|
63 | 66 | |
|
64 |
You can also either configure the method option in the email section |
|
|
65 |
sendmail compatible mailer or fill out the [smtp] section so |
|
|
66 |
patchbomb extension can automatically send patchbombs |
|
|
67 |
commandline. See the [email] and [smtp] sections in |
|
|
67 | You can also either configure the method option in the email section | |
|
68 | to be a sendmail compatible mailer or fill out the [smtp] section so | |
|
69 | that the patchbomb extension can automatically send patchbombs | |
|
70 | directly from the commandline. See the [email] and [smtp] sections in | |
|
71 | hgrc(5) for details. | |
|
68 | 72 | ''' |
|
69 | 73 | |
|
70 | 74 | import os, errno, socket, tempfile, cStringIO, time |
@@ -173,27 +177,30 b' def makepatch(ui, repo, patch, opts, _ch' | |||
|
173 | 177 | def patchbomb(ui, repo, *revs, **opts): |
|
174 | 178 | '''send changesets by email |
|
175 | 179 | |
|
176 |
By default, diffs are sent in the format generated by hg export, |
|
|
177 |
message. The series starts with a "[PATCH 0 of N]" |
|
|
178 | describes the series as a whole. | |
|
180 | By default, diffs are sent in the format generated by hg export, | |
|
181 | one per message. The series starts with a "[PATCH 0 of N]" | |
|
182 | introduction, which describes the series as a whole. | |
|
179 | 183 | |
|
180 |
Each patch email has a Subject line of "[PATCH M of N] ...", using |
|
|
181 |
first line of the changeset description as the subject text. |
|
|
182 |
contains two or three parts. First, the changeset |
|
|
183 |
(optionally) if the diffstat program is |
|
|
184 | used, the result of running diffstat on the patch. Finally, the patch | |
|
185 | itself, as generated by "hg export". | |
|
184 | Each patch email has a Subject line of "[PATCH M of N] ...", using | |
|
185 | the first line of the changeset description as the subject text. | |
|
186 | 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". | |
|
186 | 191 | |
|
187 |
By default the patch is included as text in the email body for |
|
|
188 |
reviewing. Using the -a/--attach option will instead create |
|
|
189 |
for the patch. With -i/--inline an inline attachment |
|
|
192 | By default the patch is included as text in the email body for | |
|
193 | easy reviewing. Using the -a/--attach option will instead create | |
|
194 | an attachment for the patch. With -i/--inline an inline attachment | |
|
195 | will be created. | |
|
190 | 196 | |
|
191 |
With -o/--outgoing, emails will be generated for patches not found |
|
|
192 |
destination repository (or only those which are ancestors |
|
|
193 | revisions if any are provided) | |
|
197 | With -o/--outgoing, emails will be generated for patches not found | |
|
198 | in the destination repository (or only those which are ancestors | |
|
199 | of the specified revisions if any are provided) | |
|
194 | 200 | |
|
195 |
With -b/--bundle, changesets are selected as for --outgoing, but a |
|
|
196 |
email containing a binary Mercurial bundle as an attachment |
|
|
201 | With -b/--bundle, changesets are selected as for --outgoing, but a | |
|
202 | single email containing a binary Mercurial bundle as an attachment | |
|
203 | will be sent. | |
|
197 | 204 | |
|
198 | 205 | Examples: |
|
199 | 206 | |
@@ -212,8 +219,8 b' def patchbomb(ui, repo, *revs, **opts):' | |||
|
212 | 219 | hg email -b -r 3000 # bundle of all ancestors of 3000 not in default |
|
213 | 220 | hg email -b -r 3000 DEST # bundle of all ancestors of 3000 not in DEST |
|
214 | 221 | |
|
215 |
Before using this command, you will need to enable email in your |
|
|
216 | the [email] section in hgrc(5) for details. | |
|
222 | Before using this command, you will need to enable email in your | |
|
223 | hgrc. See the [email] section in hgrc(5) for details. | |
|
217 | 224 | ''' |
|
218 | 225 | |
|
219 | 226 | _charsets = mail._charsets(ui) |
General Comments 0
You need to be logged in to leave comments.
Login now