Mercurial > hg
annotate tests/test-patchbomb @ 11525:f4eddec324b7
Merge with stable
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Fri, 09 Jul 2010 14:21:45 +0200 |
parents | f66ca4431eb9 |
children |
rev | line source |
---|---|
4420
b0656b33cc02
add test for patchbomb extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
1 #!/bin/sh |
b0656b33cc02
add test for patchbomb extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
2 |
5753
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
3 fixheaders() |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
4 { |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
5 sed -e 's/\(Message-Id:.*@\).*/\1/' \ |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
6 -e 's/\(In-Reply-To:.*@\).*/\1/' \ |
7413
0b6428da1f22
email: add References field in the header
Benoit Allard <benoit@aeteurope.nl>
parents:
7360
diff
changeset
|
7 -e 's/\(References:.*@\).*/\1/' \ |
8160
094e0d982c8a
patchbomb: add user agent header to mails
Henrik Stuart <hg@hstuart.dk>
parents:
8025
diff
changeset
|
8 -e 's/\(User-Agent:.*\)\/.*/\1/' \ |
5753
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
9 -e 's/===.*/===/' |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
10 } |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
11 |
4420
b0656b33cc02
add test for patchbomb extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
12 echo "[extensions]" >> $HGRCPATH |
b0656b33cc02
add test for patchbomb extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
13 echo "patchbomb=" >> $HGRCPATH |
b0656b33cc02
add test for patchbomb extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
14 |
5753
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
15 hg init t |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
16 cd t |
4420
b0656b33cc02
add test for patchbomb extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
17 echo a > a |
b0656b33cc02
add test for patchbomb extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
18 hg commit -Ama -d '1 0' |
b0656b33cc02
add test for patchbomb extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
19 |
8351 | 20 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip | \ |
5753
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
21 fixheaders |
4420
b0656b33cc02
add test for patchbomb extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
22 |
b0656b33cc02
add test for patchbomb extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
23 echo b > b |
b0656b33cc02
add test for patchbomb extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
24 hg commit -Amb -d '2 0' |
b0656b33cc02
add test for patchbomb extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
25 |
8351 | 26 hg email --date '1970-1-1 0:2' -n -f quux -t foo -c bar -s test -r 0:tip | \ |
5753
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
27 fixheaders |
4565
1cf908c00479
Don't validate email config if we're not sending email.
Bryan O'Sullivan <bos@serpentine.com>
parents:
4420
diff
changeset
|
28 |
4567
8b87bd4fb7ce
Correct tests/test-patchbomb* files:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
4566
diff
changeset
|
29 hg email -m test.mbox -f quux -t foo -c bar -s test 0:tip |
5753
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
30 |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
31 cd .. |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
32 |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
33 hg clone -q t t2 |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
34 cd t2 |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
35 echo c > c |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
36 hg commit -Amc -d '3 0' |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
37 |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
38 cat > description <<EOF |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
39 a multiline |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
40 |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
41 description |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
42 EOF |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
43 |
7357
6eb38b2dca6c
patchbomb: make test markers more syntax highlighter friendly
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7265
diff
changeset
|
44 echo "% test bundle and description" |
5753
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
45 hg email --date '1970-1-1 0:3' -n -f quux -t foo \ |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
46 -c bar -s test -r tip -b --desc description | \ |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
47 fixheaders |
ea1016b32e94
patchbomb: make --bundle respect --desc
Patrick Mezard <pmezard@gmail.com>
parents:
4597
diff
changeset
|
48 |
7357
6eb38b2dca6c
patchbomb: make test markers more syntax highlighter friendly
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7265
diff
changeset
|
49 echo "% utf-8 patch" |
7265
0cf3442ee844
test-patchbomb: write in binary mode, force non-interactive mode (win32)
Patrick Mezard <pmezard@gmail.com>
parents:
7193
diff
changeset
|
50 python -c 'fp = open("utf", "wb"); fp.write("h\xC3\xB6mma!\n"); fp.close();' |
7193
12fc42c78598
mail: test patch mime encoding for patchbomb
Christian Ebert <blacktrash@gmx.net>
parents:
5753
diff
changeset
|
51 hg commit -A -d '4 0' -m 'charset=utf-8; content-transfer-encoding: base64' |
12fc42c78598
mail: test patch mime encoding for patchbomb
Christian Ebert <blacktrash@gmx.net>
parents:
5753
diff
changeset
|
52 |
7357
6eb38b2dca6c
patchbomb: make test markers more syntax highlighter friendly
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7265
diff
changeset
|
53 echo "% no mime encoding for email --test" |
8351 | 54 hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n | \ |
55 fixheaders > mailtest | |
7357
6eb38b2dca6c
patchbomb: make test markers more syntax highlighter friendly
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7265
diff
changeset
|
56 echo "% md5sum of 8-bit output" |
7193
12fc42c78598
mail: test patch mime encoding for patchbomb
Christian Ebert <blacktrash@gmx.net>
parents:
5753
diff
changeset
|
57 $TESTDIR/md5sum.py mailtest |
12fc42c78598
mail: test patch mime encoding for patchbomb
Christian Ebert <blacktrash@gmx.net>
parents:
5753
diff
changeset
|
58 rm mailtest |
12fc42c78598
mail: test patch mime encoding for patchbomb
Christian Ebert <blacktrash@gmx.net>
parents:
5753
diff
changeset
|
59 |
8332
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
60 echo "% mime encoded mbox (base64)" |
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
61 hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox |
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
62 cat mbox | fixheaders |
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
63 rm mbox |
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
64 |
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
65 echo "% mime encoded mbox (quoted-printable)" |
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
66 python -c 'fp = open("qp", "wb"); fp.write("%s\nfoo\n\nbar\n" % \ |
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
67 ("x" * 1024)); fp.close();' |
8351 | 68 hg commit -A -d '4 0' -m \ |
69 'charset=utf-8; content-transfer-encoding: quoted-printable' | |
8332
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
70 |
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
71 echo "% no mime encoding for email --test" |
8351 | 72 hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n | \ |
73 fixheaders > mailtest | |
8332
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
74 echo "% md5sum of qp output" |
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
75 $TESTDIR/md5sum.py mailtest |
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
76 rm mailtest |
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
77 |
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
78 echo "% mime encoded mbox (quoted-printable)" |
7265
0cf3442ee844
test-patchbomb: write in binary mode, force non-interactive mode (win32)
Patrick Mezard <pmezard@gmail.com>
parents:
7193
diff
changeset
|
79 hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox |
7193
12fc42c78598
mail: test patch mime encoding for patchbomb
Christian Ebert <blacktrash@gmx.net>
parents:
5753
diff
changeset
|
80 cat mbox | fixheaders |
12fc42c78598
mail: test patch mime encoding for patchbomb
Christian Ebert <blacktrash@gmx.net>
parents:
5753
diff
changeset
|
81 rm mbox |
12fc42c78598
mail: test patch mime encoding for patchbomb
Christian Ebert <blacktrash@gmx.net>
parents:
5753
diff
changeset
|
82 |
7357
6eb38b2dca6c
patchbomb: make test markers more syntax highlighter friendly
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7265
diff
changeset
|
83 echo "% iso-8859-1 patch" |
7265
0cf3442ee844
test-patchbomb: write in binary mode, force non-interactive mode (win32)
Patrick Mezard <pmezard@gmail.com>
parents:
7193
diff
changeset
|
84 python -c 'fp = open("isolatin", "wb"); fp.write("h\xF6mma!\n"); fp.close();' |
7193
12fc42c78598
mail: test patch mime encoding for patchbomb
Christian Ebert <blacktrash@gmx.net>
parents:
5753
diff
changeset
|
85 hg commit -A -d '5 0' -m 'charset=us-ascii; content-transfer-encoding: 8bit' |
12fc42c78598
mail: test patch mime encoding for patchbomb
Christian Ebert <blacktrash@gmx.net>
parents:
5753
diff
changeset
|
86 |
7357
6eb38b2dca6c
patchbomb: make test markers more syntax highlighter friendly
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7265
diff
changeset
|
87 echo "% fake ascii mbox" |
7265
0cf3442ee844
test-patchbomb: write in binary mode, force non-interactive mode (win32)
Patrick Mezard <pmezard@gmail.com>
parents:
7193
diff
changeset
|
88 hg email --date '1970-1-1 0:5' -f quux -t foo -c bar -r tip -m mbox |
7193
12fc42c78598
mail: test patch mime encoding for patchbomb
Christian Ebert <blacktrash@gmx.net>
parents:
5753
diff
changeset
|
89 fixheaders < mbox > mboxfix |
7357
6eb38b2dca6c
patchbomb: make test markers more syntax highlighter friendly
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7265
diff
changeset
|
90 echo "% md5sum of 8-bit output" |
7193
12fc42c78598
mail: test patch mime encoding for patchbomb
Christian Ebert <blacktrash@gmx.net>
parents:
5753
diff
changeset
|
91 $TESTDIR/md5sum.py mboxfix |
7358
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
92 |
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
93 echo "% test diffstat for single patch" |
8351 | 94 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y -r 2 | \ |
7358
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
95 fixheaders |
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
96 |
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
97 echo "% test diffstat for multiple patches" |
8351 | 98 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y \ |
99 -r 0:1 | fixheaders | |
7358
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
100 |
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
101 echo "% test inline for single patch" |
8351 | 102 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 2 | \ |
7358
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
103 fixheaders |
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
104 |
8332
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
105 echo "% test inline for single patch (quoted-printable)" |
8351 | 106 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 4 | \ |
8332
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
107 fixheaders |
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
108 |
7358
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
109 echo "% test inline for multiple patches" |
8332
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
110 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \ |
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
111 -r 0:1 -r 4 | fixheaders |
7358
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
112 |
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
113 echo "% test attach for single patch" |
8351 | 114 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 2 | \ |
7358
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
115 fixheaders |
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
116 |
8332
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
117 echo "% test attach for single patch (quoted-printable)" |
8351 | 118 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 4 | \ |
8332
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
119 fixheaders |
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
120 |
7358
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
121 echo "% test attach for multiple patches" |
8332
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
122 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a \ |
3e544c074459
patchbomb: quoted-printable encode overly long lines
Rocco Rutte <pdmef@gmx.net>
parents:
8160
diff
changeset
|
123 -r 0:1 -r 4 | fixheaders |
7358
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
124 |
7360
42f1b8cb9a60
patchbomb: add option to send intro email for a single patch (issue1120)
Chris Winter <elwintro@gmail.com>
parents:
7358
diff
changeset
|
125 echo "% test intro for single patch" |
8351 | 126 hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \ |
127 -r 2 | fixheaders | |
7360
42f1b8cb9a60
patchbomb: add option to send intro email for a single patch (issue1120)
Chris Winter <elwintro@gmail.com>
parents:
7358
diff
changeset
|
128 |
10734
7a0502a6f9a1
patchbomb: --desc implies --intro
Cédric Duval <cedricduval@free.fr>
parents:
10257
diff
changeset
|
129 echo "% test --desc without --intro for a single patch" |
7a0502a6f9a1
patchbomb: --desc implies --intro
Cédric Duval <cedricduval@free.fr>
parents:
10257
diff
changeset
|
130 echo foo > intro.text |
7a0502a6f9a1
patchbomb: --desc implies --intro
Cédric Duval <cedricduval@free.fr>
parents:
10257
diff
changeset
|
131 hg email --date '1970-1-1 0:1' -n --desc intro.text -f quux -t foo -c bar \ |
7a0502a6f9a1
patchbomb: --desc implies --intro
Cédric Duval <cedricduval@free.fr>
parents:
10257
diff
changeset
|
132 -s test -r 2 | fixheaders |
7a0502a6f9a1
patchbomb: --desc implies --intro
Cédric Duval <cedricduval@free.fr>
parents:
10257
diff
changeset
|
133 |
7360
42f1b8cb9a60
patchbomb: add option to send intro email for a single patch (issue1120)
Chris Winter <elwintro@gmail.com>
parents:
7358
diff
changeset
|
134 echo "% test intro for multiple patches" |
8351 | 135 hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \ |
136 -r 0:1 | fixheaders | |
7360
42f1b8cb9a60
patchbomb: add option to send intro email for a single patch (issue1120)
Chris Winter <elwintro@gmail.com>
parents:
7358
diff
changeset
|
137 |
11150
f66ca4431eb9
patchbomb: Reply-To support
Cédric Duval <cedricduval@free.fr>
parents:
10734
diff
changeset
|
138 echo "% test reply-to via config" |
f66ca4431eb9
patchbomb: Reply-To support
Cédric Duval <cedricduval@free.fr>
parents:
10734
diff
changeset
|
139 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \ |
f66ca4431eb9
patchbomb: Reply-To support
Cédric Duval <cedricduval@free.fr>
parents:
10734
diff
changeset
|
140 --config patchbomb.reply-to='baz@example.com' | fixheaders |
f66ca4431eb9
patchbomb: Reply-To support
Cédric Duval <cedricduval@free.fr>
parents:
10734
diff
changeset
|
141 |
f66ca4431eb9
patchbomb: Reply-To support
Cédric Duval <cedricduval@free.fr>
parents:
10734
diff
changeset
|
142 echo "% test reply-to via command line" |
f66ca4431eb9
patchbomb: Reply-To support
Cédric Duval <cedricduval@free.fr>
parents:
10734
diff
changeset
|
143 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \ |
f66ca4431eb9
patchbomb: Reply-To support
Cédric Duval <cedricduval@free.fr>
parents:
10734
diff
changeset
|
144 --reply-to baz --reply-to fred | fixheaders |
f66ca4431eb9
patchbomb: Reply-To support
Cédric Duval <cedricduval@free.fr>
parents:
10734
diff
changeset
|
145 |
7358
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
146 echo "% tagging csets" |
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
147 hg tag -r0 zero zero.foo |
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
148 hg tag -r1 one one.patch |
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
149 hg tag -r2 two two.diff |
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
150 |
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
151 echo "% test inline for single named patch" |
8351 | 152 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 2 | \ |
7358
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
153 fixheaders |
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
154 |
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
155 echo "% test inline for multiple named/unnamed patches" |
8351 | 156 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 0:1 | \ |
7358
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
157 fixheaders |
3c2ed7c2dcb4
patchbomb: add tests for diffstat, inline, and attach options
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7357
diff
changeset
|
158 |
8025
1280934dd2dd
patchbomb: Support initial in-reply-to header
Henrik Stuart <henrik.stuart at edlund.dk>
parents:
7547
diff
changeset
|
159 echo "% test inreplyto" |
8351 | 160 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \ |
161 -r tip | fixheaders | |
8514
252232621165
patchbomb: with --in-reply-to, still thread message under first in series
Cédric Duval <cedricduval@free.fr>
parents:
8351
diff
changeset
|
162 |
252232621165
patchbomb: with --in-reply-to, still thread message under first in series
Cédric Duval <cedricduval@free.fr>
parents:
8351
diff
changeset
|
163 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \ |
252232621165
patchbomb: with --in-reply-to, still thread message under first in series
Cédric Duval <cedricduval@free.fr>
parents:
8351
diff
changeset
|
164 -r 0:1 | fixheaders |
9346
bb3f8f692bc6
patchbomb: add --flag to put flags in subject prefixes
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8514
diff
changeset
|
165 |
9612
d051db8e9e44
fix patchbomb prompt when sending series of patches
Alexander Solovyov <piranha@piranha.org.ua>
parents:
9346
diff
changeset
|
166 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \ |
d051db8e9e44
fix patchbomb prompt when sending series of patches
Alexander Solovyov <piranha@piranha.org.ua>
parents:
9346
diff
changeset
|
167 -s test -r 0:1 | fixheaders |
d051db8e9e44
fix patchbomb prompt when sending series of patches
Alexander Solovyov <piranha@piranha.org.ua>
parents:
9346
diff
changeset
|
168 |
9346
bb3f8f692bc6
patchbomb: add --flag to put flags in subject prefixes
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8514
diff
changeset
|
169 echo "% test single flag for single patch" |
bb3f8f692bc6
patchbomb: add --flag to put flags in subject prefixes
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8514
diff
changeset
|
170 hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \ |
bb3f8f692bc6
patchbomb: add --flag to put flags in subject prefixes
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8514
diff
changeset
|
171 -r 2 | fixheaders |
bb3f8f692bc6
patchbomb: add --flag to put flags in subject prefixes
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8514
diff
changeset
|
172 |
bb3f8f692bc6
patchbomb: add --flag to put flags in subject prefixes
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8514
diff
changeset
|
173 echo "% test single flag for multiple patches" |
bb3f8f692bc6
patchbomb: add --flag to put flags in subject prefixes
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8514
diff
changeset
|
174 hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \ |
bb3f8f692bc6
patchbomb: add --flag to put flags in subject prefixes
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8514
diff
changeset
|
175 -r 0:1 | fixheaders |
bb3f8f692bc6
patchbomb: add --flag to put flags in subject prefixes
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8514
diff
changeset
|
176 |
bb3f8f692bc6
patchbomb: add --flag to put flags in subject prefixes
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8514
diff
changeset
|
177 echo "% test mutiple flags for single patch" |
bb3f8f692bc6
patchbomb: add --flag to put flags in subject prefixes
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8514
diff
changeset
|
178 hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \ |
bb3f8f692bc6
patchbomb: add --flag to put flags in subject prefixes
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8514
diff
changeset
|
179 -c bar -s test -r 2 | fixheaders |
bb3f8f692bc6
patchbomb: add --flag to put flags in subject prefixes
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8514
diff
changeset
|
180 |
bb3f8f692bc6
patchbomb: add --flag to put flags in subject prefixes
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8514
diff
changeset
|
181 echo "% test multiple flags for multiple patches" |
bb3f8f692bc6
patchbomb: add --flag to put flags in subject prefixes
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8514
diff
changeset
|
182 hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \ |
bb3f8f692bc6
patchbomb: add --flag to put flags in subject prefixes
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8514
diff
changeset
|
183 -c bar -s test -r 0:1 | fixheaders |
9715
f0e99a2eac76
patchbomb: fix handling of email addresses with Unicode domains (IDNA)
Marti Raudsepp <marti@juffo.org>
parents:
9612
diff
changeset
|
184 |
9947
4600e6222efb
patchbomb: fix parsing of multiple addresses, allow multiple addrs in --to/cc/bcc
Marti Raudsepp <marti@juffo.org>
parents:
9913
diff
changeset
|
185 echo "% test multi-address parsing" |
4600e6222efb
patchbomb: fix parsing of multiple addresses, allow multiple addrs in --to/cc/bcc
Marti Raudsepp <marti@juffo.org>
parents:
9913
diff
changeset
|
186 hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t 'spam<spam><eggs>' \ |
4600e6222efb
patchbomb: fix parsing of multiple addresses, allow multiple addrs in --to/cc/bcc
Marti Raudsepp <marti@juffo.org>
parents:
9913
diff
changeset
|
187 -t toast -c 'foo,bar@example.com' -c '"A, B <>" <a@example.com>' -s test -r 0 \ |
4600e6222efb
patchbomb: fix parsing of multiple addresses, allow multiple addrs in --to/cc/bcc
Marti Raudsepp <marti@juffo.org>
parents:
9913
diff
changeset
|
188 --config email.bcc='"Quux, A." <quux>' |
4600e6222efb
patchbomb: fix parsing of multiple addresses, allow multiple addrs in --to/cc/bcc
Marti Raudsepp <marti@juffo.org>
parents:
9913
diff
changeset
|
189 cat tmp.mbox | fixheaders |
4600e6222efb
patchbomb: fix parsing of multiple addresses, allow multiple addrs in --to/cc/bcc
Marti Raudsepp <marti@juffo.org>
parents:
9913
diff
changeset
|
190 |
9715
f0e99a2eac76
patchbomb: fix handling of email addresses with Unicode domains (IDNA)
Marti Raudsepp <marti@juffo.org>
parents:
9612
diff
changeset
|
191 echo "% test multi-byte domain parsing" |
10253
b190a8125b43
Work around AIX shell builtin printf not handling \NNN.
Jim Hague <jim.hague@acm.org>
parents:
10022
diff
changeset
|
192 UUML=`python -c 'import sys; sys.stdout.write("\374")'` |
9800
b39f98be96de
fix test-patchbomb on solaris
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
9730
diff
changeset
|
193 HGENCODING=iso-8859-1 |
b39f98be96de
fix test-patchbomb on solaris
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
9730
diff
changeset
|
194 export HGENCODING |
9715
f0e99a2eac76
patchbomb: fix handling of email addresses with Unicode domains (IDNA)
Marti Raudsepp <marti@juffo.org>
parents:
9612
diff
changeset
|
195 hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t "bar@${UUML}nicode.com" \ |
f0e99a2eac76
patchbomb: fix handling of email addresses with Unicode domains (IDNA)
Marti Raudsepp <marti@juffo.org>
parents:
9612
diff
changeset
|
196 -s test -r 0 |
f0e99a2eac76
patchbomb: fix handling of email addresses with Unicode domains (IDNA)
Marti Raudsepp <marti@juffo.org>
parents:
9612
diff
changeset
|
197 cat tmp.mbox | fixheaders |
10018
4ddfad7ebd98
patchbomb: handle repository#rev URLs correctly
Sune Foldager <cryo@cyanite.org>
parents:
9913
diff
changeset
|
198 |
10022
585f51f8b5f0
patchbomb: fix bug introduced in 4ddfad7ebd98 and add test
Sune Foldager <cryo@cyanite.org>
parents:
10018
diff
changeset
|
199 echo "% test outgoing" |
10018
4ddfad7ebd98
patchbomb: handle repository#rev URLs correctly
Sune Foldager <cryo@cyanite.org>
parents:
9913
diff
changeset
|
200 hg up 1 |
4ddfad7ebd98
patchbomb: handle repository#rev URLs correctly
Sune Foldager <cryo@cyanite.org>
parents:
9913
diff
changeset
|
201 hg branch test |
4ddfad7ebd98
patchbomb: handle repository#rev URLs correctly
Sune Foldager <cryo@cyanite.org>
parents:
9913
diff
changeset
|
202 echo d > d |
4ddfad7ebd98
patchbomb: handle repository#rev URLs correctly
Sune Foldager <cryo@cyanite.org>
parents:
9913
diff
changeset
|
203 hg add d |
4ddfad7ebd98
patchbomb: handle repository#rev URLs correctly
Sune Foldager <cryo@cyanite.org>
parents:
9913
diff
changeset
|
204 hg ci -md -d '4 0' |
10022
585f51f8b5f0
patchbomb: fix bug introduced in 4ddfad7ebd98 and add test
Sune Foldager <cryo@cyanite.org>
parents:
10018
diff
changeset
|
205 hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t | fixheaders |
585f51f8b5f0
patchbomb: fix bug introduced in 4ddfad7ebd98 and add test
Sune Foldager <cryo@cyanite.org>
parents:
10018
diff
changeset
|
206 |
585f51f8b5f0
patchbomb: fix bug introduced in 4ddfad7ebd98 and add test
Sune Foldager <cryo@cyanite.org>
parents:
10018
diff
changeset
|
207 echo "% dest#branch URIs" |
10018
4ddfad7ebd98
patchbomb: handle repository#rev URLs correctly
Sune Foldager <cryo@cyanite.org>
parents:
9913
diff
changeset
|
208 hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t#test | fixheaders |