Debian Codegraph @

tests/test-patchbomb.t

raw
1 Note for future hackers of patchbomb: this file is a bit heavy on
2 wildcards in test expectations due to how many things like hostnames
3 tend to make it into outputs. As a result, you may need to perform the
4 following regular expression substitutions:
5 Mercurial-patchbomb/.* -> Mercurial-patchbomb/* (glob)
6 /mixed; boundary="===+[0-9]+==" -> /mixed; boundary="===*== (glob)"
7 --===+[0-9]+=+--$ -> --===*=-- (glob)
8 --===+[0-9]+=+$ -> --===*= (glob)
9
10 $ cat > prune-blank-after-boundary.py <<EOF
11 > import sys
12 > skipblank = False
13 > trim = lambda x: x.strip(' \r\n')
14 > for l in sys.stdin:
15 > if trim(l).endswith('=--') or trim(l).endswith('=='):
16 > skipblank = True
17 > print(l, end='')
18 > continue
19 > if not trim(l) and skipblank:
20 > continue
21 > skipblank = False
22 > print(l, end='')
23 > EOF
24 $ filterboundary() {
25 > "$PYTHON" "$TESTTMP/prune-blank-after-boundary.py"
26 > }
27 $ echo "[extensions]" >> $HGRCPATH
28 $ echo "patchbomb=" >> $HGRCPATH
29
30 $ hg init t
31 $ cd t
32 $ echo a > a
33 $ hg commit -Ama -d '1 0'
34 adding a
35
36 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip
37 this patch series consists of 1 patches.
38
39
40 displaying [PATCH] a ...
41 MIME-Version: 1.0
42 Content-Type: text/plain; charset="us-ascii"
43 Content-Transfer-Encoding: 7bit
44 Subject: [PATCH] a
45 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
46 X-Mercurial-Series-Index: 1
47 X-Mercurial-Series-Total: 1
48 Message-Id: <8580ff50825a50c8f716.60@test-hostname>
49 X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname>
50 User-Agent: Mercurial-patchbomb/* (glob)
51 Date: Thu, 01 Jan 1970 00:01:00 +0000
52 From: quux
53 To: foo
54 Cc: bar
55
56 # HG changeset patch
57 # User test
58 # Date 1 0
59 # Thu Jan 01 00:00:01 1970 +0000
60 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
61 # Parent 0000000000000000000000000000000000000000
62 a
63
64 diff -r 000000000000 -r 8580ff50825a a
65 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
66 +++ b/a Thu Jan 01 00:00:01 1970 +0000
67 @@ -0,0 +1,1 @@
68 +a
69
70
71 If --to is specified on the command line, it should override any
72 email.to config setting. Same for --cc:
73
74 $ hg email --date '1970-1-1 0:1' -n -f quux --to foo --cc bar -r tip \
75 > --config [email protected] --config [email protected]
76 this patch series consists of 1 patches.
77
78
79 displaying [PATCH] a ...
80 MIME-Version: 1.0
81 Content-Type: text/plain; charset="us-ascii"
82 Content-Transfer-Encoding: 7bit
83 Subject: [PATCH] a
84 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
85 X-Mercurial-Series-Index: 1
86 X-Mercurial-Series-Total: 1
87 Message-Id: <8580ff50825a50c8f716.60@test-hostname>
88 X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname>
89 User-Agent: Mercurial-patchbomb/* (glob)
90 Date: Thu, 01 Jan 1970 00:01:00 +0000
91 From: quux
92 To: foo
93 Cc: bar
94
95 # HG changeset patch
96 # User test
97 # Date 1 0
98 # Thu Jan 01 00:00:01 1970 +0000
99 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
100 # Parent 0000000000000000000000000000000000000000
101 a
102
103 diff -r 000000000000 -r 8580ff50825a a
104 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
105 +++ b/a Thu Jan 01 00:00:01 1970 +0000
106 @@ -0,0 +1,1 @@
107 +a
108
109
110 $ hg --config ui.interactive=1 email --confirm -n -f quux -t foo -c bar -r tip<<EOF
111 > n
112 > EOF
113 this patch series consists of 1 patches.
114
115
116 Final summary:
117
118 From: quux
119 To: foo
120 Cc: bar
121 Subject: [PATCH] a
122 a | 1 +
123 1 files changed, 1 insertions(+), 0 deletions(-)
124
125 are you sure you want to send (yn)? n
126 abort: patchbomb canceled
127 [255]
128
129 $ hg --config ui.interactive=1 --config patchbomb.confirm=true email -n -f quux -t foo -c bar -r tip<<EOF
130 > n
131 > EOF
132 this patch series consists of 1 patches.
133
134
135 Final summary:
136
137 From: quux
138 To: foo
139 Cc: bar
140 Subject: [PATCH] a
141 a | 1 +
142 1 files changed, 1 insertions(+), 0 deletions(-)
143
144 are you sure you want to send (yn)? n
145 abort: patchbomb canceled
146 [255]
147
148
149 Test diff.git is respected
150 $ hg --config diff.git=True email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip
151 this patch series consists of 1 patches.
152
153
154 displaying [PATCH] a ...
155 MIME-Version: 1.0
156 Content-Type: text/plain; charset="us-ascii"
157 Content-Transfer-Encoding: 7bit
158 Subject: [PATCH] a
159 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
160 X-Mercurial-Series-Index: 1
161 X-Mercurial-Series-Total: 1
162 Message-Id: <8580ff50825a50c8f716.60@test-hostname>
163 X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname>
164 User-Agent: Mercurial-patchbomb/* (glob)
165 Date: Thu, 01 Jan 1970 00:01:00 +0000
166 From: quux
167 To: foo
168 Cc: bar
169
170 # HG changeset patch
171 # User test
172 # Date 1 0
173 # Thu Jan 01 00:00:01 1970 +0000
174 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
175 # Parent 0000000000000000000000000000000000000000
176 a
177
178 diff --git a/a b/a
179 new file mode 100644
180 --- /dev/null
181 +++ b/a
182 @@ -0,0 +1,1 @@
183 +a
184
185
186 Test --git is respected
187 $ hg email --git --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip
188 this patch series consists of 1 patches.
189
190
191 displaying [PATCH] a ...
192 MIME-Version: 1.0
193 Content-Type: text/plain; charset="us-ascii"
194 Content-Transfer-Encoding: 7bit
195 Subject: [PATCH] a
196 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
197 X-Mercurial-Series-Index: 1
198 X-Mercurial-Series-Total: 1
199 Message-Id: <8580ff50825a50c8f716.60@test-hostname>
200 X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname>
201 User-Agent: Mercurial-patchbomb/* (glob)
202 Date: Thu, 01 Jan 1970 00:01:00 +0000
203 From: quux
204 To: foo
205 Cc: bar
206
207 # HG changeset patch
208 # User test
209 # Date 1 0
210 # Thu Jan 01 00:00:01 1970 +0000
211 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
212 # Parent 0000000000000000000000000000000000000000
213 a
214
215 diff --git a/a b/a
216 new file mode 100644
217 --- /dev/null
218 +++ b/a
219 @@ -0,0 +1,1 @@
220 +a
221
222
223
224 Test breaking format changes aren't
225 $ hg --config diff.noprefix=True email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip
226 this patch series consists of 1 patches.
227
228
229 displaying [PATCH] a ...
230 MIME-Version: 1.0
231 Content-Type: text/plain; charset="us-ascii"
232 Content-Transfer-Encoding: 7bit
233 Subject: [PATCH] a
234 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
235 X-Mercurial-Series-Index: 1
236 X-Mercurial-Series-Total: 1
237 Message-Id: <8580ff50825a50c8f716.60@test-hostname>
238 X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname>
239 User-Agent: Mercurial-patchbomb/* (glob)
240 Date: Thu, 01 Jan 1970 00:01:00 +0000
241 From: quux
242 To: foo
243 Cc: bar
244
245 # HG changeset patch
246 # User test
247 # Date 1 0
248 # Thu Jan 01 00:00:01 1970 +0000
249 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
250 # Parent 0000000000000000000000000000000000000000
251 a
252
253 diff -r 000000000000 -r 8580ff50825a a
254 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
255 +++ b/a Thu Jan 01 00:00:01 1970 +0000
256 @@ -0,0 +1,1 @@
257 +a
258
259
260 $ echo b > b
261 $ hg commit -Amb -d '2 0'
262 adding b
263
264 $ hg email --date '1970-1-1 0:2' -n -f quux -t foo -c bar -s test -r 0:tip
265 this patch series consists of 2 patches.
266
267
268 Write the introductory message for the patch series.
269
270
271 displaying [PATCH 0 of 2] test ...
272 MIME-Version: 1.0
273 Content-Type: text/plain; charset="us-ascii"
274 Content-Transfer-Encoding: 7bit
275 Subject: [PATCH 0 of 2] test
276 Message-Id: <patchbomb.120@test-hostname>
277 User-Agent: Mercurial-patchbomb/* (glob)
278 Date: Thu, 01 Jan 1970 00:02:00 +0000
279 From: quux
280 To: foo
281 Cc: bar
282
283
284 displaying [PATCH 1 of 2] a ...
285 MIME-Version: 1.0
286 Content-Type: text/plain; charset="us-ascii"
287 Content-Transfer-Encoding: 7bit
288 Subject: [PATCH 1 of 2] a
289 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
290 X-Mercurial-Series-Index: 1
291 X-Mercurial-Series-Total: 2
292 Message-Id: <8580ff50825a50c8f716.121@test-hostname>
293 X-Mercurial-Series-Id: <8580ff50825a50c8f716.121@test-hostname>
294 In-Reply-To: <patchbomb.120@test-hostname>
295 References: <patchbomb.120@test-hostname>
296 User-Agent: Mercurial-patchbomb/* (glob)
297 Date: Thu, 01 Jan 1970 00:02:01 +0000
298 From: quux
299 To: foo
300 Cc: bar
301
302 # HG changeset patch
303 # User test
304 # Date 1 0
305 # Thu Jan 01 00:00:01 1970 +0000
306 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
307 # Parent 0000000000000000000000000000000000000000
308 a
309
310 diff -r 000000000000 -r 8580ff50825a a
311 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
312 +++ b/a Thu Jan 01 00:00:01 1970 +0000
313 @@ -0,0 +1,1 @@
314 +a
315
316 displaying [PATCH 2 of 2] b ...
317 MIME-Version: 1.0
318 Content-Type: text/plain; charset="us-ascii"
319 Content-Transfer-Encoding: 7bit
320 Subject: [PATCH 2 of 2] b
321 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
322 X-Mercurial-Series-Index: 2
323 X-Mercurial-Series-Total: 2
324 Message-Id: <97d72e5f12c7e84f8506.122@test-hostname>
325 X-Mercurial-Series-Id: <8580ff50825a50c8f716.121@test-hostname>
326 In-Reply-To: <patchbomb.120@test-hostname>
327 References: <patchbomb.120@test-hostname>
328 User-Agent: Mercurial-patchbomb/* (glob)
329 Date: Thu, 01 Jan 1970 00:02:02 +0000
330 From: quux
331 To: foo
332 Cc: bar
333
334 # HG changeset patch
335 # User test
336 # Date 2 0
337 # Thu Jan 01 00:00:02 1970 +0000
338 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
339 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
340 b
341
342 diff -r 8580ff50825a -r 97d72e5f12c7 b
343 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
344 +++ b/b Thu Jan 01 00:00:02 1970 +0000
345 @@ -0,0 +1,1 @@
346 +b
347
348
349 .hg/last-email.txt
350
351 $ cat > editor.sh << '__EOF__'
352 > echo "a precious introductory message" > "$1"
353 > __EOF__
354 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg email -n -t foo -s test -r 0:tip > /dev/null
355 $ cat .hg/last-email.txt
356 a precious introductory message
357
358 $ hg email -m test.mbox -f quux -t foo -c bar -s test 0:tip \
359 > --config extensions.progress= --config progress.assume-tty=1 \
360 > --config progress.delay=0 --config progress.refresh=0 \
361 > --config progress.width=60 \
362 > --config extensions.mocktime=$TESTDIR/mocktime.py
363 this patch series consists of 2 patches.
364
365
366 Write the introductory message for the patch series.
367
368 \r (no-eol) (esc)
369 sending [ ] 0/3\r (no-eol) (esc)
370 \r (no-eol) (esc)
371 \r (no-eol) (esc)
372 sending [============> ] 1/3 01s\r (no-eol) (esc)
373 \r (no-eol) (esc)
374 \r (no-eol) (esc)
375 sending [==========================> ] 2/3 01s\r (no-eol) (esc)
376 \r (esc)
377 sending [PATCH 0 of 2] test ...
378 sending [PATCH 1 of 2] a ...
379 sending [PATCH 2 of 2] b ...
380
381 $ cd ..
382
383 $ hg clone -q t t2
384 $ cd t2
385 $ echo c > c
386 $ hg commit -Amc -d '3 0'
387 adding c
388
389 $ cat > description <<EOF
390 > a multiline
391 >
392 > description
393 > EOF
394
395
396 test bundle and description:
397 $ hg email --date '1970-1-1 0:3' -n -f quux -t foo \
398 > -c bar -s test -r tip -b --desc description | filterboundary
399 searching for changes
400 1 changesets found
401
402 displaying test ...
403 Content-Type: multipart/mixed; boundary="===*==" (glob)
404 MIME-Version: 1.0
405 Subject: test
406 Message-Id: <patchbomb.180@test-hostname>
407 User-Agent: Mercurial-patchbomb/* (glob)
408 Date: Thu, 01 Jan 1970 00:03:00 +0000
409 From: quux
410 To: foo
411 Cc: bar
412
413 --===*= (glob)
414 MIME-Version: 1.0
415 Content-Type: text/plain; charset="us-ascii"
416 Content-Transfer-Encoding: 7bit
417
418 a multiline
419
420 description
421
422 --===*= (glob)
423 Content-Type: application/x-mercurial-bundle
424 MIME-Version: 1.0
425 Content-Disposition: attachment; filename="bundle.hg"
426 Content-Transfer-Encoding: base64
427
428 SEcyMAAAAA5Db21wcmVzc2lvbj1CWkJaaDkxQVkmU1l91TAVAAAN////vFcSXL9/8H7R09C/578I
429 Ak0E4pe4SIIIgQSgGEQOcLABGYYNKgJgmhpp6mmjIZMCZNMhpgBBpkaYJpo9QaZMg02iaY2lCImK
430 emk02kmEAeoA0D01ANBoHqHqADTaj1NAAyZqA0Gg0KiYnqaepk0eoNDTCGj1A0eoyBoGjRkYBqAB
431 poNMmhkBhENSP0knlYZbqyEIYxkFdpDUS6roBDMgAGhkAqd92kEcgyeMo2MM366gpLNHjfKrhJPN
432 vdBCHAEDsYzAvzkHKxy5KWBAmh5e1nFttGChpsxrgmutRG0YrsSLWEBH9h95cbZEKFeUKYykRXHa
433 Bkt2OSgELsqqnWKeMudBR+YSZCOSHrwPz7B/Gfou7/L6QV6S0IgclBCitBVHMxMFq/vGwp5WHezM
434 JwhKTnH0OkMbmVjrAkQKR7VM2aNSXn+GzLOCzOQm0AJ1TLCpdSgnfFPcY7mGxAOyHXS1YEFVi5O9
435 I4EVBBd8VRgN4n1MAm8l6QQ+yB60hkeX/0ZZmKoQRINkEBxEDZU2HjIZMcwWRvZtbRIa5kgkGIb/
436 SkImFwIkDtQxyX+LuSKcKEg+6pgKgA==
437 --===============*==-- (glob)
438
439 with a specific bundle type
440 (binary part must be different)
441
442 $ hg email --date '1970-1-1 0:3' -n -f quux -t foo \
443 > -c bar -s test -r tip -b --desc description \
444 > --config patchbomb.bundletype=gzip-v1 | filterboundary
445 searching for changes
446 1 changesets found
447
448 displaying test ...
449 Content-Type: multipart/mixed; boundary="===*==" (glob)
450 MIME-Version: 1.0
451 Subject: test
452 Message-Id: <patchbomb.180@test-hostname>
453 User-Agent: Mercurial-patchbomb/* (glob)
454 Date: Thu, 01 Jan 1970 00:03:00 +0000
455 From: quux
456 To: foo
457 Cc: bar
458
459 --===*= (glob)
460 MIME-Version: 1.0
461 Content-Type: text/plain; charset="us-ascii"
462 Content-Transfer-Encoding: 7bit
463
464 a multiline
465
466 description
467
468 --===*= (glob)
469 Content-Type: application/x-mercurial-bundle
470 MIME-Version: 1.0
471 Content-Disposition: attachment; filename="bundle.hg"
472 Content-Transfer-Encoding: base64
473
474 SEcxMEdaeJxjYGBY8V9n/iLGbtFfJZuNk/euDCpWfrRy/vTrevFCx1/4t7J5LdeL0ix0Opx3kwEL
475 wKYXKqUJwqnG5sYWSWmmJsaWlqYWaRaWJpaWiWamZpYWRgZGxolJiabmSQbmZqlcQMV6QGwCxGzG
476 CgZcySARUyA2A2LGZKiZ3Y+Lu786z4z4MWXmsrAZCsqrl1az5y21PMcjpbThzWeXGT+/nutbmvvz
477 zXYS3BoGxdrJDIYmlimJJiZpRokmqYYmaSYWFknmSSkmhqbmliamiZYWxuYmBhbJBgZcUBNZQe5K
478 Epm7xF/LT+RLx/a9juFTomaYO/Rgsx4rwBN+IMCUDLOKAQBrsmti
479 (?)
480 --===============*==-- (glob)
481
482 utf-8 patch:
483 $ "$PYTHON" -c 'fp = open("utf", "wb"); fp.write(b"h\xC3\xB6mma!\n"); fp.close();'
484 $ hg commit -A -d '4 0' \
485 > --encoding "utf-8" \
486 > -m `"$PYTHON" -c 'import sys; getattr(sys.stdout, "buffer", sys.stdout).write(b"\xc3\xa7a")'`
487 adding description
488 adding utf
489
490 no mime encoding for email --test:
491 $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n
492 this patch series consists of 1 patches.
493
494
495 displaying [PATCH] ?a ...
496 MIME-Version: 1.0
497 Content-Type: text/plain; charset="iso-8859-1"
498 Content-Transfer-Encoding: quoted-printable
499 Subject: [PATCH] ?a
500 X-Mercurial-Node: f81ef97829467e868fc405fccbcfa66217e4d3e6
501 X-Mercurial-Series-Index: 1
502 X-Mercurial-Series-Total: 1
503 Message-Id: <f81ef97829467e868fc4.240@test-hostname>
504 X-Mercurial-Series-Id: <f81ef97829467e868fc4.240@test-hostname>
505 User-Agent: Mercurial-patchbomb/* (glob)
506 Date: Thu, 01 Jan 1970 00:04:00 +0000
507 From: quux
508 To: foo
509 Cc: bar
510
511 # HG changeset patch
512 # User test
513 # Date 4 0
514 # Thu Jan 01 00:00:04 1970 +0000
515 # Node ID f81ef97829467e868fc405fccbcfa66217e4d3e6
516 # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f
517 ?a
518
519 diff -r ff2c9fa2018b -r f81ef9782946 description
520 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
521 +++ b/description Thu Jan 01 00:00:04 1970 +0000
522 @@ -0,0 +1,3 @@
523 +a multiline
524 +
525 +description
526 diff -r ff2c9fa2018b -r f81ef9782946 utf
527 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
528 +++ b/utf Thu Jan 01 00:00:04 1970 +0000
529 @@ -0,0 +1,1 @@
530 +h=C3=B6mma!
531
532
533 mime encoded mbox (base64):
534 $ hg email --date '1970-1-1 0:4' -f 'Q <quux>' -t foo -c bar -r tip -m mbox
535 this patch series consists of 1 patches.
536
537
538 sending [PATCH] ?a ...
539
540 $ cat mbox
541 From quux ... ... .. ..:..:.. .... (re)
542 MIME-Version: 1.0
543 Content-Type: text/plain; charset="utf-8"
544 Content-Transfer-Encoding: base64
545 Subject: [PATCH] ?a
546 X-Mercurial-Node: f81ef97829467e868fc405fccbcfa66217e4d3e6
547 X-Mercurial-Series-Index: 1
548 X-Mercurial-Series-Total: 1
549 Message-Id: <f81ef97829467e868fc4.240@test-hostname>
550 X-Mercurial-Series-Id: <f81ef97829467e868fc4.240@test-hostname>
551 User-Agent: Mercurial-patchbomb/* (glob)
552 Date: Thu, 01 Jan 1970 00:04:00 +0000
553 From: =?iso-8859-1?q?Q?= <quux>
554 To: foo
555 Cc: bar
556
557 IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIHRlc3QKIyBEYXRlIDQgMAojICAgICAgVGh1IEph
558 biAwMSAwMDowMDowNCAxOTcwICswMDAwCiMgTm9kZSBJRCBmODFlZjk3ODI5NDY3ZTg2OGZjNDA1
559 ZmNjYmNmYTY2MjE3ZTRkM2U2CiMgUGFyZW50ICBmZjJjOWZhMjAxOGIxNWZhNzRiMzMzNjNiZGE5
560 NTI3MzIzZTJhOTlmCj9hCgpkaWZmIC1yIGZmMmM5ZmEyMDE4YiAtciBmODFlZjk3ODI5NDYgZGVz
561 Y3JpcHRpb24KLS0tIC9kZXYvbnVsbAlUaHUgSmFuIDAxIDAwOjAwOjAwIDE5NzAgKzAwMDAKKysr
562 IGIvZGVzY3JpcHRpb24JVGh1IEphbiAwMSAwMDowMDowNCAxOTcwICswMDAwCkBAIC0wLDAgKzEs
563 MyBAQAorYSBtdWx0aWxpbmUKKworZGVzY3JpcHRpb24KZGlmZiAtciBmZjJjOWZhMjAxOGIgLXIg
564 ZjgxZWY5NzgyOTQ2IHV0ZgotLS0gL2Rldi9udWxsCVRodSBKYW4gMDEgMDA6MDA6MDAgMTk3MCAr
565 MDAwMAorKysgYi91dGYJVGh1IEphbiAwMSAwMDowMDowNCAxOTcwICswMDAwCkBAIC0wLDAgKzEs
566 MSBAQAoraMO2bW1hIQo=
567
568
569 >>> import base64
570 >>> patch = base64.b64decode(open("mbox").read().split("\n\n")[1])
571 >>> if not isinstance(patch, str):
572 ... import sys
573 ... sys.stdout.flush()
574 ... junk = sys.stdout.buffer.write(patch + b"\n")
575 ... else:
576 ... print(patch)
577 # HG changeset patch
578 # User test
579 # Date 4 0
580 # Thu Jan 01 00:00:04 1970 +0000
581 # Node ID f81ef97829467e868fc405fccbcfa66217e4d3e6
582 # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f
583 ?a
584
585 diff -r ff2c9fa2018b -r f81ef9782946 description
586 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
587 +++ b/description Thu Jan 01 00:00:04 1970 +0000
588 @@ -0,0 +1,3 @@
589 +a multiline
590 +
591 +description
592 diff -r ff2c9fa2018b -r f81ef9782946 utf
593 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
594 +++ b/utf Thu Jan 01 00:00:04 1970 +0000
595 @@ -0,0 +1,1 @@
596 +h\xc3\xb6mma! (esc)
597
598 $ rm mbox
599
600 mime encoded mbox (quoted-printable):
601 $ "$PYTHON" -c 'fp = open("long", "wb"); fp.write(b"%s\nfoo\n\nbar\n" % (b"x" * 1024)); fp.close();'
602 $ hg commit -A -d '4 0' -m 'long line'
603 adding long
604
605 no mime encoding for email --test:
606 $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n
607 this patch series consists of 1 patches.
608
609
610 displaying [PATCH] long line ...
611 MIME-Version: 1.0
612 Content-Type: text/plain; charset="us-ascii"
613 Content-Transfer-Encoding: quoted-printable
614 Subject: [PATCH] long line
615 X-Mercurial-Node: 0c7b871cb86b61a1c07e244393603c361e4a178d
616 X-Mercurial-Series-Index: 1
617 X-Mercurial-Series-Total: 1
618 Message-Id: <0c7b871cb86b61a1c07e.240@test-hostname>
619 X-Mercurial-Series-Id: <0c7b871cb86b61a1c07e.240@test-hostname>
620 User-Agent: Mercurial-patchbomb/* (glob)
621 Date: Thu, 01 Jan 1970 00:04:00 +0000
622 From: quux
623 To: foo
624 Cc: bar
625
626 # HG changeset patch
627 # User test
628 # Date 4 0
629 # Thu Jan 01 00:00:04 1970 +0000
630 # Node ID 0c7b871cb86b61a1c07e244393603c361e4a178d
631 # Parent f81ef97829467e868fc405fccbcfa66217e4d3e6
632 long line
633
634 diff -r f81ef9782946 -r 0c7b871cb86b long
635 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
636 +++ b/long Thu Jan 01 00:00:04 1970 +0000
637 @@ -0,0 +1,4 @@
638 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
639 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
640 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
641 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
642 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
643 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
644 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
645 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
646 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
647 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
648 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
649 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
650 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
651 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
652 +foo
653 +
654 +bar
655
656
657 mime encoded mbox (quoted-printable):
658 $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox
659 this patch series consists of 1 patches.
660
661
662 sending [PATCH] long line ...
663 $ cat mbox
664 From quux ... ... .. ..:..:.. .... (re)
665 MIME-Version: 1.0
666 Content-Type: text/plain; charset="us-ascii"
667 Content-Transfer-Encoding: quoted-printable
668 Subject: [PATCH] long line
669 X-Mercurial-Node: 0c7b871cb86b61a1c07e244393603c361e4a178d
670 X-Mercurial-Series-Index: 1
671 X-Mercurial-Series-Total: 1
672 Message-Id: <0c7b871cb86b61a1c07e.240@test-hostname>
673 X-Mercurial-Series-Id: <0c7b871cb86b61a1c07e.240@test-hostname>
674 User-Agent: Mercurial-patchbomb/* (glob)
675 Date: Thu, 01 Jan 1970 00:04:00 +0000
676 From: quux
677 To: foo
678 Cc: bar
679
680 # HG changeset patch
681 # User test
682 # Date 4 0
683 # Thu Jan 01 00:00:04 1970 +0000
684 # Node ID 0c7b871cb86b61a1c07e244393603c361e4a178d
685 # Parent f81ef97829467e868fc405fccbcfa66217e4d3e6
686 long line
687
688 diff -r f81ef9782946 -r 0c7b871cb86b long
689 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
690 +++ b/long Thu Jan 01 00:00:04 1970 +0000
691 @@ -0,0 +1,4 @@
692 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
693 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
694 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
695 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
696 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
697 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
698 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
699 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
700 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
701 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
702 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
703 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
704 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
705 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
706 +foo
707 +
708 +bar
709
710
711
712 $ rm mbox
713
714 iso-8859-1 patch:
715 $ "$PYTHON" -c 'fp = open("isolatin", "wb"); fp.write(b"h\xF6mma!\n"); fp.close();'
716 $ hg commit -A -d '5 0' -m 'isolatin 8-bit encoding'
717 adding isolatin
718
719 iso-8859-1 mbox:
720 $ hg email --date '1970-1-1 0:5' -f quux -t foo -c bar -r tip -m mbox
721 this patch series consists of 1 patches.
722
723
724 sending [PATCH] isolatin 8-bit encoding ...
725 $ cat mbox
726 From quux ... ... .. ..:..:.. .... (re)
727 MIME-Version: 1.0
728 Content-Type: text/plain; charset="iso-8859-1"
729 Content-Transfer-Encoding: quoted-printable
730 Subject: [PATCH] isolatin 8-bit encoding
731 X-Mercurial-Node: 4d6f44f466c96d89f2e7e865a70ff41d8b6eee37
732 X-Mercurial-Series-Index: 1
733 X-Mercurial-Series-Total: 1
734 Message-Id: <4d6f44f466c96d89f2e7.300@test-hostname>
735 X-Mercurial-Series-Id: <4d6f44f466c96d89f2e7.300@test-hostname>
736 User-Agent: Mercurial-patchbomb/* (glob)
737 Date: Thu, 01 Jan 1970 00:05:00 +0000
738 From: quux
739 To: foo
740 Cc: bar
741
742 # HG changeset patch
743 # User test
744 # Date 5 0
745 # Thu Jan 01 00:00:05 1970 +0000
746 # Node ID 4d6f44f466c96d89f2e7e865a70ff41d8b6eee37
747 # Parent 0c7b871cb86b61a1c07e244393603c361e4a178d
748 isolatin 8-bit encoding
749
750 diff -r 0c7b871cb86b -r 4d6f44f466c9 isolatin
751 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
752 +++ b/isolatin Thu Jan 01 00:00:05 1970 +0000
753 @@ -0,0 +1,1 @@
754 +h=F6mma!
755
756
757
758 test diffstat for single patch:
759 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y -r 2
760 this patch series consists of 1 patches.
761
762
763 Final summary:
764
765 From: quux
766 To: foo
767 Cc: bar
768 Subject: [PATCH] test
769 c | 1 +
770 1 files changed, 1 insertions(+), 0 deletions(-)
771
772 are you sure you want to send (yn)? y
773
774 displaying [PATCH] test ...
775 MIME-Version: 1.0
776 Content-Type: text/plain; charset="us-ascii"
777 Content-Transfer-Encoding: 7bit
778 Subject: [PATCH] test
779 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
780 X-Mercurial-Series-Index: 1
781 X-Mercurial-Series-Total: 1
782 Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
783 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
784 User-Agent: Mercurial-patchbomb/* (glob)
785 Date: Thu, 01 Jan 1970 00:01:00 +0000
786 From: quux
787 To: foo
788 Cc: bar
789
790 c | 1 +
791 1 files changed, 1 insertions(+), 0 deletions(-)
792
793
794 # HG changeset patch
795 # User test
796 # Date 3 0
797 # Thu Jan 01 00:00:03 1970 +0000
798 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
799 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
800 c
801
802 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
803 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
804 +++ b/c Thu Jan 01 00:00:03 1970 +0000
805 @@ -0,0 +1,1 @@
806 +c
807
808
809 test diffstat for multiple patches:
810 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y \
811 > -r 0:1
812 this patch series consists of 2 patches.
813
814
815 Write the introductory message for the patch series.
816
817
818 Final summary:
819
820 From: quux
821 To: foo
822 Cc: bar
823 Subject: [PATCH 0 of 2] test
824 a | 1 +
825 b | 1 +
826 2 files changed, 2 insertions(+), 0 deletions(-)
827 Subject: [PATCH 1 of 2] a
828 a | 1 +
829 1 files changed, 1 insertions(+), 0 deletions(-)
830 Subject: [PATCH 2 of 2] b
831 b | 1 +
832 1 files changed, 1 insertions(+), 0 deletions(-)
833
834 are you sure you want to send (yn)? y
835
836 displaying [PATCH 0 of 2] test ...
837 MIME-Version: 1.0
838 Content-Type: text/plain; charset="us-ascii"
839 Content-Transfer-Encoding: 7bit
840 Subject: [PATCH 0 of 2] test
841 Message-Id: <patchbomb.60@test-hostname>
842 User-Agent: Mercurial-patchbomb/* (glob)
843 Date: Thu, 01 Jan 1970 00:01:00 +0000
844 From: quux
845 To: foo
846 Cc: bar
847
848
849 a | 1 +
850 b | 1 +
851 2 files changed, 2 insertions(+), 0 deletions(-)
852
853 displaying [PATCH 1 of 2] a ...
854 MIME-Version: 1.0
855 Content-Type: text/plain; charset="us-ascii"
856 Content-Transfer-Encoding: 7bit
857 Subject: [PATCH 1 of 2] a
858 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
859 X-Mercurial-Series-Index: 1
860 X-Mercurial-Series-Total: 2
861 Message-Id: <8580ff50825a50c8f716.61@test-hostname>
862 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
863 In-Reply-To: <patchbomb.60@test-hostname>
864 References: <patchbomb.60@test-hostname>
865 User-Agent: Mercurial-patchbomb/* (glob)
866 Date: Thu, 01 Jan 1970 00:01:01 +0000
867 From: quux
868 To: foo
869 Cc: bar
870
871 a | 1 +
872 1 files changed, 1 insertions(+), 0 deletions(-)
873
874
875 # HG changeset patch
876 # User test
877 # Date 1 0
878 # Thu Jan 01 00:00:01 1970 +0000
879 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
880 # Parent 0000000000000000000000000000000000000000
881 a
882
883 diff -r 000000000000 -r 8580ff50825a a
884 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
885 +++ b/a Thu Jan 01 00:00:01 1970 +0000
886 @@ -0,0 +1,1 @@
887 +a
888
889 displaying [PATCH 2 of 2] b ...
890 MIME-Version: 1.0
891 Content-Type: text/plain; charset="us-ascii"
892 Content-Transfer-Encoding: 7bit
893 Subject: [PATCH 2 of 2] b
894 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
895 X-Mercurial-Series-Index: 2
896 X-Mercurial-Series-Total: 2
897 Message-Id: <97d72e5f12c7e84f8506.62@test-hostname>
898 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
899 In-Reply-To: <patchbomb.60@test-hostname>
900 References: <patchbomb.60@test-hostname>
901 User-Agent: Mercurial-patchbomb/* (glob)
902 Date: Thu, 01 Jan 1970 00:01:02 +0000
903 From: quux
904 To: foo
905 Cc: bar
906
907 b | 1 +
908 1 files changed, 1 insertions(+), 0 deletions(-)
909
910
911 # HG changeset patch
912 # User test
913 # Date 2 0
914 # Thu Jan 01 00:00:02 1970 +0000
915 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
916 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
917 b
918
919 diff -r 8580ff50825a -r 97d72e5f12c7 b
920 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
921 +++ b/b Thu Jan 01 00:00:02 1970 +0000
922 @@ -0,0 +1,1 @@
923 +b
924
925
926 test inline for single patch:
927 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 2 | filterboundary
928 this patch series consists of 1 patches.
929
930
931 displaying [PATCH] test ...
932 Content-Type: multipart/mixed; boundary="===*==" (glob)
933 MIME-Version: 1.0
934 Subject: [PATCH] test
935 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
936 X-Mercurial-Series-Index: 1
937 X-Mercurial-Series-Total: 1
938 Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
939 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
940 User-Agent: Mercurial-patchbomb/* (glob)
941 Date: Thu, 01 Jan 1970 00:01:00 +0000
942 From: quux
943 To: foo
944 Cc: bar
945
946 --===*= (glob)
947 MIME-Version: 1.0
948 Content-Type: text/x-patch; charset="us-ascii"
949 Content-Transfer-Encoding: 7bit
950 Content-Disposition: inline; filename=t2.patch
951
952 # HG changeset patch
953 # User test
954 # Date 3 0
955 # Thu Jan 01 00:00:03 1970 +0000
956 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
957 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
958 c
959
960 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
961 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
962 +++ b/c Thu Jan 01 00:00:03 1970 +0000
963 @@ -0,0 +1,1 @@
964 +c
965
966 --===*=-- (glob)
967
968
969 test inline for single patch (quoted-printable):
970 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 4 | filterboundary
971 this patch series consists of 1 patches.
972
973
974 displaying [PATCH] test ...
975 Content-Type: multipart/mixed; boundary="===*==" (glob)
976 MIME-Version: 1.0
977 Subject: [PATCH] test
978 X-Mercurial-Node: 0c7b871cb86b61a1c07e244393603c361e4a178d
979 X-Mercurial-Series-Index: 1
980 X-Mercurial-Series-Total: 1
981 Message-Id: <0c7b871cb86b61a1c07e.60@test-hostname>
982 X-Mercurial-Series-Id: <0c7b871cb86b61a1c07e.60@test-hostname>
983 User-Agent: Mercurial-patchbomb/* (glob)
984 Date: Thu, 01 Jan 1970 00:01:00 +0000
985 From: quux
986 To: foo
987 Cc: bar
988
989 --===*= (glob)
990 MIME-Version: 1.0
991 Content-Type: text/x-patch; charset="us-ascii"
992 Content-Transfer-Encoding: quoted-printable
993 Content-Disposition: inline; filename=t2.patch
994
995 # HG changeset patch
996 # User test
997 # Date 4 0
998 # Thu Jan 01 00:00:04 1970 +0000
999 # Node ID 0c7b871cb86b61a1c07e244393603c361e4a178d
1000 # Parent f81ef97829467e868fc405fccbcfa66217e4d3e6
1001 long line
1002
1003 diff -r f81ef9782946 -r 0c7b871cb86b long
1004 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1005 +++ b/long Thu Jan 01 00:00:04 1970 +0000
1006 @@ -0,0 +1,4 @@
1007 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1008 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1009 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1010 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1011 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1012 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1013 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1014 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1015 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1016 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1017 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1018 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1019 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1020 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1021 +foo
1022 +
1023 +bar
1024
1025 --===*=-- (glob)
1026
1027 test inline for multiple patches:
1028 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \
1029 > -r 0:1 -r 4 | filterboundary
1030 this patch series consists of 3 patches.
1031
1032
1033 Write the introductory message for the patch series.
1034
1035
1036 displaying [PATCH 0 of 3] test ...
1037 MIME-Version: 1.0
1038 Content-Type: text/plain; charset="us-ascii"
1039 Content-Transfer-Encoding: 7bit
1040 Subject: [PATCH 0 of 3] test
1041 Message-Id: <patchbomb.60@test-hostname>
1042 User-Agent: Mercurial-patchbomb/* (glob)
1043 Date: Thu, 01 Jan 1970 00:01:00 +0000
1044 From: quux
1045 To: foo
1046 Cc: bar
1047
1048
1049 displaying [PATCH 1 of 3] a ...
1050 Content-Type: multipart/mixed; boundary="===*==" (glob)
1051 MIME-Version: 1.0
1052 Subject: [PATCH 1 of 3] a
1053 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1054 X-Mercurial-Series-Index: 1
1055 X-Mercurial-Series-Total: 3
1056 Message-Id: <8580ff50825a50c8f716.61@test-hostname>
1057 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1058 In-Reply-To: <patchbomb.60@test-hostname>
1059 References: <patchbomb.60@test-hostname>
1060 User-Agent: Mercurial-patchbomb/* (glob)
1061 Date: Thu, 01 Jan 1970 00:01:01 +0000
1062 From: quux
1063 To: foo
1064 Cc: bar
1065
1066 --===*= (glob)
1067 MIME-Version: 1.0
1068 Content-Type: text/x-patch; charset="us-ascii"
1069 Content-Transfer-Encoding: 7bit
1070 Content-Disposition: inline; filename=t2-1.patch
1071
1072 # HG changeset patch
1073 # User test
1074 # Date 1 0
1075 # Thu Jan 01 00:00:01 1970 +0000
1076 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1077 # Parent 0000000000000000000000000000000000000000
1078 a
1079
1080 diff -r 000000000000 -r 8580ff50825a a
1081 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1082 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1083 @@ -0,0 +1,1 @@
1084 +a
1085
1086 --===*=-- (glob)
1087 displaying [PATCH 2 of 3] b ...
1088 Content-Type: multipart/mixed; boundary="===*==" (glob)
1089 MIME-Version: 1.0
1090 Subject: [PATCH 2 of 3] b
1091 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1092 X-Mercurial-Series-Index: 2
1093 X-Mercurial-Series-Total: 3
1094 Message-Id: <97d72e5f12c7e84f8506.62@test-hostname>
1095 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1096 In-Reply-To: <patchbomb.60@test-hostname>
1097 References: <patchbomb.60@test-hostname>
1098 User-Agent: Mercurial-patchbomb/* (glob)
1099 Date: Thu, 01 Jan 1970 00:01:02 +0000
1100 From: quux
1101 To: foo
1102 Cc: bar
1103
1104 --===*= (glob)
1105 MIME-Version: 1.0
1106 Content-Type: text/x-patch; charset="us-ascii"
1107 Content-Transfer-Encoding: 7bit
1108 Content-Disposition: inline; filename=t2-2.patch
1109
1110 # HG changeset patch
1111 # User test
1112 # Date 2 0
1113 # Thu Jan 01 00:00:02 1970 +0000
1114 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1115 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1116 b
1117
1118 diff -r 8580ff50825a -r 97d72e5f12c7 b
1119 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1120 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1121 @@ -0,0 +1,1 @@
1122 +b
1123
1124 --===*=-- (glob)
1125 displaying [PATCH 3 of 3] long line ...
1126 Content-Type: multipart/mixed; boundary="===*==" (glob)
1127 MIME-Version: 1.0
1128 Subject: [PATCH 3 of 3] long line
1129 X-Mercurial-Node: 0c7b871cb86b61a1c07e244393603c361e4a178d
1130 X-Mercurial-Series-Index: 3
1131 X-Mercurial-Series-Total: 3
1132 Message-Id: <0c7b871cb86b61a1c07e.63@test-hostname>
1133 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1134 In-Reply-To: <patchbomb.60@test-hostname>
1135 References: <patchbomb.60@test-hostname>
1136 User-Agent: Mercurial-patchbomb/* (glob)
1137 Date: Thu, 01 Jan 1970 00:01:03 +0000
1138 From: quux
1139 To: foo
1140 Cc: bar
1141
1142 --===*= (glob)
1143 MIME-Version: 1.0
1144 Content-Type: text/x-patch; charset="us-ascii"
1145 Content-Transfer-Encoding: quoted-printable
1146 Content-Disposition: inline; filename=t2-3.patch
1147
1148 # HG changeset patch
1149 # User test
1150 # Date 4 0
1151 # Thu Jan 01 00:00:04 1970 +0000
1152 # Node ID 0c7b871cb86b61a1c07e244393603c361e4a178d
1153 # Parent f81ef97829467e868fc405fccbcfa66217e4d3e6
1154 long line
1155
1156 diff -r f81ef9782946 -r 0c7b871cb86b long
1157 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1158 +++ b/long Thu Jan 01 00:00:04 1970 +0000
1159 @@ -0,0 +1,4 @@
1160 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1161 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1162 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1163 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1164 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1165 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1166 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1167 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1168 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1169 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1170 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1171 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1172 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1173 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1174 +foo
1175 +
1176 +bar
1177
1178 --===*=-- (glob)
1179
1180 test attach for single patch:
1181 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 2 | filterboundary
1182 this patch series consists of 1 patches.
1183
1184
1185 displaying [PATCH] test ...
1186 Content-Type: multipart/mixed; boundary="===*==" (glob)
1187 MIME-Version: 1.0
1188 Subject: [PATCH] test
1189 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1190 X-Mercurial-Series-Index: 1
1191 X-Mercurial-Series-Total: 1
1192 Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1193 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1194 User-Agent: Mercurial-patchbomb/* (glob)
1195 Date: Thu, 01 Jan 1970 00:01:00 +0000
1196 From: quux
1197 To: foo
1198 Cc: bar
1199
1200 --===*= (glob)
1201 MIME-Version: 1.0
1202 Content-Type: text/plain; charset="us-ascii"
1203 Content-Transfer-Encoding: 7bit
1204
1205 Patch subject is complete summary.
1206
1207
1208
1209 --===*= (glob)
1210 MIME-Version: 1.0
1211 Content-Type: text/x-patch; charset="us-ascii"
1212 Content-Transfer-Encoding: 7bit
1213 Content-Disposition: attachment; filename=t2.patch
1214
1215 # HG changeset patch
1216 # User test
1217 # Date 3 0
1218 # Thu Jan 01 00:00:03 1970 +0000
1219 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1220 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1221 c
1222
1223 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1224 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1225 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1226 @@ -0,0 +1,1 @@
1227 +c
1228
1229 --===*=-- (glob)
1230
1231 test attach for single patch (quoted-printable):
1232 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 4 | filterboundary
1233 this patch series consists of 1 patches.
1234
1235
1236 displaying [PATCH] test ...
1237 Content-Type: multipart/mixed; boundary="===*==" (glob)
1238 MIME-Version: 1.0
1239 Subject: [PATCH] test
1240 X-Mercurial-Node: 0c7b871cb86b61a1c07e244393603c361e4a178d
1241 X-Mercurial-Series-Index: 1
1242 X-Mercurial-Series-Total: 1
1243 Message-Id: <0c7b871cb86b61a1c07e.60@test-hostname>
1244 X-Mercurial-Series-Id: <0c7b871cb86b61a1c07e.60@test-hostname>
1245 User-Agent: Mercurial-patchbomb/* (glob)
1246 Date: Thu, 01 Jan 1970 00:01:00 +0000
1247 From: quux
1248 To: foo
1249 Cc: bar
1250
1251 --===*= (glob)
1252 MIME-Version: 1.0
1253 Content-Type: text/plain; charset="us-ascii"
1254 Content-Transfer-Encoding: 7bit
1255
1256 Patch subject is complete summary.
1257
1258
1259
1260 --===*= (glob)
1261 MIME-Version: 1.0
1262 Content-Type: text/x-patch; charset="us-ascii"
1263 Content-Transfer-Encoding: quoted-printable
1264 Content-Disposition: attachment; filename=t2.patch
1265
1266 # HG changeset patch
1267 # User test
1268 # Date 4 0
1269 # Thu Jan 01 00:00:04 1970 +0000
1270 # Node ID 0c7b871cb86b61a1c07e244393603c361e4a178d
1271 # Parent f81ef97829467e868fc405fccbcfa66217e4d3e6
1272 long line
1273
1274 diff -r f81ef9782946 -r 0c7b871cb86b long
1275 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1276 +++ b/long Thu Jan 01 00:00:04 1970 +0000
1277 @@ -0,0 +1,4 @@
1278 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1279 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1280 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1281 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1282 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1283 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1284 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1285 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1286 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1287 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1288 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1289 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1290 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1291 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1292 +foo
1293 +
1294 +bar
1295
1296 --===*=-- (glob)
1297
1298 test attach and body for single patch:
1299 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a --body -r 2 | filterboundary
1300 this patch series consists of 1 patches.
1301
1302
1303 displaying [PATCH] test ...
1304 Content-Type: multipart/mixed; boundary="===*==" (glob)
1305 MIME-Version: 1.0
1306 Subject: [PATCH] test
1307 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1308 X-Mercurial-Series-Index: 1
1309 X-Mercurial-Series-Total: 1
1310 Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1311 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1312 User-Agent: Mercurial-patchbomb/* (glob)
1313 Date: Thu, 01 Jan 1970 00:01:00 +0000
1314 From: quux
1315 To: foo
1316 Cc: bar
1317
1318 --===*= (glob)
1319 MIME-Version: 1.0
1320 Content-Type: text/plain; charset="us-ascii"
1321 Content-Transfer-Encoding: 7bit
1322
1323 # HG changeset patch
1324 # User test
1325 # Date 3 0
1326 # Thu Jan 01 00:00:03 1970 +0000
1327 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1328 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1329 c
1330
1331 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1332 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1333 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1334 @@ -0,0 +1,1 @@
1335 +c
1336
1337 --===*= (glob)
1338 MIME-Version: 1.0
1339 Content-Type: text/x-patch; charset="us-ascii"
1340 Content-Transfer-Encoding: 7bit
1341 Content-Disposition: attachment; filename=t2.patch
1342
1343 # HG changeset patch
1344 # User test
1345 # Date 3 0
1346 # Thu Jan 01 00:00:03 1970 +0000
1347 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1348 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1349 c
1350
1351 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1352 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1353 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1354 @@ -0,0 +1,1 @@
1355 +c
1356
1357 --===*=-- (glob)
1358
1359 test attach for multiple patches:
1360 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a \
1361 > -r 0:1 -r 4 | filterboundary
1362 this patch series consists of 3 patches.
1363
1364
1365 Write the introductory message for the patch series.
1366
1367
1368 displaying [PATCH 0 of 3] test ...
1369 MIME-Version: 1.0
1370 Content-Type: text/plain; charset="us-ascii"
1371 Content-Transfer-Encoding: 7bit
1372 Subject: [PATCH 0 of 3] test
1373 Message-Id: <patchbomb.60@test-hostname>
1374 User-Agent: Mercurial-patchbomb/* (glob)
1375 Date: Thu, 01 Jan 1970 00:01:00 +0000
1376 From: quux
1377 To: foo
1378 Cc: bar
1379
1380
1381 displaying [PATCH 1 of 3] a ...
1382 Content-Type: multipart/mixed; boundary="===*==" (glob)
1383 MIME-Version: 1.0
1384 Subject: [PATCH 1 of 3] a
1385 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1386 X-Mercurial-Series-Index: 1
1387 X-Mercurial-Series-Total: 3
1388 Message-Id: <8580ff50825a50c8f716.61@test-hostname>
1389 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1390 In-Reply-To: <patchbomb.60@test-hostname>
1391 References: <patchbomb.60@test-hostname>
1392 User-Agent: Mercurial-patchbomb/* (glob)
1393 Date: Thu, 01 Jan 1970 00:01:01 +0000
1394 From: quux
1395 To: foo
1396 Cc: bar
1397
1398 --===*= (glob)
1399 MIME-Version: 1.0
1400 Content-Type: text/plain; charset="us-ascii"
1401 Content-Transfer-Encoding: 7bit
1402
1403 Patch subject is complete summary.
1404
1405
1406
1407 --===*= (glob)
1408 MIME-Version: 1.0
1409 Content-Type: text/x-patch; charset="us-ascii"
1410 Content-Transfer-Encoding: 7bit
1411 Content-Disposition: attachment; filename=t2-1.patch
1412
1413 # HG changeset patch
1414 # User test
1415 # Date 1 0
1416 # Thu Jan 01 00:00:01 1970 +0000
1417 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1418 # Parent 0000000000000000000000000000000000000000
1419 a
1420
1421 diff -r 000000000000 -r 8580ff50825a a
1422 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1423 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1424 @@ -0,0 +1,1 @@
1425 +a
1426
1427 --===*=-- (glob)
1428 displaying [PATCH 2 of 3] b ...
1429 Content-Type: multipart/mixed; boundary="===*==" (glob)
1430 MIME-Version: 1.0
1431 Subject: [PATCH 2 of 3] b
1432 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1433 X-Mercurial-Series-Index: 2
1434 X-Mercurial-Series-Total: 3
1435 Message-Id: <97d72e5f12c7e84f8506.62@test-hostname>
1436 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1437 In-Reply-To: <patchbomb.60@test-hostname>
1438 References: <patchbomb.60@test-hostname>
1439 User-Agent: Mercurial-patchbomb/* (glob)
1440 Date: Thu, 01 Jan 1970 00:01:02 +0000
1441 From: quux
1442 To: foo
1443 Cc: bar
1444
1445 --===*= (glob)
1446 MIME-Version: 1.0
1447 Content-Type: text/plain; charset="us-ascii"
1448 Content-Transfer-Encoding: 7bit
1449
1450 Patch subject is complete summary.
1451
1452
1453
1454 --===*= (glob)
1455 MIME-Version: 1.0
1456 Content-Type: text/x-patch; charset="us-ascii"
1457 Content-Transfer-Encoding: 7bit
1458 Content-Disposition: attachment; filename=t2-2.patch
1459
1460 # HG changeset patch
1461 # User test
1462 # Date 2 0
1463 # Thu Jan 01 00:00:02 1970 +0000
1464 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1465 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1466 b
1467
1468 diff -r 8580ff50825a -r 97d72e5f12c7 b
1469 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1470 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1471 @@ -0,0 +1,1 @@
1472 +b
1473
1474 --===*=-- (glob)
1475 displaying [PATCH 3 of 3] long line ...
1476 Content-Type: multipart/mixed; boundary="===*==" (glob)
1477 MIME-Version: 1.0
1478 Subject: [PATCH 3 of 3] long line
1479 X-Mercurial-Node: 0c7b871cb86b61a1c07e244393603c361e4a178d
1480 X-Mercurial-Series-Index: 3
1481 X-Mercurial-Series-Total: 3
1482 Message-Id: <0c7b871cb86b61a1c07e.63@test-hostname>
1483 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1484 In-Reply-To: <patchbomb.60@test-hostname>
1485 References: <patchbomb.60@test-hostname>
1486 User-Agent: Mercurial-patchbomb/* (glob)
1487 Date: Thu, 01 Jan 1970 00:01:03 +0000
1488 From: quux
1489 To: foo
1490 Cc: bar
1491
1492 --===*= (glob)
1493 MIME-Version: 1.0
1494 Content-Type: text/plain; charset="us-ascii"
1495 Content-Transfer-Encoding: 7bit
1496
1497 Patch subject is complete summary.
1498
1499
1500
1501 --===*= (glob)
1502 MIME-Version: 1.0
1503 Content-Type: text/x-patch; charset="us-ascii"
1504 Content-Transfer-Encoding: quoted-printable
1505 Content-Disposition: attachment; filename=t2-3.patch
1506
1507 # HG changeset patch
1508 # User test
1509 # Date 4 0
1510 # Thu Jan 01 00:00:04 1970 +0000
1511 # Node ID 0c7b871cb86b61a1c07e244393603c361e4a178d
1512 # Parent f81ef97829467e868fc405fccbcfa66217e4d3e6
1513 long line
1514
1515 diff -r f81ef9782946 -r 0c7b871cb86b long
1516 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1517 +++ b/long Thu Jan 01 00:00:04 1970 +0000
1518 @@ -0,0 +1,4 @@
1519 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1520 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1521 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1522 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1523 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1524 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1525 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1526 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1527 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1528 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1529 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1530 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1531 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1532 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1533 +foo
1534 +
1535 +bar
1536
1537 --===*=-- (glob)
1538
1539 test intro for single patch:
1540 $ hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \
1541 > -r 2
1542 this patch series consists of 1 patches.
1543
1544
1545 Write the introductory message for the patch series.
1546
1547
1548 displaying [PATCH 0 of 1] test ...
1549 MIME-Version: 1.0
1550 Content-Type: text/plain; charset="us-ascii"
1551 Content-Transfer-Encoding: 7bit
1552 Subject: [PATCH 0 of 1] test
1553 Message-Id: <patchbomb.60@test-hostname>
1554 User-Agent: Mercurial-patchbomb/* (glob)
1555 Date: Thu, 01 Jan 1970 00:01:00 +0000
1556 From: quux
1557 To: foo
1558 Cc: bar
1559
1560
1561 displaying [PATCH 1 of 1] c ...
1562 MIME-Version: 1.0
1563 Content-Type: text/plain; charset="us-ascii"
1564 Content-Transfer-Encoding: 7bit
1565 Subject: [PATCH 1 of 1] c
1566 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1567 X-Mercurial-Series-Index: 1
1568 X-Mercurial-Series-Total: 1
1569 Message-Id: <ff2c9fa2018b15fa74b3.61@test-hostname>
1570 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.61@test-hostname>
1571 In-Reply-To: <patchbomb.60@test-hostname>
1572 References: <patchbomb.60@test-hostname>
1573 User-Agent: Mercurial-patchbomb/* (glob)
1574 Date: Thu, 01 Jan 1970 00:01:01 +0000
1575 From: quux
1576 To: foo
1577 Cc: bar
1578
1579 # HG changeset patch
1580 # User test
1581 # Date 3 0
1582 # Thu Jan 01 00:00:03 1970 +0000
1583 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1584 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1585 c
1586
1587 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1588 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1589 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1590 @@ -0,0 +1,1 @@
1591 +c
1592
1593
1594 test --desc without --intro for a single patch:
1595 $ echo foo > intro.text
1596 $ hg email --date '1970-1-1 0:1' -n --desc intro.text -f quux -t foo -c bar \
1597 > -s test -r 2
1598 this patch series consists of 1 patches.
1599
1600
1601 displaying [PATCH 0 of 1] test ...
1602 MIME-Version: 1.0
1603 Content-Type: text/plain; charset="us-ascii"
1604 Content-Transfer-Encoding: 7bit
1605 Subject: [PATCH 0 of 1] test
1606 Message-Id: <patchbomb.60@test-hostname>
1607 User-Agent: Mercurial-patchbomb/* (glob)
1608 Date: Thu, 01 Jan 1970 00:01:00 +0000
1609 From: quux
1610 To: foo
1611 Cc: bar
1612
1613 foo
1614
1615 displaying [PATCH 1 of 1] c ...
1616 MIME-Version: 1.0
1617 Content-Type: text/plain; charset="us-ascii"
1618 Content-Transfer-Encoding: 7bit
1619 Subject: [PATCH 1 of 1] c
1620 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1621 X-Mercurial-Series-Index: 1
1622 X-Mercurial-Series-Total: 1
1623 Message-Id: <ff2c9fa2018b15fa74b3.61@test-hostname>
1624 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.61@test-hostname>
1625 In-Reply-To: <patchbomb.60@test-hostname>
1626 References: <patchbomb.60@test-hostname>
1627 User-Agent: Mercurial-patchbomb/* (glob)
1628 Date: Thu, 01 Jan 1970 00:01:01 +0000
1629 From: quux
1630 To: foo
1631 Cc: bar
1632
1633 # HG changeset patch
1634 # User test
1635 # Date 3 0
1636 # Thu Jan 01 00:00:03 1970 +0000
1637 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1638 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1639 c
1640
1641 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1642 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1643 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1644 @@ -0,0 +1,1 @@
1645 +c
1646
1647
1648 test intro for multiple patches:
1649 $ hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \
1650 > -r 0:1
1651 this patch series consists of 2 patches.
1652
1653
1654 Write the introductory message for the patch series.
1655
1656
1657 displaying [PATCH 0 of 2] test ...
1658 MIME-Version: 1.0
1659 Content-Type: text/plain; charset="us-ascii"
1660 Content-Transfer-Encoding: 7bit
1661 Subject: [PATCH 0 of 2] test
1662 Message-Id: <patchbomb.60@test-hostname>
1663 User-Agent: Mercurial-patchbomb/* (glob)
1664 Date: Thu, 01 Jan 1970 00:01:00 +0000
1665 From: quux
1666 To: foo
1667 Cc: bar
1668
1669
1670 displaying [PATCH 1 of 2] a ...
1671 MIME-Version: 1.0
1672 Content-Type: text/plain; charset="us-ascii"
1673 Content-Transfer-Encoding: 7bit
1674 Subject: [PATCH 1 of 2] a
1675 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1676 X-Mercurial-Series-Index: 1
1677 X-Mercurial-Series-Total: 2
1678 Message-Id: <8580ff50825a50c8f716.61@test-hostname>
1679 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1680 In-Reply-To: <patchbomb.60@test-hostname>
1681 References: <patchbomb.60@test-hostname>
1682 User-Agent: Mercurial-patchbomb/* (glob)
1683 Date: Thu, 01 Jan 1970 00:01:01 +0000
1684 From: quux
1685 To: foo
1686 Cc: bar
1687
1688 # HG changeset patch
1689 # User test
1690 # Date 1 0
1691 # Thu Jan 01 00:00:01 1970 +0000
1692 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1693 # Parent 0000000000000000000000000000000000000000
1694 a
1695
1696 diff -r 000000000000 -r 8580ff50825a a
1697 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1698 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1699 @@ -0,0 +1,1 @@
1700 +a
1701
1702 displaying [PATCH 2 of 2] b ...
1703 MIME-Version: 1.0
1704 Content-Type: text/plain; charset="us-ascii"
1705 Content-Transfer-Encoding: 7bit
1706 Subject: [PATCH 2 of 2] b
1707 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1708 X-Mercurial-Series-Index: 2
1709 X-Mercurial-Series-Total: 2
1710 Message-Id: <97d72e5f12c7e84f8506.62@test-hostname>
1711 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1712 In-Reply-To: <patchbomb.60@test-hostname>
1713 References: <patchbomb.60@test-hostname>
1714 User-Agent: Mercurial-patchbomb/* (glob)
1715 Date: Thu, 01 Jan 1970 00:01:02 +0000
1716 From: quux
1717 To: foo
1718 Cc: bar
1719
1720 # HG changeset patch
1721 # User test
1722 # Date 2 0
1723 # Thu Jan 01 00:00:02 1970 +0000
1724 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1725 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1726 b
1727
1728 diff -r 8580ff50825a -r 97d72e5f12c7 b
1729 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1730 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1731 @@ -0,0 +1,1 @@
1732 +b
1733
1734
1735 test reply-to via config:
1736 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \
1737 > --config patchbomb.reply-to='[email protected]'
1738 this patch series consists of 1 patches.
1739
1740
1741 displaying [PATCH] test ...
1742 MIME-Version: 1.0
1743 Content-Type: text/plain; charset="us-ascii"
1744 Content-Transfer-Encoding: 7bit
1745 Subject: [PATCH] test
1746 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1747 X-Mercurial-Series-Index: 1
1748 X-Mercurial-Series-Total: 1
1749 Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1750 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1751 User-Agent: Mercurial-patchbomb/* (glob)
1752 Date: Thu, 01 Jan 1970 00:01:00 +0000
1753 From: quux
1754 To: foo
1755 Cc: bar
1756 Reply-To: [email protected]
1757
1758 # HG changeset patch
1759 # User test
1760 # Date 3 0
1761 # Thu Jan 01 00:00:03 1970 +0000
1762 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1763 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1764 c
1765
1766 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1767 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1768 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1769 @@ -0,0 +1,1 @@
1770 +c
1771
1772
1773 test reply-to via command line:
1774 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \
1775 > --reply-to baz --reply-to fred
1776 this patch series consists of 1 patches.
1777
1778
1779 displaying [PATCH] test ...
1780 MIME-Version: 1.0
1781 Content-Type: text/plain; charset="us-ascii"
1782 Content-Transfer-Encoding: 7bit
1783 Subject: [PATCH] test
1784 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1785 X-Mercurial-Series-Index: 1
1786 X-Mercurial-Series-Total: 1
1787 Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1788 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1789 User-Agent: Mercurial-patchbomb/* (glob)
1790 Date: Thu, 01 Jan 1970 00:01:00 +0000
1791 From: quux
1792 To: foo
1793 Cc: bar
1794 Reply-To: baz, fred
1795
1796 # HG changeset patch
1797 # User test
1798 # Date 3 0
1799 # Thu Jan 01 00:00:03 1970 +0000
1800 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1801 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1802 c
1803
1804 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1805 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1806 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1807 @@ -0,0 +1,1 @@
1808 +c
1809
1810
1811 tagging csets:
1812 $ hg tag -r0 zero zero.foo
1813 $ hg tag -r1 one one.patch
1814 $ hg tag -r2 two two.diff
1815
1816 test inline for single named patch:
1817 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \
1818 > -r 2 | filterboundary
1819 this patch series consists of 1 patches.
1820
1821
1822 displaying [PATCH] test ...
1823 Content-Type: multipart/mixed; boundary="===*==" (glob)
1824 MIME-Version: 1.0
1825 Subject: [PATCH] test
1826 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1827 X-Mercurial-Series-Index: 1
1828 X-Mercurial-Series-Total: 1
1829 Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1830 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1831 User-Agent: Mercurial-patchbomb/* (glob)
1832 Date: Thu, 01 Jan 1970 00:01:00 +0000
1833 From: quux
1834 To: foo
1835 Cc: bar
1836
1837 --===*= (glob)
1838 MIME-Version: 1.0
1839 Content-Type: text/x-patch; charset="us-ascii"
1840 Content-Transfer-Encoding: 7bit
1841 Content-Disposition: inline; filename=two.diff
1842
1843 # HG changeset patch
1844 # User test
1845 # Date 3 0
1846 # Thu Jan 01 00:00:03 1970 +0000
1847 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1848 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1849 c
1850
1851 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1852 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1853 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1854 @@ -0,0 +1,1 @@
1855 +c
1856
1857 --===*=-- (glob)
1858
1859 test inline for multiple named/unnamed patches:
1860 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \
1861 > -r 0:1 | filterboundary
1862 this patch series consists of 2 patches.
1863
1864
1865 Write the introductory message for the patch series.
1866
1867
1868 displaying [PATCH 0 of 2] test ...
1869 MIME-Version: 1.0
1870 Content-Type: text/plain; charset="us-ascii"
1871 Content-Transfer-Encoding: 7bit
1872 Subject: [PATCH 0 of 2] test
1873 Message-Id: <patchbomb.60@test-hostname>
1874 User-Agent: Mercurial-patchbomb/* (glob)
1875 Date: Thu, 01 Jan 1970 00:01:00 +0000
1876 From: quux
1877 To: foo
1878 Cc: bar
1879
1880
1881 displaying [PATCH 1 of 2] a ...
1882 Content-Type: multipart/mixed; boundary="===*==" (glob)
1883 MIME-Version: 1.0
1884 Subject: [PATCH 1 of 2] a
1885 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1886 X-Mercurial-Series-Index: 1
1887 X-Mercurial-Series-Total: 2
1888 Message-Id: <8580ff50825a50c8f716.61@test-hostname>
1889 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1890 In-Reply-To: <patchbomb.60@test-hostname>
1891 References: <patchbomb.60@test-hostname>
1892 User-Agent: Mercurial-patchbomb/* (glob)
1893 Date: Thu, 01 Jan 1970 00:01:01 +0000
1894 From: quux
1895 To: foo
1896 Cc: bar
1897
1898 --===*= (glob)
1899 MIME-Version: 1.0
1900 Content-Type: text/x-patch; charset="us-ascii"
1901 Content-Transfer-Encoding: 7bit
1902 Content-Disposition: inline; filename=t2-1.patch
1903
1904 # HG changeset patch
1905 # User test
1906 # Date 1 0
1907 # Thu Jan 01 00:00:01 1970 +0000
1908 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1909 # Parent 0000000000000000000000000000000000000000
1910 a
1911
1912 diff -r 000000000000 -r 8580ff50825a a
1913 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1914 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1915 @@ -0,0 +1,1 @@
1916 +a
1917
1918 --===*=-- (glob)
1919 displaying [PATCH 2 of 2] b ...
1920 Content-Type: multipart/mixed; boundary="===*==" (glob)
1921 MIME-Version: 1.0
1922 Subject: [PATCH 2 of 2] b
1923 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1924 X-Mercurial-Series-Index: 2
1925 X-Mercurial-Series-Total: 2
1926 Message-Id: <97d72e5f12c7e84f8506.62@test-hostname>
1927 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1928 In-Reply-To: <patchbomb.60@test-hostname>
1929 References: <patchbomb.60@test-hostname>
1930 User-Agent: Mercurial-patchbomb/* (glob)
1931 Date: Thu, 01 Jan 1970 00:01:02 +0000
1932 From: quux
1933 To: foo
1934 Cc: bar
1935
1936 --===*= (glob)
1937 MIME-Version: 1.0
1938 Content-Type: text/x-patch; charset="us-ascii"
1939 Content-Transfer-Encoding: 7bit
1940 Content-Disposition: inline; filename=one.patch
1941
1942 # HG changeset patch
1943 # User test
1944 # Date 2 0
1945 # Thu Jan 01 00:00:02 1970 +0000
1946 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1947 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1948 b
1949
1950 diff -r 8580ff50825a -r 97d72e5f12c7 b
1951 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1952 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1953 @@ -0,0 +1,1 @@
1954 +b
1955
1956 --===*=-- (glob)
1957
1958
1959 test inreplyto:
1960 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
1961 > -r tip
1962 this patch series consists of 1 patches.
1963
1964
1965 displaying [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b ...
1966 MIME-Version: 1.0
1967 Content-Type: text/plain; charset="us-ascii"
1968 Content-Transfer-Encoding: 7bit
1969 Subject: [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b
1970 X-Mercurial-Node: 9cea7492c36bdda2c72e7dd5f35f7fc367adeb2c
1971 X-Mercurial-Series-Index: 1
1972 X-Mercurial-Series-Total: 1
1973 Message-Id: <9cea7492c36bdda2c72e.60@test-hostname>
1974 X-Mercurial-Series-Id: <9cea7492c36bdda2c72e.60@test-hostname>
1975 In-Reply-To: <baz>
1976 References: <baz>
1977 User-Agent: Mercurial-patchbomb/* (glob)
1978 Date: Thu, 01 Jan 1970 00:01:00 +0000
1979 From: quux
1980 To: foo
1981 Cc: bar
1982
1983 # HG changeset patch
1984 # User test
1985 # Date 0 0
1986 # Thu Jan 01 00:00:00 1970 +0000
1987 # Node ID 9cea7492c36bdda2c72e7dd5f35f7fc367adeb2c
1988 # Parent 3b775b32716d9b54291ccddf0a36ceea45449bfb
1989 Added tag two, two.diff for changeset ff2c9fa2018b
1990
1991 diff -r 3b775b32716d -r 9cea7492c36b .hgtags
1992 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
1993 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
1994 @@ -2,3 +2,5 @@
1995 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
1996 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
1997 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
1998 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two
1999 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff
2000
2001 no intro message in non-interactive mode
2002 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
2003 > -r 0:1
2004 this patch series consists of 2 patches.
2005
2006 (optional) Subject: [PATCH 0 of 2]
2007
2008 displaying [PATCH 1 of 2] a ...
2009 MIME-Version: 1.0
2010 Content-Type: text/plain; charset="us-ascii"
2011 Content-Transfer-Encoding: 7bit
2012 Subject: [PATCH 1 of 2] a
2013 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
2014 X-Mercurial-Series-Index: 1
2015 X-Mercurial-Series-Total: 2
2016 Message-Id: <8580ff50825a50c8f716.60@test-hostname>
2017 X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname>
2018 In-Reply-To: <baz>
2019 References: <baz>
2020 User-Agent: Mercurial-patchbomb/* (glob)
2021 Date: Thu, 01 Jan 1970 00:01:00 +0000
2022 From: quux
2023 To: foo
2024 Cc: bar
2025
2026 # HG changeset patch
2027 # User test
2028 # Date 1 0
2029 # Thu Jan 01 00:00:01 1970 +0000
2030 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
2031 # Parent 0000000000000000000000000000000000000000
2032 a
2033
2034 diff -r 000000000000 -r 8580ff50825a a
2035 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2036 +++ b/a Thu Jan 01 00:00:01 1970 +0000
2037 @@ -0,0 +1,1 @@
2038 +a
2039
2040 displaying [PATCH 2 of 2] b ...
2041 MIME-Version: 1.0
2042 Content-Type: text/plain; charset="us-ascii"
2043 Content-Transfer-Encoding: 7bit
2044 Subject: [PATCH 2 of 2] b
2045 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2046 X-Mercurial-Series-Index: 2
2047 X-Mercurial-Series-Total: 2
2048 Message-Id: <97d72e5f12c7e84f8506.61@test-hostname>
2049 X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname>
2050 In-Reply-To: <baz>
2051 References: <baz>
2052 User-Agent: Mercurial-patchbomb/* (glob)
2053 Date: Thu, 01 Jan 1970 00:01:01 +0000
2054 From: quux
2055 To: foo
2056 Cc: bar
2057
2058 # HG changeset patch
2059 # User test
2060 # Date 2 0
2061 # Thu Jan 01 00:00:02 1970 +0000
2062 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2063 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
2064 b
2065
2066 diff -r 8580ff50825a -r 97d72e5f12c7 b
2067 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2068 +++ b/b Thu Jan 01 00:00:02 1970 +0000
2069 @@ -0,0 +1,1 @@
2070 +b
2071
2072
2073
2074
2075 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
2076 > -s test -r 0:1
2077 this patch series consists of 2 patches.
2078
2079
2080 Write the introductory message for the patch series.
2081
2082
2083 displaying [PATCH 0 of 2] test ...
2084 MIME-Version: 1.0
2085 Content-Type: text/plain; charset="us-ascii"
2086 Content-Transfer-Encoding: 7bit
2087 Subject: [PATCH 0 of 2] test
2088 Message-Id: <patchbomb.60@test-hostname>
2089 In-Reply-To: <baz>
2090 References: <baz>
2091 User-Agent: Mercurial-patchbomb/* (glob)
2092 Date: Thu, 01 Jan 1970 00:01:00 +0000
2093 From: quux
2094 To: foo
2095 Cc: bar
2096
2097
2098 displaying [PATCH 1 of 2] a ...
2099 MIME-Version: 1.0
2100 Content-Type: text/plain; charset="us-ascii"
2101 Content-Transfer-Encoding: 7bit
2102 Subject: [PATCH 1 of 2] a
2103 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
2104 X-Mercurial-Series-Index: 1
2105 X-Mercurial-Series-Total: 2
2106 Message-Id: <8580ff50825a50c8f716.61@test-hostname>
2107 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
2108 In-Reply-To: <patchbomb.60@test-hostname>
2109 References: <patchbomb.60@test-hostname>
2110 User-Agent: Mercurial-patchbomb/* (glob)
2111 Date: Thu, 01 Jan 1970 00:01:01 +0000
2112 From: quux
2113 To: foo
2114 Cc: bar
2115
2116 # HG changeset patch
2117 # User test
2118 # Date 1 0
2119 # Thu Jan 01 00:00:01 1970 +0000
2120 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
2121 # Parent 0000000000000000000000000000000000000000
2122 a
2123
2124 diff -r 000000000000 -r 8580ff50825a a
2125 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2126 +++ b/a Thu Jan 01 00:00:01 1970 +0000
2127 @@ -0,0 +1,1 @@
2128 +a
2129
2130 displaying [PATCH 2 of 2] b ...
2131 MIME-Version: 1.0
2132 Content-Type: text/plain; charset="us-ascii"
2133 Content-Transfer-Encoding: 7bit
2134 Subject: [PATCH 2 of 2] b
2135 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2136 X-Mercurial-Series-Index: 2
2137 X-Mercurial-Series-Total: 2
2138 Message-Id: <97d72e5f12c7e84f8506.62@test-hostname>
2139 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
2140 In-Reply-To: <patchbomb.60@test-hostname>
2141 References: <patchbomb.60@test-hostname>
2142 User-Agent: Mercurial-patchbomb/* (glob)
2143 Date: Thu, 01 Jan 1970 00:01:02 +0000
2144 From: quux
2145 To: foo
2146 Cc: bar
2147
2148 # HG changeset patch
2149 # User test
2150 # Date 2 0
2151 # Thu Jan 01 00:00:02 1970 +0000
2152 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2153 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
2154 b
2155
2156 diff -r 8580ff50825a -r 97d72e5f12c7 b
2157 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2158 +++ b/b Thu Jan 01 00:00:02 1970 +0000
2159 @@ -0,0 +1,1 @@
2160 +b
2161
2162
2163 test single flag for single patch (and no warning when not mailing dirty rev):
2164 $ hg up -qr1
2165 $ echo dirt > a
2166 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \
2167 > -r 2 | filterboundary
2168 this patch series consists of 1 patches.
2169
2170
2171 displaying [PATCH fooFlag] test ...
2172 MIME-Version: 1.0
2173 Content-Type: text/plain; charset="us-ascii"
2174 Content-Transfer-Encoding: 7bit
2175 Subject: [PATCH fooFlag] test
2176 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
2177 X-Mercurial-Series-Index: 1
2178 X-Mercurial-Series-Total: 1
2179 Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
2180 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
2181 User-Agent: Mercurial-patchbomb/* (glob)
2182 Date: Thu, 01 Jan 1970 00:01:00 +0000
2183 From: quux
2184 To: foo
2185 Cc: bar
2186
2187 # HG changeset patch
2188 # User test
2189 # Date 3 0
2190 # Thu Jan 01 00:00:03 1970 +0000
2191 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
2192 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2193 c
2194
2195 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
2196 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2197 +++ b/c Thu Jan 01 00:00:03 1970 +0000
2198 @@ -0,0 +1,1 @@
2199 +c
2200
2201
2202 test single flag for multiple patches (and warning when mailing dirty rev):
2203 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \
2204 > -r 0:1
2205 warning: working directory has uncommitted changes
2206 this patch series consists of 2 patches.
2207
2208
2209 Write the introductory message for the patch series.
2210
2211
2212 displaying [PATCH 0 of 2 fooFlag] test ...
2213 MIME-Version: 1.0
2214 Content-Type: text/plain; charset="us-ascii"
2215 Content-Transfer-Encoding: 7bit
2216 Subject: [PATCH 0 of 2 fooFlag] test
2217 Message-Id: <patchbomb.60@test-hostname>
2218 User-Agent: Mercurial-patchbomb/* (glob)
2219 Date: Thu, 01 Jan 1970 00:01:00 +0000
2220 From: quux
2221 To: foo
2222 Cc: bar
2223
2224
2225 displaying [PATCH 1 of 2 fooFlag] a ...
2226 MIME-Version: 1.0
2227 Content-Type: text/plain; charset="us-ascii"
2228 Content-Transfer-Encoding: 7bit
2229 Subject: [PATCH 1 of 2 fooFlag] a
2230 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
2231 X-Mercurial-Series-Index: 1
2232 X-Mercurial-Series-Total: 2
2233 Message-Id: <8580ff50825a50c8f716.61@test-hostname>
2234 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
2235 In-Reply-To: <patchbomb.60@test-hostname>
2236 References: <patchbomb.60@test-hostname>
2237 User-Agent: Mercurial-patchbomb/* (glob)
2238 Date: Thu, 01 Jan 1970 00:01:01 +0000
2239 From: quux
2240 To: foo
2241 Cc: bar
2242
2243 # HG changeset patch
2244 # User test
2245 # Date 1 0
2246 # Thu Jan 01 00:00:01 1970 +0000
2247 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
2248 # Parent 0000000000000000000000000000000000000000
2249 a
2250
2251 diff -r 000000000000 -r 8580ff50825a a
2252 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2253 +++ b/a Thu Jan 01 00:00:01 1970 +0000
2254 @@ -0,0 +1,1 @@
2255 +a
2256
2257 displaying [PATCH 2 of 2 fooFlag] b ...
2258 MIME-Version: 1.0
2259 Content-Type: text/plain; charset="us-ascii"
2260 Content-Transfer-Encoding: 7bit
2261 Subject: [PATCH 2 of 2 fooFlag] b
2262 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2263 X-Mercurial-Series-Index: 2
2264 X-Mercurial-Series-Total: 2
2265 Message-Id: <97d72e5f12c7e84f8506.62@test-hostname>
2266 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
2267 In-Reply-To: <patchbomb.60@test-hostname>
2268 References: <patchbomb.60@test-hostname>
2269 User-Agent: Mercurial-patchbomb/* (glob)
2270 Date: Thu, 01 Jan 1970 00:01:02 +0000
2271 From: quux
2272 To: foo
2273 Cc: bar
2274
2275 # HG changeset patch
2276 # User test
2277 # Date 2 0
2278 # Thu Jan 01 00:00:02 1970 +0000
2279 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2280 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
2281 b
2282
2283 diff -r 8580ff50825a -r 97d72e5f12c7 b
2284 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2285 +++ b/b Thu Jan 01 00:00:02 1970 +0000
2286 @@ -0,0 +1,1 @@
2287 +b
2288
2289 $ hg revert --no-b a
2290 $ hg up -q
2291
2292 test multiple flags for single patch:
2293 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \
2294 > -c bar -s test -r 2
2295 this patch series consists of 1 patches.
2296
2297
2298 displaying [PATCH fooFlag barFlag] test ...
2299 MIME-Version: 1.0
2300 Content-Type: text/plain; charset="us-ascii"
2301 Content-Transfer-Encoding: 7bit
2302 Subject: [PATCH fooFlag barFlag] test
2303 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
2304 X-Mercurial-Series-Index: 1
2305 X-Mercurial-Series-Total: 1
2306 Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
2307 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
2308 User-Agent: Mercurial-patchbomb/* (glob)
2309 Date: Thu, 01 Jan 1970 00:01:00 +0000
2310 From: quux
2311 To: foo
2312 Cc: bar
2313
2314 # HG changeset patch
2315 # User test
2316 # Date 3 0
2317 # Thu Jan 01 00:00:03 1970 +0000
2318 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
2319 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2320 c
2321
2322 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
2323 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2324 +++ b/c Thu Jan 01 00:00:03 1970 +0000
2325 @@ -0,0 +1,1 @@
2326 +c
2327
2328
2329 test multiple flags for multiple patches:
2330 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \
2331 > -c bar -s test -r 0:1
2332 this patch series consists of 2 patches.
2333
2334
2335 Write the introductory message for the patch series.
2336
2337
2338 displaying [PATCH 0 of 2 fooFlag barFlag] test ...
2339 MIME-Version: 1.0
2340 Content-Type: text/plain; charset="us-ascii"
2341 Content-Transfer-Encoding: 7bit
2342 Subject: [PATCH 0 of 2 fooFlag barFlag] test
2343 Message-Id: <patchbomb.60@test-hostname>
2344 User-Agent: Mercurial-patchbomb/* (glob)
2345 Date: Thu, 01 Jan 1970 00:01:00 +0000
2346 From: quux
2347 To: foo
2348 Cc: bar
2349
2350
2351 displaying [PATCH 1 of 2 fooFlag barFlag] a ...
2352 MIME-Version: 1.0
2353 Content-Type: text/plain; charset="us-ascii"
2354 Content-Transfer-Encoding: 7bit
2355 Subject: [PATCH 1 of 2 fooFlag barFlag] a
2356 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
2357 X-Mercurial-Series-Index: 1
2358 X-Mercurial-Series-Total: 2
2359 Message-Id: <8580ff50825a50c8f716.61@test-hostname>
2360 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
2361 In-Reply-To: <patchbomb.60@test-hostname>
2362 References: <patchbomb.60@test-hostname>
2363 User-Agent: Mercurial-patchbomb/* (glob)
2364 Date: Thu, 01 Jan 1970 00:01:01 +0000
2365 From: quux
2366 To: foo
2367 Cc: bar
2368
2369 # HG changeset patch
2370 # User test
2371 # Date 1 0
2372 # Thu Jan 01 00:00:01 1970 +0000
2373 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
2374 # Parent 0000000000000000000000000000000000000000
2375 a
2376
2377 diff -r 000000000000 -r 8580ff50825a a
2378 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2379 +++ b/a Thu Jan 01 00:00:01 1970 +0000
2380 @@ -0,0 +1,1 @@
2381 +a
2382
2383 displaying [PATCH 2 of 2 fooFlag barFlag] b ...
2384 MIME-Version: 1.0
2385 Content-Type: text/plain; charset="us-ascii"
2386 Content-Transfer-Encoding: 7bit
2387 Subject: [PATCH 2 of 2 fooFlag barFlag] b
2388 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2389 X-Mercurial-Series-Index: 2
2390 X-Mercurial-Series-Total: 2
2391 Message-Id: <97d72e5f12c7e84f8506.62@test-hostname>
2392 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
2393 In-Reply-To: <patchbomb.60@test-hostname>
2394 References: <patchbomb.60@test-hostname>
2395 User-Agent: Mercurial-patchbomb/* (glob)
2396 Date: Thu, 01 Jan 1970 00:01:02 +0000
2397 From: quux
2398 To: foo
2399 Cc: bar
2400
2401 # HG changeset patch
2402 # User test
2403 # Date 2 0
2404 # Thu Jan 01 00:00:02 1970 +0000
2405 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2406 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
2407 b
2408
2409 diff -r 8580ff50825a -r 97d72e5f12c7 b
2410 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2411 +++ b/b Thu Jan 01 00:00:02 1970 +0000
2412 @@ -0,0 +1,1 @@
2413 +b
2414
2415
2416 test multi-address parsing:
2417 $ hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t 'spam<spam>' \
2418 > -t toast -c 'foo,[email protected]' -c '"A, B <>" <[email protected]>' -s test -r 0 \
2419 > --config email.bcc='"Quux, A." <quux>'
2420 this patch series consists of 1 patches.
2421
2422
2423 sending [PATCH] test ...
2424 $ cat < tmp.mbox
2425 From quux ... ... .. ..:..:.. .... (re)
2426 MIME-Version: 1.0
2427 Content-Type: text/plain; charset="us-ascii"
2428 Content-Transfer-Encoding: 7bit
2429 Subject: [PATCH] test
2430 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
2431 X-Mercurial-Series-Index: 1
2432 X-Mercurial-Series-Total: 1
2433 Message-Id: <8580ff50825a50c8f716.315532860@test-hostname>
2434 X-Mercurial-Series-Id: <8580ff50825a50c8f716.315532860@test-hostname>
2435 User-Agent: Mercurial-patchbomb/* (glob)
2436 Date: Tue, 01 Jan 1980 00:01:00 +0000
2437 From: quux
2438 To: =?iso-8859-1?q?spam?= <spam>, toast
2439 Cc: foo, [email protected], =?iso-8859-1?q?A=2C_B_=3C=3E?= <[email protected]>
2440 Bcc: =?iso-8859-1?q?Quux=2C_A=2E?= <quux>
2441
2442 # HG changeset patch
2443 # User test
2444 # Date 1 0
2445 # Thu Jan 01 00:00:01 1970 +0000
2446 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
2447 # Parent 0000000000000000000000000000000000000000
2448 a
2449
2450 diff -r 000000000000 -r 8580ff50825a a
2451 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2452 +++ b/a Thu Jan 01 00:00:01 1970 +0000
2453 @@ -0,0 +1,1 @@
2454 +a
2455
2456
2457
2458 test flag template:
2459 $ echo foo > intro.text
2460 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -r 0:1 \
2461 > --desc intro.text --subject test \
2462 > --config patchbomb.flagtemplate='R{rev}'
2463 this patch series consists of 2 patches.
2464
2465 Cc:
2466
2467 displaying [PATCH 0 of 2 R1] test ...
2468 MIME-Version: 1.0
2469 Content-Type: text/plain; charset="us-ascii"
2470 Content-Transfer-Encoding: 7bit
2471 Subject: [PATCH 0 of 2 R1] test
2472 Message-Id: <patchbomb.60@test-hostname>
2473 User-Agent: Mercurial-patchbomb/* (glob)
2474 Date: Thu, 01 Jan 1970 00:01:00 +0000
2475 From: quux
2476 To: foo
2477
2478 foo
2479
2480 displaying [PATCH 1 of 2 R0] a ...
2481 MIME-Version: 1.0
2482 Content-Type: text/plain; charset="us-ascii"
2483 Content-Transfer-Encoding: 7bit
2484 Subject: [PATCH 1 of 2 R0] a
2485 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
2486 X-Mercurial-Series-Index: 1
2487 X-Mercurial-Series-Total: 2
2488 Message-Id: <8580ff50825a50c8f716.61@test-hostname>
2489 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
2490 In-Reply-To: <patchbomb.60@test-hostname>
2491 References: <patchbomb.60@test-hostname>
2492 User-Agent: Mercurial-patchbomb/* (glob)
2493 Date: Thu, 01 Jan 1970 00:01:01 +0000
2494 From: quux
2495 To: foo
2496
2497 # HG changeset patch
2498 # User test
2499 # Date 1 0
2500 # Thu Jan 01 00:00:01 1970 +0000
2501 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
2502 # Parent 0000000000000000000000000000000000000000
2503 a
2504
2505 diff -r 000000000000 -r 8580ff50825a a
2506 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2507 +++ b/a Thu Jan 01 00:00:01 1970 +0000
2508 @@ -0,0 +1,1 @@
2509 +a
2510
2511 displaying [PATCH 2 of 2 R1] b ...
2512 MIME-Version: 1.0
2513 Content-Type: text/plain; charset="us-ascii"
2514 Content-Transfer-Encoding: 7bit
2515 Subject: [PATCH 2 of 2 R1] b
2516 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2517 X-Mercurial-Series-Index: 2
2518 X-Mercurial-Series-Total: 2
2519 Message-Id: <97d72e5f12c7e84f8506.62@test-hostname>
2520 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
2521 In-Reply-To: <patchbomb.60@test-hostname>
2522 References: <patchbomb.60@test-hostname>
2523 User-Agent: Mercurial-patchbomb/* (glob)
2524 Date: Thu, 01 Jan 1970 00:01:02 +0000
2525 From: quux
2526 To: foo
2527
2528 # HG changeset patch
2529 # User test
2530 # Date 2 0
2531 # Thu Jan 01 00:00:02 1970 +0000
2532 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2533 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
2534 b
2535
2536 diff -r 8580ff50825a -r 97d72e5f12c7 b
2537 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2538 +++ b/b Thu Jan 01 00:00:02 1970 +0000
2539 @@ -0,0 +1,1 @@
2540 +b
2541
2542
2543 test flag template plus --flag:
2544 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -r 0 --flag 'V2' \
2545 > --config patchbomb.flagtemplate='{branch} {flags}'
2546 this patch series consists of 1 patches.
2547
2548 Cc:
2549
2550 displaying [PATCH default V2] a ...
2551 MIME-Version: 1.0
2552 Content-Type: text/plain; charset="us-ascii"
2553 Content-Transfer-Encoding: 7bit
2554 Subject: [PATCH default V2] a
2555 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
2556 X-Mercurial-Series-Index: 1
2557 X-Mercurial-Series-Total: 1
2558 Message-Id: <8580ff50825a50c8f716.60@test-hostname>
2559 X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname>
2560 User-Agent: Mercurial-patchbomb/* (glob)
2561 Date: Thu, 01 Jan 1970 00:01:00 +0000
2562 From: quux
2563 To: foo
2564
2565 # HG changeset patch
2566 # User test
2567 # Date 1 0
2568 # Thu Jan 01 00:00:01 1970 +0000
2569 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
2570 # Parent 0000000000000000000000000000000000000000
2571 a
2572
2573 diff -r 000000000000 -r 8580ff50825a a
2574 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2575 +++ b/a Thu Jan 01 00:00:01 1970 +0000
2576 @@ -0,0 +1,1 @@
2577 +a
2578
2579
2580 test multi-byte domain parsing:
2581 >>> with open('toaddress.txt', 'wb') as f:
2582 ... f.write(b'bar@\xfcnicode.com') and None
2583 $ HGENCODING=iso-8859-1
2584 $ export HGENCODING
2585 $ hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t "`cat toaddress.txt`" -s test -r 0
2586 this patch series consists of 1 patches.
2587
2588 Cc:
2589
2590 sending [PATCH] test ...
2591
2592 $ cat tmp.mbox
2593 From quux ... ... .. ..:..:.. .... (re)
2594 MIME-Version: 1.0
2595 Content-Type: text/plain; charset="us-ascii"
2596 Content-Transfer-Encoding: 7bit
2597 Subject: [PATCH] test
2598 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
2599 X-Mercurial-Series-Index: 1
2600 X-Mercurial-Series-Total: 1
2601 Message-Id: <8580ff50825a50c8f716.315532860@test-hostname>
2602 X-Mercurial-Series-Id: <8580ff50825a50c8f716.315532860@test-hostname>
2603 User-Agent: Mercurial-patchbomb/* (glob)
2604 Date: Tue, 01 Jan 1980 00:01:00 +0000
2605 From: quux
2606 To: [email protected]
2607
2608 # HG changeset patch
2609 # User test
2610 # Date 1 0
2611 # Thu Jan 01 00:00:01 1970 +0000
2612 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
2613 # Parent 0000000000000000000000000000000000000000
2614 a
2615
2616 diff -r 000000000000 -r 8580ff50825a a
2617 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2618 +++ b/a Thu Jan 01 00:00:01 1970 +0000
2619 @@ -0,0 +1,1 @@
2620 +a
2621
2622
2623
2624 test outgoing:
2625 $ hg up 1
2626 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
2627
2628 $ hg branch test
2629 marked working directory as branch test
2630 (branches are permanent and global, did you want a bookmark?)
2631
2632 $ echo d > d
2633 $ hg add d
2634 $ hg ci -md -d '4 0'
2635 $ echo d >> d
2636 $ hg ci -mdd -d '5 0'
2637 $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n"
2638 @ 10:3b6f1ec9dde9 dd
2639 |
2640 o 9:2f9fa9b998c5 d
2641 |
2642 | o 8:9cea7492c36b Added tag two, two.diff for changeset ff2c9fa2018b
2643 | |
2644 | o 7:3b775b32716d Added tag one, one.patch for changeset 97d72e5f12c7
2645 | |
2646 | o 6:c41d7353114c Added tag zero, zero.foo for changeset 8580ff50825a
2647 | |
2648 | o 5:4d6f44f466c9 isolatin 8-bit encoding
2649 | |
2650 | o 4:0c7b871cb86b long line
2651 | |
2652 | o 3:f81ef9782946 \xe7a (esc)
2653 | |
2654 | o 2:ff2c9fa2018b c
2655 |/
2656 o 1:97d72e5f12c7 b
2657 |
2658 o 0:8580ff50825a a
2659
2660 $ hg phase --force --secret -r 10
2661
2662 Test without revisions specified
2663 $ hg email --date '1980-1-1 0:1' -n -o -t foo
2664 comparing with $TESTTMP/t
2665 From [test]: test
2666 this patch series consists of 1 patches.
2667
2668 Cc:
2669
2670 displaying [PATCH] d ...
2671 MIME-Version: 1.0
2672 Content-Type: text/plain; charset="us-ascii"
2673 Content-Transfer-Encoding: 7bit
2674 Subject: [PATCH] d
2675 X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2676 X-Mercurial-Series-Index: 1
2677 X-Mercurial-Series-Total: 1
2678 Message-Id: <2f9fa9b998c5fe3ac2bd.315532860@test-hostname>
2679 X-Mercurial-Series-Id: <2f9fa9b998c5fe3ac2bd.315532860@test-hostname>
2680 User-Agent: Mercurial-patchbomb/* (glob)
2681 Date: Tue, 01 Jan 1980 00:01:00 +0000
2682 From: test
2683 To: foo
2684
2685 # HG changeset patch
2686 # User test
2687 # Date 4 0
2688 # Thu Jan 01 00:00:04 1970 +0000
2689 # Branch test
2690 # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2691 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2692 d
2693
2694 diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d
2695 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2696 +++ b/d Thu Jan 01 00:00:04 1970 +0000
2697 @@ -0,0 +1,1 @@
2698 +d
2699
2700 $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t -r 'rev(10) or rev(6)'
2701 comparing with ../t
2702 From [test]: test
2703 this patch series consists of 6 patches.
2704
2705
2706 Write the introductory message for the patch series.
2707
2708 Cc:
2709
2710 displaying [PATCH 0 of 6] test ...
2711 MIME-Version: 1.0
2712 Content-Type: text/plain; charset="us-ascii"
2713 Content-Transfer-Encoding: 7bit
2714 Subject: [PATCH 0 of 6] test
2715 Message-Id: <patchbomb.315532860@test-hostname>
2716 User-Agent: Mercurial-patchbomb/* (glob)
2717 Date: Tue, 01 Jan 1980 00:01:00 +0000
2718 From: test
2719 To: foo
2720
2721
2722 displaying [PATCH 1 of 6] c ...
2723 MIME-Version: 1.0
2724 Content-Type: text/plain; charset="us-ascii"
2725 Content-Transfer-Encoding: 7bit
2726 Subject: [PATCH 1 of 6] c
2727 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
2728 X-Mercurial-Series-Index: 1
2729 X-Mercurial-Series-Total: 6
2730 Message-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname>
2731 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname>
2732 In-Reply-To: <patchbomb.315532860@test-hostname>
2733 References: <patchbomb.315532860@test-hostname>
2734 User-Agent: Mercurial-patchbomb/* (glob)
2735 Date: Tue, 01 Jan 1980 00:01:01 +0000
2736 From: test
2737 To: foo
2738
2739 # HG changeset patch
2740 # User test
2741 # Date 3 0
2742 # Thu Jan 01 00:00:03 1970 +0000
2743 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
2744 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2745 c
2746
2747 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
2748 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2749 +++ b/c Thu Jan 01 00:00:03 1970 +0000
2750 @@ -0,0 +1,1 @@
2751 +c
2752
2753 displaying [PATCH 2 of 6] \xe7a ... (esc)
2754 MIME-Version: 1.0
2755 Content-Type: text/plain; charset="iso-8859-1"
2756 Content-Transfer-Encoding: quoted-printable
2757 Subject: =?utf-8?b?W1BBVENIIDIgb2YgNl0gw6dh?=
2758 X-Mercurial-Node: f81ef97829467e868fc405fccbcfa66217e4d3e6
2759 X-Mercurial-Series-Index: 2
2760 X-Mercurial-Series-Total: 6
2761 Message-Id: <f81ef97829467e868fc4.315532862@test-hostname>
2762 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname>
2763 In-Reply-To: <patchbomb.315532860@test-hostname>
2764 References: <patchbomb.315532860@test-hostname>
2765 User-Agent: Mercurial-patchbomb/* (glob)
2766 Date: Tue, 01 Jan 1980 00:01:02 +0000
2767 From: test
2768 To: foo
2769
2770 # HG changeset patch
2771 # User test
2772 # Date 4 0
2773 # Thu Jan 01 00:00:04 1970 +0000
2774 # Node ID f81ef97829467e868fc405fccbcfa66217e4d3e6
2775 # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f
2776 =E7a
2777
2778 diff -r ff2c9fa2018b -r f81ef9782946 description
2779 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2780 +++ b/description Thu Jan 01 00:00:04 1970 +0000
2781 @@ -0,0 +1,3 @@
2782 +a multiline
2783 +
2784 +description
2785 diff -r ff2c9fa2018b -r f81ef9782946 utf
2786 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2787 +++ b/utf Thu Jan 01 00:00:04 1970 +0000
2788 @@ -0,0 +1,1 @@
2789 +h=C3=B6mma!
2790
2791 displaying [PATCH 3 of 6] long line ...
2792 MIME-Version: 1.0
2793 Content-Type: text/plain; charset="us-ascii"
2794 Content-Transfer-Encoding: quoted-printable
2795 Subject: [PATCH 3 of 6] long line
2796 X-Mercurial-Node: 0c7b871cb86b61a1c07e244393603c361e4a178d
2797 X-Mercurial-Series-Index: 3
2798 X-Mercurial-Series-Total: 6
2799 Message-Id: <0c7b871cb86b61a1c07e.315532863@test-hostname>
2800 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname>
2801 In-Reply-To: <patchbomb.315532860@test-hostname>
2802 References: <patchbomb.315532860@test-hostname>
2803 User-Agent: Mercurial-patchbomb/* (glob)
2804 Date: Tue, 01 Jan 1980 00:01:03 +0000
2805 From: test
2806 To: foo
2807
2808 # HG changeset patch
2809 # User test
2810 # Date 4 0
2811 # Thu Jan 01 00:00:04 1970 +0000
2812 # Node ID 0c7b871cb86b61a1c07e244393603c361e4a178d
2813 # Parent f81ef97829467e868fc405fccbcfa66217e4d3e6
2814 long line
2815
2816 diff -r f81ef9782946 -r 0c7b871cb86b long
2817 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2818 +++ b/long Thu Jan 01 00:00:04 1970 +0000
2819 @@ -0,0 +1,4 @@
2820 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2821 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2822 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2823 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2824 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2825 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2826 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2827 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2828 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2829 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2830 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2831 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2832 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2833 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2834 +foo
2835 +
2836 +bar
2837
2838 displaying [PATCH 4 of 6] isolatin 8-bit encoding ...
2839 MIME-Version: 1.0
2840 Content-Type: text/plain; charset="iso-8859-1"
2841 Content-Transfer-Encoding: quoted-printable
2842 Subject: [PATCH 4 of 6] isolatin 8-bit encoding
2843 X-Mercurial-Node: 4d6f44f466c96d89f2e7e865a70ff41d8b6eee37
2844 X-Mercurial-Series-Index: 4
2845 X-Mercurial-Series-Total: 6
2846 Message-Id: <4d6f44f466c96d89f2e7.315532864@test-hostname>
2847 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname>
2848 In-Reply-To: <patchbomb.315532860@test-hostname>
2849 References: <patchbomb.315532860@test-hostname>
2850 User-Agent: Mercurial-patchbomb/* (glob)
2851 Date: Tue, 01 Jan 1980 00:01:04 +0000
2852 From: test
2853 To: foo
2854
2855 # HG changeset patch
2856 # User test
2857 # Date 5 0
2858 # Thu Jan 01 00:00:05 1970 +0000
2859 # Node ID 4d6f44f466c96d89f2e7e865a70ff41d8b6eee37
2860 # Parent 0c7b871cb86b61a1c07e244393603c361e4a178d
2861 isolatin 8-bit encoding
2862
2863 diff -r 0c7b871cb86b -r 4d6f44f466c9 isolatin
2864 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2865 +++ b/isolatin Thu Jan 01 00:00:05 1970 +0000
2866 @@ -0,0 +1,1 @@
2867 +h=F6mma!
2868
2869 displaying [PATCH 5 of 6] Added tag zero, zero.foo for changeset 8580ff50825a ...
2870 MIME-Version: 1.0
2871 Content-Type: text/plain; charset="us-ascii"
2872 Content-Transfer-Encoding: 7bit
2873 Subject: [PATCH 5 of 6] Added tag zero, zero.foo for changeset 8580ff50825a
2874 X-Mercurial-Node: c41d7353114ccb07a50a822ad5ddf47051c88ec2
2875 X-Mercurial-Series-Index: 5
2876 X-Mercurial-Series-Total: 6
2877 Message-Id: <c41d7353114ccb07a50a.315532865@test-hostname>
2878 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname>
2879 In-Reply-To: <patchbomb.315532860@test-hostname>
2880 References: <patchbomb.315532860@test-hostname>
2881 User-Agent: Mercurial-patchbomb/* (glob)
2882 Date: Tue, 01 Jan 1980 00:01:05 +0000
2883 From: test
2884 To: foo
2885
2886 # HG changeset patch
2887 # User test
2888 # Date 0 0
2889 # Thu Jan 01 00:00:00 1970 +0000
2890 # Node ID c41d7353114ccb07a50a822ad5ddf47051c88ec2
2891 # Parent 4d6f44f466c96d89f2e7e865a70ff41d8b6eee37
2892 Added tag zero, zero.foo for changeset 8580ff50825a
2893
2894 diff -r 4d6f44f466c9 -r c41d7353114c .hgtags
2895 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2896 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
2897 @@ -0,0 +1,2 @@
2898 +8580ff50825a50c8f716709acdf8de0deddcd6ab zero
2899 +8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
2900
2901 displaying [PATCH 6 of 6] d ...
2902 MIME-Version: 1.0
2903 Content-Type: text/plain; charset="us-ascii"
2904 Content-Transfer-Encoding: 7bit
2905 Subject: [PATCH 6 of 6] d
2906 X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2907 X-Mercurial-Series-Index: 6
2908 X-Mercurial-Series-Total: 6
2909 Message-Id: <2f9fa9b998c5fe3ac2bd.315532866@test-hostname>
2910 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname>
2911 In-Reply-To: <patchbomb.315532860@test-hostname>
2912 References: <patchbomb.315532860@test-hostname>
2913 User-Agent: Mercurial-patchbomb/* (glob)
2914 Date: Tue, 01 Jan 1980 00:01:06 +0000
2915 From: test
2916 To: foo
2917
2918 # HG changeset patch
2919 # User test
2920 # Date 4 0
2921 # Thu Jan 01 00:00:04 1970 +0000
2922 # Branch test
2923 # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2924 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2925 d
2926
2927 diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d
2928 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2929 +++ b/d Thu Jan 01 00:00:04 1970 +0000
2930 @@ -0,0 +1,1 @@
2931 +d
2932
2933
2934 Don't prompt for a CC header.
2935
2936 $ echo "[email]" >> $HGRCPATH
2937 $ echo "cc=" >> $HGRCPATH
2938
2939 dest#branch URIs:
2940 $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t#test
2941 comparing with ../t#test
2942 From [test]: test
2943 this patch series consists of 1 patches.
2944
2945
2946 displaying [PATCH] test ...
2947 MIME-Version: 1.0
2948 Content-Type: text/plain; charset="us-ascii"
2949 Content-Transfer-Encoding: 7bit
2950 Subject: [PATCH] test
2951 X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2952 X-Mercurial-Series-Index: 1
2953 X-Mercurial-Series-Total: 1
2954 Message-Id: <2f9fa9b998c5fe3ac2bd.315532860@test-hostname>
2955 X-Mercurial-Series-Id: <2f9fa9b998c5fe3ac2bd.315532860@test-hostname>
2956 User-Agent: Mercurial-patchbomb/* (glob)
2957 Date: Tue, 01 Jan 1980 00:01:00 +0000
2958 From: test
2959 To: foo
2960
2961 # HG changeset patch
2962 # User test
2963 # Date 4 0
2964 # Thu Jan 01 00:00:04 1970 +0000
2965 # Branch test
2966 # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2967 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2968 d
2969
2970 diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d
2971 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2972 +++ b/d Thu Jan 01 00:00:04 1970 +0000
2973 @@ -0,0 +1,1 @@
2974 +d
2975
2976 #if no-windows
2977
2978 Set up a fake sendmail program
2979
2980 $ cat > pretendmail.sh << 'EOF'
2981 > #!/bin/sh
2982 > echo "$@"
2983 > cat
2984 > EOF
2985 $ chmod +x pretendmail.sh
2986
2987 $ echo '[email]' >> $HGRCPATH
2988 $ echo "method=`pwd`/pretendmail.sh" >> $HGRCPATH
2989
2990 Test introduction configuration
2991 =================================
2992
2993 $ echo '[patchbomb]' >> $HGRCPATH
2994
2995 "auto" setting
2996 ----------------
2997
2998 $ echo 'intro=auto' >> $HGRCPATH
2999
3000 single rev
3001
3002 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | grep "Write the introductory message for the patch series."
3003 [1]
3004
3005 single rev + flag
3006
3007 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' --intro | grep "Write the introductory message for the patch series."
3008 Write the introductory message for the patch series.
3009
3010
3011 Multi rev
3012
3013 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '9::' | grep "Write the introductory message for the patch series."
3014 Write the introductory message for the patch series.
3015
3016 "never" setting
3017 -----------------
3018
3019 $ echo 'intro=never' >> $HGRCPATH
3020
3021 single rev
3022
3023 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | grep "Write the introductory message for the patch series."
3024 [1]
3025
3026 single rev + flag
3027
3028 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' --intro | grep "Write the introductory message for the patch series."
3029 Write the introductory message for the patch series.
3030
3031
3032 Multi rev
3033
3034 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '9::' | grep "Write the introductory message for the patch series."
3035 [1]
3036
3037 Multi rev + flag
3038
3039 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '9::' --intro | grep "Write the introductory message for the patch series."
3040 Write the introductory message for the patch series.
3041
3042 "always" setting
3043 -----------------
3044
3045 $ echo 'intro=always' >> $HGRCPATH
3046
3047 single rev
3048
3049 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | grep "Write the introductory message for the patch series."
3050 Write the introductory message for the patch series.
3051
3052 single rev + flag
3053
3054 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' --intro | grep "Write the introductory message for the patch series."
3055 Write the introductory message for the patch series.
3056
3057
3058 Multi rev
3059
3060 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '9::' | grep "Write the introductory message for the patch series."
3061 Write the introductory message for the patch series.
3062
3063 Multi rev + flag
3064
3065 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '9::' --intro | grep "Write the introductory message for the patch series."
3066 Write the introductory message for the patch series.
3067
3068 bad value setting
3069 -----------------
3070
3071 $ echo 'intro=oliviawearaclownnose' >> $HGRCPATH
3072
3073 single rev
3074
3075 $ hg email --date '1980-1-1 0:1' -v -t foo -s test -r '10'
3076 From [test]: test
3077 this patch series consists of 1 patches.
3078
3079 warning: invalid patchbomb.intro value "oliviawearaclownnose"
3080 (should be one of always, never, auto)
3081 -f test foo
3082 MIME-Version: 1.0
3083 Content-Type: text/plain; charset="us-ascii"
3084 Content-Transfer-Encoding: 7bit
3085 Subject: [PATCH] test
3086 X-Mercurial-Node: 3b6f1ec9dde933a40a115a7990f8b320477231af
3087 X-Mercurial-Series-Index: 1
3088 X-Mercurial-Series-Total: 1
3089 Message-Id: <3b6f1ec9dde933a40a11*> (glob)
3090 X-Mercurial-Series-Id: <3b6f1ec9dde933a40a11.*> (glob)
3091 User-Agent: Mercurial-patchbomb/* (glob)
3092 Date: Tue, 01 Jan 1980 00:01:00 +0000
3093 From: test
3094 To: foo
3095
3096 # HG changeset patch
3097 # User test
3098 # Date 5 0
3099 # Thu Jan 01 00:00:05 1970 +0000
3100 # Branch test
3101 # Node ID 3b6f1ec9dde933a40a115a7990f8b320477231af
3102 # Parent 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
3103 dd
3104
3105 diff -r 2f9fa9b998c5 -r 3b6f1ec9dde9 d
3106 --- a/d Thu Jan 01 00:00:04 1970 +0000
3107 +++ b/d Thu Jan 01 00:00:05 1970 +0000
3108 @@ -1,1 +1,2 @@
3109 d
3110 +d
3111
3112 sending [PATCH] test ...
3113 sending mail: $TESTTMP/t2/pretendmail.sh -f test foo
3114
3115 Shell characters in addresses
3116
3117 $ hg email --date '1980-1-1 0:1' -v -t '~foo/[email protected]' -f 'me*@example.com' -r '10'
3118 this patch series consists of 1 patches.
3119
3120 warning: invalid patchbomb.intro value "oliviawearaclownnose"
3121 (should be one of always, never, auto)
3122 -f me*@example.com ~foo/[email protected]
3123 MIME-Version: 1.0
3124 Content-Type: text/plain; charset="us-ascii"
3125 Content-Transfer-Encoding: 7bit
3126 Subject: [PATCH] dd
3127 X-Mercurial-Node: 3b6f1ec9dde933a40a115a7990f8b320477231af
3128 X-Mercurial-Series-Index: 1
3129 X-Mercurial-Series-Total: 1
3130 Message-Id: <3b6f1ec9dde933a40a11.315532860@test-hostname>
3131 X-Mercurial-Series-Id: <3b6f1ec9dde933a40a11.315532860@test-hostname>
3132 User-Agent: Mercurial-patchbomb/* (glob)
3133 Date: Tue, 01 Jan 1980 00:01:00 +0000
3134 From: me*@example.com
3135 To: ~foo/[email protected]
3136
3137 # HG changeset patch
3138 # User test
3139 # Date 5 0
3140 # Thu Jan 01 00:00:05 1970 +0000
3141 # Branch test
3142 # Node ID 3b6f1ec9dde933a40a115a7990f8b320477231af
3143 # Parent 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
3144 dd
3145
3146 diff -r 2f9fa9b998c5 -r 3b6f1ec9dde9 d
3147 --- a/d Thu Jan 01 00:00:04 1970 +0000
3148 +++ b/d Thu Jan 01 00:00:05 1970 +0000
3149 @@ -1,1 +1,2 @@
3150 d
3151 +d
3152
3153 sending [PATCH] dd ...
3154 sending mail: $TESTTMP/t2/pretendmail.sh -f 'me*@example.com' '~foo/[email protected]'
3155
3156 Test pull url header
3157 =================================
3158
3159 basic version
3160
3161 $ echo 'intro=auto' >> $HGRCPATH
3162 $ echo "publicurl=$TESTTMP/t2" >> $HGRCPATH
3163 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | grep '^#'
3164 abort: public url $TESTTMP/t2 is missing 3b6f1ec9dde9
3165 (use 'hg push $TESTTMP/t2 -r 3b6f1ec9dde9')
3166 [1]
3167
3168 public missing
3169
3170 $ echo 'publicurl=$TESTTMP/missing' >> $HGRCPATH
3171 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10'
3172 unable to access public repo: $TESTTMP/missing
3173 abort: repository $TESTTMP/missing not found
3174 [255]
3175
3176 node missing at public
3177
3178 $ hg clone -r '9' . ../t3
3179 adding changesets
3180 adding manifests
3181 adding file changes
3182 added 3 changesets with 3 changes to 3 files
3183 new changesets 8580ff50825a:2f9fa9b998c5
3184 updating to branch test
3185 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
3186 $ echo 'publicurl=$TESTTMP/t3' >> $HGRCPATH
3187 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10'
3188 abort: public url $TESTTMP/t3 is missing 3b6f1ec9dde9
3189 (use 'hg push $TESTTMP/t3 -r 3b6f1ec9dde9')
3190 [255]
3191
3192 multiple heads are missing at public
3193
3194 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '2+10'
3195 abort: public "$TESTTMP/t3" is missing ff2c9fa2018b and 1 others
3196 (use 'hg push $TESTTMP/t3 -r ff2c9fa2018b -r 3b6f1ec9dde9')
3197 [255]
3198
3199 #endif