##// END OF EJS Templates
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht -
r7358:3c2ed7c2 default
parent child Browse files
Show More
@@ -68,3 +68,41 b" hg email --date '1970-1-1 0:5' -f quux -"
68 fixheaders < mbox > mboxfix
68 fixheaders < mbox > mboxfix
69 echo "% md5sum of 8-bit output"
69 echo "% md5sum of 8-bit output"
70 $TESTDIR/md5sum.py mboxfix
70 $TESTDIR/md5sum.py mboxfix
71
72 echo "% test diffstat for single patch"
73 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y 2 | \
74 fixheaders
75
76 echo "% test diffstat for multiple patches"
77 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y 0:1 | \
78 fixheaders
79
80 echo "% test inline for single patch"
81 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i 2 | \
82 fixheaders
83
84 echo "% test inline for multiple patches"
85 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i 0:1 | \
86 fixheaders
87
88 echo "% test attach for single patch"
89 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a 2 | \
90 fixheaders
91
92 echo "% test attach for multiple patches"
93 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a 0:1 | \
94 fixheaders
95
96 echo "% tagging csets"
97 hg tag -r0 zero zero.foo
98 hg tag -r1 one one.patch
99 hg tag -r2 two two.diff
100
101 echo "% test inline for single named patch"
102 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i 2 | \
103 fixheaders
104
105 echo "% test inline for multiple named/unnamed patches"
106 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i 0:1 | \
107 fixheaders
108
This diff has been collapsed as it changes many lines, (509 lines changed) Show them Hide them
@@ -189,3 +189,512 b' This patch series consists of 1 patches.'
189 Writing [PATCH] charset=us-ascii; content-transfer-encoding: 8bit ...
189 Writing [PATCH] charset=us-ascii; content-transfer-encoding: 8bit ...
190 % md5sum of 8-bit output
190 % md5sum of 8-bit output
191 90fae277a4a85255e8262174fcefb59f mboxfix
191 90fae277a4a85255e8262174fcefb59f mboxfix
192 % test diffstat for single patch
193 This patch series consists of 1 patches.
194
195 c
196
197 files patched: 1
198
199
200 Displaying [PATCH] test ...
201 Content-Type: text/plain; charset="us-ascii"
202 MIME-Version: 1.0
203 Content-Transfer-Encoding: 7bit
204 Subject: [PATCH] test
205 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
206 Message-Id: <ff2c9fa2018b15fa74b3.60@
207 Date: Thu, 01 Jan 1970 00:01:00 +0000
208 From: quux
209 To: foo
210 Cc: bar
211
212 files patched: 1
213
214
215 # HG changeset patch
216 # User test
217 # Date 3 0
218 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
219 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
220 c
221
222 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
223 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
224 +++ b/c Thu Jan 01 00:00:03 1970 +0000
225 @@ -0,0 +1,1 @@
226 +c
227
228 % test diffstat for multiple patches
229 This patch series consists of 2 patches.
230
231 a
232
233 files patched: 1
234
235 b
236
237 files patched: 1
238
239 Final summary:
240
241 files patched: 2
242
243
244 Write the introductory message for the patch series.
245
246
247 Displaying [PATCH 0 of 2] test ...
248 Content-Type: text/plain; charset="us-ascii"
249 MIME-Version: 1.0
250 Content-Transfer-Encoding: 7bit
251 Subject: [PATCH 0 of 2] test
252 Message-Id: <patchbomb.60@
253 Date: Thu, 01 Jan 1970 00:01:00 +0000
254 From: quux
255 To: foo
256 Cc: bar
257
258
259 files patched: 2
260
261 Displaying [PATCH 1 of 2] a ...
262 Content-Type: text/plain; charset="us-ascii"
263 MIME-Version: 1.0
264 Content-Transfer-Encoding: 7bit
265 Subject: [PATCH 1 of 2] a
266 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
267 Message-Id: <8580ff50825a50c8f716.61@
268 In-Reply-To: <patchbomb.60@
269 Date: Thu, 01 Jan 1970 00:01:01 +0000
270 From: quux
271 To: foo
272 Cc: bar
273
274 files patched: 1
275
276
277 # HG changeset patch
278 # User test
279 # Date 1 0
280 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
281 # Parent 0000000000000000000000000000000000000000
282 a
283
284 diff -r 000000000000 -r 8580ff50825a a
285 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
286 +++ b/a Thu Jan 01 00:00:01 1970 +0000
287 @@ -0,0 +1,1 @@
288 +a
289
290 Displaying [PATCH 2 of 2] b ...
291 Content-Type: text/plain; charset="us-ascii"
292 MIME-Version: 1.0
293 Content-Transfer-Encoding: 7bit
294 Subject: [PATCH 2 of 2] b
295 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
296 Message-Id: <97d72e5f12c7e84f8506.62@
297 In-Reply-To: <patchbomb.60@
298 Date: Thu, 01 Jan 1970 00:01:02 +0000
299 From: quux
300 To: foo
301 Cc: bar
302
303 files patched: 1
304
305
306 # HG changeset patch
307 # User test
308 # Date 2 0
309 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
310 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
311 b
312
313 diff -r 8580ff50825a -r 97d72e5f12c7 b
314 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
315 +++ b/b Thu Jan 01 00:00:02 1970 +0000
316 @@ -0,0 +1,1 @@
317 +b
318
319 % test inline for single patch
320 This patch series consists of 1 patches.
321
322
323 Displaying [PATCH] test ...
324 Content-Type: multipart/mixed; boundary="===
325 MIME-Version: 1.0
326 Subject: [PATCH] test
327 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
328 Message-Id: <ff2c9fa2018b15fa74b3.60@
329 Date: Thu, 01 Jan 1970 00:01:00 +0000
330 From: quux
331 To: foo
332 Cc: bar
333
334 --===
335 Content-Type: text/x-patch; charset="us-ascii"
336 MIME-Version: 1.0
337 Content-Transfer-Encoding: 7bit
338 Content-Disposition: inline; filename=t2.patch
339
340 # HG changeset patch
341 # User test
342 # Date 3 0
343 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
344 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
345 c
346
347 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
348 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
349 +++ b/c Thu Jan 01 00:00:03 1970 +0000
350 @@ -0,0 +1,1 @@
351 +c
352
353 --===
354 % test inline for multiple patches
355 This patch series consists of 2 patches.
356
357
358 Write the introductory message for the patch series.
359
360
361 Displaying [PATCH 0 of 2] test ...
362 Content-Type: text/plain; charset="us-ascii"
363 MIME-Version: 1.0
364 Content-Transfer-Encoding: 7bit
365 Subject: [PATCH 0 of 2] test
366 Message-Id: <patchbomb.60@
367 Date: Thu, 01 Jan 1970 00:01:00 +0000
368 From: quux
369 To: foo
370 Cc: bar
371
372
373 Displaying [PATCH 1 of 2] a ...
374 Content-Type: multipart/mixed; boundary="===
375 MIME-Version: 1.0
376 Subject: [PATCH 1 of 2] a
377 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
378 Message-Id: <8580ff50825a50c8f716.61@
379 In-Reply-To: <patchbomb.60@
380 Date: Thu, 01 Jan 1970 00:01:01 +0000
381 From: quux
382 To: foo
383 Cc: bar
384
385 --===
386 Content-Type: text/x-patch; charset="us-ascii"
387 MIME-Version: 1.0
388 Content-Transfer-Encoding: 7bit
389 Content-Disposition: inline; filename=t2-2.patch
390
391 # HG changeset patch
392 # User test
393 # Date 1 0
394 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
395 # Parent 0000000000000000000000000000000000000000
396 a
397
398 diff -r 000000000000 -r 8580ff50825a a
399 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
400 +++ b/a Thu Jan 01 00:00:01 1970 +0000
401 @@ -0,0 +1,1 @@
402 +a
403
404 --===
405 Displaying [PATCH 2 of 2] b ...
406 Content-Type: multipart/mixed; boundary="===
407 MIME-Version: 1.0
408 Subject: [PATCH 2 of 2] b
409 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
410 Message-Id: <97d72e5f12c7e84f8506.62@
411 In-Reply-To: <patchbomb.60@
412 Date: Thu, 01 Jan 1970 00:01:02 +0000
413 From: quux
414 To: foo
415 Cc: bar
416
417 --===
418 Content-Type: text/x-patch; charset="us-ascii"
419 MIME-Version: 1.0
420 Content-Transfer-Encoding: 7bit
421 Content-Disposition: inline; filename=t2-2.patch
422
423 # HG changeset patch
424 # User test
425 # Date 2 0
426 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
427 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
428 b
429
430 diff -r 8580ff50825a -r 97d72e5f12c7 b
431 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
432 +++ b/b Thu Jan 01 00:00:02 1970 +0000
433 @@ -0,0 +1,1 @@
434 +b
435
436 --===
437 % test attach for single patch
438 This patch series consists of 1 patches.
439
440
441 Displaying [PATCH] test ...
442 Content-Type: multipart/mixed; boundary="===
443 MIME-Version: 1.0
444 Subject: [PATCH] test
445 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
446 Message-Id: <ff2c9fa2018b15fa74b3.60@
447 Date: Thu, 01 Jan 1970 00:01:00 +0000
448 From: quux
449 To: foo
450 Cc: bar
451
452 --===
453 Content-Type: text/plain; charset="us-ascii"
454 MIME-Version: 1.0
455 Content-Transfer-Encoding: 7bit
456
457 Patch subject is complete summary.
458
459
460
461 --===
462 Content-Type: text/x-patch; charset="us-ascii"
463 MIME-Version: 1.0
464 Content-Transfer-Encoding: 7bit
465 Content-Disposition: attachment; filename=t2.patch
466
467 # HG changeset patch
468 # User test
469 # Date 3 0
470 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
471 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
472 c
473
474 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
475 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
476 +++ b/c Thu Jan 01 00:00:03 1970 +0000
477 @@ -0,0 +1,1 @@
478 +c
479
480 --===
481 % test attach for multiple patches
482 This patch series consists of 2 patches.
483
484
485 Write the introductory message for the patch series.
486
487
488 Displaying [PATCH 0 of 2] test ...
489 Content-Type: text/plain; charset="us-ascii"
490 MIME-Version: 1.0
491 Content-Transfer-Encoding: 7bit
492 Subject: [PATCH 0 of 2] test
493 Message-Id: <patchbomb.60@
494 Date: Thu, 01 Jan 1970 00:01:00 +0000
495 From: quux
496 To: foo
497 Cc: bar
498
499
500 Displaying [PATCH 1 of 2] a ...
501 Content-Type: multipart/mixed; boundary="===
502 MIME-Version: 1.0
503 Subject: [PATCH 1 of 2] a
504 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
505 Message-Id: <8580ff50825a50c8f716.61@
506 In-Reply-To: <patchbomb.60@
507 Date: Thu, 01 Jan 1970 00:01:01 +0000
508 From: quux
509 To: foo
510 Cc: bar
511
512 --===
513 Content-Type: text/plain; charset="us-ascii"
514 MIME-Version: 1.0
515 Content-Transfer-Encoding: 7bit
516
517 Patch subject is complete summary.
518
519
520
521 --===
522 Content-Type: text/x-patch; charset="us-ascii"
523 MIME-Version: 1.0
524 Content-Transfer-Encoding: 7bit
525 Content-Disposition: attachment; filename=t2-2.patch
526
527 # HG changeset patch
528 # User test
529 # Date 1 0
530 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
531 # Parent 0000000000000000000000000000000000000000
532 a
533
534 diff -r 000000000000 -r 8580ff50825a a
535 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
536 +++ b/a Thu Jan 01 00:00:01 1970 +0000
537 @@ -0,0 +1,1 @@
538 +a
539
540 --===
541 Displaying [PATCH 2 of 2] b ...
542 Content-Type: multipart/mixed; boundary="===
543 MIME-Version: 1.0
544 Subject: [PATCH 2 of 2] b
545 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
546 Message-Id: <97d72e5f12c7e84f8506.62@
547 In-Reply-To: <patchbomb.60@
548 Date: Thu, 01 Jan 1970 00:01:02 +0000
549 From: quux
550 To: foo
551 Cc: bar
552
553 --===
554 Content-Type: text/plain; charset="us-ascii"
555 MIME-Version: 1.0
556 Content-Transfer-Encoding: 7bit
557
558 Patch subject is complete summary.
559
560
561
562 --===
563 Content-Type: text/x-patch; charset="us-ascii"
564 MIME-Version: 1.0
565 Content-Transfer-Encoding: 7bit
566 Content-Disposition: attachment; filename=t2-2.patch
567
568 # HG changeset patch
569 # User test
570 # Date 2 0
571 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
572 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
573 b
574
575 diff -r 8580ff50825a -r 97d72e5f12c7 b
576 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
577 +++ b/b Thu Jan 01 00:00:02 1970 +0000
578 @@ -0,0 +1,1 @@
579 +b
580
581 --===
582 % tagging csets
583 % test inline for single named patch
584 This patch series consists of 1 patches.
585
586
587 Displaying [PATCH] test ...
588 Content-Type: multipart/mixed; boundary="===
589 MIME-Version: 1.0
590 Subject: [PATCH] test
591 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
592 Message-Id: <ff2c9fa2018b15fa74b3.60@
593 Date: Thu, 01 Jan 1970 00:01:00 +0000
594 From: quux
595 To: foo
596 Cc: bar
597
598 --===
599 Content-Type: text/x-patch; charset="us-ascii"
600 MIME-Version: 1.0
601 Content-Transfer-Encoding: 7bit
602 Content-Disposition: inline; filename=two.diff
603
604 # HG changeset patch
605 # User test
606 # Date 3 0
607 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
608 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
609 c
610
611 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
612 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
613 +++ b/c Thu Jan 01 00:00:03 1970 +0000
614 @@ -0,0 +1,1 @@
615 +c
616
617 --===
618 % test inline for multiple named/unnamed patches
619 This patch series consists of 2 patches.
620
621
622 Write the introductory message for the patch series.
623
624
625 Displaying [PATCH 0 of 2] test ...
626 Content-Type: text/plain; charset="us-ascii"
627 MIME-Version: 1.0
628 Content-Transfer-Encoding: 7bit
629 Subject: [PATCH 0 of 2] test
630 Message-Id: <patchbomb.60@
631 Date: Thu, 01 Jan 1970 00:01:00 +0000
632 From: quux
633 To: foo
634 Cc: bar
635
636
637 Displaying [PATCH 1 of 2] a ...
638 Content-Type: multipart/mixed; boundary="===
639 MIME-Version: 1.0
640 Subject: [PATCH 1 of 2] a
641 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
642 Message-Id: <8580ff50825a50c8f716.61@
643 In-Reply-To: <patchbomb.60@
644 Date: Thu, 01 Jan 1970 00:01:01 +0000
645 From: quux
646 To: foo
647 Cc: bar
648
649 --===
650 Content-Type: text/x-patch; charset="us-ascii"
651 MIME-Version: 1.0
652 Content-Transfer-Encoding: 7bit
653 Content-Disposition: inline; filename=t2-2.patch
654
655 # HG changeset patch
656 # User test
657 # Date 1 0
658 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
659 # Parent 0000000000000000000000000000000000000000
660 a
661
662 diff -r 000000000000 -r 8580ff50825a a
663 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
664 +++ b/a Thu Jan 01 00:00:01 1970 +0000
665 @@ -0,0 +1,1 @@
666 +a
667
668 --===
669 Displaying [PATCH 2 of 2] b ...
670 Content-Type: multipart/mixed; boundary="===
671 MIME-Version: 1.0
672 Subject: [PATCH 2 of 2] b
673 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
674 Message-Id: <97d72e5f12c7e84f8506.62@
675 In-Reply-To: <patchbomb.60@
676 Date: Thu, 01 Jan 1970 00:01:02 +0000
677 From: quux
678 To: foo
679 Cc: bar
680
681 --===
682 Content-Type: text/x-patch; charset="us-ascii"
683 MIME-Version: 1.0
684 Content-Transfer-Encoding: 7bit
685 Content-Disposition: inline; filename=one.patch
686
687 # HG changeset patch
688 # User test
689 # Date 2 0
690 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
691 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
692 b
693
694 diff -r 8580ff50825a -r 97d72e5f12c7 b
695 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
696 +++ b/b Thu Jan 01 00:00:02 1970 +0000
697 @@ -0,0 +1,1 @@
698 +b
699
700 --===
General Comments 0
You need to be logged in to leave comments. Login now