##// END OF EJS Templates
tests: use (esc) for all non-ASCII test output
Mads Kiilerich -
r12942:05fffd66 stable
parent child Browse files
Show More
@@ -1,92 +1,92 b''
1 $ echo "[extensions]" >> $HGRCPATH
1 $ echo "[extensions]" >> $HGRCPATH
2 $ echo "bookmarks=" >> $HGRCPATH
2 $ echo "bookmarks=" >> $HGRCPATH
3
3
4 $ echo "[bookmarks]" >> $HGRCPATH
4 $ echo "[bookmarks]" >> $HGRCPATH
5 $ echo "track.current = True" >> $HGRCPATH
5 $ echo "track.current = True" >> $HGRCPATH
6
6
7 $ hg init
7 $ hg init
8
8
9 no bookmarks
9 no bookmarks
10
10
11 $ hg bookmarks
11 $ hg bookmarks
12 no bookmarks set
12 no bookmarks set
13
13
14 set bookmark X
14 set bookmark X
15
15
16 $ hg bookmark X
16 $ hg bookmark X
17
17
18 list bookmarks
18 list bookmarks
19
19
20 $ hg bookmark
20 $ hg bookmark
21 * X -1:000000000000
21 * X -1:000000000000
22
22
23 list bookmarks with color
23 list bookmarks with color
24
24
25 $ hg --config extensions.color= --config color.mode=ansi \
25 $ hg --config extensions.color= --config color.mode=ansi \
26 > bookmark --color=always
26 > bookmark --color=always
27  * X -1:000000000000
27 \x1b[0;32m * X -1:000000000000\x1b[0m (esc)
28
28
29 update to bookmark X
29 update to bookmark X
30
30
31 $ hg update X
31 $ hg update X
32 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
32 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
33
33
34 list bookmarks
34 list bookmarks
35
35
36 $ hg bookmarks
36 $ hg bookmarks
37 * X -1:000000000000
37 * X -1:000000000000
38
38
39 rename
39 rename
40
40
41 $ hg bookmark -m X Z
41 $ hg bookmark -m X Z
42
42
43 list bookmarks
43 list bookmarks
44
44
45 $ hg bookmarks
45 $ hg bookmarks
46 * Z -1:000000000000
46 * Z -1:000000000000
47
47
48 new bookmark Y
48 new bookmark Y
49
49
50 $ hg bookmark Y
50 $ hg bookmark Y
51
51
52 list bookmarks
52 list bookmarks
53
53
54 $ hg bookmark
54 $ hg bookmark
55 * Y -1:000000000000
55 * Y -1:000000000000
56 Z -1:000000000000
56 Z -1:000000000000
57
57
58 commit
58 commit
59
59
60 $ echo 'b' > b
60 $ echo 'b' > b
61 $ hg add b
61 $ hg add b
62 $ hg commit -m'test'
62 $ hg commit -m'test'
63
63
64 list bookmarks
64 list bookmarks
65
65
66 $ hg bookmark
66 $ hg bookmark
67 * Y 0:719295282060
67 * Y 0:719295282060
68 Z -1:000000000000
68 Z -1:000000000000
69
69
70 delete bookmarks
70 delete bookmarks
71
71
72 $ hg bookmark -d Y
72 $ hg bookmark -d Y
73 $ hg bookmark -d Z
73 $ hg bookmark -d Z
74
74
75 list bookmarks
75 list bookmarks
76
76
77 $ hg bookmark
77 $ hg bookmark
78 no bookmarks set
78 no bookmarks set
79
79
80 update to tip
80 update to tip
81
81
82 $ hg update tip
82 $ hg update tip
83 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
83 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
84
84
85 set bookmark Y using -r .
85 set bookmark Y using -r .
86
86
87 $ hg bookmark -r . Y
87 $ hg bookmark -r . Y
88
88
89 list bookmarks
89 list bookmarks
90
90
91 $ hg bookmark
91 $ hg bookmark
92 * Y 0:719295282060
92 * Y 0:719295282060
@@ -1,213 +1,213 b''
1 $ echo "[extensions]" >> $HGRCPATH
1 $ echo "[extensions]" >> $HGRCPATH
2 $ echo "bookmarks=" >> $HGRCPATH
2 $ echo "bookmarks=" >> $HGRCPATH
3
3
4 $ hg init
4 $ hg init
5
5
6 no bookmarks
6 no bookmarks
7
7
8 $ hg bookmarks
8 $ hg bookmarks
9 no bookmarks set
9 no bookmarks set
10
10
11 bookmark rev -1
11 bookmark rev -1
12
12
13 $ hg bookmark X
13 $ hg bookmark X
14
14
15 list bookmarks
15 list bookmarks
16
16
17 $ hg bookmarks
17 $ hg bookmarks
18 * X -1:000000000000
18 * X -1:000000000000
19
19
20 list bookmarks with color
20 list bookmarks with color
21
21
22 $ hg --config extensions.color= --config color.mode=ansi \
22 $ hg --config extensions.color= --config color.mode=ansi \
23 > bookmarks --color=always
23 > bookmarks --color=always
24  * X -1:000000000000
24 \x1b[0;32m * X -1:000000000000\x1b[0m (esc)
25
25
26 $ echo a > a
26 $ echo a > a
27 $ hg add a
27 $ hg add a
28 $ hg commit -m 0
28 $ hg commit -m 0
29
29
30 bookmark X moved to rev 0
30 bookmark X moved to rev 0
31
31
32 $ hg bookmarks
32 $ hg bookmarks
33 * X 0:f7b1eb17ad24
33 * X 0:f7b1eb17ad24
34
34
35 look up bookmark
35 look up bookmark
36
36
37 $ hg log -r X
37 $ hg log -r X
38 changeset: 0:f7b1eb17ad24
38 changeset: 0:f7b1eb17ad24
39 tag: X
39 tag: X
40 tag: tip
40 tag: tip
41 user: test
41 user: test
42 date: Thu Jan 01 00:00:00 1970 +0000
42 date: Thu Jan 01 00:00:00 1970 +0000
43 summary: 0
43 summary: 0
44
44
45
45
46 second bookmark for rev 0
46 second bookmark for rev 0
47
47
48 $ hg bookmark X2
48 $ hg bookmark X2
49
49
50 bookmark rev -1 again
50 bookmark rev -1 again
51
51
52 $ hg bookmark -r null Y
52 $ hg bookmark -r null Y
53
53
54 list bookmarks
54 list bookmarks
55
55
56 $ hg bookmarks
56 $ hg bookmarks
57 * X2 0:f7b1eb17ad24
57 * X2 0:f7b1eb17ad24
58 * X 0:f7b1eb17ad24
58 * X 0:f7b1eb17ad24
59 Y -1:000000000000
59 Y -1:000000000000
60
60
61 $ echo b > b
61 $ echo b > b
62 $ hg add b
62 $ hg add b
63 $ hg commit -m 1
63 $ hg commit -m 1
64
64
65 bookmarks revset
65 bookmarks revset
66
66
67 $ hg log -r 'bookmark()'
67 $ hg log -r 'bookmark()'
68 changeset: 1:925d80f479bb
68 changeset: 1:925d80f479bb
69 tag: X
69 tag: X
70 tag: X2
70 tag: X2
71 tag: tip
71 tag: tip
72 user: test
72 user: test
73 date: Thu Jan 01 00:00:00 1970 +0000
73 date: Thu Jan 01 00:00:00 1970 +0000
74 summary: 1
74 summary: 1
75
75
76 $ hg log -r 'bookmark(Y)'
76 $ hg log -r 'bookmark(Y)'
77 $ hg log -r 'bookmark(X2)'
77 $ hg log -r 'bookmark(X2)'
78 changeset: 1:925d80f479bb
78 changeset: 1:925d80f479bb
79 tag: X
79 tag: X
80 tag: X2
80 tag: X2
81 tag: tip
81 tag: tip
82 user: test
82 user: test
83 date: Thu Jan 01 00:00:00 1970 +0000
83 date: Thu Jan 01 00:00:00 1970 +0000
84 summary: 1
84 summary: 1
85
85
86 $ hg help revsets | grep 'bookmark('
86 $ hg help revsets | grep 'bookmark('
87 "bookmark([name])"
87 "bookmark([name])"
88
88
89 bookmarks X and X2 moved to rev 1, Y at rev -1
89 bookmarks X and X2 moved to rev 1, Y at rev -1
90
90
91 $ hg bookmarks
91 $ hg bookmarks
92 * X2 1:925d80f479bb
92 * X2 1:925d80f479bb
93 * X 1:925d80f479bb
93 * X 1:925d80f479bb
94 Y -1:000000000000
94 Y -1:000000000000
95
95
96 bookmark rev 0 again
96 bookmark rev 0 again
97
97
98 $ hg bookmark -r 0 Z
98 $ hg bookmark -r 0 Z
99
99
100 $ echo c > c
100 $ echo c > c
101 $ hg add c
101 $ hg add c
102 $ hg commit -m 2
102 $ hg commit -m 2
103
103
104 bookmarks X and X2 moved to rev 2, Y at rev -1, Z at rev 0
104 bookmarks X and X2 moved to rev 2, Y at rev -1, Z at rev 0
105
105
106 $ hg bookmarks
106 $ hg bookmarks
107 * X2 2:0316ce92851d
107 * X2 2:0316ce92851d
108 * X 2:0316ce92851d
108 * X 2:0316ce92851d
109 Z 0:f7b1eb17ad24
109 Z 0:f7b1eb17ad24
110 Y -1:000000000000
110 Y -1:000000000000
111
111
112 rename nonexistent bookmark
112 rename nonexistent bookmark
113
113
114 $ hg bookmark -m A B
114 $ hg bookmark -m A B
115 abort: a bookmark of this name does not exist
115 abort: a bookmark of this name does not exist
116 [255]
116 [255]
117
117
118 rename to existent bookmark
118 rename to existent bookmark
119
119
120 $ hg bookmark -m X Y
120 $ hg bookmark -m X Y
121 abort: a bookmark of the same name already exists
121 abort: a bookmark of the same name already exists
122 [255]
122 [255]
123
123
124 force rename to existent bookmark
124 force rename to existent bookmark
125
125
126 $ hg bookmark -f -m X Y
126 $ hg bookmark -f -m X Y
127
127
128 list bookmarks
128 list bookmarks
129
129
130 $ hg bookmark
130 $ hg bookmark
131 * X2 2:0316ce92851d
131 * X2 2:0316ce92851d
132 * Y 2:0316ce92851d
132 * Y 2:0316ce92851d
133 Z 0:f7b1eb17ad24
133 Z 0:f7b1eb17ad24
134
134
135 rename without new name
135 rename without new name
136
136
137 $ hg bookmark -m Y
137 $ hg bookmark -m Y
138 abort: new bookmark name required
138 abort: new bookmark name required
139 [255]
139 [255]
140
140
141 delete without name
141 delete without name
142
142
143 $ hg bookmark -d
143 $ hg bookmark -d
144 abort: bookmark name required
144 abort: bookmark name required
145 [255]
145 [255]
146
146
147 delete nonexistent bookmark
147 delete nonexistent bookmark
148
148
149 $ hg bookmark -d A
149 $ hg bookmark -d A
150 abort: a bookmark of this name does not exist
150 abort: a bookmark of this name does not exist
151 [255]
151 [255]
152
152
153 bookmark name with spaces should be stripped
153 bookmark name with spaces should be stripped
154
154
155 $ hg bookmark ' x y '
155 $ hg bookmark ' x y '
156
156
157 list bookmarks
157 list bookmarks
158
158
159 $ hg bookmarks
159 $ hg bookmarks
160 * X2 2:0316ce92851d
160 * X2 2:0316ce92851d
161 * Y 2:0316ce92851d
161 * Y 2:0316ce92851d
162 Z 0:f7b1eb17ad24
162 Z 0:f7b1eb17ad24
163 * x y 2:0316ce92851d
163 * x y 2:0316ce92851d
164
164
165 look up stripped bookmark name
165 look up stripped bookmark name
166
166
167 $ hg log -r '"x y"'
167 $ hg log -r '"x y"'
168 changeset: 2:0316ce92851d
168 changeset: 2:0316ce92851d
169 tag: X2
169 tag: X2
170 tag: Y
170 tag: Y
171 tag: tip
171 tag: tip
172 tag: x y
172 tag: x y
173 user: test
173 user: test
174 date: Thu Jan 01 00:00:00 1970 +0000
174 date: Thu Jan 01 00:00:00 1970 +0000
175 summary: 2
175 summary: 2
176
176
177
177
178 reject bookmark name with newline
178 reject bookmark name with newline
179
179
180 $ hg bookmark '
180 $ hg bookmark '
181 > '
181 > '
182 abort: bookmark name cannot contain newlines
182 abort: bookmark name cannot contain newlines
183 [255]
183 [255]
184
184
185 bookmark with existing name
185 bookmark with existing name
186
186
187 $ hg bookmark Z
187 $ hg bookmark Z
188 abort: a bookmark of the same name already exists
188 abort: a bookmark of the same name already exists
189 [255]
189 [255]
190
190
191 force bookmark with existing name
191 force bookmark with existing name
192
192
193 $ hg bookmark -f Z
193 $ hg bookmark -f Z
194
194
195 list bookmarks
195 list bookmarks
196
196
197 $ hg bookmark
197 $ hg bookmark
198 * X2 2:0316ce92851d
198 * X2 2:0316ce92851d
199 * Y 2:0316ce92851d
199 * Y 2:0316ce92851d
200 * Z 2:0316ce92851d
200 * Z 2:0316ce92851d
201 * x y 2:0316ce92851d
201 * x y 2:0316ce92851d
202
202
203 revision but no bookmark name
203 revision but no bookmark name
204
204
205 $ hg bookmark -r .
205 $ hg bookmark -r .
206 abort: bookmark name required
206 abort: bookmark name required
207 [255]
207 [255]
208
208
209 bookmark name with whitespace only
209 bookmark name with whitespace only
210
210
211 $ hg bookmark ' '
211 $ hg bookmark ' '
212 abort: bookmark names cannot consist entirely of whitespace
212 abort: bookmark names cannot consist entirely of whitespace
213 [255]
213 [255]
@@ -1,126 +1,126 b''
1 test branch selection options
1 test branch selection options
2
2
3 $ hg init branch
3 $ hg init branch
4 $ cd branch
4 $ cd branch
5 $ hg branch a
5 $ hg branch a
6 marked working directory as branch a
6 marked working directory as branch a
7 $ echo a > foo
7 $ echo a > foo
8 $ hg ci -d '0 0' -Ama
8 $ hg ci -d '0 0' -Ama
9 adding foo
9 adding foo
10 $ echo a2 > foo
10 $ echo a2 > foo
11 $ hg ci -d '0 0' -ma2
11 $ hg ci -d '0 0' -ma2
12 $ hg up 0
12 $ hg up 0
13 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
13 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
14 $ hg branch c
14 $ hg branch c
15 marked working directory as branch c
15 marked working directory as branch c
16 $ echo c > foo
16 $ echo c > foo
17 $ hg ci -d '0 0' -mc
17 $ hg ci -d '0 0' -mc
18 $ hg tag -l z
18 $ hg tag -l z
19 $ cd ..
19 $ cd ..
20 $ hg clone -r 0 branch branch2
20 $ hg clone -r 0 branch branch2
21 adding changesets
21 adding changesets
22 adding manifests
22 adding manifests
23 adding file changes
23 adding file changes
24 added 1 changesets with 1 changes to 1 files
24 added 1 changesets with 1 changes to 1 files
25 updating to branch a
25 updating to branch a
26 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
26 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
27 $ cd branch2
27 $ cd branch2
28 $ hg up 0
28 $ hg up 0
29 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
29 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
30 $ hg branch b
30 $ hg branch b
31 marked working directory as branch b
31 marked working directory as branch b
32 $ echo b > foo
32 $ echo b > foo
33 $ hg ci -d '0 0' -mb
33 $ hg ci -d '0 0' -mb
34 $ hg up 0
34 $ hg up 0
35 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
35 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
36 $ hg --encoding utf-8 branch Γ¦
36 $ hg --encoding utf-8 branch Γ¦
37 marked working directory as branch Γ¦
37 marked working directory as branch \xc3\xa6 (esc)
38 $ echo ae1 > foo
38 $ echo ae1 > foo
39 $ hg ci -d '0 0' -mae1
39 $ hg ci -d '0 0' -mae1
40 $ hg up 0
40 $ hg up 0
41 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
41 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
42 $ hg --encoding utf-8 branch -f Γ¦
42 $ hg --encoding utf-8 branch -f Γ¦
43 marked working directory as branch Γ¦
43 marked working directory as branch \xc3\xa6 (esc)
44 $ echo ae2 > foo
44 $ echo ae2 > foo
45 $ hg ci -d '0 0' -mae2
45 $ hg ci -d '0 0' -mae2
46 created new head
46 created new head
47 $ hg up 0
47 $ hg up 0
48 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
48 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
49 $ hg branch -f b
49 $ hg branch -f b
50 marked working directory as branch b
50 marked working directory as branch b
51 $ echo b2 > foo
51 $ echo b2 > foo
52 $ hg ci -d '0 0' -mb2
52 $ hg ci -d '0 0' -mb2
53 created new head
53 created new head
54
54
55 unknown branch and fallback
55 unknown branch and fallback
56
56
57 $ hg in -qbz
57 $ hg in -qbz
58 abort: unknown branch 'z'!
58 abort: unknown branch 'z'!
59 [255]
59 [255]
60 $ hg in -q ../branch#z
60 $ hg in -q ../branch#z
61 2:f25d57ab0566
61 2:f25d57ab0566
62 $ hg out -qbz
62 $ hg out -qbz
63 abort: unknown branch 'z'!
63 abort: unknown branch 'z'!
64 [255]
64 [255]
65
65
66 in rev c branch a
66 in rev c branch a
67
67
68 $ hg in -qr c ../branch#a
68 $ hg in -qr c ../branch#a
69 1:dd6e60a716c6
69 1:dd6e60a716c6
70 2:f25d57ab0566
70 2:f25d57ab0566
71 $ hg in -qr c -b a
71 $ hg in -qr c -b a
72 1:dd6e60a716c6
72 1:dd6e60a716c6
73 2:f25d57ab0566
73 2:f25d57ab0566
74
74
75 out branch .
75 out branch .
76
76
77 $ hg out -q ../branch#.
77 $ hg out -q ../branch#.
78 1:b84708d77ab7
78 1:b84708d77ab7
79 4:65511d0e2b55
79 4:65511d0e2b55
80 $ hg out -q -b .
80 $ hg out -q -b .
81 1:b84708d77ab7
81 1:b84708d77ab7
82 4:65511d0e2b55
82 4:65511d0e2b55
83
83
84 out branch . non-ascii
84 out branch . non-ascii
85
85
86 $ hg --encoding utf-8 up Γ¦
86 $ hg --encoding utf-8 up Γ¦
87 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
87 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
88 $ hg --encoding latin1 out -q ../branch#.
88 $ hg --encoding latin1 out -q ../branch#.
89 2:df5a44224d4e
89 2:df5a44224d4e
90 3:4f4a5125ca10
90 3:4f4a5125ca10
91 $ hg --encoding latin1 out -q -b .
91 $ hg --encoding latin1 out -q -b .
92 2:df5a44224d4e
92 2:df5a44224d4e
93 3:4f4a5125ca10
93 3:4f4a5125ca10
94
94
95 clone branch b
95 clone branch b
96
96
97 $ cd ..
97 $ cd ..
98 $ hg clone branch2#b branch3
98 $ hg clone branch2#b branch3
99 adding changesets
99 adding changesets
100 adding manifests
100 adding manifests
101 adding file changes
101 adding file changes
102 added 3 changesets with 3 changes to 1 files (+1 heads)
102 added 3 changesets with 3 changes to 1 files (+1 heads)
103 updating to branch b
103 updating to branch b
104 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
104 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
105 $ hg -q -R branch3 heads b
105 $ hg -q -R branch3 heads b
106 2:65511d0e2b55
106 2:65511d0e2b55
107 1:b84708d77ab7
107 1:b84708d77ab7
108 $ hg -q -R branch3 parents
108 $ hg -q -R branch3 parents
109 2:65511d0e2b55
109 2:65511d0e2b55
110 $ rm -rf branch3
110 $ rm -rf branch3
111
111
112 clone rev a branch b
112 clone rev a branch b
113
113
114 $ hg clone -r a branch2#b branch3
114 $ hg clone -r a branch2#b branch3
115 adding changesets
115 adding changesets
116 adding manifests
116 adding manifests
117 adding file changes
117 adding file changes
118 added 3 changesets with 3 changes to 1 files (+1 heads)
118 added 3 changesets with 3 changes to 1 files (+1 heads)
119 updating to branch a
119 updating to branch a
120 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
120 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
121 $ hg -q -R branch3 heads b
121 $ hg -q -R branch3 heads b
122 2:65511d0e2b55
122 2:65511d0e2b55
123 1:b84708d77ab7
123 1:b84708d77ab7
124 $ hg -q -R branch3 parents
124 $ hg -q -R branch3 parents
125 0:5b65ba7c951d
125 0:5b65ba7c951d
126 $ rm -rf branch3
126 $ rm -rf branch3
@@ -1,398 +1,398 b''
1 $ hg init a
1 $ hg init a
2 $ cd a
2 $ cd a
3 $ echo 'root' >root
3 $ echo 'root' >root
4 $ hg add root
4 $ hg add root
5 $ hg commit -d '0 0' -m "Adding root node"
5 $ hg commit -d '0 0' -m "Adding root node"
6
6
7 $ echo 'a' >a
7 $ echo 'a' >a
8 $ hg add a
8 $ hg add a
9 $ hg branch a
9 $ hg branch a
10 marked working directory as branch a
10 marked working directory as branch a
11 $ hg commit -d '1 0' -m "Adding a branch"
11 $ hg commit -d '1 0' -m "Adding a branch"
12
12
13 $ hg branch q
13 $ hg branch q
14 marked working directory as branch q
14 marked working directory as branch q
15 $ echo 'aa' >a
15 $ echo 'aa' >a
16 $ hg branch -C
16 $ hg branch -C
17 reset working directory to branch a
17 reset working directory to branch a
18 $ hg commit -d '2 0' -m "Adding to a branch"
18 $ hg commit -d '2 0' -m "Adding to a branch"
19
19
20 $ hg update -C 0
20 $ hg update -C 0
21 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
21 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
22 $ echo 'b' >b
22 $ echo 'b' >b
23 $ hg add b
23 $ hg add b
24 $ hg branch b
24 $ hg branch b
25 marked working directory as branch b
25 marked working directory as branch b
26 $ hg commit -d '2 0' -m "Adding b branch"
26 $ hg commit -d '2 0' -m "Adding b branch"
27
27
28 $ echo 'bh1' >bh1
28 $ echo 'bh1' >bh1
29 $ hg add bh1
29 $ hg add bh1
30 $ hg commit -d '3 0' -m "Adding b branch head 1"
30 $ hg commit -d '3 0' -m "Adding b branch head 1"
31
31
32 $ hg update -C 2
32 $ hg update -C 2
33 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
33 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
34 $ echo 'bh2' >bh2
34 $ echo 'bh2' >bh2
35 $ hg add bh2
35 $ hg add bh2
36 $ hg commit -d '4 0' -m "Adding b branch head 2"
36 $ hg commit -d '4 0' -m "Adding b branch head 2"
37
37
38 $ echo 'c' >c
38 $ echo 'c' >c
39 $ hg add c
39 $ hg add c
40 $ hg branch c
40 $ hg branch c
41 marked working directory as branch c
41 marked working directory as branch c
42 $ hg commit -d '5 0' -m "Adding c branch"
42 $ hg commit -d '5 0' -m "Adding c branch"
43
43
44 $ hg branch tip
44 $ hg branch tip
45 abort: the name 'tip' is reserved
45 abort: the name 'tip' is reserved
46 [255]
46 [255]
47 $ hg branch null
47 $ hg branch null
48 abort: the name 'null' is reserved
48 abort: the name 'null' is reserved
49 [255]
49 [255]
50 $ hg branch .
50 $ hg branch .
51 abort: the name '.' is reserved
51 abort: the name '.' is reserved
52 [255]
52 [255]
53
53
54 $ echo 'd' >d
54 $ echo 'd' >d
55 $ hg add d
55 $ hg add d
56 $ hg branch 'a branch name much longer than the default justification used by branches'
56 $ hg branch 'a branch name much longer than the default justification used by branches'
57 marked working directory as branch a branch name much longer than the default justification used by branches
57 marked working directory as branch a branch name much longer than the default justification used by branches
58 $ hg commit -d '6 0' -m "Adding d branch"
58 $ hg commit -d '6 0' -m "Adding d branch"
59
59
60 $ hg branches
60 $ hg branches
61 a branch name much longer than the default justification used by branches 7:10ff5895aa57
61 a branch name much longer than the default justification used by branches 7:10ff5895aa57
62 b 4:aee39cd168d0
62 b 4:aee39cd168d0
63 c 6:589736a22561 (inactive)
63 c 6:589736a22561 (inactive)
64 a 5:d8cbc61dbaa6 (inactive)
64 a 5:d8cbc61dbaa6 (inactive)
65 default 0:19709c5a4e75 (inactive)
65 default 0:19709c5a4e75 (inactive)
66
66
67 -------
67 -------
68
68
69 $ hg branches -a
69 $ hg branches -a
70 a branch name much longer than the default justification used by branches 7:10ff5895aa57
70 a branch name much longer than the default justification used by branches 7:10ff5895aa57
71 b 4:aee39cd168d0
71 b 4:aee39cd168d0
72
72
73 --- Branch a
73 --- Branch a
74
74
75 $ hg log -b a
75 $ hg log -b a
76 changeset: 5:d8cbc61dbaa6
76 changeset: 5:d8cbc61dbaa6
77 branch: a
77 branch: a
78 parent: 2:881fe2b92ad0
78 parent: 2:881fe2b92ad0
79 user: test
79 user: test
80 date: Thu Jan 01 00:00:04 1970 +0000
80 date: Thu Jan 01 00:00:04 1970 +0000
81 summary: Adding b branch head 2
81 summary: Adding b branch head 2
82
82
83 changeset: 2:881fe2b92ad0
83 changeset: 2:881fe2b92ad0
84 branch: a
84 branch: a
85 user: test
85 user: test
86 date: Thu Jan 01 00:00:02 1970 +0000
86 date: Thu Jan 01 00:00:02 1970 +0000
87 summary: Adding to a branch
87 summary: Adding to a branch
88
88
89 changeset: 1:dd6b440dd85a
89 changeset: 1:dd6b440dd85a
90 branch: a
90 branch: a
91 user: test
91 user: test
92 date: Thu Jan 01 00:00:01 1970 +0000
92 date: Thu Jan 01 00:00:01 1970 +0000
93 summary: Adding a branch
93 summary: Adding a branch
94
94
95
95
96 ---- Branch b
96 ---- Branch b
97
97
98 $ hg log -b b
98 $ hg log -b b
99 changeset: 4:aee39cd168d0
99 changeset: 4:aee39cd168d0
100 branch: b
100 branch: b
101 user: test
101 user: test
102 date: Thu Jan 01 00:00:03 1970 +0000
102 date: Thu Jan 01 00:00:03 1970 +0000
103 summary: Adding b branch head 1
103 summary: Adding b branch head 1
104
104
105 changeset: 3:ac22033332d1
105 changeset: 3:ac22033332d1
106 branch: b
106 branch: b
107 parent: 0:19709c5a4e75
107 parent: 0:19709c5a4e75
108 user: test
108 user: test
109 date: Thu Jan 01 00:00:02 1970 +0000
109 date: Thu Jan 01 00:00:02 1970 +0000
110 summary: Adding b branch
110 summary: Adding b branch
111
111
112
112
113 ---- going to test branch closing
113 ---- going to test branch closing
114
114
115 $ hg branches
115 $ hg branches
116 a branch name much longer than the default justification used by branches 7:10ff5895aa57
116 a branch name much longer than the default justification used by branches 7:10ff5895aa57
117 b 4:aee39cd168d0
117 b 4:aee39cd168d0
118 c 6:589736a22561 (inactive)
118 c 6:589736a22561 (inactive)
119 a 5:d8cbc61dbaa6 (inactive)
119 a 5:d8cbc61dbaa6 (inactive)
120 default 0:19709c5a4e75 (inactive)
120 default 0:19709c5a4e75 (inactive)
121 $ hg up -C b
121 $ hg up -C b
122 2 files updated, 0 files merged, 4 files removed, 0 files unresolved
122 2 files updated, 0 files merged, 4 files removed, 0 files unresolved
123 $ echo 'xxx1' >> b
123 $ echo 'xxx1' >> b
124 $ hg commit -d '7 0' -m 'adding cset to branch b'
124 $ hg commit -d '7 0' -m 'adding cset to branch b'
125 $ hg up -C aee39cd168d0
125 $ hg up -C aee39cd168d0
126 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
126 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
127 $ echo 'xxx2' >> b
127 $ echo 'xxx2' >> b
128 $ hg commit -d '8 0' -m 'adding head to branch b'
128 $ hg commit -d '8 0' -m 'adding head to branch b'
129 created new head
129 created new head
130 $ echo 'xxx3' >> b
130 $ echo 'xxx3' >> b
131 $ hg commit -d '9 0' -m 'adding another cset to branch b'
131 $ hg commit -d '9 0' -m 'adding another cset to branch b'
132 $ hg branches
132 $ hg branches
133 b 10:bfbe841b666e
133 b 10:bfbe841b666e
134 a branch name much longer than the default justification used by branches 7:10ff5895aa57
134 a branch name much longer than the default justification used by branches 7:10ff5895aa57
135 c 6:589736a22561 (inactive)
135 c 6:589736a22561 (inactive)
136 a 5:d8cbc61dbaa6 (inactive)
136 a 5:d8cbc61dbaa6 (inactive)
137 default 0:19709c5a4e75 (inactive)
137 default 0:19709c5a4e75 (inactive)
138 $ hg heads --closed
138 $ hg heads --closed
139 changeset: 10:bfbe841b666e
139 changeset: 10:bfbe841b666e
140 branch: b
140 branch: b
141 tag: tip
141 tag: tip
142 user: test
142 user: test
143 date: Thu Jan 01 00:00:09 1970 +0000
143 date: Thu Jan 01 00:00:09 1970 +0000
144 summary: adding another cset to branch b
144 summary: adding another cset to branch b
145
145
146 changeset: 8:eebb944467c9
146 changeset: 8:eebb944467c9
147 branch: b
147 branch: b
148 parent: 4:aee39cd168d0
148 parent: 4:aee39cd168d0
149 user: test
149 user: test
150 date: Thu Jan 01 00:00:07 1970 +0000
150 date: Thu Jan 01 00:00:07 1970 +0000
151 summary: adding cset to branch b
151 summary: adding cset to branch b
152
152
153 changeset: 7:10ff5895aa57
153 changeset: 7:10ff5895aa57
154 branch: a branch name much longer than the default justification used by branches
154 branch: a branch name much longer than the default justification used by branches
155 user: test
155 user: test
156 date: Thu Jan 01 00:00:06 1970 +0000
156 date: Thu Jan 01 00:00:06 1970 +0000
157 summary: Adding d branch
157 summary: Adding d branch
158
158
159 changeset: 6:589736a22561
159 changeset: 6:589736a22561
160 branch: c
160 branch: c
161 user: test
161 user: test
162 date: Thu Jan 01 00:00:05 1970 +0000
162 date: Thu Jan 01 00:00:05 1970 +0000
163 summary: Adding c branch
163 summary: Adding c branch
164
164
165 changeset: 5:d8cbc61dbaa6
165 changeset: 5:d8cbc61dbaa6
166 branch: a
166 branch: a
167 parent: 2:881fe2b92ad0
167 parent: 2:881fe2b92ad0
168 user: test
168 user: test
169 date: Thu Jan 01 00:00:04 1970 +0000
169 date: Thu Jan 01 00:00:04 1970 +0000
170 summary: Adding b branch head 2
170 summary: Adding b branch head 2
171
171
172 changeset: 0:19709c5a4e75
172 changeset: 0:19709c5a4e75
173 user: test
173 user: test
174 date: Thu Jan 01 00:00:00 1970 +0000
174 date: Thu Jan 01 00:00:00 1970 +0000
175 summary: Adding root node
175 summary: Adding root node
176
176
177 $ hg heads
177 $ hg heads
178 changeset: 10:bfbe841b666e
178 changeset: 10:bfbe841b666e
179 branch: b
179 branch: b
180 tag: tip
180 tag: tip
181 user: test
181 user: test
182 date: Thu Jan 01 00:00:09 1970 +0000
182 date: Thu Jan 01 00:00:09 1970 +0000
183 summary: adding another cset to branch b
183 summary: adding another cset to branch b
184
184
185 changeset: 8:eebb944467c9
185 changeset: 8:eebb944467c9
186 branch: b
186 branch: b
187 parent: 4:aee39cd168d0
187 parent: 4:aee39cd168d0
188 user: test
188 user: test
189 date: Thu Jan 01 00:00:07 1970 +0000
189 date: Thu Jan 01 00:00:07 1970 +0000
190 summary: adding cset to branch b
190 summary: adding cset to branch b
191
191
192 changeset: 7:10ff5895aa57
192 changeset: 7:10ff5895aa57
193 branch: a branch name much longer than the default justification used by branches
193 branch: a branch name much longer than the default justification used by branches
194 user: test
194 user: test
195 date: Thu Jan 01 00:00:06 1970 +0000
195 date: Thu Jan 01 00:00:06 1970 +0000
196 summary: Adding d branch
196 summary: Adding d branch
197
197
198 changeset: 6:589736a22561
198 changeset: 6:589736a22561
199 branch: c
199 branch: c
200 user: test
200 user: test
201 date: Thu Jan 01 00:00:05 1970 +0000
201 date: Thu Jan 01 00:00:05 1970 +0000
202 summary: Adding c branch
202 summary: Adding c branch
203
203
204 changeset: 5:d8cbc61dbaa6
204 changeset: 5:d8cbc61dbaa6
205 branch: a
205 branch: a
206 parent: 2:881fe2b92ad0
206 parent: 2:881fe2b92ad0
207 user: test
207 user: test
208 date: Thu Jan 01 00:00:04 1970 +0000
208 date: Thu Jan 01 00:00:04 1970 +0000
209 summary: Adding b branch head 2
209 summary: Adding b branch head 2
210
210
211 changeset: 0:19709c5a4e75
211 changeset: 0:19709c5a4e75
212 user: test
212 user: test
213 date: Thu Jan 01 00:00:00 1970 +0000
213 date: Thu Jan 01 00:00:00 1970 +0000
214 summary: Adding root node
214 summary: Adding root node
215
215
216 $ hg commit -d '9 0' --close-branch -m 'prune bad branch'
216 $ hg commit -d '9 0' --close-branch -m 'prune bad branch'
217 $ hg branches -a
217 $ hg branches -a
218 b 8:eebb944467c9
218 b 8:eebb944467c9
219 a branch name much longer than the default justification used by branches 7:10ff5895aa57
219 a branch name much longer than the default justification used by branches 7:10ff5895aa57
220 $ hg up -C b
220 $ hg up -C b
221 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
221 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
222 $ hg commit -d '9 0' --close-branch -m 'close this part branch too'
222 $ hg commit -d '9 0' --close-branch -m 'close this part branch too'
223
223
224 --- b branch should be inactive
224 --- b branch should be inactive
225
225
226 $ hg branches
226 $ hg branches
227 a branch name much longer than the default justification used by branches 7:10ff5895aa57
227 a branch name much longer than the default justification used by branches 7:10ff5895aa57
228 c 6:589736a22561 (inactive)
228 c 6:589736a22561 (inactive)
229 a 5:d8cbc61dbaa6 (inactive)
229 a 5:d8cbc61dbaa6 (inactive)
230 default 0:19709c5a4e75 (inactive)
230 default 0:19709c5a4e75 (inactive)
231 $ hg branches -c
231 $ hg branches -c
232 a branch name much longer than the default justification used by branches 7:10ff5895aa57
232 a branch name much longer than the default justification used by branches 7:10ff5895aa57
233 b 12:2da6583810df (closed)
233 b 12:2da6583810df (closed)
234 c 6:589736a22561 (inactive)
234 c 6:589736a22561 (inactive)
235 a 5:d8cbc61dbaa6 (inactive)
235 a 5:d8cbc61dbaa6 (inactive)
236 default 0:19709c5a4e75 (inactive)
236 default 0:19709c5a4e75 (inactive)
237 $ hg branches -a
237 $ hg branches -a
238 a branch name much longer than the default justification used by branches 7:10ff5895aa57
238 a branch name much longer than the default justification used by branches 7:10ff5895aa57
239 $ hg heads b
239 $ hg heads b
240 no open branch heads found on branches b
240 no open branch heads found on branches b
241 [1]
241 [1]
242 $ hg heads --closed b
242 $ hg heads --closed b
243 changeset: 12:2da6583810df
243 changeset: 12:2da6583810df
244 branch: b
244 branch: b
245 tag: tip
245 tag: tip
246 parent: 8:eebb944467c9
246 parent: 8:eebb944467c9
247 user: test
247 user: test
248 date: Thu Jan 01 00:00:09 1970 +0000
248 date: Thu Jan 01 00:00:09 1970 +0000
249 summary: close this part branch too
249 summary: close this part branch too
250
250
251 changeset: 11:c84627f3c15d
251 changeset: 11:c84627f3c15d
252 branch: b
252 branch: b
253 user: test
253 user: test
254 date: Thu Jan 01 00:00:09 1970 +0000
254 date: Thu Jan 01 00:00:09 1970 +0000
255 summary: prune bad branch
255 summary: prune bad branch
256
256
257 $ echo 'xxx4' >> b
257 $ echo 'xxx4' >> b
258 $ hg commit -d '9 0' -m 'reopen branch with a change'
258 $ hg commit -d '9 0' -m 'reopen branch with a change'
259 reopening closed branch head 12
259 reopening closed branch head 12
260
260
261 --- branch b is back in action
261 --- branch b is back in action
262
262
263 $ hg branches -a
263 $ hg branches -a
264 b 13:6ac12926b8c3
264 b 13:6ac12926b8c3
265 a branch name much longer than the default justification used by branches 7:10ff5895aa57
265 a branch name much longer than the default justification used by branches 7:10ff5895aa57
266
266
267 ---- test heads listings
267 ---- test heads listings
268
268
269 $ hg heads
269 $ hg heads
270 changeset: 13:6ac12926b8c3
270 changeset: 13:6ac12926b8c3
271 branch: b
271 branch: b
272 tag: tip
272 tag: tip
273 user: test
273 user: test
274 date: Thu Jan 01 00:00:09 1970 +0000
274 date: Thu Jan 01 00:00:09 1970 +0000
275 summary: reopen branch with a change
275 summary: reopen branch with a change
276
276
277 changeset: 7:10ff5895aa57
277 changeset: 7:10ff5895aa57
278 branch: a branch name much longer than the default justification used by branches
278 branch: a branch name much longer than the default justification used by branches
279 user: test
279 user: test
280 date: Thu Jan 01 00:00:06 1970 +0000
280 date: Thu Jan 01 00:00:06 1970 +0000
281 summary: Adding d branch
281 summary: Adding d branch
282
282
283 changeset: 6:589736a22561
283 changeset: 6:589736a22561
284 branch: c
284 branch: c
285 user: test
285 user: test
286 date: Thu Jan 01 00:00:05 1970 +0000
286 date: Thu Jan 01 00:00:05 1970 +0000
287 summary: Adding c branch
287 summary: Adding c branch
288
288
289 changeset: 5:d8cbc61dbaa6
289 changeset: 5:d8cbc61dbaa6
290 branch: a
290 branch: a
291 parent: 2:881fe2b92ad0
291 parent: 2:881fe2b92ad0
292 user: test
292 user: test
293 date: Thu Jan 01 00:00:04 1970 +0000
293 date: Thu Jan 01 00:00:04 1970 +0000
294 summary: Adding b branch head 2
294 summary: Adding b branch head 2
295
295
296 changeset: 0:19709c5a4e75
296 changeset: 0:19709c5a4e75
297 user: test
297 user: test
298 date: Thu Jan 01 00:00:00 1970 +0000
298 date: Thu Jan 01 00:00:00 1970 +0000
299 summary: Adding root node
299 summary: Adding root node
300
300
301
301
302 branch default
302 branch default
303
303
304 $ hg heads default
304 $ hg heads default
305 changeset: 0:19709c5a4e75
305 changeset: 0:19709c5a4e75
306 user: test
306 user: test
307 date: Thu Jan 01 00:00:00 1970 +0000
307 date: Thu Jan 01 00:00:00 1970 +0000
308 summary: Adding root node
308 summary: Adding root node
309
309
310
310
311 branch a
311 branch a
312
312
313 $ hg heads a
313 $ hg heads a
314 changeset: 5:d8cbc61dbaa6
314 changeset: 5:d8cbc61dbaa6
315 branch: a
315 branch: a
316 parent: 2:881fe2b92ad0
316 parent: 2:881fe2b92ad0
317 user: test
317 user: test
318 date: Thu Jan 01 00:00:04 1970 +0000
318 date: Thu Jan 01 00:00:04 1970 +0000
319 summary: Adding b branch head 2
319 summary: Adding b branch head 2
320
320
321 $ hg heads --active a
321 $ hg heads --active a
322 no open branch heads found on branches a
322 no open branch heads found on branches a
323 [1]
323 [1]
324
324
325 branch b
325 branch b
326
326
327 $ hg heads b
327 $ hg heads b
328 changeset: 13:6ac12926b8c3
328 changeset: 13:6ac12926b8c3
329 branch: b
329 branch: b
330 tag: tip
330 tag: tip
331 user: test
331 user: test
332 date: Thu Jan 01 00:00:09 1970 +0000
332 date: Thu Jan 01 00:00:09 1970 +0000
333 summary: reopen branch with a change
333 summary: reopen branch with a change
334
334
335 $ hg heads --closed b
335 $ hg heads --closed b
336 changeset: 13:6ac12926b8c3
336 changeset: 13:6ac12926b8c3
337 branch: b
337 branch: b
338 tag: tip
338 tag: tip
339 user: test
339 user: test
340 date: Thu Jan 01 00:00:09 1970 +0000
340 date: Thu Jan 01 00:00:09 1970 +0000
341 summary: reopen branch with a change
341 summary: reopen branch with a change
342
342
343 changeset: 11:c84627f3c15d
343 changeset: 11:c84627f3c15d
344 branch: b
344 branch: b
345 user: test
345 user: test
346 date: Thu Jan 01 00:00:09 1970 +0000
346 date: Thu Jan 01 00:00:09 1970 +0000
347 summary: prune bad branch
347 summary: prune bad branch
348
348
349 default branch colors:
349 default branch colors:
350
350
351 $ echo "[extensions]" >> $HGRCPATH
351 $ echo "[extensions]" >> $HGRCPATH
352 $ echo "color =" >> $HGRCPATH
352 $ echo "color =" >> $HGRCPATH
353
353
354 $ hg up -C c
354 $ hg up -C c
355 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
355 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
356 $ hg commit -d '9 0' --close-branch -m 'reclosing this branch'
356 $ hg commit -d '9 0' --close-branch -m 'reclosing this branch'
357 $ hg up -C b
357 $ hg up -C b
358 2 files updated, 0 files merged, 3 files removed, 0 files unresolved
358 2 files updated, 0 files merged, 3 files removed, 0 files unresolved
359 $ hg branches --color=always
359 $ hg branches --color=always
360 b  13:6ac12926b8c3
360 \x1b[0;32mb\x1b[0m \x1b[0;33m 13:6ac12926b8c3\x1b[0m (esc)
361 a branch name much longer than the default justification used by branches 7:10ff5895aa57
361 \x1b[0;0ma branch name much longer than the default justification used by branches\x1b[0m \x1b[0;33m7:10ff5895aa57\x1b[0m (esc)
362 a  5:d8cbc61dbaa6 (inactive)
362 \x1b[0;0ma\x1b[0m \x1b[0;33m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
363 default  0:19709c5a4e75 (inactive)
363 \x1b[0;0mdefault\x1b[0m \x1b[0;33m 0:19709c5a4e75\x1b[0m (inactive) (esc)
364
364
365 default closed branch color:
365 default closed branch color:
366
366
367 $ hg branches --color=always --closed
367 $ hg branches --color=always --closed
368 b  13:6ac12926b8c3
368 \x1b[0;32mb\x1b[0m \x1b[0;33m 13:6ac12926b8c3\x1b[0m (esc)
369 a branch name much longer than the default justification used by branches 7:10ff5895aa57
369 \x1b[0;0ma branch name much longer than the default justification used by branches\x1b[0m \x1b[0;33m7:10ff5895aa57\x1b[0m (esc)
370 c  14:717d2e6fabe1 (closed)
370 \x1b[0;30;1mc\x1b[0m \x1b[0;33m 14:717d2e6fabe1\x1b[0m (closed) (esc)
371 a  5:d8cbc61dbaa6 (inactive)
371 \x1b[0;0ma\x1b[0m \x1b[0;33m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
372 default  0:19709c5a4e75 (inactive)
372 \x1b[0;0mdefault\x1b[0m \x1b[0;33m 0:19709c5a4e75\x1b[0m (inactive) (esc)
373
373
374 $ echo "[extensions]" >> $HGRCPATH
374 $ echo "[extensions]" >> $HGRCPATH
375 $ echo "color =" >> $HGRCPATH
375 $ echo "color =" >> $HGRCPATH
376 $ echo "[color]" >> $HGRCPATH
376 $ echo "[color]" >> $HGRCPATH
377 $ echo "branches.active = green" >> $HGRCPATH
377 $ echo "branches.active = green" >> $HGRCPATH
378 $ echo "branches.closed = blue" >> $HGRCPATH
378 $ echo "branches.closed = blue" >> $HGRCPATH
379 $ echo "branches.current = red" >> $HGRCPATH
379 $ echo "branches.current = red" >> $HGRCPATH
380 $ echo "branches.inactive = magenta" >> $HGRCPATH
380 $ echo "branches.inactive = magenta" >> $HGRCPATH
381 $ echo "log.changeset = cyan" >> $HGRCPATH
381 $ echo "log.changeset = cyan" >> $HGRCPATH
382
382
383 custom branch colors:
383 custom branch colors:
384
384
385 $ hg branches --color=always
385 $ hg branches --color=always
386 b  13:6ac12926b8c3
386 \x1b[0;31mb\x1b[0m \x1b[0;36m 13:6ac12926b8c3\x1b[0m (esc)
387 a branch name much longer than the default justification used by branches 7:10ff5895aa57
387 \x1b[0;32ma branch name much longer than the default justification used by branches\x1b[0m \x1b[0;36m7:10ff5895aa57\x1b[0m (esc)
388 a  5:d8cbc61dbaa6 (inactive)
388 \x1b[0;35ma\x1b[0m \x1b[0;36m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
389 default  0:19709c5a4e75 (inactive)
389 \x1b[0;35mdefault\x1b[0m \x1b[0;36m 0:19709c5a4e75\x1b[0m (inactive) (esc)
390
390
391 custom closed branch color:
391 custom closed branch color:
392
392
393 $ hg branches --color=always --closed
393 $ hg branches --color=always --closed
394 b  13:6ac12926b8c3
394 \x1b[0;31mb\x1b[0m \x1b[0;36m 13:6ac12926b8c3\x1b[0m (esc)
395 a branch name much longer than the default justification used by branches 7:10ff5895aa57
395 \x1b[0;32ma branch name much longer than the default justification used by branches\x1b[0m \x1b[0;36m7:10ff5895aa57\x1b[0m (esc)
396 c  14:717d2e6fabe1 (closed)
396 \x1b[0;34mc\x1b[0m \x1b[0;36m 14:717d2e6fabe1\x1b[0m (closed) (esc)
397 a  5:d8cbc61dbaa6 (inactive)
397 \x1b[0;35ma\x1b[0m \x1b[0;36m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
398 default  0:19709c5a4e75 (inactive)
398 \x1b[0;35mdefault\x1b[0m \x1b[0;36m 0:19709c5a4e75\x1b[0m (inactive) (esc)
@@ -1,141 +1,141 b''
1 $ echo "[extensions]" >> $HGRCPATH
1 $ echo "[extensions]" >> $HGRCPATH
2 $ echo "churn=" >> $HGRCPATH
2 $ echo "churn=" >> $HGRCPATH
3
3
4 create test repository
4 create test repository
5
5
6 $ hg init repo
6 $ hg init repo
7 $ cd repo
7 $ cd repo
8 $ echo a > a
8 $ echo a > a
9 $ hg ci -Am adda -u user1 -d 6:00
9 $ hg ci -Am adda -u user1 -d 6:00
10 adding a
10 adding a
11 $ echo b >> a
11 $ echo b >> a
12 $ echo b > b
12 $ echo b > b
13 $ hg ci -m changeba -u user2 -d 9:00 a
13 $ hg ci -m changeba -u user2 -d 9:00 a
14 $ hg ci -Am addb -u user2 -d 9:30
14 $ hg ci -Am addb -u user2 -d 9:30
15 adding b
15 adding b
16 $ echo c >> a
16 $ echo c >> a
17 $ echo c >> b
17 $ echo c >> b
18 $ echo c > c
18 $ echo c > c
19 $ hg ci -m changeca -u user3 -d 12:00 a
19 $ hg ci -m changeca -u user3 -d 12:00 a
20 $ hg ci -m changecb -u user3 -d 12:15 b
20 $ hg ci -m changecb -u user3 -d 12:15 b
21 $ hg ci -Am addc -u user3 -d 12:30
21 $ hg ci -Am addc -u user3 -d 12:30
22 adding c
22 adding c
23 $ mkdir -p d/e
23 $ mkdir -p d/e
24 $ echo abc > d/e/f1.txt
24 $ echo abc > d/e/f1.txt
25 $ hg ci -Am "add d/e/f1.txt" -u user1 -d 12:45 d/e/f1.txt
25 $ hg ci -Am "add d/e/f1.txt" -u user1 -d 12:45 d/e/f1.txt
26 $ mkdir -p d/g
26 $ mkdir -p d/g
27 $ echo def > d/g/f2.txt
27 $ echo def > d/g/f2.txt
28 $ hg ci -Am "add d/g/f2.txt" -u user1 -d 13:00 d/g/f2.txt
28 $ hg ci -Am "add d/g/f2.txt" -u user1 -d 13:00 d/g/f2.txt
29
29
30
30
31 churn separate directories
31 churn separate directories
32
32
33 $ cd d
33 $ cd d
34 $ hg churn e
34 $ hg churn e
35 user1 1 ***************************************************************
35 user1 1 ***************************************************************
36
36
37 churn all
37 churn all
38
38
39 $ hg churn
39 $ hg churn
40 user3 3 ***************************************************************
40 user3 3 ***************************************************************
41 user1 3 ***************************************************************
41 user1 3 ***************************************************************
42 user2 2 ******************************************
42 user2 2 ******************************************
43
43
44 churn excluding one dir
44 churn excluding one dir
45
45
46 $ hg churn -X e
46 $ hg churn -X e
47 user3 3 ***************************************************************
47 user3 3 ***************************************************************
48 user2 2 ******************************************
48 user2 2 ******************************************
49 user1 2 ******************************************
49 user1 2 ******************************************
50
50
51 churn up to rev 2
51 churn up to rev 2
52
52
53 $ hg churn -r :2
53 $ hg churn -r :2
54 user2 2 ***************************************************************
54 user2 2 ***************************************************************
55 user1 1 ********************************
55 user1 1 ********************************
56 $ cd ..
56 $ cd ..
57
57
58 churn with aliases
58 churn with aliases
59
59
60 $ cat > ../aliases <<EOF
60 $ cat > ../aliases <<EOF
61 > user1 alias1
61 > user1 alias1
62 > user3 alias3
62 > user3 alias3
63 > not-an-alias
63 > not-an-alias
64 > EOF
64 > EOF
65
65
66 churn with .hgchurn
66 churn with .hgchurn
67
67
68 $ mv ../aliases .hgchurn
68 $ mv ../aliases .hgchurn
69 $ hg churn
69 $ hg churn
70 skipping malformed alias: not-an-alias
70 skipping malformed alias: not-an-alias
71 alias3 3 **************************************************************
71 alias3 3 **************************************************************
72 alias1 3 **************************************************************
72 alias1 3 **************************************************************
73 user2 2 *****************************************
73 user2 2 *****************************************
74 $ rm .hgchurn
74 $ rm .hgchurn
75
75
76 churn with column specifier
76 churn with column specifier
77
77
78 $ COLUMNS=40 hg churn
78 $ COLUMNS=40 hg churn
79 user3 3 ***********************
79 user3 3 ***********************
80 user1 3 ***********************
80 user1 3 ***********************
81 user2 2 ***************
81 user2 2 ***************
82
82
83 churn by hour
83 churn by hour
84
84
85 $ hg churn -f '%H' -s
85 $ hg churn -f '%H' -s
86 06 1 *****************
86 06 1 *****************
87 09 2 *********************************
87 09 2 *********************************
88 12 4 ******************************************************************
88 12 4 ******************************************************************
89 13 1 *****************
89 13 1 *****************
90
90
91
91
92 churn with separated added/removed lines
92 churn with separated added/removed lines
93
93
94 $ hg rm d/g/f2.txt
94 $ hg rm d/g/f2.txt
95 $ hg ci -Am "removed d/g/f2.txt" -u user1 -d 14:00 d/g/f2.txt
95 $ hg ci -Am "removed d/g/f2.txt" -u user1 -d 14:00 d/g/f2.txt
96 $ hg churn --diffstat
96 $ hg churn --diffstat
97 user1 +3/-1 +++++++++++++++++++++++++++++++++++++++++--------------
97 user1 +3/-1 +++++++++++++++++++++++++++++++++++++++++--------------
98 user3 +3/-0 +++++++++++++++++++++++++++++++++++++++++
98 user3 +3/-0 +++++++++++++++++++++++++++++++++++++++++
99 user2 +2/-0 +++++++++++++++++++++++++++
99 user2 +2/-0 +++++++++++++++++++++++++++
100
100
101 churn --diffstat with color
101 churn --diffstat with color
102
102
103 $ hg --config extensions.color= churn --config color.mode=ansi \
103 $ hg --config extensions.color= churn --config color.mode=ansi \
104 > --diffstat --color=always
104 > --diffstat --color=always
105 user1 +3/-1 +++++++++++++++++++++++++++++++++++++++++--------------
105 user1 +3/-1 \x1b[0;32m+++++++++++++++++++++++++++++++++++++++++\x1b[0m\x1b[0;31m--------------\x1b[0m (esc)
106 user3 +3/-0 +++++++++++++++++++++++++++++++++++++++++
106 user3 +3/-0 \x1b[0;32m+++++++++++++++++++++++++++++++++++++++++\x1b[0m (esc)
107 user2 +2/-0 +++++++++++++++++++++++++++
107 user2 +2/-0 \x1b[0;32m+++++++++++++++++++++++++++\x1b[0m (esc)
108
108
109
109
110 changeset number churn
110 changeset number churn
111
111
112 $ hg churn -c
112 $ hg churn -c
113 user1 4 ***************************************************************
113 user1 4 ***************************************************************
114 user3 3 ***********************************************
114 user3 3 ***********************************************
115 user2 2 ********************************
115 user2 2 ********************************
116
116
117 $ echo 'with space = no-space' >> ../aliases
117 $ echo 'with space = no-space' >> ../aliases
118 $ echo a >> a
118 $ echo a >> a
119 $ hg commit -m a -u 'with space' -d 15:00
119 $ hg commit -m a -u 'with space' -d 15:00
120
120
121 churn with space in alias
121 churn with space in alias
122
122
123 $ hg churn --aliases ../aliases -r tip
123 $ hg churn --aliases ../aliases -r tip
124 no-space 1 ************************************************************
124 no-space 1 ************************************************************
125
125
126 $ cd ..
126 $ cd ..
127
127
128
128
129 Issue833: ZeroDivisionError
129 Issue833: ZeroDivisionError
130
130
131 $ hg init issue-833
131 $ hg init issue-833
132 $ cd issue-833
132 $ cd issue-833
133 $ touch foo
133 $ touch foo
134 $ hg ci -Am foo
134 $ hg ci -Am foo
135 adding foo
135 adding foo
136
136
137 this was failing with a ZeroDivisionError
137 this was failing with a ZeroDivisionError
138
138
139 $ hg churn
139 $ hg churn
140 test 0
140 test 0
141 $ cd ..
141 $ cd ..
@@ -1,144 +1,144 b''
1
1
2 $ "$TESTDIR/hghave" darcs || exit 80
2 $ "$TESTDIR/hghave" darcs || exit 80
3 $ echo "[extensions]" >> $HGRCPATH
3 $ echo "[extensions]" >> $HGRCPATH
4 $ echo "convert=" >> $HGRCPATH
4 $ echo "convert=" >> $HGRCPATH
5 $ echo 'graphlog =' >> $HGRCPATH
5 $ echo 'graphlog =' >> $HGRCPATH
6 $ DARCS_EMAIL='test@example.org'; export DARCS_EMAIL
6 $ DARCS_EMAIL='test@example.org'; export DARCS_EMAIL
7 $ HOME=`pwd`/do_not_use_HOME_darcs; export HOME
7 $ HOME=`pwd`/do_not_use_HOME_darcs; export HOME
8
8
9 skip if we can't import elementtree
9 skip if we can't import elementtree
10
10
11 $ mkdir dummy
11 $ mkdir dummy
12 $ mkdir dummy/_darcs
12 $ mkdir dummy/_darcs
13 $ if hg convert dummy 2>&1 | grep ElementTree > /dev/null; then
13 $ if hg convert dummy 2>&1 | grep ElementTree > /dev/null; then
14 > echo 'skipped: missing feature: elementtree module'
14 > echo 'skipped: missing feature: elementtree module'
15 > exit 80
15 > exit 80
16 > fi
16 > fi
17
17
18 try converting darcs1 repository
18 try converting darcs1 repository
19
19
20 $ hg clone -q "$TESTDIR/darcs1.hg" darcs
20 $ hg clone -q "$TESTDIR/darcs1.hg" darcs
21 $ hg convert -s darcs darcs/darcs1 2>&1 | grep darcs-1.0
21 $ hg convert -s darcs darcs/darcs1 2>&1 | grep darcs-1.0
22 darcs-1.0 repository format is unsupported, please upgrade
22 darcs-1.0 repository format is unsupported, please upgrade
23
23
24 initialize darcs repo
24 initialize darcs repo
25
25
26 $ mkdir darcs-repo
26 $ mkdir darcs-repo
27 $ cd darcs-repo
27 $ cd darcs-repo
28 $ darcs init
28 $ darcs init
29 $ echo a > a
29 $ echo a > a
30 $ darcs record -a -l -m p0
30 $ darcs record -a -l -m p0
31 Finished recording patch 'p0'
31 Finished recording patch 'p0'
32 $ cd ..
32 $ cd ..
33
33
34 branch and update
34 branch and update
35
35
36 $ darcs get darcs-repo darcs-clone >/dev/null
36 $ darcs get darcs-repo darcs-clone >/dev/null
37 $ cd darcs-clone
37 $ cd darcs-clone
38 $ echo c >> a
38 $ echo c >> a
39 $ echo c > c
39 $ echo c > c
40 $ darcs record -a -l -m p1.1
40 $ darcs record -a -l -m p1.1
41 Finished recording patch 'p1.1'
41 Finished recording patch 'p1.1'
42 $ cd ..
42 $ cd ..
43
43
44 update source
44 update source
45
45
46 $ cd darcs-repo
46 $ cd darcs-repo
47 $ echo b >> a
47 $ echo b >> a
48 $ echo b > b
48 $ echo b > b
49 $ darcs record -a -l -m p1.2
49 $ darcs record -a -l -m p1.2
50 Finished recording patch 'p1.2'
50 Finished recording patch 'p1.2'
51
51
52 $ darcs pull -a ../darcs-clone
52 $ darcs pull -a ../darcs-clone
53 Backing up ./a(-darcs-backup0)
53 Backing up ./a(-darcs-backup0)
54 We have conflicts in the following files:
54 We have conflicts in the following files:
55 ./a
55 ./a
56 Finished pulling and applying.
56 Finished pulling and applying.
57 $ sleep 1
57 $ sleep 1
58 $ echo e > a
58 $ echo e > a
59 $ echo f > f
59 $ echo f > f
60 $ mkdir dir
60 $ mkdir dir
61 $ echo d > dir/d
61 $ echo d > dir/d
62 $ echo d > dir/d2
62 $ echo d > dir/d2
63 $ darcs record -a -l -m p2
63 $ darcs record -a -l -m p2
64 Finished recording patch 'p2'
64 Finished recording patch 'p2'
65
65
66 test file and directory move
66 test file and directory move
67
67
68 $ darcs mv f ff
68 $ darcs mv f ff
69
69
70 Test remove + move
70 Test remove + move
71
71
72 $ darcs remove dir/d2
72 $ darcs remove dir/d2
73 $ rm dir/d2
73 $ rm dir/d2
74 $ darcs mv dir dir2
74 $ darcs mv dir dir2
75 $ darcs record -a -l -m p3
75 $ darcs record -a -l -m p3
76 Finished recording patch 'p3'
76 Finished recording patch 'p3'
77
77
78 test utf-8 commit message and author
78 test utf-8 commit message and author
79
79
80 $ echo g > g
80 $ echo g > g
81
81
82 darcs is encoding agnostic, so it takes whatever bytes it's given
82 darcs is encoding agnostic, so it takes whatever bytes it's given
83
83
84 $ darcs record -a -l -m 'p4: desc Γ±' -A 'author Γ±'
84 $ darcs record -a -l -m 'p4: desc Γ±' -A 'author Γ±'
85 Finished recording patch 'p4: desc Γ±'
85 Finished recording patch 'p4: desc \xc3\xb1' (esc)
86
86
87 Test latin-1 commit message
87 Test latin-1 commit message
88
88
89 $ echo h > h
89 $ echo h > h
90 $ printf "p5: desc " > ../p5
90 $ printf "p5: desc " > ../p5
91 $ python -c 'print "".join([chr(i) for i in range(128, 256)])' >> ../p5
91 $ python -c 'print "".join([chr(i) for i in range(128, 256)])' >> ../p5
92 $ darcs record -a -l --logfile ../p5
92 $ darcs record -a -l --logfile ../p5
93 Finished recording patch 'p5: desc οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½'
93 Finished recording patch 'p5: desc \x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff' (esc)
94
94
95 $ glog()
95 $ glog()
96 > {
96 > {
97 > HGENCODING=utf-8 hg glog --template '{rev} "{desc|firstline}" ({author}) files: {files}\n' "$@"
97 > HGENCODING=utf-8 hg glog --template '{rev} "{desc|firstline}" ({author}) files: {files}\n' "$@"
98 > }
98 > }
99 $ cd ..
99 $ cd ..
100 $ hg convert darcs-repo darcs-repo-hg
100 $ hg convert darcs-repo darcs-repo-hg
101 initializing destination darcs-repo-hg repository
101 initializing destination darcs-repo-hg repository
102 scanning source...
102 scanning source...
103 sorting...
103 sorting...
104 converting...
104 converting...
105 6 p0
105 6 p0
106 5 p1.2
106 5 p1.2
107 4 p1.1
107 4 p1.1
108 3 p2
108 3 p2
109 2 p3
109 2 p3
110 1 p4: desc ?
110 1 p4: desc ?
111 0 p5: desc ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
111 0 p5: desc ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
112
112
113 The converter does not currently handle patch conflicts very well.
113 The converter does not currently handle patch conflicts very well.
114 When they occur, it reverts *all* changes and moves forward,
114 When they occur, it reverts *all* changes and moves forward,
115 letting the conflict resolving patch fix collisions.
115 letting the conflict resolving patch fix collisions.
116 Unfortunately, non-conflicting changes, like the addition of the
116 Unfortunately, non-conflicting changes, like the addition of the
117 "c" file in p1.1 patch are reverted too.
117 "c" file in p1.1 patch are reverted too.
118 Just to say that manifest not listing "c" here is a bug.
118 Just to say that manifest not listing "c" here is a bug.
119
119
120 $ HGENCODING=latin-1 glog -R darcs-repo-hg -r 6 | "$TESTDIR"/printrepr.py
120 $ HGENCODING=latin-1 glog -R darcs-repo-hg -r 6 | "$TESTDIR"/printrepr.py
121 o 6 "p5: desc \xc2\x80\xc2\x81\xc2\x82\xc2\x83\xc2\x84\xc2\x85\xc2\x86\xc2\x87\xc2\x88\xc2\x89\xc2\x8a\xc2\x8b\xc2\x8c\xc2\x8d\xc2\x8e\xc2\x8f\xc2\x90\xc2\x91\xc2\x92\xc2\x93\xc2\x94\xc2\x95\xc2\x96\xc2\x97\xc2\x98\xc2\x99\xc2\x9a\xc2\x9b\xc2\x9c\xc2\x9d\xc2\x9e\xc2\x9f\xc2\xa0\xc2\xa1\xc2\xa2\xc2\xa3\xc2\xa4\xc2\xa5\xc2\xa6\xc2\xa7\xc2\xa8\xc2\xa9\xc2\xaa\xc2\xab\xc2\xac\xc2\xad\xc2\xae\xc2\xaf\xc2\xb0\xc2\xb1\xc2\xb2\xc2\xb3\xc2\xb4\xc2\xb5\xc2\xb6\xc2\xb7\xc2\xb8\xc2\xb9\xc2\xba\xc2\xbb\xc2\xbc\xc2\xbd\xc2\xbe\xc2\xbf\xc3\x80\xc3\x81\xc3\x82\xc3\x83\xc3\x84\xc3\x85\xc3\x86\xc3\x87\xc3\x88\xc3\x89\xc3\x8a\xc3\x8b\xc3\x8c\xc3\x8d\xc3\x8e\xc3\x8f\xc3\x90\xc3\x91\xc3\x92\xc3\x93\xc3\x94\xc3\x95\xc3\x96\xc3\x97\xc3\x98\xc3\x99\xc3\x9a\xc3\x9b\xc3\x9c\xc3\x9d\xc3\x9e\xc3\x9f\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4\xc3\xa5\xc3\xa6\xc3\xa7\xc3\xa8\xc3\xa9\xc3\xaa\xc3\xab\xc3\xac\xc3\xad\xc3\xae\xc3\xaf\xc3\xb0\xc3\xb1\xc3\xb2\xc3\xb3\xc3\xb4\xc3\xb5\xc3\xb6\xc3\xb7\xc3\xb8\xc3\xb9\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3\xbe\xc3\xbf" (test@example.org) files: h
121 o 6 "p5: desc \xc2\x80\xc2\x81\xc2\x82\xc2\x83\xc2\x84\xc2\x85\xc2\x86\xc2\x87\xc2\x88\xc2\x89\xc2\x8a\xc2\x8b\xc2\x8c\xc2\x8d\xc2\x8e\xc2\x8f\xc2\x90\xc2\x91\xc2\x92\xc2\x93\xc2\x94\xc2\x95\xc2\x96\xc2\x97\xc2\x98\xc2\x99\xc2\x9a\xc2\x9b\xc2\x9c\xc2\x9d\xc2\x9e\xc2\x9f\xc2\xa0\xc2\xa1\xc2\xa2\xc2\xa3\xc2\xa4\xc2\xa5\xc2\xa6\xc2\xa7\xc2\xa8\xc2\xa9\xc2\xaa\xc2\xab\xc2\xac\xc2\xad\xc2\xae\xc2\xaf\xc2\xb0\xc2\xb1\xc2\xb2\xc2\xb3\xc2\xb4\xc2\xb5\xc2\xb6\xc2\xb7\xc2\xb8\xc2\xb9\xc2\xba\xc2\xbb\xc2\xbc\xc2\xbd\xc2\xbe\xc2\xbf\xc3\x80\xc3\x81\xc3\x82\xc3\x83\xc3\x84\xc3\x85\xc3\x86\xc3\x87\xc3\x88\xc3\x89\xc3\x8a\xc3\x8b\xc3\x8c\xc3\x8d\xc3\x8e\xc3\x8f\xc3\x90\xc3\x91\xc3\x92\xc3\x93\xc3\x94\xc3\x95\xc3\x96\xc3\x97\xc3\x98\xc3\x99\xc3\x9a\xc3\x9b\xc3\x9c\xc3\x9d\xc3\x9e\xc3\x9f\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4\xc3\xa5\xc3\xa6\xc3\xa7\xc3\xa8\xc3\xa9\xc3\xaa\xc3\xab\xc3\xac\xc3\xad\xc3\xae\xc3\xaf\xc3\xb0\xc3\xb1\xc3\xb2\xc3\xb3\xc3\xb4\xc3\xb5\xc3\xb6\xc3\xb7\xc3\xb8\xc3\xb9\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3\xbe\xc3\xbf" (test@example.org) files: h
122 |
122 |
123 $ HGENCODING=utf-8 glog -R darcs-repo-hg -r 0:5 | "$TESTDIR"/printrepr.py
123 $ HGENCODING=utf-8 glog -R darcs-repo-hg -r 0:5 | "$TESTDIR"/printrepr.py
124 o 5 "p4: desc \xc3\xb1" (author \xc3\xb1) files: g
124 o 5 "p4: desc \xc3\xb1" (author \xc3\xb1) files: g
125 |
125 |
126 o 4 "p3" (test@example.org) files: dir/d dir/d2 dir2/d f ff
126 o 4 "p3" (test@example.org) files: dir/d dir/d2 dir2/d f ff
127 |
127 |
128 o 3 "p2" (test@example.org) files: a dir/d dir/d2 f
128 o 3 "p2" (test@example.org) files: a dir/d dir/d2 f
129 |
129 |
130 o 2 "p1.1" (test@example.org) files:
130 o 2 "p1.1" (test@example.org) files:
131 |
131 |
132 o 1 "p1.2" (test@example.org) files: a b
132 o 1 "p1.2" (test@example.org) files: a b
133 |
133 |
134 o 0 "p0" (test@example.org) files: a
134 o 0 "p0" (test@example.org) files: a
135
135
136
136
137 $ hg up -q -R darcs-repo-hg
137 $ hg up -q -R darcs-repo-hg
138 $ hg -R darcs-repo-hg manifest --debug
138 $ hg -R darcs-repo-hg manifest --debug
139 7225b30cdf38257d5cc7780772c051b6f33e6d6b 644 a
139 7225b30cdf38257d5cc7780772c051b6f33e6d6b 644 a
140 1e88685f5ddec574a34c70af492f95b6debc8741 644 b
140 1e88685f5ddec574a34c70af492f95b6debc8741 644 b
141 37406831adc447ec2385014019599dfec953c806 644 dir2/d
141 37406831adc447ec2385014019599dfec953c806 644 dir2/d
142 b783a337463792a5c7d548ad85a7d3253c16ba8c 644 ff
142 b783a337463792a5c7d548ad85a7d3253c16ba8c 644 ff
143 0973eb1b2ecc4de7fafe7447ce1b7462108b4848 644 g
143 0973eb1b2ecc4de7fafe7447ce1b7462108b4848 644 g
144 fe6f8b4f507fe3eb524c527192a84920a4288dac 644 h
144 fe6f8b4f507fe3eb524c527192a84920a4288dac 644 h
@@ -1,135 +1,135 b''
1
1
2 $ "$TESTDIR/hghave" svn svn-bindings || exit 80
2 $ "$TESTDIR/hghave" svn svn-bindings || exit 80
3
3
4 $ cat > $HGRCPATH <<EOF
4 $ cat > $HGRCPATH <<EOF
5 > [extensions]
5 > [extensions]
6 > convert =
6 > convert =
7 > graphlog =
7 > graphlog =
8 > EOF
8 > EOF
9
9
10 $ svnadmin create svn-repo
10 $ svnadmin create svn-repo
11 $ svnadmin load -q svn-repo < "$TESTDIR/svn/encoding.svndump"
11 $ svnadmin load -q svn-repo < "$TESTDIR/svn/encoding.svndump"
12
12
13 Convert while testing all possible outputs
13 Convert while testing all possible outputs
14
14
15 $ hg --debug convert svn-repo A-hg
15 $ hg --debug convert svn-repo A-hg
16 initializing destination A-hg repository
16 initializing destination A-hg repository
17 reparent to file://*/svn-repo (glob)
17 reparent to file://*/svn-repo (glob)
18 run hg sink pre-conversion action
18 run hg sink pre-conversion action
19 scanning source...
19 scanning source...
20 found trunk at 'trunk'
20 found trunk at 'trunk'
21 found tags at 'tags'
21 found tags at 'tags'
22 found branches at 'branches'
22 found branches at 'branches'
23 found branch branchΓ© at 5
23 found branch branch\xc3\xa9 at 5 (esc)
24 found branch branchΓ©e at 6
24 found branch branch\xc3\xa9e at 6 (esc)
25 scanning: 1 revisions
25 scanning: 1 revisions
26 reparent to file://*/svn-repo/trunk (glob)
26 reparent to file://*/svn-repo/trunk (glob)
27 fetching revision log for "/trunk" from 4 to 0
27 fetching revision log for "/trunk" from 4 to 0
28 parsing revision 4 (2 changes)
28 parsing revision 4 (2 changes)
29 parsing revision 3 (4 changes)
29 parsing revision 3 (4 changes)
30 parsing revision 2 (3 changes)
30 parsing revision 2 (3 changes)
31 parsing revision 1 (3 changes)
31 parsing revision 1 (3 changes)
32 no copyfrom path, don't know what to do.
32 no copyfrom path, don't know what to do.
33 '/branches' is not under '/trunk', ignoring
33 '/branches' is not under '/trunk', ignoring
34 '/tags' is not under '/trunk', ignoring
34 '/tags' is not under '/trunk', ignoring
35 scanning: 2 revisions
35 scanning: 2 revisions
36 reparent to file://*/svn-repo/branches/branch%C3%A9 (glob)
36 reparent to file://*/svn-repo/branches/branch%C3%A9 (glob)
37 fetching revision log for "/branches/branchΓ©" from 5 to 0
37 fetching revision log for "/branches/branch\xc3\xa9" from 5 to 0 (esc)
38 parsing revision 5 (1 changes)
38 parsing revision 5 (1 changes)
39 reparent to file://*/svn-repo (glob)
39 reparent to file://*/svn-repo (glob)
40 reparent to file://*/svn-repo/branches/branch%C3%A9 (glob)
40 reparent to file://*/svn-repo/branches/branch%C3%A9 (glob)
41 found parent of branch /branches/branchΓ© at 4: /trunk
41 found parent of branch /branches/branch\xc3\xa9 at 4: /trunk (esc)
42 scanning: 3 revisions
42 scanning: 3 revisions
43 reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
43 reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
44 fetching revision log for "/branches/branchΓ©e" from 6 to 0
44 fetching revision log for "/branches/branch\xc3\xa9e" from 6 to 0 (esc)
45 parsing revision 6 (1 changes)
45 parsing revision 6 (1 changes)
46 reparent to file://*/svn-repo (glob)
46 reparent to file://*/svn-repo (glob)
47 reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
47 reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
48 found parent of branch /branches/branchΓ©e at 5: /branches/branchΓ©
48 found parent of branch /branches/branch\xc3\xa9e at 5: /branches/branch\xc3\xa9 (esc)
49 scanning: 4 revisions
49 scanning: 4 revisions
50 scanning: 5 revisions
50 scanning: 5 revisions
51 scanning: 6 revisions
51 scanning: 6 revisions
52 sorting...
52 sorting...
53 converting...
53 converting...
54 5 init projA
54 5 init projA
55 source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@1
55 source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@1
56 converting: 0/6 revisions (0.00%)
56 converting: 0/6 revisions (0.00%)
57 4 hello
57 4 hello
58 source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@2
58 source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@2
59 converting: 1/6 revisions (16.67%)
59 converting: 1/6 revisions (16.67%)
60 reparent to file://*/svn-repo/trunk (glob)
60 reparent to file://*/svn-repo/trunk (glob)
61 scanning paths: /trunk/Γ  0/3 (0.00%)
61 scanning paths: /trunk/\xc3\xa0 0/3 (0.00%) (esc)
62 scanning paths: /trunk/à/é 1/3 (33.33%)
62 scanning paths: /trunk/\xc3\xa0/e\xcc\x81 1/3 (33.33%) (esc)
63 scanning paths: /trunk/Γ© 2/3 (66.67%)
63 scanning paths: /trunk/\xc3\xa9 2/3 (66.67%) (esc)
64 à/é
64 \xc3\xa0/e\xcc\x81 (esc)
65 getting files: à/é 1/2 (50.00%)
65 getting files: \xc3\xa0/e\xcc\x81 1/2 (50.00%) (esc)
66 Γ©
66 \xc3\xa9 (esc)
67 getting files: Γ© 2/2 (100.00%)
67 getting files: \xc3\xa9 2/2 (100.00%) (esc)
68 3 copy files
68 3 copy files
69 source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@3
69 source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@3
70 converting: 2/6 revisions (33.33%)
70 converting: 2/6 revisions (33.33%)
71 scanning paths: /trunk/Γ  0/4 (0.00%)
71 scanning paths: /trunk/\xc3\xa0 0/4 (0.00%) (esc)
72 gone from -1
72 gone from -1
73 reparent to file://*/svn-repo (glob)
73 reparent to file://*/svn-repo (glob)
74 reparent to file://*/svn-repo/trunk (glob)
74 reparent to file://*/svn-repo/trunk (glob)
75 scanning paths: /trunk/Γ¨ 1/4 (25.00%)
75 scanning paths: /trunk/\xc3\xa8 1/4 (25.00%) (esc)
76 copied to Γ¨ from Γ©@2
76 copied to \xc3\xa8 from \xc3\xa9@2 (esc)
77 scanning paths: /trunk/Γ© 2/4 (50.00%)
77 scanning paths: /trunk/\xc3\xa9 2/4 (50.00%) (esc)
78 gone from -1
78 gone from -1
79 reparent to file://*/svn-repo (glob)
79 reparent to file://*/svn-repo (glob)
80 reparent to file://*/svn-repo/trunk (glob)
80 reparent to file://*/svn-repo/trunk (glob)
81 scanning paths: /trunk/ΓΉ 3/4 (75.00%)
81 scanning paths: /trunk/\xc3\xb9 3/4 (75.00%) (esc)
82 mark /trunk/ΓΉ came from Γ :2
82 mark /trunk/\xc3\xb9 came from \xc3\xa0:2 (esc)
83 à/é
83 \xc3\xa0/e\xcc\x81 (esc)
84 getting files: à/é 1/4 (25.00%)
84 getting files: \xc3\xa0/e\xcc\x81 1/4 (25.00%) (esc)
85 Γ¨
85 \xc3\xa8 (esc)
86 getting files: Γ¨ 2/4 (50.00%)
86 getting files: \xc3\xa8 2/4 (50.00%) (esc)
87 Γ¨: copy Γ©:6b67ccefd5ce6de77e7ead4f5292843a0255329f
87 \xc3\xa8: copy \xc3\xa9:6b67ccefd5ce6de77e7ead4f5292843a0255329f (esc)
88 Γ©
88 \xc3\xa9 (esc)
89 getting files: Γ© 3/4 (75.00%)
89 getting files: \xc3\xa9 3/4 (75.00%) (esc)
90 ù/é
90 \xc3\xb9/e\xcc\x81 (esc)
91 getting files: ù/é 4/4 (100.00%)
91 getting files: \xc3\xb9/e\xcc\x81 4/4 (100.00%) (esc)
92 ù/é: copy à/é:a9092a3d84a37b9993b5c73576f6de29b7ea50f6
92 \xc3\xb9/e\xcc\x81: copy \xc3\xa0/e\xcc\x81:a9092a3d84a37b9993b5c73576f6de29b7ea50f6 (esc)
93 2 remove files
93 2 remove files
94 source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@4
94 source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@4
95 converting: 3/6 revisions (50.00%)
95 converting: 3/6 revisions (50.00%)
96 scanning paths: /trunk/Γ¨ 0/2 (0.00%)
96 scanning paths: /trunk/\xc3\xa8 0/2 (0.00%) (esc)
97 gone from -1
97 gone from -1
98 reparent to file://*/svn-repo (glob)
98 reparent to file://*/svn-repo (glob)
99 reparent to file://*/svn-repo/trunk (glob)
99 reparent to file://*/svn-repo/trunk (glob)
100 scanning paths: /trunk/ΓΉ 1/2 (50.00%)
100 scanning paths: /trunk/\xc3\xb9 1/2 (50.00%) (esc)
101 gone from -1
101 gone from -1
102 reparent to file://*/svn-repo (glob)
102 reparent to file://*/svn-repo (glob)
103 reparent to file://*/svn-repo/trunk (glob)
103 reparent to file://*/svn-repo/trunk (glob)
104 Γ¨
104 \xc3\xa8 (esc)
105 getting files: Γ¨ 1/2 (50.00%)
105 getting files: \xc3\xa8 1/2 (50.00%) (esc)
106 ù/é
106 \xc3\xb9/e\xcc\x81 (esc)
107 getting files: ù/é 2/2 (100.00%)
107 getting files: \xc3\xb9/e\xcc\x81 2/2 (100.00%) (esc)
108 1 branch to branch?
108 1 branch to branch?
109 source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/branches/branch?@5
109 source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/branches/branch?@5
110 converting: 4/6 revisions (66.67%)
110 converting: 4/6 revisions (66.67%)
111 reparent to file://*/svn-repo/branches/branch%C3%A9 (glob)
111 reparent to file://*/svn-repo/branches/branch%C3%A9 (glob)
112 scanning paths: /branches/branchΓ© 0/1 (0.00%)
112 scanning paths: /branches/branch\xc3\xa9 0/1 (0.00%) (esc)
113 0 branch to branch?e
113 0 branch to branch?e
114 source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/branches/branch?e@6
114 source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/branches/branch?e@6
115 converting: 5/6 revisions (83.33%)
115 converting: 5/6 revisions (83.33%)
116 reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
116 reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
117 scanning paths: /branches/branchΓ©e 0/1 (0.00%)
117 scanning paths: /branches/branch\xc3\xa9e 0/1 (0.00%) (esc)
118 reparent to file://*/svn-repo (glob)
118 reparent to file://*/svn-repo (glob)
119 reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
119 reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
120 reparent to file://*/svn-repo (glob)
120 reparent to file://*/svn-repo (glob)
121 reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
121 reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
122 updating tags
122 updating tags
123 .hgtags
123 .hgtags
124 run hg sink post-conversion action
124 run hg sink post-conversion action
125 $ cd A-hg
125 $ cd A-hg
126 $ hg up
126 $ hg up
127 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
127 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
128
128
129 Check tags are in UTF-8
129 Check tags are in UTF-8
130
130
131 $ python -c "print '\n'.join([('%r' % l) for l in file('.hgtags', 'rb').readlines()])"
131 $ python -c "print '\n'.join([('%r' % l) for l in file('.hgtags', 'rb').readlines()])"
132 '221c3fdaf24df5f14c0a64c597581e2eacfb47bb branch\xc3\xa9e\n'
132 '221c3fdaf24df5f14c0a64c597581e2eacfb47bb branch\xc3\xa9e\n'
133 '7a40952c2db29cf00d9e31df3749e98d8a4bdcbf branch\xc3\xa9\n'
133 '7a40952c2db29cf00d9e31df3749e98d8a4bdcbf branch\xc3\xa9\n'
134
134
135 $ cd ..
135 $ cd ..
@@ -1,124 +1,124 b''
1 Setup
1 Setup
2
2
3 $ echo "[extensions]" >> $HGRCPATH
3 $ echo "[extensions]" >> $HGRCPATH
4 $ echo "color=" >> $HGRCPATH
4 $ echo "color=" >> $HGRCPATH
5 $ hg init repo
5 $ hg init repo
6 $ cd repo
6 $ cd repo
7 $ cat > a <<EOF
7 $ cat > a <<EOF
8 > c
8 > c
9 > c
9 > c
10 > a
10 > a
11 > a
11 > a
12 > b
12 > b
13 > a
13 > a
14 > a
14 > a
15 > c
15 > c
16 > c
16 > c
17 > EOF
17 > EOF
18 $ hg ci -Am adda
18 $ hg ci -Am adda
19 adding a
19 adding a
20 $ cat > a <<EOF
20 $ cat > a <<EOF
21 > c
21 > c
22 > c
22 > c
23 > a
23 > a
24 > a
24 > a
25 > dd
25 > dd
26 > a
26 > a
27 > a
27 > a
28 > c
28 > c
29 > c
29 > c
30 > EOF
30 > EOF
31
31
32 default context
32 default context
33
33
34 $ hg diff --nodates --color=always
34 $ hg diff --nodates --color=always
35 diff -r cf9f4ba66af2 a
35 \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc)
36 --- a/a
36 \x1b[0;31;1m--- a/a\x1b[0m (esc)
37 +++ b/a
37 \x1b[0;32;1m+++ b/a\x1b[0m (esc)
38 @@ -2,7 +2,7 @@
38 \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc)
39 c
39 c
40 a
40 a
41 a
41 a
42 -b
42 \x1b[0;31m-b\x1b[0m (esc)
43 +dd
43 \x1b[0;32m+dd\x1b[0m (esc)
44 a
44 a
45 a
45 a
46 c
46 c
47
47
48 --unified=2
48 --unified=2
49
49
50 $ hg diff --nodates -U 2 --color=always
50 $ hg diff --nodates -U 2 --color=always
51 diff -r cf9f4ba66af2 a
51 \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc)
52 --- a/a
52 \x1b[0;31;1m--- a/a\x1b[0m (esc)
53 +++ b/a
53 \x1b[0;32;1m+++ b/a\x1b[0m (esc)
54 @@ -3,5 +3,5 @@
54 \x1b[0;35m@@ -3,5 +3,5 @@\x1b[0m (esc)
55 a
55 a
56 a
56 a
57 -b
57 \x1b[0;31m-b\x1b[0m (esc)
58 +dd
58 \x1b[0;32m+dd\x1b[0m (esc)
59 a
59 a
60 a
60 a
61
61
62 diffstat
62 diffstat
63
63
64 $ hg diff --stat --color=always
64 $ hg diff --stat --color=always
65 a | 2 +-
65 a | 2 \x1b[0;32m+\x1b[0m\x1b[0;31m-\x1b[0m (esc)
66 1 files changed, 1 insertions(+), 1 deletions(-)
66 1 files changed, 1 insertions(+), 1 deletions(-)
67 $ echo "record=" >> $HGRCPATH
67 $ echo "record=" >> $HGRCPATH
68 $ echo "[ui]" >> $HGRCPATH
68 $ echo "[ui]" >> $HGRCPATH
69 $ echo "interactive=true" >> $HGRCPATH
69 $ echo "interactive=true" >> $HGRCPATH
70 $ echo "[diff]" >> $HGRCPATH
70 $ echo "[diff]" >> $HGRCPATH
71 $ echo "git=True" >> $HGRCPATH
71 $ echo "git=True" >> $HGRCPATH
72
72
73 record
73 record
74
74
75 $ chmod 0755 a
75 $ chmod 0755 a
76 $ hg record --color=always -m moda a <<EOF
76 $ hg record --color=always -m moda a <<EOF
77 > y
77 > y
78 > y
78 > y
79 > EOF
79 > EOF
80 diff --git a/a b/a
80 \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc)
81 old mode 100644
81 \x1b[0;36;1mold mode 100644\x1b[0m (esc)
82 new mode 100755
82 \x1b[0;36;1mnew mode 100755\x1b[0m (esc)
83 1 hunks, 1 lines changed
83 1 hunks, 1 lines changed
84 examine changes to 'a'? [Ynsfdaq?]
84 examine changes to 'a'? [Ynsfdaq?]
85 @@ -2,7 +2,7 @@
85 \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc)
86 c
86 c
87 a
87 a
88 a
88 a
89 -b
89 \x1b[0;31m-b\x1b[0m (esc)
90 +dd
90 \x1b[0;32m+dd\x1b[0m (esc)
91 a
91 a
92 a
92 a
93 c
93 c
94 record this change to 'a'? [Ynsfdaq?]
94 record this change to 'a'? [Ynsfdaq?]
95 $ echo
95 $ echo
96
96
97 $ echo "[extensions]" >> $HGRCPATH
97 $ echo "[extensions]" >> $HGRCPATH
98 $ echo "mq=" >> $HGRCPATH
98 $ echo "mq=" >> $HGRCPATH
99 $ hg rollback
99 $ hg rollback
100 rolling back to revision 0 (undo commit)
100 rolling back to revision 0 (undo commit)
101
101
102 qrecord
102 qrecord
103
103
104 $ hg qrecord --color=always -m moda patch <<EOF
104 $ hg qrecord --color=always -m moda patch <<EOF
105 > y
105 > y
106 > y
106 > y
107 > EOF
107 > EOF
108 diff --git a/a b/a
108 \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc)
109 old mode 100644
109 \x1b[0;36;1mold mode 100644\x1b[0m (esc)
110 new mode 100755
110 \x1b[0;36;1mnew mode 100755\x1b[0m (esc)
111 1 hunks, 1 lines changed
111 1 hunks, 1 lines changed
112 examine changes to 'a'? [Ynsfdaq?]
112 examine changes to 'a'? [Ynsfdaq?]
113 @@ -2,7 +2,7 @@
113 \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc)
114 c
114 c
115 a
115 a
116 a
116 a
117 -b
117 \x1b[0;31m-b\x1b[0m (esc)
118 +dd
118 \x1b[0;32m+dd\x1b[0m (esc)
119 a
119 a
120 a
120 a
121 c
121 c
122 record this change to 'a'? [Ynsfdaq?]
122 record this change to 'a'? [Ynsfdaq?]
123 $ echo
123 $ echo
124
124
@@ -1,446 +1,444 b''
1 GNU diff is the reference for all of these results.
1 GNU diff is the reference for all of these results.
2
2
3 Prepare tests:
3 Prepare tests:
4
4
5 $ echo '[alias]' >> $HGRCPATH
5 $ echo '[alias]' >> $HGRCPATH
6 $ echo 'ndiff = diff --nodates' >> $HGRCPATH
6 $ echo 'ndiff = diff --nodates' >> $HGRCPATH
7
7
8 $ hg init
8 $ hg init
9 $ printf 'hello world\ngoodbye world\n' >foo
9 $ printf 'hello world\ngoodbye world\n' >foo
10 $ hg ci -Amfoo -ufoo
10 $ hg ci -Amfoo -ufoo
11 adding foo
11 adding foo
12
12
13
13
14 Test added blank lines:
14 Test added blank lines:
15
15
16 $ printf '\nhello world\n\ngoodbye world\n\n' >foo
16 $ printf '\nhello world\n\ngoodbye world\n\n' >foo
17
17
18 >>> two diffs showing three added lines <<<
18 >>> two diffs showing three added lines <<<
19
19
20 $ hg ndiff
20 $ hg ndiff
21 diff -r 540c40a65b78 foo
21 diff -r 540c40a65b78 foo
22 --- a/foo
22 --- a/foo
23 +++ b/foo
23 +++ b/foo
24 @@ -1,2 +1,5 @@
24 @@ -1,2 +1,5 @@
25 +
25 +
26 hello world
26 hello world
27 +
27 +
28 goodbye world
28 goodbye world
29 +
29 +
30 $ hg ndiff -b
30 $ hg ndiff -b
31 diff -r 540c40a65b78 foo
31 diff -r 540c40a65b78 foo
32 --- a/foo
32 --- a/foo
33 +++ b/foo
33 +++ b/foo
34 @@ -1,2 +1,5 @@
34 @@ -1,2 +1,5 @@
35 +
35 +
36 hello world
36 hello world
37 +
37 +
38 goodbye world
38 goodbye world
39 +
39 +
40
40
41 >>> no diffs <<<
41 >>> no diffs <<<
42
42
43 $ hg ndiff -B
43 $ hg ndiff -B
44 $ hg ndiff -Bb
44 $ hg ndiff -Bb
45
45
46
46
47 Test added horizontal space first on a line():
47 Test added horizontal space first on a line():
48
48
49 $ printf '\t hello world\ngoodbye world\n' >foo
49 $ printf '\t hello world\ngoodbye world\n' >foo
50
50
51 >>> four diffs showing added space first on the first line <<<
51 >>> four diffs showing added space first on the first line <<<
52
52
53 $ hg ndiff
53 $ hg ndiff
54 diff -r 540c40a65b78 foo
54 diff -r 540c40a65b78 foo
55 --- a/foo
55 --- a/foo
56 +++ b/foo
56 +++ b/foo
57 @@ -1,2 +1,2 @@
57 @@ -1,2 +1,2 @@
58 -hello world
58 -hello world
59 + hello world
59 + hello world
60 goodbye world
60 goodbye world
61
61
62 $ hg ndiff -b
62 $ hg ndiff -b
63 diff -r 540c40a65b78 foo
63 diff -r 540c40a65b78 foo
64 --- a/foo
64 --- a/foo
65 +++ b/foo
65 +++ b/foo
66 @@ -1,2 +1,2 @@
66 @@ -1,2 +1,2 @@
67 -hello world
67 -hello world
68 + hello world
68 + hello world
69 goodbye world
69 goodbye world
70
70
71 $ hg ndiff -B
71 $ hg ndiff -B
72 diff -r 540c40a65b78 foo
72 diff -r 540c40a65b78 foo
73 --- a/foo
73 --- a/foo
74 +++ b/foo
74 +++ b/foo
75 @@ -1,2 +1,2 @@
75 @@ -1,2 +1,2 @@
76 -hello world
76 -hello world
77 + hello world
77 + hello world
78 goodbye world
78 goodbye world
79
79
80 $ hg ndiff -Bb
80 $ hg ndiff -Bb
81 diff -r 540c40a65b78 foo
81 diff -r 540c40a65b78 foo
82 --- a/foo
82 --- a/foo
83 +++ b/foo
83 +++ b/foo
84 @@ -1,2 +1,2 @@
84 @@ -1,2 +1,2 @@
85 -hello world
85 -hello world
86 + hello world
86 + hello world
87 goodbye world
87 goodbye world
88
88
89
89
90 Test added horizontal space last on a line:
90 Test added horizontal space last on a line:
91
91
92 $ printf 'hello world\t \ngoodbye world\n' >foo
92 $ printf 'hello world\t \ngoodbye world\n' >foo
93
93
94 >>> two diffs showing space appended to the first line <<<
94 >>> two diffs showing space appended to the first line <<<
95
95
96 $ hg ndiff
96 $ hg ndiff
97 diff -r 540c40a65b78 foo
97 diff -r 540c40a65b78 foo
98 --- a/foo
98 --- a/foo
99 +++ b/foo
99 +++ b/foo
100 @@ -1,2 +1,2 @@
100 @@ -1,2 +1,2 @@
101 -hello world
101 -hello world
102 +hello world
102 +hello world
103 goodbye world
103 goodbye world
104
104
105 $ hg ndiff -B
105 $ hg ndiff -B
106 diff -r 540c40a65b78 foo
106 diff -r 540c40a65b78 foo
107 --- a/foo
107 --- a/foo
108 +++ b/foo
108 +++ b/foo
109 @@ -1,2 +1,2 @@
109 @@ -1,2 +1,2 @@
110 -hello world
110 -hello world
111 +hello world
111 +hello world
112 goodbye world
112 goodbye world
113
113
114 >>> no diffs <<<
114 >>> no diffs <<<
115
115
116 $ hg ndiff -b
116 $ hg ndiff -b
117 $ hg ndiff -Bb
117 $ hg ndiff -Bb
118
118
119
119
120 Test added horizontal space in the middle of a word:
120 Test added horizontal space in the middle of a word:
121
121
122 $ printf 'hello world\ngood bye world\n' >foo
122 $ printf 'hello world\ngood bye world\n' >foo
123
123
124 >>> four diffs showing space inserted into "goodbye" <<<
124 >>> four diffs showing space inserted into "goodbye" <<<
125
125
126 $ hg ndiff
126 $ hg ndiff
127 diff -r 540c40a65b78 foo
127 diff -r 540c40a65b78 foo
128 --- a/foo
128 --- a/foo
129 +++ b/foo
129 +++ b/foo
130 @@ -1,2 +1,2 @@
130 @@ -1,2 +1,2 @@
131 hello world
131 hello world
132 -goodbye world
132 -goodbye world
133 +good bye world
133 +good bye world
134
134
135 $ hg ndiff -B
135 $ hg ndiff -B
136 diff -r 540c40a65b78 foo
136 diff -r 540c40a65b78 foo
137 --- a/foo
137 --- a/foo
138 +++ b/foo
138 +++ b/foo
139 @@ -1,2 +1,2 @@
139 @@ -1,2 +1,2 @@
140 hello world
140 hello world
141 -goodbye world
141 -goodbye world
142 +good bye world
142 +good bye world
143
143
144 $ hg ndiff -b
144 $ hg ndiff -b
145 diff -r 540c40a65b78 foo
145 diff -r 540c40a65b78 foo
146 --- a/foo
146 --- a/foo
147 +++ b/foo
147 +++ b/foo
148 @@ -1,2 +1,2 @@
148 @@ -1,2 +1,2 @@
149 hello world
149 hello world
150 -goodbye world
150 -goodbye world
151 +good bye world
151 +good bye world
152
152
153 $ hg ndiff -Bb
153 $ hg ndiff -Bb
154 diff -r 540c40a65b78 foo
154 diff -r 540c40a65b78 foo
155 --- a/foo
155 --- a/foo
156 +++ b/foo
156 +++ b/foo
157 @@ -1,2 +1,2 @@
157 @@ -1,2 +1,2 @@
158 hello world
158 hello world
159 -goodbye world
159 -goodbye world
160 +good bye world
160 +good bye world
161
161
162
162
163 Test increased horizontal whitespace amount:
163 Test increased horizontal whitespace amount:
164
164
165 $ printf 'hello world\ngoodbye\t\t \tworld\n' >foo
165 $ printf 'hello world\ngoodbye\t\t \tworld\n' >foo
166
166
167 >>> two diffs showing changed whitespace amount in the last line <<<
167 >>> two diffs showing changed whitespace amount in the last line <<<
168
168
169 $ hg ndiff
169 $ hg ndiff
170 diff -r 540c40a65b78 foo
170 diff -r 540c40a65b78 foo
171 --- a/foo
171 --- a/foo
172 +++ b/foo
172 +++ b/foo
173 @@ -1,2 +1,2 @@
173 @@ -1,2 +1,2 @@
174 hello world
174 hello world
175 -goodbye world
175 -goodbye world
176 +goodbye world
176 +goodbye world
177
177
178 $ hg ndiff -B
178 $ hg ndiff -B
179 diff -r 540c40a65b78 foo
179 diff -r 540c40a65b78 foo
180 --- a/foo
180 --- a/foo
181 +++ b/foo
181 +++ b/foo
182 @@ -1,2 +1,2 @@
182 @@ -1,2 +1,2 @@
183 hello world
183 hello world
184 -goodbye world
184 -goodbye world
185 +goodbye world
185 +goodbye world
186
186
187 >>> no diffs <<<
187 >>> no diffs <<<
188
188
189 $ hg ndiff -b
189 $ hg ndiff -b
190 $ hg ndiff -Bb
190 $ hg ndiff -Bb
191
191
192
192
193 Test added blank line with horizontal whitespace:
193 Test added blank line with horizontal whitespace:
194
194
195 $ printf 'hello world\n \t\ngoodbye world\n' >foo
195 $ printf 'hello world\n \t\ngoodbye world\n' >foo
196
196
197 >>> three diffs showing added blank line with horizontal space <<<
197 >>> three diffs showing added blank line with horizontal space <<<
198
198
199 $ hg ndiff
199 $ hg ndiff
200 diff -r 540c40a65b78 foo
200 diff -r 540c40a65b78 foo
201 --- a/foo
201 --- a/foo
202 +++ b/foo
202 +++ b/foo
203 @@ -1,2 +1,3 @@
203 @@ -1,2 +1,3 @@
204 hello world
204 hello world
205 +
205 +
206 goodbye world
206 goodbye world
207
207
208 $ hg ndiff -B
208 $ hg ndiff -B
209 diff -r 540c40a65b78 foo
209 diff -r 540c40a65b78 foo
210 --- a/foo
210 --- a/foo
211 +++ b/foo
211 +++ b/foo
212 @@ -1,2 +1,3 @@
212 @@ -1,2 +1,3 @@
213 hello world
213 hello world
214 +
214 +
215 goodbye world
215 goodbye world
216
216
217 $ hg ndiff -b
217 $ hg ndiff -b
218 diff -r 540c40a65b78 foo
218 diff -r 540c40a65b78 foo
219 --- a/foo
219 --- a/foo
220 +++ b/foo
220 +++ b/foo
221 @@ -1,2 +1,3 @@
221 @@ -1,2 +1,3 @@
222 hello world
222 hello world
223 +
223 +
224 goodbye world
224 goodbye world
225
225
226 >>> no diffs <<<
226 >>> no diffs <<<
227
227
228 $ hg ndiff -Bb
228 $ hg ndiff -Bb
229
229
230
230
231 Test added blank line with other whitespace:
231 Test added blank line with other whitespace:
232
232
233 $ printf 'hello world\n \t\ngoodbye world \n' >foo
233 $ printf 'hello world\n \t\ngoodbye world \n' >foo
234
234
235 >>> three diffs showing added blank line with other space <<<
235 >>> three diffs showing added blank line with other space <<<
236
236
237 $ hg ndiff
237 $ hg ndiff
238 diff -r 540c40a65b78 foo
238 diff -r 540c40a65b78 foo
239 --- a/foo
239 --- a/foo
240 +++ b/foo
240 +++ b/foo
241 @@ -1,2 +1,3 @@
241 @@ -1,2 +1,3 @@
242 -hello world
242 -hello world
243 -goodbye world
243 -goodbye world
244 +hello world
244 +hello world
245 +
245 +
246 +goodbye world
246 +goodbye world
247
247
248 $ hg ndiff -B
248 $ hg ndiff -B
249 diff -r 540c40a65b78 foo
249 diff -r 540c40a65b78 foo
250 --- a/foo
250 --- a/foo
251 +++ b/foo
251 +++ b/foo
252 @@ -1,2 +1,3 @@
252 @@ -1,2 +1,3 @@
253 -hello world
253 -hello world
254 -goodbye world
254 -goodbye world
255 +hello world
255 +hello world
256 +
256 +
257 +goodbye world
257 +goodbye world
258
258
259 $ hg ndiff -b
259 $ hg ndiff -b
260 diff -r 540c40a65b78 foo
260 diff -r 540c40a65b78 foo
261 --- a/foo
261 --- a/foo
262 +++ b/foo
262 +++ b/foo
263 @@ -1,2 +1,3 @@
263 @@ -1,2 +1,3 @@
264 hello world
264 hello world
265 +
265 +
266 goodbye world
266 goodbye world
267
267
268 >>> no diffs <<<
268 >>> no diffs <<<
269
269
270 $ hg ndiff -Bb
270 $ hg ndiff -Bb
271
271
272
272
273 Test whitespace changes:
273 Test whitespace changes:
274
274
275 $ printf 'helloworld\ngoodbye\tworld \n' >foo
275 $ printf 'helloworld\ngoodbye\tworld \n' >foo
276
276
277 >>> four diffs showing changed whitespace <<<
277 >>> four diffs showing changed whitespace <<<
278
278
279 $ hg ndiff
279 $ hg ndiff
280 diff -r 540c40a65b78 foo
280 diff -r 540c40a65b78 foo
281 --- a/foo
281 --- a/foo
282 +++ b/foo
282 +++ b/foo
283 @@ -1,2 +1,2 @@
283 @@ -1,2 +1,2 @@
284 -hello world
284 -hello world
285 -goodbye world
285 -goodbye world
286 +helloworld
286 +helloworld
287 +goodbye world
287 +goodbye world
288
288
289 $ hg ndiff -B
289 $ hg ndiff -B
290 diff -r 540c40a65b78 foo
290 diff -r 540c40a65b78 foo
291 --- a/foo
291 --- a/foo
292 +++ b/foo
292 +++ b/foo
293 @@ -1,2 +1,2 @@
293 @@ -1,2 +1,2 @@
294 -hello world
294 -hello world
295 -goodbye world
295 -goodbye world
296 +helloworld
296 +helloworld
297 +goodbye world
297 +goodbye world
298
298
299 $ hg ndiff -b
299 $ hg ndiff -b
300 diff -r 540c40a65b78 foo
300 diff -r 540c40a65b78 foo
301 --- a/foo
301 --- a/foo
302 +++ b/foo
302 +++ b/foo
303 @@ -1,2 +1,2 @@
303 @@ -1,2 +1,2 @@
304 -hello world
304 -hello world
305 +helloworld
305 +helloworld
306 goodbye world
306 goodbye world
307
307
308 $ hg ndiff -Bb
308 $ hg ndiff -Bb
309 diff -r 540c40a65b78 foo
309 diff -r 540c40a65b78 foo
310 --- a/foo
310 --- a/foo
311 +++ b/foo
311 +++ b/foo
312 @@ -1,2 +1,2 @@
312 @@ -1,2 +1,2 @@
313 -hello world
313 -hello world
314 +helloworld
314 +helloworld
315 goodbye world
315 goodbye world
316
316
317 >>> no diffs <<<
317 >>> no diffs <<<
318
318
319 $ hg ndiff -w
319 $ hg ndiff -w
320
320
321
321
322 Test whitespace changes and blank lines:
322 Test whitespace changes and blank lines:
323
323
324 $ printf 'helloworld\n\n\n\ngoodbye\tworld \n' >foo
324 $ printf 'helloworld\n\n\n\ngoodbye\tworld \n' >foo
325
325
326 >>> five diffs showing changed whitespace <<<
326 >>> five diffs showing changed whitespace <<<
327
327
328 $ hg ndiff
328 $ hg ndiff
329 diff -r 540c40a65b78 foo
329 diff -r 540c40a65b78 foo
330 --- a/foo
330 --- a/foo
331 +++ b/foo
331 +++ b/foo
332 @@ -1,2 +1,5 @@
332 @@ -1,2 +1,5 @@
333 -hello world
333 -hello world
334 -goodbye world
334 -goodbye world
335 +helloworld
335 +helloworld
336 +
336 +
337 +
337 +
338 +
338 +
339 +goodbye world
339 +goodbye world
340
340
341 $ hg ndiff -B
341 $ hg ndiff -B
342 diff -r 540c40a65b78 foo
342 diff -r 540c40a65b78 foo
343 --- a/foo
343 --- a/foo
344 +++ b/foo
344 +++ b/foo
345 @@ -1,2 +1,5 @@
345 @@ -1,2 +1,5 @@
346 -hello world
346 -hello world
347 -goodbye world
347 -goodbye world
348 +helloworld
348 +helloworld
349 +
349 +
350 +
350 +
351 +
351 +
352 +goodbye world
352 +goodbye world
353
353
354 $ hg ndiff -b
354 $ hg ndiff -b
355 diff -r 540c40a65b78 foo
355 diff -r 540c40a65b78 foo
356 --- a/foo
356 --- a/foo
357 +++ b/foo
357 +++ b/foo
358 @@ -1,2 +1,5 @@
358 @@ -1,2 +1,5 @@
359 -hello world
359 -hello world
360 +helloworld
360 +helloworld
361 +
361 +
362 +
362 +
363 +
363 +
364 goodbye world
364 goodbye world
365
365
366 $ hg ndiff -Bb
366 $ hg ndiff -Bb
367 diff -r 540c40a65b78 foo
367 diff -r 540c40a65b78 foo
368 --- a/foo
368 --- a/foo
369 +++ b/foo
369 +++ b/foo
370 @@ -1,2 +1,5 @@
370 @@ -1,2 +1,5 @@
371 -hello world
371 -hello world
372 +helloworld
372 +helloworld
373 +
373 +
374 +
374 +
375 +
375 +
376 goodbye world
376 goodbye world
377
377
378 $ hg ndiff -w
378 $ hg ndiff -w
379 diff -r 540c40a65b78 foo
379 diff -r 540c40a65b78 foo
380 --- a/foo
380 --- a/foo
381 +++ b/foo
381 +++ b/foo
382 @@ -1,2 +1,5 @@
382 @@ -1,2 +1,5 @@
383 hello world
383 hello world
384 +
384 +
385 +
385 +
386 +
386 +
387 goodbye world
387 goodbye world
388
388
389 >>> no diffs <<<
389 >>> no diffs <<<
390
390
391 $ hg ndiff -wB
391 $ hg ndiff -wB
392
392
393
393
394 Test \r (carriage return) as used in "DOS" line endings:
394 Test \r (carriage return) as used in "DOS" line endings:
395
395
396 $ printf 'hello world\r\n\r\ngoodbye\rworld\n' >foo
396 $ printf 'hello world\r\n\r\ngoodbye\rworld\n' >foo
397
397
398 $ hg ndiff
398 $ hg ndiff
399 diff -r 540c40a65b78 foo
399 diff -r 540c40a65b78 foo
400 --- a/foo
400 --- a/foo
401 +++ b/foo
401 +++ b/foo
402 @@ -1,2 +1,3 @@
402 @@ -1,2 +1,3 @@
403 -hello world
403 -hello world
404 -goodbye world
404 -goodbye world
405 +hello world
405 +hello world\r (esc)
406 +
406 +\r (esc)
407 +goodbye
407 +goodbye\rworld (esc)
408 world
409 world
408
410
409 No completely blank lines to ignore:
411 No completely blank lines to ignore:
410
412
411 $ hg ndiff --ignore-blank-lines
413 $ hg ndiff --ignore-blank-lines
412 diff -r 540c40a65b78 foo
414 diff -r 540c40a65b78 foo
413 --- a/foo
415 --- a/foo
414 +++ b/foo
416 +++ b/foo
415 @@ -1,2 +1,3 @@
417 @@ -1,2 +1,3 @@
416 -hello world
418 -hello world
417 -goodbye world
419 -goodbye world
418 +hello world\r (esc)
420 +hello world
419 +\r (esc)
421 +
420 +goodbye\rworld (esc)
422 +goodbye
423 world
421
424 world
422 Only new line noticed:
425
423
426 Only new line noticed:
424 $ hg ndiff --ignore-space-change
427
425 diff -r 540c40a65b78 foo
428 $ hg ndiff --ignore-space-change
426 --- a/foo
429 diff -r 540c40a65b78 foo
427 +++ b/foo
430 --- a/foo
428 @@ -1,2 +1,3 @@
431 +++ b/foo
429 hello world
432 @@ -1,2 +1,3 @@
430 +\r (esc)
433 hello world
431 goodbye world
434 +
432
435 goodbye world
433 $ hg ndiff --ignore-all-space
436
434 diff -r 540c40a65b78 foo
437 $ hg ndiff --ignore-all-space
435 --- a/foo
438 diff -r 540c40a65b78 foo
436 +++ b/foo
439 --- a/foo
437 @@ -1,2 +1,3 @@
440 +++ b/foo
438 hello world
441 @@ -1,2 +1,3 @@
439 +\r (esc)
442 hello world
440 goodbye world
443 +
441
444 goodbye world
442 New line not noticed when space change ignored:
445
443
446 New line not noticed when space change ignored:
444 $ hg ndiff --ignore-blank-lines --ignore-all-space
@@ -1,18 +1,18 b''
1 $ hg init
1 $ hg init
2
2
3 $ python -c 'print "confuse str.splitlines\nembedded\rnewline"' > a
3 $ python -c 'print "confuse str.splitlines\nembedded\rnewline"' > a
4 $ hg ci -Ama -d '1 0'
4 $ hg ci -Ama -d '1 0'
5 adding a
5 adding a
6
6
7 $ echo clean diff >> a
7 $ echo clean diff >> a
8 $ hg ci -mb -d '2 0'
8 $ hg ci -mb -d '2 0'
9
9
10 $ hg diff -r0 -r1
10 $ hg diff -r0 -r1
11 diff -r 107ba6f817b5 -r 310ce7989cdc a
11 diff -r 107ba6f817b5 -r 310ce7989cdc a
12 --- a/a Thu Jan 01 00:00:01 1970 +0000
12 --- a/a Thu Jan 01 00:00:01 1970 +0000
13 +++ b/a Thu Jan 01 00:00:02 1970 +0000
13 +++ b/a Thu Jan 01 00:00:02 1970 +0000
14 @@ -1,2 +1,3 @@
14 @@ -1,2 +1,3 @@
15 confuse str.splitlines
15 confuse str.splitlines
16 embedded
16 embedded\rnewline (esc)
17 newline
17 +clean diff
18 +clean diff
18
@@ -1,245 +1,245 b''
1 Test character encoding
1 Test character encoding
2
2
3 $ hg init t
3 $ hg init t
4 $ cd t
4 $ cd t
5
5
6 we need a repo with some legacy latin-1 changesets
6 we need a repo with some legacy latin-1 changesets
7
7
8 $ hg unbundle $TESTDIR/legacy-encoding.hg
8 $ hg unbundle $TESTDIR/legacy-encoding.hg
9 adding changesets
9 adding changesets
10 adding manifests
10 adding manifests
11 adding file changes
11 adding file changes
12 added 2 changesets with 2 changes to 1 files
12 added 2 changesets with 2 changes to 1 files
13 (run 'hg update' to get a working copy)
13 (run 'hg update' to get a working copy)
14 $ hg co
14 $ hg co
15 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
15 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
16 $ python << EOF
16 $ python << EOF
17 > f = file('latin-1', 'w'); f.write("latin-1 e' encoded: \xe9"); f.close()
17 > f = file('latin-1', 'w'); f.write("latin-1 e' encoded: \xe9"); f.close()
18 > f = file('utf-8', 'w'); f.write("utf-8 e' encoded: \xc3\xa9"); f.close()
18 > f = file('utf-8', 'w'); f.write("utf-8 e' encoded: \xc3\xa9"); f.close()
19 > f = file('latin-1-tag', 'w'); f.write("\xe9"); f.close()
19 > f = file('latin-1-tag', 'w'); f.write("\xe9"); f.close()
20 > EOF
20 > EOF
21
21
22 should fail with encoding error
22 should fail with encoding error
23
23
24 $ echo "plain old ascii" > a
24 $ echo "plain old ascii" > a
25 $ hg st
25 $ hg st
26 M a
26 M a
27 ? latin-1
27 ? latin-1
28 ? latin-1-tag
28 ? latin-1-tag
29 ? utf-8
29 ? utf-8
30 $ HGENCODING=ascii hg ci -l latin-1
30 $ HGENCODING=ascii hg ci -l latin-1
31 transaction abort!
31 transaction abort!
32 rollback completed
32 rollback completed
33 abort: decoding near ' encoded: οΏ½': 'ascii' codec can't decode byte 0xe9 in position 20: ordinal not in range(128)!
33 abort: decoding near ' encoded: \xe9': 'ascii' codec can't decode byte 0xe9 in position 20: ordinal not in range(128)! (esc)
34 [255]
34 [255]
35
35
36 these should work
36 these should work
37
37
38 $ echo "latin-1" > a
38 $ echo "latin-1" > a
39 $ HGENCODING=latin-1 hg ci -l latin-1
39 $ HGENCODING=latin-1 hg ci -l latin-1
40 $ echo "utf-8" > a
40 $ echo "utf-8" > a
41 $ HGENCODING=utf-8 hg ci -l utf-8
41 $ HGENCODING=utf-8 hg ci -l utf-8
42 $ HGENCODING=latin-1 hg tag `cat latin-1-tag`
42 $ HGENCODING=latin-1 hg tag `cat latin-1-tag`
43 $ HGENCODING=latin-1 hg branch `cat latin-1-tag`
43 $ HGENCODING=latin-1 hg branch `cat latin-1-tag`
44 marked working directory as branch οΏ½
44 marked working directory as branch \xe9 (esc)
45 $ HGENCODING=latin-1 hg ci -m 'latin1 branch'
45 $ HGENCODING=latin-1 hg ci -m 'latin1 branch'
46 $ rm .hg/branch
46 $ rm .hg/branch
47
47
48 hg log (ascii)
48 hg log (ascii)
49
49
50 $ hg --encoding ascii log
50 $ hg --encoding ascii log
51 changeset: 5:093c6077d1c8
51 changeset: 5:093c6077d1c8
52 branch: ?
52 branch: ?
53 tag: tip
53 tag: tip
54 user: test
54 user: test
55 date: Thu Jan 01 00:00:00 1970 +0000
55 date: Thu Jan 01 00:00:00 1970 +0000
56 summary: latin1 branch
56 summary: latin1 branch
57
57
58 changeset: 4:94db611b4196
58 changeset: 4:94db611b4196
59 user: test
59 user: test
60 date: Thu Jan 01 00:00:00 1970 +0000
60 date: Thu Jan 01 00:00:00 1970 +0000
61 summary: Added tag ? for changeset ca661e7520de
61 summary: Added tag ? for changeset ca661e7520de
62
62
63 changeset: 3:ca661e7520de
63 changeset: 3:ca661e7520de
64 tag: ?
64 tag: ?
65 user: test
65 user: test
66 date: Thu Jan 01 00:00:00 1970 +0000
66 date: Thu Jan 01 00:00:00 1970 +0000
67 summary: utf-8 e' encoded: ?
67 summary: utf-8 e' encoded: ?
68
68
69 changeset: 2:650c6f3d55dd
69 changeset: 2:650c6f3d55dd
70 user: test
70 user: test
71 date: Thu Jan 01 00:00:00 1970 +0000
71 date: Thu Jan 01 00:00:00 1970 +0000
72 summary: latin-1 e' encoded: ?
72 summary: latin-1 e' encoded: ?
73
73
74 changeset: 1:0e5b7e3f9c4a
74 changeset: 1:0e5b7e3f9c4a
75 user: test
75 user: test
76 date: Mon Jan 12 13:46:40 1970 +0000
76 date: Mon Jan 12 13:46:40 1970 +0000
77 summary: koi8-r: ????? = u'\u0440\u0442\u0443\u0442\u044c'
77 summary: koi8-r: ????? = u'\u0440\u0442\u0443\u0442\u044c'
78
78
79 changeset: 0:1e78a93102a3
79 changeset: 0:1e78a93102a3
80 user: test
80 user: test
81 date: Mon Jan 12 13:46:40 1970 +0000
81 date: Mon Jan 12 13:46:40 1970 +0000
82 summary: latin-1 e': ? = u'\xe9'
82 summary: latin-1 e': ? = u'\xe9'
83
83
84
84
85 hg log (latin-1)
85 hg log (latin-1)
86
86
87 $ hg --encoding latin-1 log
87 $ hg --encoding latin-1 log
88 changeset: 5:093c6077d1c8
88 changeset: 5:093c6077d1c8
89 branch: οΏ½
89 branch: \xe9 (esc)
90 tag: tip
90 tag: tip
91 user: test
91 user: test
92 date: Thu Jan 01 00:00:00 1970 +0000
92 date: Thu Jan 01 00:00:00 1970 +0000
93 summary: latin1 branch
93 summary: latin1 branch
94
94
95 changeset: 4:94db611b4196
95 changeset: 4:94db611b4196
96 user: test
96 user: test
97 date: Thu Jan 01 00:00:00 1970 +0000
97 date: Thu Jan 01 00:00:00 1970 +0000
98 summary: Added tag οΏ½ for changeset ca661e7520de
98 summary: Added tag \xe9 for changeset ca661e7520de (esc)
99
99
100 changeset: 3:ca661e7520de
100 changeset: 3:ca661e7520de
101 tag: οΏ½
101 tag: \xe9 (esc)
102 user: test
102 user: test
103 date: Thu Jan 01 00:00:00 1970 +0000
103 date: Thu Jan 01 00:00:00 1970 +0000
104 summary: utf-8 e' encoded: οΏ½
104 summary: utf-8 e' encoded: \xe9 (esc)
105
105
106 changeset: 2:650c6f3d55dd
106 changeset: 2:650c6f3d55dd
107 user: test
107 user: test
108 date: Thu Jan 01 00:00:00 1970 +0000
108 date: Thu Jan 01 00:00:00 1970 +0000
109 summary: latin-1 e' encoded: οΏ½
109 summary: latin-1 e' encoded: \xe9 (esc)
110
110
111 changeset: 1:0e5b7e3f9c4a
111 changeset: 1:0e5b7e3f9c4a
112 user: test
112 user: test
113 date: Mon Jan 12 13:46:40 1970 +0000
113 date: Mon Jan 12 13:46:40 1970 +0000
114 summary: koi8-r: οΏ½οΏ½οΏ½οΏ½οΏ½ = u'\u0440\u0442\u0443\u0442\u044c'
114 summary: koi8-r: \xd2\xd4\xd5\xd4\xd8 = u'\\u0440\\u0442\\u0443\\u0442\\u044c' (esc)
115
115
116 changeset: 0:1e78a93102a3
116 changeset: 0:1e78a93102a3
117 user: test
117 user: test
118 date: Mon Jan 12 13:46:40 1970 +0000
118 date: Mon Jan 12 13:46:40 1970 +0000
119 summary: latin-1 e': οΏ½ = u'\xe9'
119 summary: latin-1 e': \xe9 = u'\\xe9' (esc)
120
120
121
121
122 hg log (utf-8)
122 hg log (utf-8)
123
123
124 $ hg --encoding utf-8 log
124 $ hg --encoding utf-8 log
125 changeset: 5:093c6077d1c8
125 changeset: 5:093c6077d1c8
126 branch: Γ©
126 branch: \xc3\xa9 (esc)
127 tag: tip
127 tag: tip
128 user: test
128 user: test
129 date: Thu Jan 01 00:00:00 1970 +0000
129 date: Thu Jan 01 00:00:00 1970 +0000
130 summary: latin1 branch
130 summary: latin1 branch
131
131
132 changeset: 4:94db611b4196
132 changeset: 4:94db611b4196
133 user: test
133 user: test
134 date: Thu Jan 01 00:00:00 1970 +0000
134 date: Thu Jan 01 00:00:00 1970 +0000
135 summary: Added tag Γ© for changeset ca661e7520de
135 summary: Added tag \xc3\xa9 for changeset ca661e7520de (esc)
136
136
137 changeset: 3:ca661e7520de
137 changeset: 3:ca661e7520de
138 tag: Γ©
138 tag: \xc3\xa9 (esc)
139 user: test
139 user: test
140 date: Thu Jan 01 00:00:00 1970 +0000
140 date: Thu Jan 01 00:00:00 1970 +0000
141 summary: utf-8 e' encoded: Γ©
141 summary: utf-8 e' encoded: \xc3\xa9 (esc)
142
142
143 changeset: 2:650c6f3d55dd
143 changeset: 2:650c6f3d55dd
144 user: test
144 user: test
145 date: Thu Jan 01 00:00:00 1970 +0000
145 date: Thu Jan 01 00:00:00 1970 +0000
146 summary: latin-1 e' encoded: Γ©
146 summary: latin-1 e' encoded: \xc3\xa9 (esc)
147
147
148 changeset: 1:0e5b7e3f9c4a
148 changeset: 1:0e5b7e3f9c4a
149 user: test
149 user: test
150 date: Mon Jan 12 13:46:40 1970 +0000
150 date: Mon Jan 12 13:46:40 1970 +0000
151 summary: koi8-r: Γ’Γ”Γ•Γ”Γ˜ = u'\u0440\u0442\u0443\u0442\u044c'
151 summary: koi8-r: \xc3\x92\xc3\x94\xc3\x95\xc3\x94\xc3\x98 = u'\\u0440\\u0442\\u0443\\u0442\\u044c' (esc)
152
152
153 changeset: 0:1e78a93102a3
153 changeset: 0:1e78a93102a3
154 user: test
154 user: test
155 date: Mon Jan 12 13:46:40 1970 +0000
155 date: Mon Jan 12 13:46:40 1970 +0000
156 summary: latin-1 e': Γ© = u'\xe9'
156 summary: latin-1 e': \xc3\xa9 = u'\\xe9' (esc)
157
157
158
158
159 hg tags (ascii)
159 hg tags (ascii)
160
160
161 $ HGENCODING=ascii hg tags
161 $ HGENCODING=ascii hg tags
162 tip 5:093c6077d1c8
162 tip 5:093c6077d1c8
163 ? 3:ca661e7520de
163 ? 3:ca661e7520de
164
164
165 hg tags (latin-1)
165 hg tags (latin-1)
166
166
167 $ HGENCODING=latin-1 hg tags
167 $ HGENCODING=latin-1 hg tags
168 tip 5:093c6077d1c8
168 tip 5:093c6077d1c8
169 οΏ½ 3:ca661e7520de
169 \xe9 3:ca661e7520de (esc)
170
170
171 hg tags (utf-8)
171 hg tags (utf-8)
172
172
173 $ HGENCODING=utf-8 hg tags
173 $ HGENCODING=utf-8 hg tags
174 tip 5:093c6077d1c8
174 tip 5:093c6077d1c8
175 Γ© 3:ca661e7520de
175 \xc3\xa9 3:ca661e7520de (esc)
176
176
177 hg branches (ascii)
177 hg branches (ascii)
178
178
179 $ HGENCODING=ascii hg branches
179 $ HGENCODING=ascii hg branches
180 ? 5:093c6077d1c8
180 ? 5:093c6077d1c8
181 default 4:94db611b4196 (inactive)
181 default 4:94db611b4196 (inactive)
182
182
183 hg branches (latin-1)
183 hg branches (latin-1)
184
184
185 $ HGENCODING=latin-1 hg branches
185 $ HGENCODING=latin-1 hg branches
186 οΏ½ 5:093c6077d1c8
186 \xe9 5:093c6077d1c8 (esc)
187 default 4:94db611b4196 (inactive)
187 default 4:94db611b4196 (inactive)
188
188
189 hg branches (utf-8)
189 hg branches (utf-8)
190
190
191 $ HGENCODING=utf-8 hg branches
191 $ HGENCODING=utf-8 hg branches
192 Γ© 5:093c6077d1c8
192 \xc3\xa9 5:093c6077d1c8 (esc)
193 default 4:94db611b4196 (inactive)
193 default 4:94db611b4196 (inactive)
194 $ echo '[ui]' >> .hg/hgrc
194 $ echo '[ui]' >> .hg/hgrc
195 $ echo 'fallbackencoding = koi8-r' >> .hg/hgrc
195 $ echo 'fallbackencoding = koi8-r' >> .hg/hgrc
196
196
197 hg log (utf-8)
197 hg log (utf-8)
198
198
199 $ HGENCODING=utf-8 hg log
199 $ HGENCODING=utf-8 hg log
200 changeset: 5:093c6077d1c8
200 changeset: 5:093c6077d1c8
201 branch: Γ©
201 branch: \xc3\xa9 (esc)
202 tag: tip
202 tag: tip
203 user: test
203 user: test
204 date: Thu Jan 01 00:00:00 1970 +0000
204 date: Thu Jan 01 00:00:00 1970 +0000
205 summary: latin1 branch
205 summary: latin1 branch
206
206
207 changeset: 4:94db611b4196
207 changeset: 4:94db611b4196
208 user: test
208 user: test
209 date: Thu Jan 01 00:00:00 1970 +0000
209 date: Thu Jan 01 00:00:00 1970 +0000
210 summary: Added tag Γ© for changeset ca661e7520de
210 summary: Added tag \xc3\xa9 for changeset ca661e7520de (esc)
211
211
212 changeset: 3:ca661e7520de
212 changeset: 3:ca661e7520de
213 tag: Γ©
213 tag: \xc3\xa9 (esc)
214 user: test
214 user: test
215 date: Thu Jan 01 00:00:00 1970 +0000
215 date: Thu Jan 01 00:00:00 1970 +0000
216 summary: utf-8 e' encoded: Γ©
216 summary: utf-8 e' encoded: \xc3\xa9 (esc)
217
217
218 changeset: 2:650c6f3d55dd
218 changeset: 2:650c6f3d55dd
219 user: test
219 user: test
220 date: Thu Jan 01 00:00:00 1970 +0000
220 date: Thu Jan 01 00:00:00 1970 +0000
221 summary: latin-1 e' encoded: Γ©
221 summary: latin-1 e' encoded: \xc3\xa9 (esc)
222
222
223 changeset: 1:0e5b7e3f9c4a
223 changeset: 1:0e5b7e3f9c4a
224 user: test
224 user: test
225 date: Mon Jan 12 13:46:40 1970 +0000
225 date: Mon Jan 12 13:46:40 1970 +0000
226 summary: koi8-r: Ρ€Ρ‚ΡƒΡ‚ΡŒ = u'\u0440\u0442\u0443\u0442\u044c'
226 summary: koi8-r: \xd1\x80\xd1\x82\xd1\x83\xd1\x82\xd1\x8c = u'\\u0440\\u0442\\u0443\\u0442\\u044c' (esc)
227
227
228 changeset: 0:1e78a93102a3
228 changeset: 0:1e78a93102a3
229 user: test
229 user: test
230 date: Mon Jan 12 13:46:40 1970 +0000
230 date: Mon Jan 12 13:46:40 1970 +0000
231 summary: latin-1 e': И = u'\xe9'
231 summary: latin-1 e': \xd0\x98 = u'\\xe9' (esc)
232
232
233
233
234 hg log (dolphin)
234 hg log (dolphin)
235
235
236 $ HGENCODING=dolphin hg log
236 $ HGENCODING=dolphin hg log
237 abort: unknown encoding: dolphin, please check your locale settings
237 abort: unknown encoding: dolphin, please check your locale settings
238 [255]
238 [255]
239 $ HGENCODING=ascii hg branch `cat latin-1-tag`
239 $ HGENCODING=ascii hg branch `cat latin-1-tag`
240 abort: decoding near 'οΏ½': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)!
240 abort: decoding near '\xe9': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)! (esc)
241 [255]
241 [255]
242 $ cp latin-1-tag .hg/branch
242 $ cp latin-1-tag .hg/branch
243 $ HGENCODING=latin-1 hg ci -m 'should fail'
243 $ HGENCODING=latin-1 hg ci -m 'should fail'
244 abort: branch name not in UTF-8!
244 abort: branch name not in UTF-8!
245 [255]
245 [255]
@@ -1,57 +1,57 b''
1 http://mercurial.selenic.com/bts/issue352
1 http://mercurial.selenic.com/bts/issue352
2
2
3 $ "$TESTDIR/hghave" eol-in-paths || exit 80
3 $ "$TESTDIR/hghave" eol-in-paths || exit 80
4
4
5 test issue352
5 test issue352
6
6
7 $ hg init foo
7 $ hg init foo
8 $ cd foo
8 $ cd foo
9 $ A=`printf 'he\rllo'`
9 $ A=`printf 'he\rllo'`
10 $ echo foo > "$A"
10 $ echo foo > "$A"
11 $ hg add
11 $ hg add
12 adding he
12 adding he\rllo (esc)
13 llo
13 abort: '\n' and '\r' disallowed in filenames: 'he\rllo'
14 abort: '\n' and '\r' disallowed in filenames: 'he\rllo'
14 [255]
15 [255]
15 $ hg ci -A -m m
16 $ hg ci -A -m m
16 adding he\rllo (esc)
17 adding he
17 abort: '\n' and '\r' disallowed in filenames: 'he\rllo'
18 llo
18 [255]
19 abort: '\n' and '\r' disallowed in filenames: 'he\rllo'
19 $ rm "$A"
20 [255]
20 $ echo foo > "hell
21 $ rm "$A"
21 > o"
22 $ echo foo > "hell
22 $ hg add
23 > o"
23 adding hell
24 $ hg add
24 o
25 adding hell
25 abort: '\n' and '\r' disallowed in filenames: 'hell\no'
26 o
26 [255]
27 abort: '\n' and '\r' disallowed in filenames: 'hell\no'
27 $ hg ci -A -m m
28 [255]
28 adding hell
29 $ hg ci -A -m m
29 o
30 adding hell
30 abort: '\n' and '\r' disallowed in filenames: 'hell\no'
31 o
31 [255]
32 abort: '\n' and '\r' disallowed in filenames: 'hell\no'
32 $ echo foo > "$A"
33 [255]
33 $ hg debugwalk
34 $ echo foo > "$A"
34 f he\rllo he\rllo (esc)
35 $ hg debugwalk
35 f hell
36 f he
36 o hell
37 llo he
37 o
38 llo
38
39 f hell
39 http://mercurial.selenic.com/bts/issue2036
40 o hell
40
41 o
41 $ cd ..
42
42
43 http://mercurial.selenic.com/bts/issue2036
43 test issue2039
44
44
45 $ cd ..
45 $ hg init bar
46
46 $ cd bar
47 test issue2039
47 $ echo "[extensions]" >> $HGRCPATH
48
48 $ echo "color=" >> $HGRCPATH
49 $ hg init bar
49 $ A=`printf 'foo\nbar'`
50 $ cd bar
50 $ B=`printf 'foo\nbar.baz'`
51 $ echo "[extensions]" >> $HGRCPATH
51 $ touch "$A"
52 $ echo "color=" >> $HGRCPATH
52 $ touch "$B"
53 $ A=`printf 'foo\nbar'`
53 $ hg status --color=always
54 $ B=`printf 'foo\nbar.baz'`
54 \x1b[0;35;1;4m? foo\x1b[0m (esc)
55 $ touch "$A"
55 \x1b[0;35;1;4mbar\x1b[0m (esc)
56 $ touch "$B"
56 \x1b[0;35;1;4m? foo\x1b[0m (esc)
57 $ hg status --color=always
57 \x1b[0;35;1;4mbar.baz\x1b[0m (esc)
@@ -1,168 +1,168 b''
1 $ mkdir t
1 $ mkdir t
2 $ cd t
2 $ cd t
3 $ hg init
3 $ hg init
4 $ echo import > port
4 $ echo import > port
5 $ hg add port
5 $ hg add port
6 $ hg commit -m 0 -u spam -d '0 0'
6 $ hg commit -m 0 -u spam -d '0 0'
7 $ echo export >> port
7 $ echo export >> port
8 $ hg commit -m 1 -u eggs -d '1 0'
8 $ hg commit -m 1 -u eggs -d '1 0'
9 $ echo export > port
9 $ echo export > port
10 $ echo vaportight >> port
10 $ echo vaportight >> port
11 $ echo 'import/export' >> port
11 $ echo 'import/export' >> port
12 $ hg commit -m 2 -u spam -d '2 0'
12 $ hg commit -m 2 -u spam -d '2 0'
13 $ echo 'import/export' >> port
13 $ echo 'import/export' >> port
14 $ hg commit -m 3 -u eggs -d '3 0'
14 $ hg commit -m 3 -u eggs -d '3 0'
15 $ head -n 3 port > port1
15 $ head -n 3 port > port1
16 $ mv port1 port
16 $ mv port1 port
17 $ hg commit -m 4 -u spam -d '4 0'
17 $ hg commit -m 4 -u spam -d '4 0'
18
18
19 pattern error
19 pattern error
20
20
21 $ hg grep '**test**'
21 $ hg grep '**test**'
22 grep: invalid match pattern: nothing to repeat
22 grep: invalid match pattern: nothing to repeat
23 [1]
23 [1]
24
24
25 simple
25 simple
26
26
27 $ hg grep port port
27 $ hg grep port port
28 port:4:export
28 port:4:export
29 port:4:vaportight
29 port:4:vaportight
30 port:4:import/export
30 port:4:import/export
31
31
32 simple with color
32 simple with color
33
33
34 $ hg --config extensions.color= grep --config color.mode=ansi \
34 $ hg --config extensions.color= grep --config color.mode=ansi \
35 > --color=always port port
35 > --color=always port port
36 port:4:export
36 port:4:ex\x1b[0;31;1mport\x1b[0m (esc)
37 port:4:vaportight
37 port:4:va\x1b[0;31;1mport\x1b[0might (esc)
38 port:4:import/export
38 port:4:im\x1b[0;31;1mport\x1b[0m/export (esc)
39
39
40 all
40 all
41
41
42 $ hg grep --traceback --all -nu port port
42 $ hg grep --traceback --all -nu port port
43 port:4:4:-:spam:import/export
43 port:4:4:-:spam:import/export
44 port:3:4:+:eggs:import/export
44 port:3:4:+:eggs:import/export
45 port:2:1:-:spam:import
45 port:2:1:-:spam:import
46 port:2:2:-:spam:export
46 port:2:2:-:spam:export
47 port:2:1:+:spam:export
47 port:2:1:+:spam:export
48 port:2:2:+:spam:vaportight
48 port:2:2:+:spam:vaportight
49 port:2:3:+:spam:import/export
49 port:2:3:+:spam:import/export
50 port:1:2:+:eggs:export
50 port:1:2:+:eggs:export
51 port:0:1:+:spam:import
51 port:0:1:+:spam:import
52
52
53 other
53 other
54
54
55 $ hg grep import port
55 $ hg grep import port
56 port:4:import/export
56 port:4:import/export
57
57
58 $ hg cp port port2
58 $ hg cp port port2
59 $ hg commit -m 4 -u spam -d '5 0'
59 $ hg commit -m 4 -u spam -d '5 0'
60
60
61 follow
61 follow
62
62
63 $ hg grep --traceback -f 'import$' port2
63 $ hg grep --traceback -f 'import$' port2
64 port:0:import
64 port:0:import
65 $ echo deport >> port2
65 $ echo deport >> port2
66 $ hg commit -m 5 -u eggs -d '6 0'
66 $ hg commit -m 5 -u eggs -d '6 0'
67 $ hg grep -f --all -nu port port2
67 $ hg grep -f --all -nu port port2
68 port2:6:4:+:eggs:deport
68 port2:6:4:+:eggs:deport
69 port:4:4:-:spam:import/export
69 port:4:4:-:spam:import/export
70 port:3:4:+:eggs:import/export
70 port:3:4:+:eggs:import/export
71 port:2:1:-:spam:import
71 port:2:1:-:spam:import
72 port:2:2:-:spam:export
72 port:2:2:-:spam:export
73 port:2:1:+:spam:export
73 port:2:1:+:spam:export
74 port:2:2:+:spam:vaportight
74 port:2:2:+:spam:vaportight
75 port:2:3:+:spam:import/export
75 port:2:3:+:spam:import/export
76 port:1:2:+:eggs:export
76 port:1:2:+:eggs:export
77 port:0:1:+:spam:import
77 port:0:1:+:spam:import
78
78
79 $ cd ..
79 $ cd ..
80 $ hg init t2
80 $ hg init t2
81 $ cd t2
81 $ cd t2
82 $ hg grep foobar foo
82 $ hg grep foobar foo
83 [1]
83 [1]
84 $ hg grep foobar
84 $ hg grep foobar
85 [1]
85 [1]
86 $ echo blue >> color
86 $ echo blue >> color
87 $ echo black >> color
87 $ echo black >> color
88 $ hg add color
88 $ hg add color
89 $ hg ci -m 0
89 $ hg ci -m 0
90 $ echo orange >> color
90 $ echo orange >> color
91 $ hg ci -m 1
91 $ hg ci -m 1
92 $ echo black > color
92 $ echo black > color
93 $ hg ci -m 2
93 $ hg ci -m 2
94 $ echo orange >> color
94 $ echo orange >> color
95 $ echo blue >> color
95 $ echo blue >> color
96 $ hg ci -m 3
96 $ hg ci -m 3
97 $ hg grep orange
97 $ hg grep orange
98 color:3:orange
98 color:3:orange
99 $ hg grep --all orange
99 $ hg grep --all orange
100 color:3:+:orange
100 color:3:+:orange
101 color:2:-:orange
101 color:2:-:orange
102 color:1:+:orange
102 color:1:+:orange
103
103
104
104
105 match in last "line" without newline
105 match in last "line" without newline
106
106
107 $ python -c 'fp = open("noeol", "wb"); fp.write("no infinite loop"); fp.close();'
107 $ python -c 'fp = open("noeol", "wb"); fp.write("no infinite loop"); fp.close();'
108 $ hg ci -Amnoeol
108 $ hg ci -Amnoeol
109 adding noeol
109 adding noeol
110
110
111 last character omitted in output to avoid infinite loop
111 last character omitted in output to avoid infinite loop
112
112
113 $ hg grep loop
113 $ hg grep loop
114 noeol:4:no infinite loo
114 noeol:4:no infinite loo
115
115
116
116
117 $ cd ..
117 $ cd ..
118
118
119 Issue685: trackback in grep -r after rename
119 Issue685: trackback in grep -r after rename
120
120
121 Got a traceback when using grep on a single
121 Got a traceback when using grep on a single
122 revision with renamed files.
122 revision with renamed files.
123
123
124 $ hg init issue685
124 $ hg init issue685
125 $ cd issue685
125 $ cd issue685
126 $ echo octarine > color
126 $ echo octarine > color
127 $ hg ci -Amcolor
127 $ hg ci -Amcolor
128 adding color
128 adding color
129 $ hg rename color colour
129 $ hg rename color colour
130 $ hg ci -Am rename
130 $ hg ci -Am rename
131 $ hg grep octarine
131 $ hg grep octarine
132 colour:1:octarine
132 colour:1:octarine
133 color:0:octarine
133 color:0:octarine
134
134
135 Used to crash here
135 Used to crash here
136
136
137 $ hg grep -r 1 octarine
137 $ hg grep -r 1 octarine
138 colour:1:octarine
138 colour:1:octarine
139 $ cd ..
139 $ cd ..
140
140
141
141
142 Issue337: test that grep follows parent-child relationships instead
142 Issue337: test that grep follows parent-child relationships instead
143 of just using revision numbers.
143 of just using revision numbers.
144
144
145 $ hg init issue337
145 $ hg init issue337
146 $ cd issue337
146 $ cd issue337
147
147
148 $ echo white > color
148 $ echo white > color
149 $ hg commit -A -m "0 white"
149 $ hg commit -A -m "0 white"
150 adding color
150 adding color
151
151
152 $ echo red > color
152 $ echo red > color
153 $ hg commit -A -m "1 red"
153 $ hg commit -A -m "1 red"
154
154
155 $ hg update 0
155 $ hg update 0
156 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
156 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
157 $ echo black > color
157 $ echo black > color
158 $ hg commit -A -m "2 black"
158 $ hg commit -A -m "2 black"
159 created new head
159 created new head
160
160
161 $ hg update --clean 1
161 $ hg update --clean 1
162 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
162 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
163 $ echo blue > color
163 $ echo blue > color
164 $ hg commit -A -m "3 blue"
164 $ hg commit -A -m "3 blue"
165
165
166 $ hg grep --all red
166 $ hg grep --all red
167 color:3:-:red
167 color:3:-:red
168 color:1:+:red
168 color:1:+:red
@@ -1,92 +1,92 b''
1
1
2 $ hgserve() {
2 $ hgserve() {
3 > hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -E errors.log -v $@
3 > hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -E errors.log -v $@
4 > cat hg.pid >> "$DAEMON_PIDS"
4 > cat hg.pid >> "$DAEMON_PIDS"
5 > }
5 > }
6 $ hg init a
6 $ hg init a
7 $ hg --encoding utf-8 -R a branch Γ¦
7 $ hg --encoding utf-8 -R a branch Γ¦
8 marked working directory as branch Γ¦
8 marked working directory as branch \xc3\xa6 (esc)
9 $ echo foo > a/foo
9 $ echo foo > a/foo
10 $ hg -R a ci -Am foo
10 $ hg -R a ci -Am foo
11 adding foo
11 adding foo
12 $ hgserve -R a --config web.push_ssl=False --config web.allow_push=* --encoding latin1
12 $ hgserve -R a --config web.push_ssl=False --config web.allow_push=* --encoding latin1
13 listening at http://*:$HGPORT1/ (bound to 127.0.0.1:$HGPORT1) (glob)
13 listening at http://*:$HGPORT1/ (bound to 127.0.0.1:$HGPORT1) (glob)
14 $ hg --encoding utf-8 clone http://localhost:$HGPORT1 b
14 $ hg --encoding utf-8 clone http://localhost:$HGPORT1 b
15 requesting all changes
15 requesting all changes
16 adding changesets
16 adding changesets
17 adding manifests
17 adding manifests
18 adding file changes
18 adding file changes
19 added 1 changesets with 1 changes to 1 files
19 added 1 changesets with 1 changes to 1 files
20 updating to branch Γ¦
20 updating to branch \xc3\xa6 (esc)
21 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
21 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
22 $ hg --encoding utf-8 -R b log
22 $ hg --encoding utf-8 -R b log
23 changeset: 0:867c11ce77b8
23 changeset: 0:867c11ce77b8
24 branch: Γ¦
24 branch: \xc3\xa6 (esc)
25 tag: tip
25 tag: tip
26 user: test
26 user: test
27 date: Thu Jan 01 00:00:00 1970 +0000
27 date: Thu Jan 01 00:00:00 1970 +0000
28 summary: foo
28 summary: foo
29
29
30 $ echo bar >> b/foo
30 $ echo bar >> b/foo
31 $ hg -R b ci -m bar
31 $ hg -R b ci -m bar
32 $ hg --encoding utf-8 -R b push
32 $ hg --encoding utf-8 -R b push
33 pushing to http://localhost:$HGPORT1
33 pushing to http://localhost:$HGPORT1
34 searching for changes
34 searching for changes
35 remote: adding changesets
35 remote: adding changesets
36 remote: adding manifests
36 remote: adding manifests
37 remote: adding file changes
37 remote: adding file changes
38 remote: added 1 changesets with 1 changes to 1 files
38 remote: added 1 changesets with 1 changes to 1 files
39 $ hg -R a --encoding utf-8 log
39 $ hg -R a --encoding utf-8 log
40 changeset: 1:58e7c90d67cb
40 changeset: 1:58e7c90d67cb
41 branch: Γ¦
41 branch: \xc3\xa6 (esc)
42 tag: tip
42 tag: tip
43 user: test
43 user: test
44 date: Thu Jan 01 00:00:00 1970 +0000
44 date: Thu Jan 01 00:00:00 1970 +0000
45 summary: bar
45 summary: bar
46
46
47 changeset: 0:867c11ce77b8
47 changeset: 0:867c11ce77b8
48 branch: Γ¦
48 branch: \xc3\xa6 (esc)
49 user: test
49 user: test
50 date: Thu Jan 01 00:00:00 1970 +0000
50 date: Thu Jan 01 00:00:00 1970 +0000
51 summary: foo
51 summary: foo
52
52
53 $ kill `cat hg.pid`
53 $ kill `cat hg.pid`
54
54
55 verify 7e7d56fe4833 (encoding fallback in branchmap to maintain compatibility with 1.3.x)
55 verify 7e7d56fe4833 (encoding fallback in branchmap to maintain compatibility with 1.3.x)
56
56
57 $ cat <<EOF > oldhg
57 $ cat <<EOF > oldhg
58 > import sys
58 > import sys
59 > from mercurial import ui, hg, commands
59 > from mercurial import ui, hg, commands
60 >
60 >
61 > class StdoutWrapper(object):
61 > class StdoutWrapper(object):
62 > def __init__(self, stdout):
62 > def __init__(self, stdout):
63 > self._file = stdout
63 > self._file = stdout
64 >
64 >
65 > def write(self, data):
65 > def write(self, data):
66 > if data == '47\n':
66 > if data == '47\n':
67 > # latin1 encoding is one %xx (3 bytes) shorter
67 > # latin1 encoding is one %xx (3 bytes) shorter
68 > data = '44\n'
68 > data = '44\n'
69 > elif data.startswith('%C3%A6 '):
69 > elif data.startswith('%C3%A6 '):
70 > # translate to latin1 encoding
70 > # translate to latin1 encoding
71 > data = '%%E6 %s' % data[7:]
71 > data = '%%E6 %s' % data[7:]
72 > self._file.write(data)
72 > self._file.write(data)
73 >
73 >
74 > def __getattr__(self, name):
74 > def __getattr__(self, name):
75 > return getattr(self._file, name)
75 > return getattr(self._file, name)
76 >
76 >
77 > sys.stdout = StdoutWrapper(sys.stdout)
77 > sys.stdout = StdoutWrapper(sys.stdout)
78 > sys.stderr = StdoutWrapper(sys.stderr)
78 > sys.stderr = StdoutWrapper(sys.stderr)
79 >
79 >
80 > myui = ui.ui()
80 > myui = ui.ui()
81 > repo = hg.repository(myui, 'a')
81 > repo = hg.repository(myui, 'a')
82 > commands.serve(myui, repo, stdio=True)
82 > commands.serve(myui, repo, stdio=True)
83 > EOF
83 > EOF
84 $ echo baz >> b/foo
84 $ echo baz >> b/foo
85 $ hg -R b ci -m baz
85 $ hg -R b ci -m baz
86 $ hg push -R b -e 'python oldhg' ssh://dummy/ --encoding latin1
86 $ hg push -R b -e 'python oldhg' ssh://dummy/ --encoding latin1
87 pushing to ssh://dummy/
87 pushing to ssh://dummy/
88 searching for changes
88 searching for changes
89 remote: adding changesets
89 remote: adding changesets
90 remote: adding manifests
90 remote: adding manifests
91 remote: adding file changes
91 remote: adding file changes
92 remote: added 1 changesets with 1 changes to 1 files
92 remote: added 1 changesets with 1 changes to 1 files
@@ -1,1094 +1,1094 b''
1 $ hg init a
1 $ hg init a
2
2
3 $ cd a
3 $ cd a
4 $ echo a > a
4 $ echo a > a
5 $ hg ci -Ama -d '1 0'
5 $ hg ci -Ama -d '1 0'
6 adding a
6 adding a
7
7
8 $ hg cp a b
8 $ hg cp a b
9 $ hg ci -mb -d '2 0'
9 $ hg ci -mb -d '2 0'
10
10
11 $ mkdir dir
11 $ mkdir dir
12 $ hg mv b dir
12 $ hg mv b dir
13 $ hg ci -mc -d '3 0'
13 $ hg ci -mc -d '3 0'
14
14
15 $ hg mv a b
15 $ hg mv a b
16 $ echo a > d
16 $ echo a > d
17 $ hg add d
17 $ hg add d
18 $ hg ci -md -d '4 0'
18 $ hg ci -md -d '4 0'
19
19
20 $ hg mv dir/b e
20 $ hg mv dir/b e
21 $ hg ci -me -d '5 0'
21 $ hg ci -me -d '5 0'
22
22
23 $ hg log a
23 $ hg log a
24 changeset: 0:8580ff50825a
24 changeset: 0:8580ff50825a
25 user: test
25 user: test
26 date: Thu Jan 01 00:00:01 1970 +0000
26 date: Thu Jan 01 00:00:01 1970 +0000
27 summary: a
27 summary: a
28
28
29
29
30 -f, directory
30 -f, directory
31
31
32 $ hg log -f dir
32 $ hg log -f dir
33 abort: cannot follow nonexistent file: "dir"
33 abort: cannot follow nonexistent file: "dir"
34 [255]
34 [255]
35
35
36 -f, but no args
36 -f, but no args
37
37
38 $ hg log -f
38 $ hg log -f
39 changeset: 4:66c1345dc4f9
39 changeset: 4:66c1345dc4f9
40 tag: tip
40 tag: tip
41 user: test
41 user: test
42 date: Thu Jan 01 00:00:05 1970 +0000
42 date: Thu Jan 01 00:00:05 1970 +0000
43 summary: e
43 summary: e
44
44
45 changeset: 3:7c6c671bb7cc
45 changeset: 3:7c6c671bb7cc
46 user: test
46 user: test
47 date: Thu Jan 01 00:00:04 1970 +0000
47 date: Thu Jan 01 00:00:04 1970 +0000
48 summary: d
48 summary: d
49
49
50 changeset: 2:41dd4284081e
50 changeset: 2:41dd4284081e
51 user: test
51 user: test
52 date: Thu Jan 01 00:00:03 1970 +0000
52 date: Thu Jan 01 00:00:03 1970 +0000
53 summary: c
53 summary: c
54
54
55 changeset: 1:784de7cef101
55 changeset: 1:784de7cef101
56 user: test
56 user: test
57 date: Thu Jan 01 00:00:02 1970 +0000
57 date: Thu Jan 01 00:00:02 1970 +0000
58 summary: b
58 summary: b
59
59
60 changeset: 0:8580ff50825a
60 changeset: 0:8580ff50825a
61 user: test
61 user: test
62 date: Thu Jan 01 00:00:01 1970 +0000
62 date: Thu Jan 01 00:00:01 1970 +0000
63 summary: a
63 summary: a
64
64
65
65
66 one rename
66 one rename
67
67
68 $ hg log -vf a
68 $ hg log -vf a
69 changeset: 0:8580ff50825a
69 changeset: 0:8580ff50825a
70 user: test
70 user: test
71 date: Thu Jan 01 00:00:01 1970 +0000
71 date: Thu Jan 01 00:00:01 1970 +0000
72 files: a
72 files: a
73 description:
73 description:
74 a
74 a
75
75
76
76
77
77
78 many renames
78 many renames
79
79
80 $ hg log -vf e
80 $ hg log -vf e
81 changeset: 4:66c1345dc4f9
81 changeset: 4:66c1345dc4f9
82 tag: tip
82 tag: tip
83 user: test
83 user: test
84 date: Thu Jan 01 00:00:05 1970 +0000
84 date: Thu Jan 01 00:00:05 1970 +0000
85 files: dir/b e
85 files: dir/b e
86 description:
86 description:
87 e
87 e
88
88
89
89
90 changeset: 2:41dd4284081e
90 changeset: 2:41dd4284081e
91 user: test
91 user: test
92 date: Thu Jan 01 00:00:03 1970 +0000
92 date: Thu Jan 01 00:00:03 1970 +0000
93 files: b dir/b
93 files: b dir/b
94 description:
94 description:
95 c
95 c
96
96
97
97
98 changeset: 1:784de7cef101
98 changeset: 1:784de7cef101
99 user: test
99 user: test
100 date: Thu Jan 01 00:00:02 1970 +0000
100 date: Thu Jan 01 00:00:02 1970 +0000
101 files: b
101 files: b
102 description:
102 description:
103 b
103 b
104
104
105
105
106 changeset: 0:8580ff50825a
106 changeset: 0:8580ff50825a
107 user: test
107 user: test
108 date: Thu Jan 01 00:00:01 1970 +0000
108 date: Thu Jan 01 00:00:01 1970 +0000
109 files: a
109 files: a
110 description:
110 description:
111 a
111 a
112
112
113
113
114
114
115
115
116 log -pf dir/b
116 log -pf dir/b
117
117
118 $ hg log -pf dir/b
118 $ hg log -pf dir/b
119 changeset: 2:41dd4284081e
119 changeset: 2:41dd4284081e
120 user: test
120 user: test
121 date: Thu Jan 01 00:00:03 1970 +0000
121 date: Thu Jan 01 00:00:03 1970 +0000
122 summary: c
122 summary: c
123
123
124 diff -r 784de7cef101 -r 41dd4284081e dir/b
124 diff -r 784de7cef101 -r 41dd4284081e dir/b
125 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
125 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
126 +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000
126 +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000
127 @@ -0,0 +1,1 @@
127 @@ -0,0 +1,1 @@
128 +a
128 +a
129
129
130 changeset: 1:784de7cef101
130 changeset: 1:784de7cef101
131 user: test
131 user: test
132 date: Thu Jan 01 00:00:02 1970 +0000
132 date: Thu Jan 01 00:00:02 1970 +0000
133 summary: b
133 summary: b
134
134
135 diff -r 8580ff50825a -r 784de7cef101 b
135 diff -r 8580ff50825a -r 784de7cef101 b
136 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
136 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
137 +++ b/b Thu Jan 01 00:00:02 1970 +0000
137 +++ b/b Thu Jan 01 00:00:02 1970 +0000
138 @@ -0,0 +1,1 @@
138 @@ -0,0 +1,1 @@
139 +a
139 +a
140
140
141 changeset: 0:8580ff50825a
141 changeset: 0:8580ff50825a
142 user: test
142 user: test
143 date: Thu Jan 01 00:00:01 1970 +0000
143 date: Thu Jan 01 00:00:01 1970 +0000
144 summary: a
144 summary: a
145
145
146 diff -r 000000000000 -r 8580ff50825a a
146 diff -r 000000000000 -r 8580ff50825a a
147 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
147 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
148 +++ b/a Thu Jan 01 00:00:01 1970 +0000
148 +++ b/a Thu Jan 01 00:00:01 1970 +0000
149 @@ -0,0 +1,1 @@
149 @@ -0,0 +1,1 @@
150 +a
150 +a
151
151
152
152
153 log -vf dir/b
153 log -vf dir/b
154
154
155 $ hg log -vf dir/b
155 $ hg log -vf dir/b
156 changeset: 2:41dd4284081e
156 changeset: 2:41dd4284081e
157 user: test
157 user: test
158 date: Thu Jan 01 00:00:03 1970 +0000
158 date: Thu Jan 01 00:00:03 1970 +0000
159 files: b dir/b
159 files: b dir/b
160 description:
160 description:
161 c
161 c
162
162
163
163
164 changeset: 1:784de7cef101
164 changeset: 1:784de7cef101
165 user: test
165 user: test
166 date: Thu Jan 01 00:00:02 1970 +0000
166 date: Thu Jan 01 00:00:02 1970 +0000
167 files: b
167 files: b
168 description:
168 description:
169 b
169 b
170
170
171
171
172 changeset: 0:8580ff50825a
172 changeset: 0:8580ff50825a
173 user: test
173 user: test
174 date: Thu Jan 01 00:00:01 1970 +0000
174 date: Thu Jan 01 00:00:01 1970 +0000
175 files: a
175 files: a
176 description:
176 description:
177 a
177 a
178
178
179
179
180
180
181
181
182 log copies with --copies
182 log copies with --copies
183
183
184 $ hg log -vC --template '{rev} {file_copies}\n'
184 $ hg log -vC --template '{rev} {file_copies}\n'
185 4 e (dir/b)
185 4 e (dir/b)
186 3 b (a)
186 3 b (a)
187 2 dir/b (b)
187 2 dir/b (b)
188 1 b (a)
188 1 b (a)
189 0
189 0
190
190
191 log copies switch without --copies, with old filecopy template
191 log copies switch without --copies, with old filecopy template
192
192
193 $ hg log -v --template '{rev} {file_copies_switch%filecopy}\n'
193 $ hg log -v --template '{rev} {file_copies_switch%filecopy}\n'
194 4
194 4
195 3
195 3
196 2
196 2
197 1
197 1
198 0
198 0
199
199
200 log copies switch with --copies
200 log copies switch with --copies
201
201
202 $ hg log -vC --template '{rev} {file_copies_switch}\n'
202 $ hg log -vC --template '{rev} {file_copies_switch}\n'
203 4 e (dir/b)
203 4 e (dir/b)
204 3 b (a)
204 3 b (a)
205 2 dir/b (b)
205 2 dir/b (b)
206 1 b (a)
206 1 b (a)
207 0
207 0
208
208
209
209
210 log copies with hardcoded style and with --style=default
210 log copies with hardcoded style and with --style=default
211
211
212 $ hg log -vC -r4
212 $ hg log -vC -r4
213 changeset: 4:66c1345dc4f9
213 changeset: 4:66c1345dc4f9
214 tag: tip
214 tag: tip
215 user: test
215 user: test
216 date: Thu Jan 01 00:00:05 1970 +0000
216 date: Thu Jan 01 00:00:05 1970 +0000
217 files: dir/b e
217 files: dir/b e
218 copies: e (dir/b)
218 copies: e (dir/b)
219 description:
219 description:
220 e
220 e
221
221
222
222
223 $ hg log -vC -r4 --style=default
223 $ hg log -vC -r4 --style=default
224 changeset: 4:66c1345dc4f9
224 changeset: 4:66c1345dc4f9
225 tag: tip
225 tag: tip
226 user: test
226 user: test
227 date: Thu Jan 01 00:00:05 1970 +0000
227 date: Thu Jan 01 00:00:05 1970 +0000
228 files: dir/b e
228 files: dir/b e
229 copies: e (dir/b)
229 copies: e (dir/b)
230 description:
230 description:
231 e
231 e
232
232
233
233
234
234
235
235
236 log copies, non-linear manifest
236 log copies, non-linear manifest
237
237
238 $ hg up -C 3
238 $ hg up -C 3
239 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
239 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
240 $ hg mv dir/b e
240 $ hg mv dir/b e
241 $ echo foo > foo
241 $ echo foo > foo
242 $ hg ci -Ame2 -d '6 0'
242 $ hg ci -Ame2 -d '6 0'
243 adding foo
243 adding foo
244 created new head
244 created new head
245 $ hg log -v --template '{rev} {file_copies}\n' -r 5
245 $ hg log -v --template '{rev} {file_copies}\n' -r 5
246 5 e (dir/b)
246 5 e (dir/b)
247
247
248
248
249 log copies, execute bit set
249 log copies, execute bit set
250
250
251 $ chmod +x e
251 $ chmod +x e
252 $ hg ci -me3 -d '7 0'
252 $ hg ci -me3 -d '7 0'
253 $ hg log -v --template '{rev} {file_copies}\n' -r 6
253 $ hg log -v --template '{rev} {file_copies}\n' -r 6
254 6
254 6
255
255
256
256
257 log -p d
257 log -p d
258
258
259 $ hg log -pv d
259 $ hg log -pv d
260 changeset: 3:7c6c671bb7cc
260 changeset: 3:7c6c671bb7cc
261 user: test
261 user: test
262 date: Thu Jan 01 00:00:04 1970 +0000
262 date: Thu Jan 01 00:00:04 1970 +0000
263 files: a b d
263 files: a b d
264 description:
264 description:
265 d
265 d
266
266
267
267
268 diff -r 41dd4284081e -r 7c6c671bb7cc d
268 diff -r 41dd4284081e -r 7c6c671bb7cc d
269 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
269 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
270 +++ b/d Thu Jan 01 00:00:04 1970 +0000
270 +++ b/d Thu Jan 01 00:00:04 1970 +0000
271 @@ -0,0 +1,1 @@
271 @@ -0,0 +1,1 @@
272 +a
272 +a
273
273
274
274
275
275
276 log --removed file
276 log --removed file
277
277
278 $ hg log --removed -v a
278 $ hg log --removed -v a
279 changeset: 3:7c6c671bb7cc
279 changeset: 3:7c6c671bb7cc
280 user: test
280 user: test
281 date: Thu Jan 01 00:00:04 1970 +0000
281 date: Thu Jan 01 00:00:04 1970 +0000
282 files: a b d
282 files: a b d
283 description:
283 description:
284 d
284 d
285
285
286
286
287 changeset: 0:8580ff50825a
287 changeset: 0:8580ff50825a
288 user: test
288 user: test
289 date: Thu Jan 01 00:00:01 1970 +0000
289 date: Thu Jan 01 00:00:01 1970 +0000
290 files: a
290 files: a
291 description:
291 description:
292 a
292 a
293
293
294
294
295
295
296 log --removed revrange file
296 log --removed revrange file
297
297
298 $ hg log --removed -v -r0:2 a
298 $ hg log --removed -v -r0:2 a
299 changeset: 0:8580ff50825a
299 changeset: 0:8580ff50825a
300 user: test
300 user: test
301 date: Thu Jan 01 00:00:01 1970 +0000
301 date: Thu Jan 01 00:00:01 1970 +0000
302 files: a
302 files: a
303 description:
303 description:
304 a
304 a
305
305
306
306
307
307
308
308
309 log --follow tests
309 log --follow tests
310
310
311 $ hg init ../follow
311 $ hg init ../follow
312 $ cd ../follow
312 $ cd ../follow
313
313
314 $ echo base > base
314 $ echo base > base
315 $ hg ci -Ambase -d '1 0'
315 $ hg ci -Ambase -d '1 0'
316 adding base
316 adding base
317
317
318 $ echo r1 >> base
318 $ echo r1 >> base
319 $ hg ci -Amr1 -d '1 0'
319 $ hg ci -Amr1 -d '1 0'
320 $ echo r2 >> base
320 $ echo r2 >> base
321 $ hg ci -Amr2 -d '1 0'
321 $ hg ci -Amr2 -d '1 0'
322
322
323 $ hg up -C 1
323 $ hg up -C 1
324 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
324 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
325 $ echo b1 > b1
325 $ echo b1 > b1
326 $ hg ci -Amb1 -d '1 0'
326 $ hg ci -Amb1 -d '1 0'
327 adding b1
327 adding b1
328 created new head
328 created new head
329
329
330
330
331 log -f
331 log -f
332
332
333 $ hg log -f
333 $ hg log -f
334 changeset: 3:e62f78d544b4
334 changeset: 3:e62f78d544b4
335 tag: tip
335 tag: tip
336 parent: 1:3d5bf5654eda
336 parent: 1:3d5bf5654eda
337 user: test
337 user: test
338 date: Thu Jan 01 00:00:01 1970 +0000
338 date: Thu Jan 01 00:00:01 1970 +0000
339 summary: b1
339 summary: b1
340
340
341 changeset: 1:3d5bf5654eda
341 changeset: 1:3d5bf5654eda
342 user: test
342 user: test
343 date: Thu Jan 01 00:00:01 1970 +0000
343 date: Thu Jan 01 00:00:01 1970 +0000
344 summary: r1
344 summary: r1
345
345
346 changeset: 0:67e992f2c4f3
346 changeset: 0:67e992f2c4f3
347 user: test
347 user: test
348 date: Thu Jan 01 00:00:01 1970 +0000
348 date: Thu Jan 01 00:00:01 1970 +0000
349 summary: base
349 summary: base
350
350
351
351
352
352
353 log -f -r 1:tip
353 log -f -r 1:tip
354
354
355 $ hg up -C 0
355 $ hg up -C 0
356 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
356 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
357 $ echo b2 > b2
357 $ echo b2 > b2
358 $ hg ci -Amb2 -d '1 0'
358 $ hg ci -Amb2 -d '1 0'
359 adding b2
359 adding b2
360 created new head
360 created new head
361 $ hg log -f -r 1:tip
361 $ hg log -f -r 1:tip
362 changeset: 1:3d5bf5654eda
362 changeset: 1:3d5bf5654eda
363 user: test
363 user: test
364 date: Thu Jan 01 00:00:01 1970 +0000
364 date: Thu Jan 01 00:00:01 1970 +0000
365 summary: r1
365 summary: r1
366
366
367 changeset: 2:60c670bf5b30
367 changeset: 2:60c670bf5b30
368 user: test
368 user: test
369 date: Thu Jan 01 00:00:01 1970 +0000
369 date: Thu Jan 01 00:00:01 1970 +0000
370 summary: r2
370 summary: r2
371
371
372 changeset: 3:e62f78d544b4
372 changeset: 3:e62f78d544b4
373 parent: 1:3d5bf5654eda
373 parent: 1:3d5bf5654eda
374 user: test
374 user: test
375 date: Thu Jan 01 00:00:01 1970 +0000
375 date: Thu Jan 01 00:00:01 1970 +0000
376 summary: b1
376 summary: b1
377
377
378
378
379
379
380 log -r . with two parents
380 log -r . with two parents
381
381
382 $ hg up -C 3
382 $ hg up -C 3
383 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
383 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
384 $ hg merge tip
384 $ hg merge tip
385 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
385 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
386 (branch merge, don't forget to commit)
386 (branch merge, don't forget to commit)
387 $ hg log -r .
387 $ hg log -r .
388 changeset: 3:e62f78d544b4
388 changeset: 3:e62f78d544b4
389 parent: 1:3d5bf5654eda
389 parent: 1:3d5bf5654eda
390 user: test
390 user: test
391 date: Thu Jan 01 00:00:01 1970 +0000
391 date: Thu Jan 01 00:00:01 1970 +0000
392 summary: b1
392 summary: b1
393
393
394
394
395
395
396 log -r . with one parent
396 log -r . with one parent
397
397
398 $ hg ci -mm12 -d '1 0'
398 $ hg ci -mm12 -d '1 0'
399 $ hg log -r .
399 $ hg log -r .
400 changeset: 5:302e9dd6890d
400 changeset: 5:302e9dd6890d
401 tag: tip
401 tag: tip
402 parent: 3:e62f78d544b4
402 parent: 3:e62f78d544b4
403 parent: 4:ddb82e70d1a1
403 parent: 4:ddb82e70d1a1
404 user: test
404 user: test
405 date: Thu Jan 01 00:00:01 1970 +0000
405 date: Thu Jan 01 00:00:01 1970 +0000
406 summary: m12
406 summary: m12
407
407
408
408
409 $ echo postm >> b1
409 $ echo postm >> b1
410 $ hg ci -Amb1.1 -d'1 0'
410 $ hg ci -Amb1.1 -d'1 0'
411
411
412
412
413 log --follow-first
413 log --follow-first
414
414
415 $ hg log --follow-first
415 $ hg log --follow-first
416 changeset: 6:2404bbcab562
416 changeset: 6:2404bbcab562
417 tag: tip
417 tag: tip
418 user: test
418 user: test
419 date: Thu Jan 01 00:00:01 1970 +0000
419 date: Thu Jan 01 00:00:01 1970 +0000
420 summary: b1.1
420 summary: b1.1
421
421
422 changeset: 5:302e9dd6890d
422 changeset: 5:302e9dd6890d
423 parent: 3:e62f78d544b4
423 parent: 3:e62f78d544b4
424 parent: 4:ddb82e70d1a1
424 parent: 4:ddb82e70d1a1
425 user: test
425 user: test
426 date: Thu Jan 01 00:00:01 1970 +0000
426 date: Thu Jan 01 00:00:01 1970 +0000
427 summary: m12
427 summary: m12
428
428
429 changeset: 3:e62f78d544b4
429 changeset: 3:e62f78d544b4
430 parent: 1:3d5bf5654eda
430 parent: 1:3d5bf5654eda
431 user: test
431 user: test
432 date: Thu Jan 01 00:00:01 1970 +0000
432 date: Thu Jan 01 00:00:01 1970 +0000
433 summary: b1
433 summary: b1
434
434
435 changeset: 1:3d5bf5654eda
435 changeset: 1:3d5bf5654eda
436 user: test
436 user: test
437 date: Thu Jan 01 00:00:01 1970 +0000
437 date: Thu Jan 01 00:00:01 1970 +0000
438 summary: r1
438 summary: r1
439
439
440 changeset: 0:67e992f2c4f3
440 changeset: 0:67e992f2c4f3
441 user: test
441 user: test
442 date: Thu Jan 01 00:00:01 1970 +0000
442 date: Thu Jan 01 00:00:01 1970 +0000
443 summary: base
443 summary: base
444
444
445
445
446
446
447 log -P 2
447 log -P 2
448
448
449 $ hg log -P 2
449 $ hg log -P 2
450 changeset: 6:2404bbcab562
450 changeset: 6:2404bbcab562
451 tag: tip
451 tag: tip
452 user: test
452 user: test
453 date: Thu Jan 01 00:00:01 1970 +0000
453 date: Thu Jan 01 00:00:01 1970 +0000
454 summary: b1.1
454 summary: b1.1
455
455
456 changeset: 5:302e9dd6890d
456 changeset: 5:302e9dd6890d
457 parent: 3:e62f78d544b4
457 parent: 3:e62f78d544b4
458 parent: 4:ddb82e70d1a1
458 parent: 4:ddb82e70d1a1
459 user: test
459 user: test
460 date: Thu Jan 01 00:00:01 1970 +0000
460 date: Thu Jan 01 00:00:01 1970 +0000
461 summary: m12
461 summary: m12
462
462
463 changeset: 4:ddb82e70d1a1
463 changeset: 4:ddb82e70d1a1
464 parent: 0:67e992f2c4f3
464 parent: 0:67e992f2c4f3
465 user: test
465 user: test
466 date: Thu Jan 01 00:00:01 1970 +0000
466 date: Thu Jan 01 00:00:01 1970 +0000
467 summary: b2
467 summary: b2
468
468
469 changeset: 3:e62f78d544b4
469 changeset: 3:e62f78d544b4
470 parent: 1:3d5bf5654eda
470 parent: 1:3d5bf5654eda
471 user: test
471 user: test
472 date: Thu Jan 01 00:00:01 1970 +0000
472 date: Thu Jan 01 00:00:01 1970 +0000
473 summary: b1
473 summary: b1
474
474
475
475
476
476
477 log -r tip -p --git
477 log -r tip -p --git
478
478
479 $ hg log -r tip -p --git
479 $ hg log -r tip -p --git
480 changeset: 6:2404bbcab562
480 changeset: 6:2404bbcab562
481 tag: tip
481 tag: tip
482 user: test
482 user: test
483 date: Thu Jan 01 00:00:01 1970 +0000
483 date: Thu Jan 01 00:00:01 1970 +0000
484 summary: b1.1
484 summary: b1.1
485
485
486 diff --git a/b1 b/b1
486 diff --git a/b1 b/b1
487 --- a/b1
487 --- a/b1
488 +++ b/b1
488 +++ b/b1
489 @@ -1,1 +1,2 @@
489 @@ -1,1 +1,2 @@
490 b1
490 b1
491 +postm
491 +postm
492
492
493
493
494
494
495 log -r ""
495 log -r ""
496
496
497 $ hg log -r ''
497 $ hg log -r ''
498 hg: parse error: empty query
498 hg: parse error: empty query
499 [255]
499 [255]
500
500
501 log -r <some unknown node id>
501 log -r <some unknown node id>
502
502
503 $ hg log -r 1000000000000000000000000000000000000000
503 $ hg log -r 1000000000000000000000000000000000000000
504 abort: unknown revision '1000000000000000000000000000000000000000'!
504 abort: unknown revision '1000000000000000000000000000000000000000'!
505 [255]
505 [255]
506
506
507 log -k r1
507 log -k r1
508
508
509 $ hg log -k r1
509 $ hg log -k r1
510 changeset: 1:3d5bf5654eda
510 changeset: 1:3d5bf5654eda
511 user: test
511 user: test
512 date: Thu Jan 01 00:00:01 1970 +0000
512 date: Thu Jan 01 00:00:01 1970 +0000
513 summary: r1
513 summary: r1
514
514
515
515
516
516
517 log -d -1
517 log -d -1
518
518
519 $ hg log -d -1
519 $ hg log -d -1
520
520
521
521
522 log -p -l2 --color=always
522 log -p -l2 --color=always
523
523
524 $ hg --config extensions.color= --config color.mode=ansi \
524 $ hg --config extensions.color= --config color.mode=ansi \
525 > log -p -l2 --color=always
525 > log -p -l2 --color=always
526 changeset: 6:2404bbcab562
526 \x1b[0;33mchangeset: 6:2404bbcab562\x1b[0m (esc)
527 tag: tip
527 tag: tip
528 user: test
528 user: test
529 date: Thu Jan 01 00:00:01 1970 +0000
529 date: Thu Jan 01 00:00:01 1970 +0000
530 summary: b1.1
530 summary: b1.1
531
531
532 diff -r 302e9dd6890d -r 2404bbcab562 b1
532 \x1b[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1\x1b[0m (esc)
533 --- a/b1 Thu Jan 01 00:00:01 1970 +0000
533 \x1b[0;31;1m--- a/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
534 +++ b/b1 Thu Jan 01 00:00:01 1970 +0000
534 \x1b[0;32;1m+++ b/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
535 @@ -1,1 +1,2 @@
535 \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc)
536 b1
536 b1
537 +postm
537 \x1b[0;32m+postm\x1b[0m (esc)
538
538
539 changeset: 5:302e9dd6890d
539 \x1b[0;33mchangeset: 5:302e9dd6890d\x1b[0m (esc)
540 parent: 3:e62f78d544b4
540 parent: 3:e62f78d544b4
541 parent: 4:ddb82e70d1a1
541 parent: 4:ddb82e70d1a1
542 user: test
542 user: test
543 date: Thu Jan 01 00:00:01 1970 +0000
543 date: Thu Jan 01 00:00:01 1970 +0000
544 summary: m12
544 summary: m12
545
545
546 diff -r e62f78d544b4 -r 302e9dd6890d b2
546 \x1b[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2\x1b[0m (esc)
547 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
547 \x1b[0;31;1m--- /dev/null Thu Jan 01 00:00:00 1970 +0000\x1b[0m (esc)
548 +++ b/b2 Thu Jan 01 00:00:01 1970 +0000
548 \x1b[0;32;1m+++ b/b2 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
549 @@ -0,0 +1,1 @@
549 \x1b[0;35m@@ -0,0 +1,1 @@\x1b[0m (esc)
550 +b2
550 \x1b[0;32m+b2\x1b[0m (esc)
551
551
552
552
553
553
554 log -r tip --stat
554 log -r tip --stat
555
555
556 $ hg log -r tip --stat
556 $ hg log -r tip --stat
557 changeset: 6:2404bbcab562
557 changeset: 6:2404bbcab562
558 tag: tip
558 tag: tip
559 user: test
559 user: test
560 date: Thu Jan 01 00:00:01 1970 +0000
560 date: Thu Jan 01 00:00:01 1970 +0000
561 summary: b1.1
561 summary: b1.1
562
562
563 b1 | 1 +
563 b1 | 1 +
564 1 files changed, 1 insertions(+), 0 deletions(-)
564 1 files changed, 1 insertions(+), 0 deletions(-)
565
565
566
566
567 $ cd ..
567 $ cd ..
568
568
569 $ hg init usertest
569 $ hg init usertest
570 $ cd usertest
570 $ cd usertest
571
571
572 $ echo a > a
572 $ echo a > a
573 $ hg ci -A -m "a" -u "User One <user1@example.org>"
573 $ hg ci -A -m "a" -u "User One <user1@example.org>"
574 adding a
574 adding a
575 $ echo b > b
575 $ echo b > b
576 $ hg ci -A -m "b" -u "User Two <user2@example.org>"
576 $ hg ci -A -m "b" -u "User Two <user2@example.org>"
577 adding b
577 adding b
578
578
579 $ hg log -u "User One <user1@example.org>"
579 $ hg log -u "User One <user1@example.org>"
580 changeset: 0:29a4c94f1924
580 changeset: 0:29a4c94f1924
581 user: User One <user1@example.org>
581 user: User One <user1@example.org>
582 date: Thu Jan 01 00:00:00 1970 +0000
582 date: Thu Jan 01 00:00:00 1970 +0000
583 summary: a
583 summary: a
584
584
585 $ hg log -u "user1" -u "user2"
585 $ hg log -u "user1" -u "user2"
586 changeset: 1:e834b5e69c0e
586 changeset: 1:e834b5e69c0e
587 tag: tip
587 tag: tip
588 user: User Two <user2@example.org>
588 user: User Two <user2@example.org>
589 date: Thu Jan 01 00:00:00 1970 +0000
589 date: Thu Jan 01 00:00:00 1970 +0000
590 summary: b
590 summary: b
591
591
592 changeset: 0:29a4c94f1924
592 changeset: 0:29a4c94f1924
593 user: User One <user1@example.org>
593 user: User One <user1@example.org>
594 date: Thu Jan 01 00:00:00 1970 +0000
594 date: Thu Jan 01 00:00:00 1970 +0000
595 summary: a
595 summary: a
596
596
597 $ hg log -u "user3"
597 $ hg log -u "user3"
598
598
599 $ cd ..
599 $ cd ..
600
600
601 $ hg init branches
601 $ hg init branches
602 $ cd branches
602 $ cd branches
603
603
604 $ echo a > a
604 $ echo a > a
605 $ hg ci -A -m "commit on default"
605 $ hg ci -A -m "commit on default"
606 adding a
606 adding a
607 $ hg branch test
607 $ hg branch test
608 marked working directory as branch test
608 marked working directory as branch test
609 $ echo b > b
609 $ echo b > b
610 $ hg ci -A -m "commit on test"
610 $ hg ci -A -m "commit on test"
611 adding b
611 adding b
612
612
613 $ hg up default
613 $ hg up default
614 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
614 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
615 $ echo c > c
615 $ echo c > c
616 $ hg ci -A -m "commit on default"
616 $ hg ci -A -m "commit on default"
617 adding c
617 adding c
618 $ hg up test
618 $ hg up test
619 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
619 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
620 $ echo c > c
620 $ echo c > c
621 $ hg ci -A -m "commit on test"
621 $ hg ci -A -m "commit on test"
622 adding c
622 adding c
623
623
624
624
625 log -b default
625 log -b default
626
626
627 $ hg log -b default
627 $ hg log -b default
628 changeset: 2:c3a4f03cc9a7
628 changeset: 2:c3a4f03cc9a7
629 parent: 0:24427303d56f
629 parent: 0:24427303d56f
630 user: test
630 user: test
631 date: Thu Jan 01 00:00:00 1970 +0000
631 date: Thu Jan 01 00:00:00 1970 +0000
632 summary: commit on default
632 summary: commit on default
633
633
634 changeset: 0:24427303d56f
634 changeset: 0:24427303d56f
635 user: test
635 user: test
636 date: Thu Jan 01 00:00:00 1970 +0000
636 date: Thu Jan 01 00:00:00 1970 +0000
637 summary: commit on default
637 summary: commit on default
638
638
639
639
640
640
641 log -b test
641 log -b test
642
642
643 $ hg log -b test
643 $ hg log -b test
644 changeset: 3:f5d8de11c2e2
644 changeset: 3:f5d8de11c2e2
645 branch: test
645 branch: test
646 tag: tip
646 tag: tip
647 parent: 1:d32277701ccb
647 parent: 1:d32277701ccb
648 user: test
648 user: test
649 date: Thu Jan 01 00:00:00 1970 +0000
649 date: Thu Jan 01 00:00:00 1970 +0000
650 summary: commit on test
650 summary: commit on test
651
651
652 changeset: 1:d32277701ccb
652 changeset: 1:d32277701ccb
653 branch: test
653 branch: test
654 user: test
654 user: test
655 date: Thu Jan 01 00:00:00 1970 +0000
655 date: Thu Jan 01 00:00:00 1970 +0000
656 summary: commit on test
656 summary: commit on test
657
657
658
658
659
659
660 log -b dummy
660 log -b dummy
661
661
662 $ hg log -b dummy
662 $ hg log -b dummy
663 abort: unknown revision 'dummy'!
663 abort: unknown revision 'dummy'!
664 [255]
664 [255]
665
665
666
666
667 log -b .
667 log -b .
668
668
669 $ hg log -b .
669 $ hg log -b .
670 changeset: 3:f5d8de11c2e2
670 changeset: 3:f5d8de11c2e2
671 branch: test
671 branch: test
672 tag: tip
672 tag: tip
673 parent: 1:d32277701ccb
673 parent: 1:d32277701ccb
674 user: test
674 user: test
675 date: Thu Jan 01 00:00:00 1970 +0000
675 date: Thu Jan 01 00:00:00 1970 +0000
676 summary: commit on test
676 summary: commit on test
677
677
678 changeset: 1:d32277701ccb
678 changeset: 1:d32277701ccb
679 branch: test
679 branch: test
680 user: test
680 user: test
681 date: Thu Jan 01 00:00:00 1970 +0000
681 date: Thu Jan 01 00:00:00 1970 +0000
682 summary: commit on test
682 summary: commit on test
683
683
684
684
685
685
686 log -b default -b test
686 log -b default -b test
687
687
688 $ hg log -b default -b test
688 $ hg log -b default -b test
689 changeset: 3:f5d8de11c2e2
689 changeset: 3:f5d8de11c2e2
690 branch: test
690 branch: test
691 tag: tip
691 tag: tip
692 parent: 1:d32277701ccb
692 parent: 1:d32277701ccb
693 user: test
693 user: test
694 date: Thu Jan 01 00:00:00 1970 +0000
694 date: Thu Jan 01 00:00:00 1970 +0000
695 summary: commit on test
695 summary: commit on test
696
696
697 changeset: 2:c3a4f03cc9a7
697 changeset: 2:c3a4f03cc9a7
698 parent: 0:24427303d56f
698 parent: 0:24427303d56f
699 user: test
699 user: test
700 date: Thu Jan 01 00:00:00 1970 +0000
700 date: Thu Jan 01 00:00:00 1970 +0000
701 summary: commit on default
701 summary: commit on default
702
702
703 changeset: 1:d32277701ccb
703 changeset: 1:d32277701ccb
704 branch: test
704 branch: test
705 user: test
705 user: test
706 date: Thu Jan 01 00:00:00 1970 +0000
706 date: Thu Jan 01 00:00:00 1970 +0000
707 summary: commit on test
707 summary: commit on test
708
708
709 changeset: 0:24427303d56f
709 changeset: 0:24427303d56f
710 user: test
710 user: test
711 date: Thu Jan 01 00:00:00 1970 +0000
711 date: Thu Jan 01 00:00:00 1970 +0000
712 summary: commit on default
712 summary: commit on default
713
713
714
714
715
715
716 log -b default -b .
716 log -b default -b .
717
717
718 $ hg log -b default -b .
718 $ hg log -b default -b .
719 changeset: 3:f5d8de11c2e2
719 changeset: 3:f5d8de11c2e2
720 branch: test
720 branch: test
721 tag: tip
721 tag: tip
722 parent: 1:d32277701ccb
722 parent: 1:d32277701ccb
723 user: test
723 user: test
724 date: Thu Jan 01 00:00:00 1970 +0000
724 date: Thu Jan 01 00:00:00 1970 +0000
725 summary: commit on test
725 summary: commit on test
726
726
727 changeset: 2:c3a4f03cc9a7
727 changeset: 2:c3a4f03cc9a7
728 parent: 0:24427303d56f
728 parent: 0:24427303d56f
729 user: test
729 user: test
730 date: Thu Jan 01 00:00:00 1970 +0000
730 date: Thu Jan 01 00:00:00 1970 +0000
731 summary: commit on default
731 summary: commit on default
732
732
733 changeset: 1:d32277701ccb
733 changeset: 1:d32277701ccb
734 branch: test
734 branch: test
735 user: test
735 user: test
736 date: Thu Jan 01 00:00:00 1970 +0000
736 date: Thu Jan 01 00:00:00 1970 +0000
737 summary: commit on test
737 summary: commit on test
738
738
739 changeset: 0:24427303d56f
739 changeset: 0:24427303d56f
740 user: test
740 user: test
741 date: Thu Jan 01 00:00:00 1970 +0000
741 date: Thu Jan 01 00:00:00 1970 +0000
742 summary: commit on default
742 summary: commit on default
743
743
744
744
745
745
746 log -b . -b test
746 log -b . -b test
747
747
748 $ hg log -b . -b test
748 $ hg log -b . -b test
749 changeset: 3:f5d8de11c2e2
749 changeset: 3:f5d8de11c2e2
750 branch: test
750 branch: test
751 tag: tip
751 tag: tip
752 parent: 1:d32277701ccb
752 parent: 1:d32277701ccb
753 user: test
753 user: test
754 date: Thu Jan 01 00:00:00 1970 +0000
754 date: Thu Jan 01 00:00:00 1970 +0000
755 summary: commit on test
755 summary: commit on test
756
756
757 changeset: 1:d32277701ccb
757 changeset: 1:d32277701ccb
758 branch: test
758 branch: test
759 user: test
759 user: test
760 date: Thu Jan 01 00:00:00 1970 +0000
760 date: Thu Jan 01 00:00:00 1970 +0000
761 summary: commit on test
761 summary: commit on test
762
762
763
763
764
764
765 log -b 2
765 log -b 2
766
766
767 $ hg log -b 2
767 $ hg log -b 2
768 changeset: 2:c3a4f03cc9a7
768 changeset: 2:c3a4f03cc9a7
769 parent: 0:24427303d56f
769 parent: 0:24427303d56f
770 user: test
770 user: test
771 date: Thu Jan 01 00:00:00 1970 +0000
771 date: Thu Jan 01 00:00:00 1970 +0000
772 summary: commit on default
772 summary: commit on default
773
773
774 changeset: 0:24427303d56f
774 changeset: 0:24427303d56f
775 user: test
775 user: test
776 date: Thu Jan 01 00:00:00 1970 +0000
776 date: Thu Jan 01 00:00:00 1970 +0000
777 summary: commit on default
777 summary: commit on default
778
778
779
779
780
780
781 log -p --cwd dir (in subdir)
781 log -p --cwd dir (in subdir)
782
782
783 $ mkdir dir
783 $ mkdir dir
784 $ hg log -p --cwd dir
784 $ hg log -p --cwd dir
785 changeset: 3:f5d8de11c2e2
785 changeset: 3:f5d8de11c2e2
786 branch: test
786 branch: test
787 tag: tip
787 tag: tip
788 parent: 1:d32277701ccb
788 parent: 1:d32277701ccb
789 user: test
789 user: test
790 date: Thu Jan 01 00:00:00 1970 +0000
790 date: Thu Jan 01 00:00:00 1970 +0000
791 summary: commit on test
791 summary: commit on test
792
792
793 diff -r d32277701ccb -r f5d8de11c2e2 c
793 diff -r d32277701ccb -r f5d8de11c2e2 c
794 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
794 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
795 +++ b/c Thu Jan 01 00:00:00 1970 +0000
795 +++ b/c Thu Jan 01 00:00:00 1970 +0000
796 @@ -0,0 +1,1 @@
796 @@ -0,0 +1,1 @@
797 +c
797 +c
798
798
799 changeset: 2:c3a4f03cc9a7
799 changeset: 2:c3a4f03cc9a7
800 parent: 0:24427303d56f
800 parent: 0:24427303d56f
801 user: test
801 user: test
802 date: Thu Jan 01 00:00:00 1970 +0000
802 date: Thu Jan 01 00:00:00 1970 +0000
803 summary: commit on default
803 summary: commit on default
804
804
805 diff -r 24427303d56f -r c3a4f03cc9a7 c
805 diff -r 24427303d56f -r c3a4f03cc9a7 c
806 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
806 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
807 +++ b/c Thu Jan 01 00:00:00 1970 +0000
807 +++ b/c Thu Jan 01 00:00:00 1970 +0000
808 @@ -0,0 +1,1 @@
808 @@ -0,0 +1,1 @@
809 +c
809 +c
810
810
811 changeset: 1:d32277701ccb
811 changeset: 1:d32277701ccb
812 branch: test
812 branch: test
813 user: test
813 user: test
814 date: Thu Jan 01 00:00:00 1970 +0000
814 date: Thu Jan 01 00:00:00 1970 +0000
815 summary: commit on test
815 summary: commit on test
816
816
817 diff -r 24427303d56f -r d32277701ccb b
817 diff -r 24427303d56f -r d32277701ccb b
818 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
818 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
819 +++ b/b Thu Jan 01 00:00:00 1970 +0000
819 +++ b/b Thu Jan 01 00:00:00 1970 +0000
820 @@ -0,0 +1,1 @@
820 @@ -0,0 +1,1 @@
821 +b
821 +b
822
822
823 changeset: 0:24427303d56f
823 changeset: 0:24427303d56f
824 user: test
824 user: test
825 date: Thu Jan 01 00:00:00 1970 +0000
825 date: Thu Jan 01 00:00:00 1970 +0000
826 summary: commit on default
826 summary: commit on default
827
827
828 diff -r 000000000000 -r 24427303d56f a
828 diff -r 000000000000 -r 24427303d56f a
829 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
829 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
830 +++ b/a Thu Jan 01 00:00:00 1970 +0000
830 +++ b/a Thu Jan 01 00:00:00 1970 +0000
831 @@ -0,0 +1,1 @@
831 @@ -0,0 +1,1 @@
832 +a
832 +a
833
833
834
834
835
835
836 log -p -R repo
836 log -p -R repo
837
837
838 $ cd dir
838 $ cd dir
839 $ hg log -p -R .. ../a
839 $ hg log -p -R .. ../a
840 changeset: 0:24427303d56f
840 changeset: 0:24427303d56f
841 user: test
841 user: test
842 date: Thu Jan 01 00:00:00 1970 +0000
842 date: Thu Jan 01 00:00:00 1970 +0000
843 summary: commit on default
843 summary: commit on default
844
844
845 diff -r 000000000000 -r 24427303d56f a
845 diff -r 000000000000 -r 24427303d56f a
846 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
846 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
847 +++ b/a Thu Jan 01 00:00:00 1970 +0000
847 +++ b/a Thu Jan 01 00:00:00 1970 +0000
848 @@ -0,0 +1,1 @@
848 @@ -0,0 +1,1 @@
849 +a
849 +a
850
850
851
851
852
852
853 $ cd ..
853 $ cd ..
854 $ hg init follow2
854 $ hg init follow2
855 $ cd follow2
855 $ cd follow2
856
856
857
857
858 # Build the following history:
858 # Build the following history:
859 # tip - o - x - o - x - x
859 # tip - o - x - o - x - x
860 # \ /
860 # \ /
861 # o - o - o - x
861 # o - o - o - x
862 # \ /
862 # \ /
863 # o
863 # o
864 #
864 #
865 # Where "o" is a revision containing "foo" and
865 # Where "o" is a revision containing "foo" and
866 # "x" is a revision without "foo"
866 # "x" is a revision without "foo"
867
867
868 $ touch init
868 $ touch init
869 $ hg ci -A -m "init, unrelated"
869 $ hg ci -A -m "init, unrelated"
870 adding init
870 adding init
871 $ echo 'foo' > init
871 $ echo 'foo' > init
872 $ hg ci -m "change, unrelated"
872 $ hg ci -m "change, unrelated"
873 $ echo 'foo' > foo
873 $ echo 'foo' > foo
874 $ hg ci -A -m "add unrelated old foo"
874 $ hg ci -A -m "add unrelated old foo"
875 adding foo
875 adding foo
876 $ hg rm foo
876 $ hg rm foo
877 $ hg ci -m "delete foo, unrelated"
877 $ hg ci -m "delete foo, unrelated"
878 $ echo 'related' > foo
878 $ echo 'related' > foo
879 $ hg ci -A -m "add foo, related"
879 $ hg ci -A -m "add foo, related"
880 adding foo
880 adding foo
881
881
882 $ hg up 0
882 $ hg up 0
883 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
883 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
884 $ touch branch
884 $ touch branch
885 $ hg ci -A -m "first branch, unrelated"
885 $ hg ci -A -m "first branch, unrelated"
886 adding branch
886 adding branch
887 created new head
887 created new head
888 $ touch foo
888 $ touch foo
889 $ hg ci -A -m "create foo, related"
889 $ hg ci -A -m "create foo, related"
890 adding foo
890 adding foo
891 $ echo 'change' > foo
891 $ echo 'change' > foo
892 $ hg ci -m "change foo, related"
892 $ hg ci -m "change foo, related"
893
893
894 $ hg up 6
894 $ hg up 6
895 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
895 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
896 $ echo 'change foo in branch' > foo
896 $ echo 'change foo in branch' > foo
897 $ hg ci -m "change foo in branch, related"
897 $ hg ci -m "change foo in branch, related"
898 created new head
898 created new head
899 $ hg merge 7
899 $ hg merge 7
900 merging foo
900 merging foo
901 warning: conflicts during merge.
901 warning: conflicts during merge.
902 merging foo failed!
902 merging foo failed!
903 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
903 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
904 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
904 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
905 [1]
905 [1]
906 $ echo 'merge 1' > foo
906 $ echo 'merge 1' > foo
907 $ hg resolve -m foo
907 $ hg resolve -m foo
908 $ hg ci -m "First merge, related"
908 $ hg ci -m "First merge, related"
909
909
910 $ hg merge 4
910 $ hg merge 4
911 merging foo
911 merging foo
912 warning: conflicts during merge.
912 warning: conflicts during merge.
913 merging foo failed!
913 merging foo failed!
914 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
914 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
915 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
915 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
916 [1]
916 [1]
917 $ echo 'merge 2' > foo
917 $ echo 'merge 2' > foo
918 $ hg resolve -m foo
918 $ hg resolve -m foo
919 $ hg ci -m "Last merge, related"
919 $ hg ci -m "Last merge, related"
920
920
921 $ hg --config "extensions.graphlog=" glog
921 $ hg --config "extensions.graphlog=" glog
922 @ changeset: 10:4dae8563d2c5
922 @ changeset: 10:4dae8563d2c5
923 |\ tag: tip
923 |\ tag: tip
924 | | parent: 9:7b35701b003e
924 | | parent: 9:7b35701b003e
925 | | parent: 4:88176d361b69
925 | | parent: 4:88176d361b69
926 | | user: test
926 | | user: test
927 | | date: Thu Jan 01 00:00:00 1970 +0000
927 | | date: Thu Jan 01 00:00:00 1970 +0000
928 | | summary: Last merge, related
928 | | summary: Last merge, related
929 | |
929 | |
930 | o changeset: 9:7b35701b003e
930 | o changeset: 9:7b35701b003e
931 | |\ parent: 8:e5416ad8a855
931 | |\ parent: 8:e5416ad8a855
932 | | | parent: 7:87fe3144dcfa
932 | | | parent: 7:87fe3144dcfa
933 | | | user: test
933 | | | user: test
934 | | | date: Thu Jan 01 00:00:00 1970 +0000
934 | | | date: Thu Jan 01 00:00:00 1970 +0000
935 | | | summary: First merge, related
935 | | | summary: First merge, related
936 | | |
936 | | |
937 | | o changeset: 8:e5416ad8a855
937 | | o changeset: 8:e5416ad8a855
938 | | | parent: 6:dc6c325fe5ee
938 | | | parent: 6:dc6c325fe5ee
939 | | | user: test
939 | | | user: test
940 | | | date: Thu Jan 01 00:00:00 1970 +0000
940 | | | date: Thu Jan 01 00:00:00 1970 +0000
941 | | | summary: change foo in branch, related
941 | | | summary: change foo in branch, related
942 | | |
942 | | |
943 | o | changeset: 7:87fe3144dcfa
943 | o | changeset: 7:87fe3144dcfa
944 | |/ user: test
944 | |/ user: test
945 | | date: Thu Jan 01 00:00:00 1970 +0000
945 | | date: Thu Jan 01 00:00:00 1970 +0000
946 | | summary: change foo, related
946 | | summary: change foo, related
947 | |
947 | |
948 | o changeset: 6:dc6c325fe5ee
948 | o changeset: 6:dc6c325fe5ee
949 | | user: test
949 | | user: test
950 | | date: Thu Jan 01 00:00:00 1970 +0000
950 | | date: Thu Jan 01 00:00:00 1970 +0000
951 | | summary: create foo, related
951 | | summary: create foo, related
952 | |
952 | |
953 | o changeset: 5:73db34516eb9
953 | o changeset: 5:73db34516eb9
954 | | parent: 0:e87515fd044a
954 | | parent: 0:e87515fd044a
955 | | user: test
955 | | user: test
956 | | date: Thu Jan 01 00:00:00 1970 +0000
956 | | date: Thu Jan 01 00:00:00 1970 +0000
957 | | summary: first branch, unrelated
957 | | summary: first branch, unrelated
958 | |
958 | |
959 o | changeset: 4:88176d361b69
959 o | changeset: 4:88176d361b69
960 | | user: test
960 | | user: test
961 | | date: Thu Jan 01 00:00:00 1970 +0000
961 | | date: Thu Jan 01 00:00:00 1970 +0000
962 | | summary: add foo, related
962 | | summary: add foo, related
963 | |
963 | |
964 o | changeset: 3:dd78ae4afb56
964 o | changeset: 3:dd78ae4afb56
965 | | user: test
965 | | user: test
966 | | date: Thu Jan 01 00:00:00 1970 +0000
966 | | date: Thu Jan 01 00:00:00 1970 +0000
967 | | summary: delete foo, unrelated
967 | | summary: delete foo, unrelated
968 | |
968 | |
969 o | changeset: 2:c4c64aedf0f7
969 o | changeset: 2:c4c64aedf0f7
970 | | user: test
970 | | user: test
971 | | date: Thu Jan 01 00:00:00 1970 +0000
971 | | date: Thu Jan 01 00:00:00 1970 +0000
972 | | summary: add unrelated old foo
972 | | summary: add unrelated old foo
973 | |
973 | |
974 o | changeset: 1:e5faa7440653
974 o | changeset: 1:e5faa7440653
975 |/ user: test
975 |/ user: test
976 | date: Thu Jan 01 00:00:00 1970 +0000
976 | date: Thu Jan 01 00:00:00 1970 +0000
977 | summary: change, unrelated
977 | summary: change, unrelated
978 |
978 |
979 o changeset: 0:e87515fd044a
979 o changeset: 0:e87515fd044a
980 user: test
980 user: test
981 date: Thu Jan 01 00:00:00 1970 +0000
981 date: Thu Jan 01 00:00:00 1970 +0000
982 summary: init, unrelated
982 summary: init, unrelated
983
983
984
984
985 $ hg --traceback log -f foo
985 $ hg --traceback log -f foo
986 changeset: 10:4dae8563d2c5
986 changeset: 10:4dae8563d2c5
987 tag: tip
987 tag: tip
988 parent: 9:7b35701b003e
988 parent: 9:7b35701b003e
989 parent: 4:88176d361b69
989 parent: 4:88176d361b69
990 user: test
990 user: test
991 date: Thu Jan 01 00:00:00 1970 +0000
991 date: Thu Jan 01 00:00:00 1970 +0000
992 summary: Last merge, related
992 summary: Last merge, related
993
993
994 changeset: 9:7b35701b003e
994 changeset: 9:7b35701b003e
995 parent: 8:e5416ad8a855
995 parent: 8:e5416ad8a855
996 parent: 7:87fe3144dcfa
996 parent: 7:87fe3144dcfa
997 user: test
997 user: test
998 date: Thu Jan 01 00:00:00 1970 +0000
998 date: Thu Jan 01 00:00:00 1970 +0000
999 summary: First merge, related
999 summary: First merge, related
1000
1000
1001 changeset: 8:e5416ad8a855
1001 changeset: 8:e5416ad8a855
1002 parent: 6:dc6c325fe5ee
1002 parent: 6:dc6c325fe5ee
1003 user: test
1003 user: test
1004 date: Thu Jan 01 00:00:00 1970 +0000
1004 date: Thu Jan 01 00:00:00 1970 +0000
1005 summary: change foo in branch, related
1005 summary: change foo in branch, related
1006
1006
1007 changeset: 7:87fe3144dcfa
1007 changeset: 7:87fe3144dcfa
1008 user: test
1008 user: test
1009 date: Thu Jan 01 00:00:00 1970 +0000
1009 date: Thu Jan 01 00:00:00 1970 +0000
1010 summary: change foo, related
1010 summary: change foo, related
1011
1011
1012 changeset: 6:dc6c325fe5ee
1012 changeset: 6:dc6c325fe5ee
1013 user: test
1013 user: test
1014 date: Thu Jan 01 00:00:00 1970 +0000
1014 date: Thu Jan 01 00:00:00 1970 +0000
1015 summary: create foo, related
1015 summary: create foo, related
1016
1016
1017 changeset: 4:88176d361b69
1017 changeset: 4:88176d361b69
1018 user: test
1018 user: test
1019 date: Thu Jan 01 00:00:00 1970 +0000
1019 date: Thu Jan 01 00:00:00 1970 +0000
1020 summary: add foo, related
1020 summary: add foo, related
1021
1021
1022
1022
1023 Issue2383: hg log showing _less_ differences than hg diff
1023 Issue2383: hg log showing _less_ differences than hg diff
1024
1024
1025 $ hg init issue2383
1025 $ hg init issue2383
1026 $ cd issue2383
1026 $ cd issue2383
1027
1027
1028 Create a test repo:
1028 Create a test repo:
1029
1029
1030 $ echo a > a
1030 $ echo a > a
1031 $ hg ci -Am0
1031 $ hg ci -Am0
1032 adding a
1032 adding a
1033 $ echo b > b
1033 $ echo b > b
1034 $ hg ci -Am1
1034 $ hg ci -Am1
1035 adding b
1035 adding b
1036 $ hg co 0
1036 $ hg co 0
1037 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1037 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1038 $ echo b > a
1038 $ echo b > a
1039 $ hg ci -m2
1039 $ hg ci -m2
1040 created new head
1040 created new head
1041
1041
1042 Merge:
1042 Merge:
1043
1043
1044 $ hg merge
1044 $ hg merge
1045 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1045 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1046 (branch merge, don't forget to commit)
1046 (branch merge, don't forget to commit)
1047
1047
1048 Make sure there's a file listed in the merge to trigger the bug:
1048 Make sure there's a file listed in the merge to trigger the bug:
1049
1049
1050 $ echo c > a
1050 $ echo c > a
1051 $ hg ci -m3
1051 $ hg ci -m3
1052
1052
1053 Two files shown here in diff:
1053 Two files shown here in diff:
1054
1054
1055 $ hg diff --rev 2:3
1055 $ hg diff --rev 2:3
1056 diff -r b09be438c43a -r 8e07aafe1edc a
1056 diff -r b09be438c43a -r 8e07aafe1edc a
1057 --- a/a Thu Jan 01 00:00:00 1970 +0000
1057 --- a/a Thu Jan 01 00:00:00 1970 +0000
1058 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1058 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1059 @@ -1,1 +1,1 @@
1059 @@ -1,1 +1,1 @@
1060 -b
1060 -b
1061 +c
1061 +c
1062 diff -r b09be438c43a -r 8e07aafe1edc b
1062 diff -r b09be438c43a -r 8e07aafe1edc b
1063 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1063 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1064 +++ b/b Thu Jan 01 00:00:00 1970 +0000
1064 +++ b/b Thu Jan 01 00:00:00 1970 +0000
1065 @@ -0,0 +1,1 @@
1065 @@ -0,0 +1,1 @@
1066 +b
1066 +b
1067
1067
1068 Diff here should be the same:
1068 Diff here should be the same:
1069
1069
1070 $ hg log -vpr 3
1070 $ hg log -vpr 3
1071 changeset: 3:8e07aafe1edc
1071 changeset: 3:8e07aafe1edc
1072 tag: tip
1072 tag: tip
1073 parent: 2:b09be438c43a
1073 parent: 2:b09be438c43a
1074 parent: 1:925d80f479bb
1074 parent: 1:925d80f479bb
1075 user: test
1075 user: test
1076 date: Thu Jan 01 00:00:00 1970 +0000
1076 date: Thu Jan 01 00:00:00 1970 +0000
1077 files: a
1077 files: a
1078 description:
1078 description:
1079 3
1079 3
1080
1080
1081
1081
1082 diff -r b09be438c43a -r 8e07aafe1edc a
1082 diff -r b09be438c43a -r 8e07aafe1edc a
1083 --- a/a Thu Jan 01 00:00:00 1970 +0000
1083 --- a/a Thu Jan 01 00:00:00 1970 +0000
1084 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1084 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1085 @@ -1,1 +1,1 @@
1085 @@ -1,1 +1,1 @@
1086 -b
1086 -b
1087 +c
1087 +c
1088 diff -r b09be438c43a -r 8e07aafe1edc b
1088 diff -r b09be438c43a -r 8e07aafe1edc b
1089 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1089 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1090 +++ b/b Thu Jan 01 00:00:00 1970 +0000
1090 +++ b/b Thu Jan 01 00:00:00 1970 +0000
1091 @@ -0,0 +1,1 @@
1091 @@ -0,0 +1,1 @@
1092 +b
1092 +b
1093
1093
1094 $ cd ..
1094 $ cd ..
@@ -1,436 +1,436 b''
1 $ echo "[extensions]" >> $HGRCPATH
1 $ echo "[extensions]" >> $HGRCPATH
2 $ echo "mq=" >> $HGRCPATH
2 $ echo "mq=" >> $HGRCPATH
3
3
4 $ hg init
4 $ hg init
5 $ hg qinit
5 $ hg qinit
6
6
7 $ echo x > x
7 $ echo x > x
8 $ hg ci -Ama
8 $ hg ci -Ama
9 adding x
9 adding x
10
10
11 $ hg qnew a.patch
11 $ hg qnew a.patch
12 $ echo a > a
12 $ echo a > a
13 $ hg add a
13 $ hg add a
14 $ hg qrefresh
14 $ hg qrefresh
15
15
16 $ hg qnew b.patch
16 $ hg qnew b.patch
17 $ echo b > b
17 $ echo b > b
18 $ hg add b
18 $ hg add b
19 $ hg qrefresh
19 $ hg qrefresh
20
20
21 $ hg qnew c.patch
21 $ hg qnew c.patch
22 $ echo c > c
22 $ echo c > c
23 $ hg add c
23 $ hg add c
24 $ hg qrefresh
24 $ hg qrefresh
25
25
26 $ hg qpop -a
26 $ hg qpop -a
27 popping c.patch
27 popping c.patch
28 popping b.patch
28 popping b.patch
29 popping a.patch
29 popping a.patch
30 patch queue now empty
30 patch queue now empty
31
31
32
32
33 should fail
33 should fail
34
34
35 $ hg qguard does-not-exist.patch +bleh
35 $ hg qguard does-not-exist.patch +bleh
36 abort: no patch named does-not-exist.patch
36 abort: no patch named does-not-exist.patch
37 [255]
37 [255]
38
38
39
39
40 should fail
40 should fail
41
41
42 $ hg qguard +fail
42 $ hg qguard +fail
43 abort: no patches applied
43 abort: no patches applied
44 [255]
44 [255]
45
45
46 $ hg qpush
46 $ hg qpush
47 applying a.patch
47 applying a.patch
48 now at: a.patch
48 now at: a.patch
49
49
50 should guard a.patch
50 should guard a.patch
51
51
52 $ hg qguard +a
52 $ hg qguard +a
53
53
54 should print +a
54 should print +a
55
55
56 $ hg qguard
56 $ hg qguard
57 a.patch: +a
57 a.patch: +a
58 $ hg qpop
58 $ hg qpop
59 popping a.patch
59 popping a.patch
60 patch queue now empty
60 patch queue now empty
61
61
62
62
63 should fail
63 should fail
64
64
65 $ hg qpush a.patch
65 $ hg qpush a.patch
66 cannot push 'a.patch' - guarded by ['+a']
66 cannot push 'a.patch' - guarded by ['+a']
67 [1]
67 [1]
68
68
69 $ hg qguard a.patch
69 $ hg qguard a.patch
70 a.patch: +a
70 a.patch: +a
71
71
72 should push b.patch
72 should push b.patch
73
73
74 $ hg qpush
74 $ hg qpush
75 applying b.patch
75 applying b.patch
76 now at: b.patch
76 now at: b.patch
77
77
78 $ hg qpop
78 $ hg qpop
79 popping b.patch
79 popping b.patch
80 patch queue now empty
80 patch queue now empty
81
81
82 test selection of an empty guard
82 test selection of an empty guard
83
83
84 $ hg qselect ""
84 $ hg qselect ""
85 abort: guard cannot be an empty string
85 abort: guard cannot be an empty string
86 [255]
86 [255]
87 $ hg qselect a
87 $ hg qselect a
88 number of unguarded, unapplied patches has changed from 2 to 3
88 number of unguarded, unapplied patches has changed from 2 to 3
89
89
90 should push a.patch
90 should push a.patch
91
91
92 $ hg qpush
92 $ hg qpush
93 applying a.patch
93 applying a.patch
94 now at: a.patch
94 now at: a.patch
95
95
96 $ hg qguard -- c.patch -a
96 $ hg qguard -- c.patch -a
97
97
98 should print -a
98 should print -a
99
99
100 $ hg qguard c.patch
100 $ hg qguard c.patch
101 c.patch: -a
101 c.patch: -a
102
102
103
103
104 should skip c.patch
104 should skip c.patch
105
105
106 $ hg qpush -a
106 $ hg qpush -a
107 applying b.patch
107 applying b.patch
108 skipping c.patch - guarded by '-a'
108 skipping c.patch - guarded by '-a'
109 now at: b.patch
109 now at: b.patch
110
110
111 should display b.patch
111 should display b.patch
112
112
113 $ hg qtop
113 $ hg qtop
114 b.patch
114 b.patch
115
115
116 $ hg qguard -n c.patch
116 $ hg qguard -n c.patch
117
117
118 should push c.patch
118 should push c.patch
119
119
120 $ hg qpush -a
120 $ hg qpush -a
121 applying c.patch
121 applying c.patch
122 now at: c.patch
122 now at: c.patch
123
123
124 $ hg qpop -a
124 $ hg qpop -a
125 popping c.patch
125 popping c.patch
126 popping b.patch
126 popping b.patch
127 popping a.patch
127 popping a.patch
128 patch queue now empty
128 patch queue now empty
129 $ hg qselect -n
129 $ hg qselect -n
130 guards deactivated
130 guards deactivated
131 number of unguarded, unapplied patches has changed from 3 to 2
131 number of unguarded, unapplied patches has changed from 3 to 2
132
132
133 should push all
133 should push all
134
134
135 $ hg qpush -a
135 $ hg qpush -a
136 applying b.patch
136 applying b.patch
137 applying c.patch
137 applying c.patch
138 now at: c.patch
138 now at: c.patch
139
139
140 $ hg qpop -a
140 $ hg qpop -a
141 popping c.patch
141 popping c.patch
142 popping b.patch
142 popping b.patch
143 patch queue now empty
143 patch queue now empty
144 $ hg qguard a.patch +1
144 $ hg qguard a.patch +1
145 $ hg qguard b.patch +2
145 $ hg qguard b.patch +2
146 $ hg qselect 1
146 $ hg qselect 1
147 number of unguarded, unapplied patches has changed from 1 to 2
147 number of unguarded, unapplied patches has changed from 1 to 2
148
148
149 should push a.patch, not b.patch
149 should push a.patch, not b.patch
150
150
151 $ hg qpush
151 $ hg qpush
152 applying a.patch
152 applying a.patch
153 now at: a.patch
153 now at: a.patch
154 $ hg qpush
154 $ hg qpush
155 applying c.patch
155 applying c.patch
156 now at: c.patch
156 now at: c.patch
157 $ hg qpop -a
157 $ hg qpop -a
158 popping c.patch
158 popping c.patch
159 popping a.patch
159 popping a.patch
160 patch queue now empty
160 patch queue now empty
161
161
162 $ hg qselect 2
162 $ hg qselect 2
163
163
164 should push b.patch
164 should push b.patch
165
165
166 $ hg qpush
166 $ hg qpush
167 applying b.patch
167 applying b.patch
168 now at: b.patch
168 now at: b.patch
169 $ hg qpush -a
169 $ hg qpush -a
170 applying c.patch
170 applying c.patch
171 now at: c.patch
171 now at: c.patch
172
172
173 Used to be an issue with holes in the patch sequence
173 Used to be an issue with holes in the patch sequence
174 So, put one hole on the base and ask for topmost patch.
174 So, put one hole on the base and ask for topmost patch.
175
175
176 $ hg qtop
176 $ hg qtop
177 c.patch
177 c.patch
178 $ hg qpop -a
178 $ hg qpop -a
179 popping c.patch
179 popping c.patch
180 popping b.patch
180 popping b.patch
181 patch queue now empty
181 patch queue now empty
182
182
183 $ hg qselect 1 2
183 $ hg qselect 1 2
184 number of unguarded, unapplied patches has changed from 2 to 3
184 number of unguarded, unapplied patches has changed from 2 to 3
185
185
186 should push a.patch, b.patch
186 should push a.patch, b.patch
187
187
188 $ hg qpush
188 $ hg qpush
189 applying a.patch
189 applying a.patch
190 now at: a.patch
190 now at: a.patch
191 $ hg qpush
191 $ hg qpush
192 applying b.patch
192 applying b.patch
193 now at: b.patch
193 now at: b.patch
194 $ hg qpop -a
194 $ hg qpop -a
195 popping b.patch
195 popping b.patch
196 popping a.patch
196 popping a.patch
197 patch queue now empty
197 patch queue now empty
198
198
199 $ hg qguard -- a.patch +1 +2 -3
199 $ hg qguard -- a.patch +1 +2 -3
200 $ hg qselect 1 2 3
200 $ hg qselect 1 2 3
201 number of unguarded, unapplied patches has changed from 3 to 2
201 number of unguarded, unapplied patches has changed from 3 to 2
202
202
203
203
204 list patches and guards
204 list patches and guards
205
205
206 $ hg qguard -l
206 $ hg qguard -l
207 a.patch: +1 +2 -3
207 a.patch: +1 +2 -3
208 b.patch: +2
208 b.patch: +2
209 c.patch: unguarded
209 c.patch: unguarded
210
210
211 have at least one patch applied to test coloring
211 have at least one patch applied to test coloring
212
212
213 $ hg qpush
213 $ hg qpush
214 applying b.patch
214 applying b.patch
215 now at: b.patch
215 now at: b.patch
216
216
217 list patches and guards with color
217 list patches and guards with color
218
218
219 $ hg --config extensions.color= qguard --config color.mode=ansi \
219 $ hg --config extensions.color= qguard --config color.mode=ansi \
220 > -l --color=always
220 > -l --color=always
221 a.patch: +1 +2 -3
221 \x1b[0;30;1ma.patch\x1b[0m: \x1b[0;33m+1\x1b[0m \x1b[0;33m+2\x1b[0m \x1b[0;31m-3\x1b[0m (esc)
222 b.patch: +2
222 \x1b[0;34;1;4mb.patch\x1b[0m: \x1b[0;33m+2\x1b[0m (esc)
223 c.patch: unguarded
223 \x1b[0;30;1mc.patch\x1b[0m: \x1b[0;32munguarded\x1b[0m (esc)
224
224
225 should pop b.patch
225 should pop b.patch
226
226
227 $ hg qpop
227 $ hg qpop
228 popping b.patch
228 popping b.patch
229 patch queue now empty
229 patch queue now empty
230
230
231 list series
231 list series
232
232
233 $ hg qseries -v
233 $ hg qseries -v
234 0 G a.patch
234 0 G a.patch
235 1 U b.patch
235 1 U b.patch
236 2 U c.patch
236 2 U c.patch
237
237
238 list guards
238 list guards
239
239
240 $ hg qselect
240 $ hg qselect
241 1
241 1
242 2
242 2
243 3
243 3
244
244
245 should push b.patch
245 should push b.patch
246
246
247 $ hg qpush
247 $ hg qpush
248 applying b.patch
248 applying b.patch
249 now at: b.patch
249 now at: b.patch
250
250
251 $ hg qpush -a
251 $ hg qpush -a
252 applying c.patch
252 applying c.patch
253 now at: c.patch
253 now at: c.patch
254 $ hg qselect -n --reapply
254 $ hg qselect -n --reapply
255 guards deactivated
255 guards deactivated
256 popping guarded patches
256 popping guarded patches
257 popping c.patch
257 popping c.patch
258 popping b.patch
258 popping b.patch
259 patch queue now empty
259 patch queue now empty
260 reapplying unguarded patches
260 reapplying unguarded patches
261 applying c.patch
261 applying c.patch
262 now at: c.patch
262 now at: c.patch
263
263
264 guards in series file: +1 +2 -3
264 guards in series file: +1 +2 -3
265
265
266 $ hg qselect -s
266 $ hg qselect -s
267 +1
267 +1
268 +2
268 +2
269 -3
269 -3
270
270
271 should show c.patch
271 should show c.patch
272
272
273 $ hg qapplied
273 $ hg qapplied
274 c.patch
274 c.patch
275
275
276 $ hg qrename a.patch new.patch
276 $ hg qrename a.patch new.patch
277
277
278 should show :
278 should show :
279
279
280
280
281 new.patch: +1 +2 -3
281 new.patch: +1 +2 -3
282
282
283
283
284 b.patch: +2
284 b.patch: +2
285
285
286
286
287 c.patch: unguarded
287 c.patch: unguarded
288
288
289 $ hg qguard -l
289 $ hg qguard -l
290 new.patch: +1 +2 -3
290 new.patch: +1 +2 -3
291 b.patch: +2
291 b.patch: +2
292 c.patch: unguarded
292 c.patch: unguarded
293
293
294 $ hg qnew d.patch
294 $ hg qnew d.patch
295 $ hg qpop
295 $ hg qpop
296 popping d.patch
296 popping d.patch
297 now at: c.patch
297 now at: c.patch
298
298
299 should show new.patch and b.patch as Guarded, c.patch as Applied
299 should show new.patch and b.patch as Guarded, c.patch as Applied
300
300
301
301
302 and d.patch as Unapplied
302 and d.patch as Unapplied
303
303
304 $ hg qseries -v
304 $ hg qseries -v
305 0 G new.patch
305 0 G new.patch
306 1 G b.patch
306 1 G b.patch
307 2 A c.patch
307 2 A c.patch
308 3 U d.patch
308 3 U d.patch
309
309
310 qseries again, but with color
310 qseries again, but with color
311
311
312 $ hg --config extensions.color= qseries -v --color=always
312 $ hg --config extensions.color= qseries -v --color=always
313 0 G new.patch
313 0 G \x1b[0;30;1mnew.patch\x1b[0m (esc)
314 1 G b.patch
314 1 G \x1b[0;30;1mb.patch\x1b[0m (esc)
315 2 A c.patch
315 2 A \x1b[0;34;1;4mc.patch\x1b[0m (esc)
316 3 U d.patch
316 3 U \x1b[0;30;1md.patch\x1b[0m (esc)
317
317
318 $ hg qguard d.patch +2
318 $ hg qguard d.patch +2
319
319
320 new.patch, b.patch: Guarded. c.patch: Applied. d.patch: Guarded.
320 new.patch, b.patch: Guarded. c.patch: Applied. d.patch: Guarded.
321
321
322 $ hg qseries -v
322 $ hg qseries -v
323 0 G new.patch
323 0 G new.patch
324 1 G b.patch
324 1 G b.patch
325 2 A c.patch
325 2 A c.patch
326 3 G d.patch
326 3 G d.patch
327
327
328 $ qappunappv()
328 $ qappunappv()
329 > {
329 > {
330 > for command in qapplied "qapplied -v" qunapplied "qunapplied -v"; do
330 > for command in qapplied "qapplied -v" qunapplied "qunapplied -v"; do
331 > echo % hg $command
331 > echo % hg $command
332 > hg $command
332 > hg $command
333 > done
333 > done
334 > }
334 > }
335
335
336 $ hg qpop -a
336 $ hg qpop -a
337 popping c.patch
337 popping c.patch
338 patch queue now empty
338 patch queue now empty
339 $ hg qguard -l
339 $ hg qguard -l
340 new.patch: +1 +2 -3
340 new.patch: +1 +2 -3
341 b.patch: +2
341 b.patch: +2
342 c.patch: unguarded
342 c.patch: unguarded
343 d.patch: +2
343 d.patch: +2
344 $ qappunappv
344 $ qappunappv
345 % hg qapplied
345 % hg qapplied
346 % hg qapplied -v
346 % hg qapplied -v
347 % hg qunapplied
347 % hg qunapplied
348 c.patch
348 c.patch
349 % hg qunapplied -v
349 % hg qunapplied -v
350 0 G new.patch
350 0 G new.patch
351 1 G b.patch
351 1 G b.patch
352 2 U c.patch
352 2 U c.patch
353 3 G d.patch
353 3 G d.patch
354 $ hg qselect 1
354 $ hg qselect 1
355 number of unguarded, unapplied patches has changed from 1 to 2
355 number of unguarded, unapplied patches has changed from 1 to 2
356 $ qappunappv
356 $ qappunappv
357 % hg qapplied
357 % hg qapplied
358 % hg qapplied -v
358 % hg qapplied -v
359 % hg qunapplied
359 % hg qunapplied
360 new.patch
360 new.patch
361 c.patch
361 c.patch
362 % hg qunapplied -v
362 % hg qunapplied -v
363 0 U new.patch
363 0 U new.patch
364 1 G b.patch
364 1 G b.patch
365 2 U c.patch
365 2 U c.patch
366 3 G d.patch
366 3 G d.patch
367 $ hg qpush -a
367 $ hg qpush -a
368 applying new.patch
368 applying new.patch
369 skipping b.patch - guarded by ['+2']
369 skipping b.patch - guarded by ['+2']
370 applying c.patch
370 applying c.patch
371 skipping d.patch - guarded by ['+2']
371 skipping d.patch - guarded by ['+2']
372 now at: c.patch
372 now at: c.patch
373 $ qappunappv
373 $ qappunappv
374 % hg qapplied
374 % hg qapplied
375 new.patch
375 new.patch
376 c.patch
376 c.patch
377 % hg qapplied -v
377 % hg qapplied -v
378 0 A new.patch
378 0 A new.patch
379 1 G b.patch
379 1 G b.patch
380 2 A c.patch
380 2 A c.patch
381 % hg qunapplied
381 % hg qunapplied
382 % hg qunapplied -v
382 % hg qunapplied -v
383 3 G d.patch
383 3 G d.patch
384 $ hg qselect 2
384 $ hg qselect 2
385 number of unguarded, unapplied patches has changed from 0 to 1
385 number of unguarded, unapplied patches has changed from 0 to 1
386 number of guarded, applied patches has changed from 1 to 0
386 number of guarded, applied patches has changed from 1 to 0
387 $ qappunappv
387 $ qappunappv
388 % hg qapplied
388 % hg qapplied
389 new.patch
389 new.patch
390 c.patch
390 c.patch
391 % hg qapplied -v
391 % hg qapplied -v
392 0 A new.patch
392 0 A new.patch
393 1 U b.patch
393 1 U b.patch
394 2 A c.patch
394 2 A c.patch
395 % hg qunapplied
395 % hg qunapplied
396 d.patch
396 d.patch
397 % hg qunapplied -v
397 % hg qunapplied -v
398 3 U d.patch
398 3 U d.patch
399
399
400 $ for patch in `hg qseries`; do
400 $ for patch in `hg qseries`; do
401 > echo % hg qapplied $patch
401 > echo % hg qapplied $patch
402 > hg qapplied $patch
402 > hg qapplied $patch
403 > echo % hg qunapplied $patch
403 > echo % hg qunapplied $patch
404 > hg qunapplied $patch
404 > hg qunapplied $patch
405 > done
405 > done
406 % hg qapplied new.patch
406 % hg qapplied new.patch
407 new.patch
407 new.patch
408 % hg qunapplied new.patch
408 % hg qunapplied new.patch
409 b.patch
409 b.patch
410 d.patch
410 d.patch
411 % hg qapplied b.patch
411 % hg qapplied b.patch
412 new.patch
412 new.patch
413 % hg qunapplied b.patch
413 % hg qunapplied b.patch
414 d.patch
414 d.patch
415 % hg qapplied c.patch
415 % hg qapplied c.patch
416 new.patch
416 new.patch
417 c.patch
417 c.patch
418 % hg qunapplied c.patch
418 % hg qunapplied c.patch
419 d.patch
419 d.patch
420 % hg qapplied d.patch
420 % hg qapplied d.patch
421 new.patch
421 new.patch
422 c.patch
422 c.patch
423 % hg qunapplied d.patch
423 % hg qunapplied d.patch
424
424
425
425
426 hg qseries -m: only b.patch should be shown
426 hg qseries -m: only b.patch should be shown
427 the guards file was not ignored in the past
427 the guards file was not ignored in the past
428
428
429 $ hg qdelete -k b.patch
429 $ hg qdelete -k b.patch
430 $ hg qseries -m
430 $ hg qseries -m
431 b.patch
431 b.patch
432
432
433 hg qseries -m with color
433 hg qseries -m with color
434
434
435 $ hg --config extensions.color= qseries -m --color=always
435 $ hg --config extensions.color= qseries -m --color=always
436 b.patch
436 \x1b[0;31;1mb.patch\x1b[0m (esc)
@@ -1,90 +1,90 b''
1 Test that qpush cleans things up if it doesn't complete
1 Test that qpush cleans things up if it doesn't complete
2
2
3 $ echo "[extensions]" >> $HGRCPATH
3 $ echo "[extensions]" >> $HGRCPATH
4 $ echo "mq=" >> $HGRCPATH
4 $ echo "mq=" >> $HGRCPATH
5 $ hg init repo
5 $ hg init repo
6 $ cd repo
6 $ cd repo
7 $ echo foo > foo
7 $ echo foo > foo
8 $ hg ci -Am 'add foo'
8 $ hg ci -Am 'add foo'
9 adding foo
9 adding foo
10 $ touch untracked-file
10 $ touch untracked-file
11 $ echo 'syntax: glob' > .hgignore
11 $ echo 'syntax: glob' > .hgignore
12 $ echo '.hgignore' >> .hgignore
12 $ echo '.hgignore' >> .hgignore
13 $ hg qinit
13 $ hg qinit
14
14
15 test qpush on empty series
15 test qpush on empty series
16
16
17 $ hg qpush
17 $ hg qpush
18 no patches in series
18 no patches in series
19 $ hg qnew patch1
19 $ hg qnew patch1
20 $ echo >> foo
20 $ echo >> foo
21 $ hg qrefresh -m 'patch 1'
21 $ hg qrefresh -m 'patch 1'
22 $ hg qnew patch2
22 $ hg qnew patch2
23 $ echo bar > bar
23 $ echo bar > bar
24 $ hg add bar
24 $ hg add bar
25 $ hg qrefresh -m 'patch 2'
25 $ hg qrefresh -m 'patch 2'
26 $ hg qnew --config 'mq.plain=true' bad-patch
26 $ hg qnew --config 'mq.plain=true' bad-patch
27 $ echo >> foo
27 $ echo >> foo
28 $ hg qrefresh
28 $ hg qrefresh
29 $ hg qpop -a
29 $ hg qpop -a
30 popping bad-patch
30 popping bad-patch
31 popping patch2
31 popping patch2
32 popping patch1
32 popping patch1
33 patch queue now empty
33 patch queue now empty
34 $ python -c 'print "\xe9"' > message
34 $ python -c 'print "\xe9"' > message
35 $ cat .hg/patches/bad-patch >> message
35 $ cat .hg/patches/bad-patch >> message
36 $ mv message .hg/patches/bad-patch
36 $ mv message .hg/patches/bad-patch
37 $ hg qpush -a && echo 'qpush succeded?!'
37 $ hg qpush -a && echo 'qpush succeded?!'
38 applying patch1
38 applying patch1
39 applying patch2
39 applying patch2
40 applying bad-patch
40 applying bad-patch
41 transaction abort!
41 transaction abort!
42 rollback completed
42 rollback completed
43 cleaning up working directory...done
43 cleaning up working directory...done
44 abort: decoding near 'οΏ½': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)!
44 abort: decoding near '\xe9': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)! (esc)
45 [255]
45 [255]
46 $ hg parents
46 $ hg parents
47 changeset: 0:bbd179dfa0a7
47 changeset: 0:bbd179dfa0a7
48 tag: tip
48 tag: tip
49 user: test
49 user: test
50 date: Thu Jan 01 00:00:00 1970 +0000
50 date: Thu Jan 01 00:00:00 1970 +0000
51 summary: add foo
51 summary: add foo
52
52
53
53
54 bar should be gone; other unknown/ignored files should still be around
54 bar should be gone; other unknown/ignored files should still be around
55
55
56 $ hg status -A
56 $ hg status -A
57 ? untracked-file
57 ? untracked-file
58 I .hgignore
58 I .hgignore
59 C foo
59 C foo
60
60
61 preparing qpush of a missing patch
61 preparing qpush of a missing patch
62
62
63 $ hg qpop -a
63 $ hg qpop -a
64 no patches applied
64 no patches applied
65 $ hg qpush
65 $ hg qpush
66 applying patch1
66 applying patch1
67 now at: patch1
67 now at: patch1
68 $ rm .hg/patches/patch2
68 $ rm .hg/patches/patch2
69
69
70 now we expect the push to fail, but it should NOT complain about patch1
70 now we expect the push to fail, but it should NOT complain about patch1
71
71
72 $ hg qpush
72 $ hg qpush
73 applying patch2
73 applying patch2
74 unable to read patch2
74 unable to read patch2
75 now at: patch1
75 now at: patch1
76 [1]
76 [1]
77
77
78 preparing qpush of missing patch with no patch applied
78 preparing qpush of missing patch with no patch applied
79
79
80 $ hg qpop -a
80 $ hg qpop -a
81 popping patch1
81 popping patch1
82 patch queue now empty
82 patch queue now empty
83 $ rm .hg/patches/patch1
83 $ rm .hg/patches/patch1
84
84
85 qpush should fail the same way as below
85 qpush should fail the same way as below
86
86
87 $ hg qpush
87 $ hg qpush
88 applying patch1
88 applying patch1
89 unable to read patch1
89 unable to read patch1
90 [1]
90 [1]
@@ -1,1368 +1,1368 b''
1 $ checkundo()
1 $ checkundo()
2 > {
2 > {
3 > if [ -f .hg/store/undo ]; then
3 > if [ -f .hg/store/undo ]; then
4 > echo ".hg/store/undo still exists after $1"
4 > echo ".hg/store/undo still exists after $1"
5 > fi
5 > fi
6 > }
6 > }
7
7
8 $ echo "[extensions]" >> $HGRCPATH
8 $ echo "[extensions]" >> $HGRCPATH
9 $ echo "mq=" >> $HGRCPATH
9 $ echo "mq=" >> $HGRCPATH
10
10
11 $ echo "[mq]" >> $HGRCPATH
11 $ echo "[mq]" >> $HGRCPATH
12 $ echo "plain=true" >> $HGRCPATH
12 $ echo "plain=true" >> $HGRCPATH
13
13
14
14
15 help
15 help
16
16
17 $ hg help mq
17 $ hg help mq
18 mq extension - manage a stack of patches
18 mq extension - manage a stack of patches
19
19
20 This extension lets you work with a stack of patches in a Mercurial
20 This extension lets you work with a stack of patches in a Mercurial
21 repository. It manages two stacks of patches - all known patches, and applied
21 repository. It manages two stacks of patches - all known patches, and applied
22 patches (subset of known patches).
22 patches (subset of known patches).
23
23
24 Known patches are represented as patch files in the .hg/patches directory.
24 Known patches are represented as patch files in the .hg/patches directory.
25 Applied patches are both patch files and changesets.
25 Applied patches are both patch files and changesets.
26
26
27 Common tasks (use "hg help command" for more details):
27 Common tasks (use "hg help command" for more details):
28
28
29 create new patch qnew
29 create new patch qnew
30 import existing patch qimport
30 import existing patch qimport
31
31
32 print patch series qseries
32 print patch series qseries
33 print applied patches qapplied
33 print applied patches qapplied
34
34
35 add known patch to applied stack qpush
35 add known patch to applied stack qpush
36 remove patch from applied stack qpop
36 remove patch from applied stack qpop
37 refresh contents of top applied patch qrefresh
37 refresh contents of top applied patch qrefresh
38
38
39 By default, mq will automatically use git patches when required to avoid
39 By default, mq will automatically use git patches when required to avoid
40 losing file mode changes, copy records, binary files or empty files creations
40 losing file mode changes, copy records, binary files or empty files creations
41 or deletions. This behaviour can be configured with:
41 or deletions. This behaviour can be configured with:
42
42
43 [mq]
43 [mq]
44 git = auto/keep/yes/no
44 git = auto/keep/yes/no
45
45
46 If set to 'keep', mq will obey the [diff] section configuration while
46 If set to 'keep', mq will obey the [diff] section configuration while
47 preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq
47 preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq
48 will override the [diff] section and always generate git or regular patches,
48 will override the [diff] section and always generate git or regular patches,
49 possibly losing data in the second case.
49 possibly losing data in the second case.
50
50
51 You will by default be managing a patch queue named "patches". You can create
51 You will by default be managing a patch queue named "patches". You can create
52 other, independent patch queues with the "hg qqueue" command.
52 other, independent patch queues with the "hg qqueue" command.
53
53
54 list of commands:
54 list of commands:
55
55
56 qapplied print the patches already applied
56 qapplied print the patches already applied
57 qclone clone main and patch repository at same time
57 qclone clone main and patch repository at same time
58 qdelete remove patches from queue
58 qdelete remove patches from queue
59 qdiff diff of the current patch and subsequent modifications
59 qdiff diff of the current patch and subsequent modifications
60 qfinish move applied patches into repository history
60 qfinish move applied patches into repository history
61 qfold fold the named patches into the current patch
61 qfold fold the named patches into the current patch
62 qgoto push or pop patches until named patch is at top of stack
62 qgoto push or pop patches until named patch is at top of stack
63 qguard set or print guards for a patch
63 qguard set or print guards for a patch
64 qheader print the header of the topmost or specified patch
64 qheader print the header of the topmost or specified patch
65 qimport import a patch
65 qimport import a patch
66 qnew create a new patch
66 qnew create a new patch
67 qnext print the name of the next patch
67 qnext print the name of the next patch
68 qpop pop the current patch off the stack
68 qpop pop the current patch off the stack
69 qprev print the name of the previous patch
69 qprev print the name of the previous patch
70 qpush push the next patch onto the stack
70 qpush push the next patch onto the stack
71 qqueue manage multiple patch queues
71 qqueue manage multiple patch queues
72 qrefresh update the current patch
72 qrefresh update the current patch
73 qrename rename a patch
73 qrename rename a patch
74 qselect set or print guarded patches to push
74 qselect set or print guarded patches to push
75 qseries print the entire series file
75 qseries print the entire series file
76 qtop print the name of the current patch
76 qtop print the name of the current patch
77 qunapplied print the patches not yet applied
77 qunapplied print the patches not yet applied
78 strip strip changesets and all their descendants from the repository
78 strip strip changesets and all their descendants from the repository
79
79
80 use "hg -v help mq" to show aliases and global options
80 use "hg -v help mq" to show aliases and global options
81
81
82 $ hg init a
82 $ hg init a
83 $ cd a
83 $ cd a
84 $ echo a > a
84 $ echo a > a
85 $ hg ci -Ama
85 $ hg ci -Ama
86 adding a
86 adding a
87
87
88 $ hg clone . ../k
88 $ hg clone . ../k
89 updating to branch default
89 updating to branch default
90 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
91
91
92 $ mkdir b
92 $ mkdir b
93 $ echo z > b/z
93 $ echo z > b/z
94 $ hg ci -Ama
94 $ hg ci -Ama
95 adding b/z
95 adding b/z
96
96
97
97
98 qinit
98 qinit
99
99
100 $ hg qinit
100 $ hg qinit
101
101
102 $ cd ..
102 $ cd ..
103 $ hg init b
103 $ hg init b
104
104
105
105
106 -R qinit
106 -R qinit
107
107
108 $ hg -R b qinit
108 $ hg -R b qinit
109
109
110 $ hg init c
110 $ hg init c
111
111
112
112
113 qinit -c
113 qinit -c
114
114
115 $ hg --cwd c qinit -c
115 $ hg --cwd c qinit -c
116 $ hg -R c/.hg/patches st
116 $ hg -R c/.hg/patches st
117 A .hgignore
117 A .hgignore
118 A series
118 A series
119
119
120
120
121 qinit; qinit -c
121 qinit; qinit -c
122
122
123 $ hg init d
123 $ hg init d
124 $ cd d
124 $ cd d
125 $ hg qinit
125 $ hg qinit
126 $ hg qinit -c
126 $ hg qinit -c
127
127
128 qinit -c should create both files if they don't exist
128 qinit -c should create both files if they don't exist
129
129
130 $ cat .hg/patches/.hgignore
130 $ cat .hg/patches/.hgignore
131 ^\.hg
131 ^\.hg
132 ^\.mq
132 ^\.mq
133 syntax: glob
133 syntax: glob
134 status
134 status
135 guards
135 guards
136 $ cat .hg/patches/series
136 $ cat .hg/patches/series
137 $ hg qinit -c
137 $ hg qinit -c
138 abort: repository $TESTTMP/d/.hg/patches already exists!
138 abort: repository $TESTTMP/d/.hg/patches already exists!
139 [255]
139 [255]
140 $ cd ..
140 $ cd ..
141
141
142 $ echo '% qinit; <stuff>; qinit -c'
142 $ echo '% qinit; <stuff>; qinit -c'
143 % qinit; <stuff>; qinit -c
143 % qinit; <stuff>; qinit -c
144 $ hg init e
144 $ hg init e
145 $ cd e
145 $ cd e
146 $ hg qnew A
146 $ hg qnew A
147 $ checkundo qnew
147 $ checkundo qnew
148 $ echo foo > foo
148 $ echo foo > foo
149 $ hg add foo
149 $ hg add foo
150 $ hg qrefresh
150 $ hg qrefresh
151 $ hg qnew B
151 $ hg qnew B
152 $ echo >> foo
152 $ echo >> foo
153 $ hg qrefresh
153 $ hg qrefresh
154 $ echo status >> .hg/patches/.hgignore
154 $ echo status >> .hg/patches/.hgignore
155 $ echo bleh >> .hg/patches/.hgignore
155 $ echo bleh >> .hg/patches/.hgignore
156 $ hg qinit -c
156 $ hg qinit -c
157 adding .hg/patches/A
157 adding .hg/patches/A
158 adding .hg/patches/B
158 adding .hg/patches/B
159 $ hg -R .hg/patches status
159 $ hg -R .hg/patches status
160 A .hgignore
160 A .hgignore
161 A A
161 A A
162 A B
162 A B
163 A series
163 A series
164
164
165 qinit -c shouldn't touch these files if they already exist
165 qinit -c shouldn't touch these files if they already exist
166
166
167 $ cat .hg/patches/.hgignore
167 $ cat .hg/patches/.hgignore
168 status
168 status
169 bleh
169 bleh
170 $ cat .hg/patches/series
170 $ cat .hg/patches/series
171 A
171 A
172 B
172 B
173
173
174 add an untracked file
174 add an untracked file
175
175
176 $ echo >> .hg/patches/flaf
176 $ echo >> .hg/patches/flaf
177
177
178 status --mq with color (issue2096)
178 status --mq with color (issue2096)
179
179
180 $ hg status --mq --config extensions.color= --color=always
180 $ hg status --mq --config extensions.color= --color=always
181 A .hgignore
181 \x1b[0;32;1mA .hgignore\x1b[0m (esc)
182 A A
182 \x1b[0;32;1mA A\x1b[0m (esc)
183 A B
183 \x1b[0;32;1mA B\x1b[0m (esc)
184 A series
184 \x1b[0;32;1mA series\x1b[0m (esc)
185 ? flaf
185 \x1b[0;35;1;4m? flaf\x1b[0m (esc)
186
186
187 try the --mq option on a command provided by an extension
187 try the --mq option on a command provided by an extension
188
188
189 $ hg purge --mq --verbose --config extensions.purge=
189 $ hg purge --mq --verbose --config extensions.purge=
190 Removing file flaf
190 Removing file flaf
191
191
192 $ cd ..
192 $ cd ..
193
193
194 init --mq without repo
194 init --mq without repo
195
195
196 $ mkdir f
196 $ mkdir f
197 $ cd f
197 $ cd f
198 $ hg init --mq
198 $ hg init --mq
199 abort: there is no Mercurial repository here (.hg not found)
199 abort: there is no Mercurial repository here (.hg not found)
200 [255]
200 [255]
201 $ cd ..
201 $ cd ..
202
202
203 init --mq with repo path
203 init --mq with repo path
204
204
205 $ hg init g
205 $ hg init g
206 $ hg init --mq g
206 $ hg init --mq g
207 $ test -d g/.hg/patches/.hg
207 $ test -d g/.hg/patches/.hg
208
208
209 init --mq with nonexistent directory
209 init --mq with nonexistent directory
210
210
211 $ hg init --mq nonexistentdir
211 $ hg init --mq nonexistentdir
212 abort: repository nonexistentdir not found!
212 abort: repository nonexistentdir not found!
213 [255]
213 [255]
214
214
215
215
216 init --mq with bundle (non "local")
216 init --mq with bundle (non "local")
217
217
218 $ hg -R a bundle --all a.bundle >/dev/null
218 $ hg -R a bundle --all a.bundle >/dev/null
219 $ hg init --mq a.bundle
219 $ hg init --mq a.bundle
220 abort: only a local queue repository may be initialized
220 abort: only a local queue repository may be initialized
221 [255]
221 [255]
222
222
223 $ cd a
223 $ cd a
224
224
225 $ hg qnew -m 'foo bar' test.patch
225 $ hg qnew -m 'foo bar' test.patch
226
226
227 $ echo '# comment' > .hg/patches/series.tmp
227 $ echo '# comment' > .hg/patches/series.tmp
228 $ echo >> .hg/patches/series.tmp # empty line
228 $ echo >> .hg/patches/series.tmp # empty line
229 $ cat .hg/patches/series >> .hg/patches/series.tmp
229 $ cat .hg/patches/series >> .hg/patches/series.tmp
230 $ mv .hg/patches/series.tmp .hg/patches/series
230 $ mv .hg/patches/series.tmp .hg/patches/series
231
231
232
232
233 qrefresh
233 qrefresh
234
234
235 $ echo a >> a
235 $ echo a >> a
236 $ hg qrefresh
236 $ hg qrefresh
237 $ cat .hg/patches/test.patch
237 $ cat .hg/patches/test.patch
238 foo bar
238 foo bar
239
239
240 diff -r [a-f0-9]* a (re)
240 diff -r [a-f0-9]* a (re)
241 --- a/a\t(?P<date>.*) (re)
241 --- a/a\t(?P<date>.*) (re)
242 \+\+\+ b/a\t(?P<date2>.*) (re)
242 \+\+\+ b/a\t(?P<date2>.*) (re)
243 @@ -1,1 +1,2 @@
243 @@ -1,1 +1,2 @@
244 a
244 a
245 +a
245 +a
246
246
247 empty qrefresh
247 empty qrefresh
248
248
249 $ hg qrefresh -X a
249 $ hg qrefresh -X a
250
250
251 revision:
251 revision:
252
252
253 $ hg diff -r -2 -r -1
253 $ hg diff -r -2 -r -1
254
254
255 patch:
255 patch:
256
256
257 $ cat .hg/patches/test.patch
257 $ cat .hg/patches/test.patch
258 foo bar
258 foo bar
259
259
260
260
261 working dir diff:
261 working dir diff:
262
262
263 $ hg diff --nodates -q
263 $ hg diff --nodates -q
264 --- a/a
264 --- a/a
265 +++ b/a
265 +++ b/a
266 @@ -1,1 +1,2 @@
266 @@ -1,1 +1,2 @@
267 a
267 a
268 +a
268 +a
269
269
270 restore things
270 restore things
271
271
272 $ hg qrefresh
272 $ hg qrefresh
273 $ checkundo qrefresh
273 $ checkundo qrefresh
274
274
275
275
276 qpop
276 qpop
277
277
278 $ hg qpop
278 $ hg qpop
279 popping test.patch
279 popping test.patch
280 patch queue now empty
280 patch queue now empty
281 $ checkundo qpop
281 $ checkundo qpop
282
282
283
283
284 qpush with dump of tag cache
284 qpush with dump of tag cache
285 Dump the tag cache to ensure that it has exactly one head after qpush.
285 Dump the tag cache to ensure that it has exactly one head after qpush.
286
286
287 $ rm -f .hg/tags.cache
287 $ rm -f .hg/tags.cache
288 $ hg tags > /dev/null
288 $ hg tags > /dev/null
289
289
290 .hg/tags.cache (pre qpush):
290 .hg/tags.cache (pre qpush):
291
291
292 $ cat .hg/tags.cache
292 $ cat .hg/tags.cache
293 1 [\da-f]{40} (re)
293 1 [\da-f]{40} (re)
294
294
295 $ hg qpush
295 $ hg qpush
296 applying test.patch
296 applying test.patch
297 now at: test.patch
297 now at: test.patch
298 $ hg tags > /dev/null
298 $ hg tags > /dev/null
299
299
300 .hg/tags.cache (post qpush):
300 .hg/tags.cache (post qpush):
301
301
302 $ cat .hg/tags.cache
302 $ cat .hg/tags.cache
303 2 [\da-f]{40} (re)
303 2 [\da-f]{40} (re)
304
304
305 $ checkundo qpush
305 $ checkundo qpush
306 $ cd ..
306 $ cd ..
307
307
308
308
309 pop/push outside repo
309 pop/push outside repo
310 $ hg -R a qpop
310 $ hg -R a qpop
311 popping test.patch
311 popping test.patch
312 patch queue now empty
312 patch queue now empty
313 $ hg -R a qpush
313 $ hg -R a qpush
314 applying test.patch
314 applying test.patch
315 now at: test.patch
315 now at: test.patch
316
316
317 $ cd a
317 $ cd a
318 $ hg qnew test2.patch
318 $ hg qnew test2.patch
319
319
320 qrefresh in subdir
320 qrefresh in subdir
321
321
322 $ cd b
322 $ cd b
323 $ echo a > a
323 $ echo a > a
324 $ hg add a
324 $ hg add a
325 $ hg qrefresh
325 $ hg qrefresh
326
326
327 pop/push -a in subdir
327 pop/push -a in subdir
328
328
329 $ hg qpop -a
329 $ hg qpop -a
330 popping test2.patch
330 popping test2.patch
331 popping test.patch
331 popping test.patch
332 patch queue now empty
332 patch queue now empty
333 $ hg --traceback qpush -a
333 $ hg --traceback qpush -a
334 applying test.patch
334 applying test.patch
335 applying test2.patch
335 applying test2.patch
336 now at: test2.patch
336 now at: test2.patch
337
337
338
338
339 setting columns & formatted tests truncating (issue1912)
339 setting columns & formatted tests truncating (issue1912)
340
340
341 $ COLUMNS=4 hg qseries --config ui.formatted=true
341 $ COLUMNS=4 hg qseries --config ui.formatted=true
342 test.patch
342 test.patch
343 test2.patch
343 test2.patch
344 $ COLUMNS=20 hg qseries --config ui.formatted=true -vs
344 $ COLUMNS=20 hg qseries --config ui.formatted=true -vs
345 0 A test.patch: f...
345 0 A test.patch: f...
346 1 A test2.patch:
346 1 A test2.patch:
347 $ hg qpop
347 $ hg qpop
348 popping test2.patch
348 popping test2.patch
349 now at: test.patch
349 now at: test.patch
350 $ hg qseries -vs
350 $ hg qseries -vs
351 0 A test.patch: foo bar
351 0 A test.patch: foo bar
352 1 U test2.patch:
352 1 U test2.patch:
353 $ hg sum | grep mq
353 $ hg sum | grep mq
354 mq: 1 applied, 1 unapplied
354 mq: 1 applied, 1 unapplied
355 $ hg qpush
355 $ hg qpush
356 applying test2.patch
356 applying test2.patch
357 now at: test2.patch
357 now at: test2.patch
358 $ hg sum | grep mq
358 $ hg sum | grep mq
359 mq: 2 applied
359 mq: 2 applied
360 $ hg qapplied
360 $ hg qapplied
361 test.patch
361 test.patch
362 test2.patch
362 test2.patch
363 $ hg qtop
363 $ hg qtop
364 test2.patch
364 test2.patch
365
365
366
366
367 prev
367 prev
368
368
369 $ hg qapp -1
369 $ hg qapp -1
370 test.patch
370 test.patch
371
371
372 next
372 next
373
373
374 $ hg qunapp -1
374 $ hg qunapp -1
375 all patches applied
375 all patches applied
376 [1]
376 [1]
377
377
378 $ hg qpop
378 $ hg qpop
379 popping test2.patch
379 popping test2.patch
380 now at: test.patch
380 now at: test.patch
381
381
382 commit should fail
382 commit should fail
383
383
384 $ hg commit
384 $ hg commit
385 abort: cannot commit over an applied mq patch
385 abort: cannot commit over an applied mq patch
386 [255]
386 [255]
387
387
388 push should fail
388 push should fail
389
389
390 $ hg push ../../k
390 $ hg push ../../k
391 pushing to ../../k
391 pushing to ../../k
392 abort: source has mq patches applied
392 abort: source has mq patches applied
393 [255]
393 [255]
394
394
395
395
396 import should fail
396 import should fail
397
397
398 $ hg st .
398 $ hg st .
399 $ echo foo >> ../a
399 $ echo foo >> ../a
400 $ hg diff > ../../import.diff
400 $ hg diff > ../../import.diff
401 $ hg revert --no-backup ../a
401 $ hg revert --no-backup ../a
402 $ hg import ../../import.diff
402 $ hg import ../../import.diff
403 abort: cannot import over an applied patch
403 abort: cannot import over an applied patch
404 [255]
404 [255]
405 $ hg st
405 $ hg st
406
406
407 import --no-commit should succeed
407 import --no-commit should succeed
408
408
409 $ hg import --no-commit ../../import.diff
409 $ hg import --no-commit ../../import.diff
410 applying ../../import.diff
410 applying ../../import.diff
411 $ hg st
411 $ hg st
412 M a
412 M a
413 $ hg revert --no-backup ../a
413 $ hg revert --no-backup ../a
414
414
415
415
416 qunapplied
416 qunapplied
417
417
418 $ hg qunapplied
418 $ hg qunapplied
419 test2.patch
419 test2.patch
420
420
421
421
422 qpush/qpop with index
422 qpush/qpop with index
423
423
424 $ hg qnew test1b.patch
424 $ hg qnew test1b.patch
425 $ echo 1b > 1b
425 $ echo 1b > 1b
426 $ hg add 1b
426 $ hg add 1b
427 $ hg qrefresh
427 $ hg qrefresh
428 $ hg qpush 2
428 $ hg qpush 2
429 applying test2.patch
429 applying test2.patch
430 now at: test2.patch
430 now at: test2.patch
431 $ hg qpop 0
431 $ hg qpop 0
432 popping test2.patch
432 popping test2.patch
433 popping test1b.patch
433 popping test1b.patch
434 now at: test.patch
434 now at: test.patch
435 $ hg qpush test.patch+1
435 $ hg qpush test.patch+1
436 applying test1b.patch
436 applying test1b.patch
437 now at: test1b.patch
437 now at: test1b.patch
438 $ hg qpush test.patch+2
438 $ hg qpush test.patch+2
439 applying test2.patch
439 applying test2.patch
440 now at: test2.patch
440 now at: test2.patch
441 $ hg qpop test2.patch-1
441 $ hg qpop test2.patch-1
442 popping test2.patch
442 popping test2.patch
443 now at: test1b.patch
443 now at: test1b.patch
444 $ hg qpop test2.patch-2
444 $ hg qpop test2.patch-2
445 popping test1b.patch
445 popping test1b.patch
446 now at: test.patch
446 now at: test.patch
447 $ hg qpush test1b.patch+1
447 $ hg qpush test1b.patch+1
448 applying test1b.patch
448 applying test1b.patch
449 applying test2.patch
449 applying test2.patch
450 now at: test2.patch
450 now at: test2.patch
451
451
452
452
453 qpush --move
453 qpush --move
454
454
455 $ hg qpop -a
455 $ hg qpop -a
456 popping test2.patch
456 popping test2.patch
457 popping test1b.patch
457 popping test1b.patch
458 popping test.patch
458 popping test.patch
459 patch queue now empty
459 patch queue now empty
460 $ hg qguard test1b.patch -- -negguard
460 $ hg qguard test1b.patch -- -negguard
461 $ hg qguard test2.patch -- +posguard
461 $ hg qguard test2.patch -- +posguard
462 $ hg qpush --move test2.patch # can't move guarded patch
462 $ hg qpush --move test2.patch # can't move guarded patch
463 cannot push 'test2.patch' - guarded by ['+posguard']
463 cannot push 'test2.patch' - guarded by ['+posguard']
464 [1]
464 [1]
465 $ hg qselect posguard
465 $ hg qselect posguard
466 number of unguarded, unapplied patches has changed from 2 to 3
466 number of unguarded, unapplied patches has changed from 2 to 3
467 $ hg qpush --move test2.patch # move to front
467 $ hg qpush --move test2.patch # move to front
468 applying test2.patch
468 applying test2.patch
469 now at: test2.patch
469 now at: test2.patch
470 $ hg qpush --move test1b.patch # negative guard unselected
470 $ hg qpush --move test1b.patch # negative guard unselected
471 applying test1b.patch
471 applying test1b.patch
472 now at: test1b.patch
472 now at: test1b.patch
473 $ hg qpush --move test.patch # noop move
473 $ hg qpush --move test.patch # noop move
474 applying test.patch
474 applying test.patch
475 now at: test.patch
475 now at: test.patch
476 $ hg qseries -v
476 $ hg qseries -v
477 0 A test2.patch
477 0 A test2.patch
478 1 A test1b.patch
478 1 A test1b.patch
479 2 A test.patch
479 2 A test.patch
480 $ hg qpop -a
480 $ hg qpop -a
481 popping test.patch
481 popping test.patch
482 popping test1b.patch
482 popping test1b.patch
483 popping test2.patch
483 popping test2.patch
484 patch queue now empty
484 patch queue now empty
485
485
486 cleaning up
486 cleaning up
487
487
488 $ hg qselect --none
488 $ hg qselect --none
489 guards deactivated
489 guards deactivated
490 number of unguarded, unapplied patches has changed from 3 to 2
490 number of unguarded, unapplied patches has changed from 3 to 2
491 $ hg qguard --none test1b.patch
491 $ hg qguard --none test1b.patch
492 $ hg qguard --none test2.patch
492 $ hg qguard --none test2.patch
493 $ hg qpush --move test.patch
493 $ hg qpush --move test.patch
494 applying test.patch
494 applying test.patch
495 now at: test.patch
495 now at: test.patch
496 $ hg qpush --move test1b.patch
496 $ hg qpush --move test1b.patch
497 applying test1b.patch
497 applying test1b.patch
498 now at: test1b.patch
498 now at: test1b.patch
499 $ hg qpush --move bogus # nonexistent patch
499 $ hg qpush --move bogus # nonexistent patch
500 abort: patch bogus not in series
500 abort: patch bogus not in series
501 [255]
501 [255]
502 $ hg qpush --move # no patch
502 $ hg qpush --move # no patch
503 abort: please specify the patch to move
503 abort: please specify the patch to move
504 [255]
504 [255]
505 $ hg qpush --move test.patch # already applied
505 $ hg qpush --move test.patch # already applied
506 abort: cannot push to a previous patch: test.patch
506 abort: cannot push to a previous patch: test.patch
507 [255]
507 [255]
508 $ hg qpush
508 $ hg qpush
509 applying test2.patch
509 applying test2.patch
510 now at: test2.patch
510 now at: test2.patch
511
511
512
512
513 series after move
513 series after move
514
514
515 $ cat `hg root`/.hg/patches/series
515 $ cat `hg root`/.hg/patches/series
516 test.patch
516 test.patch
517 test1b.patch
517 test1b.patch
518 test2.patch
518 test2.patch
519 # comment
519 # comment
520
520
521
521
522
522
523 pop, qapplied, qunapplied
523 pop, qapplied, qunapplied
524
524
525 $ hg qseries -v
525 $ hg qseries -v
526 0 A test.patch
526 0 A test.patch
527 1 A test1b.patch
527 1 A test1b.patch
528 2 A test2.patch
528 2 A test2.patch
529
529
530 qapplied -1 test.patch
530 qapplied -1 test.patch
531
531
532 $ hg qapplied -1 test.patch
532 $ hg qapplied -1 test.patch
533 only one patch applied
533 only one patch applied
534 [1]
534 [1]
535
535
536 qapplied -1 test1b.patch
536 qapplied -1 test1b.patch
537
537
538 $ hg qapplied -1 test1b.patch
538 $ hg qapplied -1 test1b.patch
539 test.patch
539 test.patch
540
540
541 qapplied -1 test2.patch
541 qapplied -1 test2.patch
542
542
543 $ hg qapplied -1 test2.patch
543 $ hg qapplied -1 test2.patch
544 test1b.patch
544 test1b.patch
545
545
546 qapplied -1
546 qapplied -1
547
547
548 $ hg qapplied -1
548 $ hg qapplied -1
549 test1b.patch
549 test1b.patch
550
550
551 qapplied
551 qapplied
552
552
553 $ hg qapplied
553 $ hg qapplied
554 test.patch
554 test.patch
555 test1b.patch
555 test1b.patch
556 test2.patch
556 test2.patch
557
557
558 qapplied test1b.patch
558 qapplied test1b.patch
559
559
560 $ hg qapplied test1b.patch
560 $ hg qapplied test1b.patch
561 test.patch
561 test.patch
562 test1b.patch
562 test1b.patch
563
563
564 qunapplied -1
564 qunapplied -1
565
565
566 $ hg qunapplied -1
566 $ hg qunapplied -1
567 all patches applied
567 all patches applied
568 [1]
568 [1]
569
569
570 qunapplied
570 qunapplied
571
571
572 $ hg qunapplied
572 $ hg qunapplied
573
573
574 popping
574 popping
575
575
576 $ hg qpop
576 $ hg qpop
577 popping test2.patch
577 popping test2.patch
578 now at: test1b.patch
578 now at: test1b.patch
579
579
580 qunapplied -1
580 qunapplied -1
581
581
582 $ hg qunapplied -1
582 $ hg qunapplied -1
583 test2.patch
583 test2.patch
584
584
585 qunapplied
585 qunapplied
586
586
587 $ hg qunapplied
587 $ hg qunapplied
588 test2.patch
588 test2.patch
589
589
590 qunapplied test2.patch
590 qunapplied test2.patch
591
591
592 $ hg qunapplied test2.patch
592 $ hg qunapplied test2.patch
593
593
594 qunapplied -1 test2.patch
594 qunapplied -1 test2.patch
595
595
596 $ hg qunapplied -1 test2.patch
596 $ hg qunapplied -1 test2.patch
597 all patches applied
597 all patches applied
598 [1]
598 [1]
599
599
600 popping -a
600 popping -a
601
601
602 $ hg qpop -a
602 $ hg qpop -a
603 popping test1b.patch
603 popping test1b.patch
604 popping test.patch
604 popping test.patch
605 patch queue now empty
605 patch queue now empty
606
606
607 qapplied
607 qapplied
608
608
609 $ hg qapplied
609 $ hg qapplied
610
610
611 qapplied -1
611 qapplied -1
612
612
613 $ hg qapplied -1
613 $ hg qapplied -1
614 no patches applied
614 no patches applied
615 [1]
615 [1]
616 $ hg qpush
616 $ hg qpush
617 applying test.patch
617 applying test.patch
618 now at: test.patch
618 now at: test.patch
619
619
620
620
621 push should succeed
621 push should succeed
622
622
623 $ hg qpop -a
623 $ hg qpop -a
624 popping test.patch
624 popping test.patch
625 patch queue now empty
625 patch queue now empty
626 $ hg push ../../k
626 $ hg push ../../k
627 pushing to ../../k
627 pushing to ../../k
628 searching for changes
628 searching for changes
629 adding changesets
629 adding changesets
630 adding manifests
630 adding manifests
631 adding file changes
631 adding file changes
632 added 1 changesets with 1 changes to 1 files
632 added 1 changesets with 1 changes to 1 files
633
633
634
634
635 we want to start with some patches applied
635 we want to start with some patches applied
636
636
637 $ hg qpush -a
637 $ hg qpush -a
638 applying test.patch
638 applying test.patch
639 applying test1b.patch
639 applying test1b.patch
640 applying test2.patch
640 applying test2.patch
641 now at: test2.patch
641 now at: test2.patch
642
642
643 % pops all patches and succeeds
643 % pops all patches and succeeds
644
644
645 $ hg qpop -a
645 $ hg qpop -a
646 popping test2.patch
646 popping test2.patch
647 popping test1b.patch
647 popping test1b.patch
648 popping test.patch
648 popping test.patch
649 patch queue now empty
649 patch queue now empty
650
650
651 % does nothing and succeeds
651 % does nothing and succeeds
652
652
653 $ hg qpop -a
653 $ hg qpop -a
654 no patches applied
654 no patches applied
655
655
656 % fails - nothing else to pop
656 % fails - nothing else to pop
657
657
658 $ hg qpop
658 $ hg qpop
659 no patches applied
659 no patches applied
660 [1]
660 [1]
661
661
662 % pushes a patch and succeeds
662 % pushes a patch and succeeds
663
663
664 $ hg qpush
664 $ hg qpush
665 applying test.patch
665 applying test.patch
666 now at: test.patch
666 now at: test.patch
667
667
668 % pops a patch and succeeds
668 % pops a patch and succeeds
669
669
670 $ hg qpop
670 $ hg qpop
671 popping test.patch
671 popping test.patch
672 patch queue now empty
672 patch queue now empty
673
673
674 % pushes up to test1b.patch and succeeds
674 % pushes up to test1b.patch and succeeds
675
675
676 $ hg qpush test1b.patch
676 $ hg qpush test1b.patch
677 applying test.patch
677 applying test.patch
678 applying test1b.patch
678 applying test1b.patch
679 now at: test1b.patch
679 now at: test1b.patch
680
680
681 % does nothing and succeeds
681 % does nothing and succeeds
682
682
683 $ hg qpush test1b.patch
683 $ hg qpush test1b.patch
684 qpush: test1b.patch is already at the top
684 qpush: test1b.patch is already at the top
685
685
686 % does nothing and succeeds
686 % does nothing and succeeds
687
687
688 $ hg qpop test1b.patch
688 $ hg qpop test1b.patch
689 qpop: test1b.patch is already at the top
689 qpop: test1b.patch is already at the top
690
690
691 % fails - can't push to this patch
691 % fails - can't push to this patch
692
692
693 $ hg qpush test.patch
693 $ hg qpush test.patch
694 abort: cannot push to a previous patch: test.patch
694 abort: cannot push to a previous patch: test.patch
695 [255]
695 [255]
696
696
697 % fails - can't pop to this patch
697 % fails - can't pop to this patch
698
698
699 $ hg qpop test2.patch
699 $ hg qpop test2.patch
700 abort: patch test2.patch is not applied
700 abort: patch test2.patch is not applied
701 [255]
701 [255]
702
702
703 % pops up to test.patch and succeeds
703 % pops up to test.patch and succeeds
704
704
705 $ hg qpop test.patch
705 $ hg qpop test.patch
706 popping test1b.patch
706 popping test1b.patch
707 now at: test.patch
707 now at: test.patch
708
708
709 % pushes all patches and succeeds
709 % pushes all patches and succeeds
710
710
711 $ hg qpush -a
711 $ hg qpush -a
712 applying test1b.patch
712 applying test1b.patch
713 applying test2.patch
713 applying test2.patch
714 now at: test2.patch
714 now at: test2.patch
715
715
716 % does nothing and succeeds
716 % does nothing and succeeds
717
717
718 $ hg qpush -a
718 $ hg qpush -a
719 all patches are currently applied
719 all patches are currently applied
720
720
721 % fails - nothing else to push
721 % fails - nothing else to push
722
722
723 $ hg qpush
723 $ hg qpush
724 patch series already fully applied
724 patch series already fully applied
725 [1]
725 [1]
726
726
727 % does nothing and succeeds
727 % does nothing and succeeds
728
728
729 $ hg qpush test2.patch
729 $ hg qpush test2.patch
730 qpush: test2.patch is already at the top
730 qpush: test2.patch is already at the top
731
731
732 strip
732 strip
733
733
734 $ cd ../../b
734 $ cd ../../b
735 $ echo x>x
735 $ echo x>x
736 $ hg ci -Ama
736 $ hg ci -Ama
737 adding x
737 adding x
738 $ hg strip tip
738 $ hg strip tip
739 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
739 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
740 saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob)
740 saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob)
741 $ hg unbundle .hg/strip-backup/*
741 $ hg unbundle .hg/strip-backup/*
742 adding changesets
742 adding changesets
743 adding manifests
743 adding manifests
744 adding file changes
744 adding file changes
745 added 1 changesets with 1 changes to 1 files
745 added 1 changesets with 1 changes to 1 files
746 (run 'hg update' to get a working copy)
746 (run 'hg update' to get a working copy)
747
747
748
748
749 strip with local changes, should complain
749 strip with local changes, should complain
750
750
751 $ hg up
751 $ hg up
752 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
752 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
753 $ echo y>y
753 $ echo y>y
754 $ hg add y
754 $ hg add y
755 $ hg strip tip
755 $ hg strip tip
756 abort: local changes found
756 abort: local changes found
757 [255]
757 [255]
758
758
759 --force strip with local changes
759 --force strip with local changes
760
760
761 $ hg strip -f tip
761 $ hg strip -f tip
762 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
762 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
763 saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob)
763 saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob)
764
764
765
765
766 cd b; hg qrefresh
766 cd b; hg qrefresh
767
767
768 $ hg init refresh
768 $ hg init refresh
769 $ cd refresh
769 $ cd refresh
770 $ echo a > a
770 $ echo a > a
771 $ hg ci -Ama
771 $ hg ci -Ama
772 adding a
772 adding a
773 $ hg qnew -mfoo foo
773 $ hg qnew -mfoo foo
774 $ echo a >> a
774 $ echo a >> a
775 $ hg qrefresh
775 $ hg qrefresh
776 $ mkdir b
776 $ mkdir b
777 $ cd b
777 $ cd b
778 $ echo f > f
778 $ echo f > f
779 $ hg add f
779 $ hg add f
780 $ hg qrefresh
780 $ hg qrefresh
781 $ cat ../.hg/patches/foo
781 $ cat ../.hg/patches/foo
782 foo
782 foo
783
783
784 diff -r cb9a9f314b8b a
784 diff -r cb9a9f314b8b a
785 --- a/a\t(?P<date>.*) (re)
785 --- a/a\t(?P<date>.*) (re)
786 \+\+\+ b/a\t(?P<date>.*) (re)
786 \+\+\+ b/a\t(?P<date>.*) (re)
787 @@ -1,1 +1,2 @@
787 @@ -1,1 +1,2 @@
788 a
788 a
789 +a
789 +a
790 diff -r cb9a9f314b8b b/f
790 diff -r cb9a9f314b8b b/f
791 --- /dev/null\t(?P<date>.*) (re)
791 --- /dev/null\t(?P<date>.*) (re)
792 \+\+\+ b/b/f\t(?P<date>.*) (re)
792 \+\+\+ b/b/f\t(?P<date>.*) (re)
793 @@ -0,0 +1,1 @@
793 @@ -0,0 +1,1 @@
794 +f
794 +f
795
795
796 hg qrefresh .
796 hg qrefresh .
797
797
798 $ hg qrefresh .
798 $ hg qrefresh .
799 $ cat ../.hg/patches/foo
799 $ cat ../.hg/patches/foo
800 foo
800 foo
801
801
802 diff -r cb9a9f314b8b b/f
802 diff -r cb9a9f314b8b b/f
803 --- /dev/null\t(?P<date>.*) (re)
803 --- /dev/null\t(?P<date>.*) (re)
804 \+\+\+ b/b/f\t(?P<date>.*) (re)
804 \+\+\+ b/b/f\t(?P<date>.*) (re)
805 @@ -0,0 +1,1 @@
805 @@ -0,0 +1,1 @@
806 +f
806 +f
807 $ hg status
807 $ hg status
808 M a
808 M a
809
809
810
810
811 qpush failure
811 qpush failure
812
812
813 $ cd ..
813 $ cd ..
814 $ hg qrefresh
814 $ hg qrefresh
815 $ hg qnew -mbar bar
815 $ hg qnew -mbar bar
816 $ echo foo > foo
816 $ echo foo > foo
817 $ echo bar > bar
817 $ echo bar > bar
818 $ hg add foo bar
818 $ hg add foo bar
819 $ hg qrefresh
819 $ hg qrefresh
820 $ hg qpop -a
820 $ hg qpop -a
821 popping bar
821 popping bar
822 popping foo
822 popping foo
823 patch queue now empty
823 patch queue now empty
824 $ echo bar > foo
824 $ echo bar > foo
825 $ hg qpush -a
825 $ hg qpush -a
826 applying foo
826 applying foo
827 applying bar
827 applying bar
828 file foo already exists
828 file foo already exists
829 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
829 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
830 patch failed, unable to continue (try -v)
830 patch failed, unable to continue (try -v)
831 patch failed, rejects left in working dir
831 patch failed, rejects left in working dir
832 errors during apply, please fix and refresh bar
832 errors during apply, please fix and refresh bar
833 [2]
833 [2]
834 $ hg st
834 $ hg st
835 ? foo
835 ? foo
836 ? foo.rej
836 ? foo.rej
837
837
838
838
839 mq tags
839 mq tags
840
840
841 $ hg log --template '{rev} {tags}\n' -r qparent:qtip
841 $ hg log --template '{rev} {tags}\n' -r qparent:qtip
842 0 qparent
842 0 qparent
843 1 foo qbase
843 1 foo qbase
844 2 bar qtip tip
844 2 bar qtip tip
845
845
846
846
847 bad node in status
847 bad node in status
848
848
849 $ hg qpop
849 $ hg qpop
850 popping bar
850 popping bar
851 now at: foo
851 now at: foo
852 $ hg strip -qn tip
852 $ hg strip -qn tip
853 $ hg tip
853 $ hg tip
854 changeset: 0:cb9a9f314b8b
854 changeset: 0:cb9a9f314b8b
855 tag: tip
855 tag: tip
856 user: test
856 user: test
857 date: Thu Jan 01 00:00:00 1970 +0000
857 date: Thu Jan 01 00:00:00 1970 +0000
858 summary: a
858 summary: a
859
859
860 $ hg branches
860 $ hg branches
861 default 0:cb9a9f314b8b
861 default 0:cb9a9f314b8b
862 $ hg qpop
862 $ hg qpop
863 no patches applied
863 no patches applied
864 [1]
864 [1]
865
865
866 $ cat >>$HGRCPATH <<EOF
866 $ cat >>$HGRCPATH <<EOF
867 > [diff]
867 > [diff]
868 > git = True
868 > git = True
869 > EOF
869 > EOF
870 $ cd ..
870 $ cd ..
871 $ hg init git
871 $ hg init git
872 $ cd git
872 $ cd git
873 $ hg qinit
873 $ hg qinit
874
874
875 $ hg qnew -m'new file' new
875 $ hg qnew -m'new file' new
876 $ echo foo > new
876 $ echo foo > new
877 $ chmod +x new
877 $ chmod +x new
878 $ hg add new
878 $ hg add new
879 $ hg qrefresh
879 $ hg qrefresh
880 $ cat .hg/patches/new
880 $ cat .hg/patches/new
881 new file
881 new file
882
882
883 diff --git a/new b/new
883 diff --git a/new b/new
884 new file mode 100755
884 new file mode 100755
885 --- /dev/null
885 --- /dev/null
886 +++ b/new
886 +++ b/new
887 @@ -0,0 +1,1 @@
887 @@ -0,0 +1,1 @@
888 +foo
888 +foo
889
889
890 $ hg qnew -m'copy file' copy
890 $ hg qnew -m'copy file' copy
891 $ hg cp new copy
891 $ hg cp new copy
892 $ hg qrefresh
892 $ hg qrefresh
893 $ cat .hg/patches/copy
893 $ cat .hg/patches/copy
894 copy file
894 copy file
895
895
896 diff --git a/new b/copy
896 diff --git a/new b/copy
897 copy from new
897 copy from new
898 copy to copy
898 copy to copy
899
899
900 $ hg qpop
900 $ hg qpop
901 popping copy
901 popping copy
902 now at: new
902 now at: new
903 $ hg qpush
903 $ hg qpush
904 applying copy
904 applying copy
905 now at: copy
905 now at: copy
906 $ hg qdiff
906 $ hg qdiff
907 diff --git a/new b/copy
907 diff --git a/new b/copy
908 copy from new
908 copy from new
909 copy to copy
909 copy to copy
910 $ cat >>$HGRCPATH <<EOF
910 $ cat >>$HGRCPATH <<EOF
911 > [diff]
911 > [diff]
912 > git = False
912 > git = False
913 > EOF
913 > EOF
914 $ hg qdiff --git
914 $ hg qdiff --git
915 diff --git a/new b/copy
915 diff --git a/new b/copy
916 copy from new
916 copy from new
917 copy to copy
917 copy to copy
918 $ cd ..
918 $ cd ..
919
919
920
920
921 test file addition in slow path
921 test file addition in slow path
922
922
923 $ hg init slow
923 $ hg init slow
924 $ cd slow
924 $ cd slow
925 $ hg qinit
925 $ hg qinit
926 $ echo foo > foo
926 $ echo foo > foo
927 $ hg add foo
927 $ hg add foo
928 $ hg ci -m 'add foo'
928 $ hg ci -m 'add foo'
929 $ hg qnew bar
929 $ hg qnew bar
930 $ echo bar > bar
930 $ echo bar > bar
931 $ hg add bar
931 $ hg add bar
932 $ hg mv foo baz
932 $ hg mv foo baz
933 $ hg qrefresh --git
933 $ hg qrefresh --git
934 $ hg up -C 0
934 $ hg up -C 0
935 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
935 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
936 $ echo >> foo
936 $ echo >> foo
937 $ hg ci -m 'change foo'
937 $ hg ci -m 'change foo'
938 created new head
938 created new head
939 $ hg up -C 1
939 $ hg up -C 1
940 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
940 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
941 $ hg qrefresh --git
941 $ hg qrefresh --git
942 $ cat .hg/patches/bar
942 $ cat .hg/patches/bar
943 diff --git a/bar b/bar
943 diff --git a/bar b/bar
944 new file mode 100644
944 new file mode 100644
945 --- /dev/null
945 --- /dev/null
946 +++ b/bar
946 +++ b/bar
947 @@ -0,0 +1,1 @@
947 @@ -0,0 +1,1 @@
948 +bar
948 +bar
949 diff --git a/foo b/baz
949 diff --git a/foo b/baz
950 rename from foo
950 rename from foo
951 rename to baz
951 rename to baz
952 $ hg log -v --template '{rev} {file_copies}\n' -r .
952 $ hg log -v --template '{rev} {file_copies}\n' -r .
953 2 baz (foo)
953 2 baz (foo)
954 $ hg qrefresh --git
954 $ hg qrefresh --git
955 $ cat .hg/patches/bar
955 $ cat .hg/patches/bar
956 diff --git a/bar b/bar
956 diff --git a/bar b/bar
957 new file mode 100644
957 new file mode 100644
958 --- /dev/null
958 --- /dev/null
959 +++ b/bar
959 +++ b/bar
960 @@ -0,0 +1,1 @@
960 @@ -0,0 +1,1 @@
961 +bar
961 +bar
962 diff --git a/foo b/baz
962 diff --git a/foo b/baz
963 rename from foo
963 rename from foo
964 rename to baz
964 rename to baz
965 $ hg log -v --template '{rev} {file_copies}\n' -r .
965 $ hg log -v --template '{rev} {file_copies}\n' -r .
966 2 baz (foo)
966 2 baz (foo)
967 $ hg qrefresh
967 $ hg qrefresh
968 $ grep 'diff --git' .hg/patches/bar
968 $ grep 'diff --git' .hg/patches/bar
969 diff --git a/bar b/bar
969 diff --git a/bar b/bar
970 diff --git a/foo b/baz
970 diff --git a/foo b/baz
971
971
972
972
973 test file move chains in the slow path
973 test file move chains in the slow path
974
974
975 $ hg up -C 1
975 $ hg up -C 1
976 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
976 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
977 $ echo >> foo
977 $ echo >> foo
978 $ hg ci -m 'change foo again'
978 $ hg ci -m 'change foo again'
979 $ hg up -C 2
979 $ hg up -C 2
980 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
980 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
981 $ hg mv bar quux
981 $ hg mv bar quux
982 $ hg mv baz bleh
982 $ hg mv baz bleh
983 $ hg qrefresh --git
983 $ hg qrefresh --git
984 $ cat .hg/patches/bar
984 $ cat .hg/patches/bar
985 diff --git a/foo b/bleh
985 diff --git a/foo b/bleh
986 rename from foo
986 rename from foo
987 rename to bleh
987 rename to bleh
988 diff --git a/quux b/quux
988 diff --git a/quux b/quux
989 new file mode 100644
989 new file mode 100644
990 --- /dev/null
990 --- /dev/null
991 +++ b/quux
991 +++ b/quux
992 @@ -0,0 +1,1 @@
992 @@ -0,0 +1,1 @@
993 +bar
993 +bar
994 $ hg log -v --template '{rev} {file_copies}\n' -r .
994 $ hg log -v --template '{rev} {file_copies}\n' -r .
995 3 bleh (foo)
995 3 bleh (foo)
996 $ hg mv quux fred
996 $ hg mv quux fred
997 $ hg mv bleh barney
997 $ hg mv bleh barney
998 $ hg qrefresh --git
998 $ hg qrefresh --git
999 $ cat .hg/patches/bar
999 $ cat .hg/patches/bar
1000 diff --git a/foo b/barney
1000 diff --git a/foo b/barney
1001 rename from foo
1001 rename from foo
1002 rename to barney
1002 rename to barney
1003 diff --git a/fred b/fred
1003 diff --git a/fred b/fred
1004 new file mode 100644
1004 new file mode 100644
1005 --- /dev/null
1005 --- /dev/null
1006 +++ b/fred
1006 +++ b/fred
1007 @@ -0,0 +1,1 @@
1007 @@ -0,0 +1,1 @@
1008 +bar
1008 +bar
1009 $ hg log -v --template '{rev} {file_copies}\n' -r .
1009 $ hg log -v --template '{rev} {file_copies}\n' -r .
1010 3 barney (foo)
1010 3 barney (foo)
1011
1011
1012
1012
1013 refresh omitting an added file
1013 refresh omitting an added file
1014
1014
1015 $ hg qnew baz
1015 $ hg qnew baz
1016 $ echo newfile > newfile
1016 $ echo newfile > newfile
1017 $ hg add newfile
1017 $ hg add newfile
1018 $ hg qrefresh
1018 $ hg qrefresh
1019 $ hg st -A newfile
1019 $ hg st -A newfile
1020 C newfile
1020 C newfile
1021 $ hg qrefresh -X newfile
1021 $ hg qrefresh -X newfile
1022 $ hg st -A newfile
1022 $ hg st -A newfile
1023 A newfile
1023 A newfile
1024 $ hg revert newfile
1024 $ hg revert newfile
1025 $ rm newfile
1025 $ rm newfile
1026 $ hg qpop
1026 $ hg qpop
1027 popping baz
1027 popping baz
1028 now at: bar
1028 now at: bar
1029 $ hg qdel baz
1029 $ hg qdel baz
1030
1030
1031
1031
1032 create a git patch
1032 create a git patch
1033
1033
1034 $ echo a > alexander
1034 $ echo a > alexander
1035 $ hg add alexander
1035 $ hg add alexander
1036 $ hg qnew -f --git addalexander
1036 $ hg qnew -f --git addalexander
1037 $ grep diff .hg/patches/addalexander
1037 $ grep diff .hg/patches/addalexander
1038 diff --git a/alexander b/alexander
1038 diff --git a/alexander b/alexander
1039
1039
1040
1040
1041 create a git binary patch
1041 create a git binary patch
1042
1042
1043 $ cat > writebin.py <<EOF
1043 $ cat > writebin.py <<EOF
1044 > import sys
1044 > import sys
1045 > path = sys.argv[1]
1045 > path = sys.argv[1]
1046 > open(path, 'wb').write('BIN\x00ARY')
1046 > open(path, 'wb').write('BIN\x00ARY')
1047 > EOF
1047 > EOF
1048 $ python writebin.py bucephalus
1048 $ python writebin.py bucephalus
1049
1049
1050 $ python "$TESTDIR/md5sum.py" bucephalus
1050 $ python "$TESTDIR/md5sum.py" bucephalus
1051 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
1051 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
1052 $ hg add bucephalus
1052 $ hg add bucephalus
1053 $ hg qnew -f --git addbucephalus
1053 $ hg qnew -f --git addbucephalus
1054 $ grep diff .hg/patches/addbucephalus
1054 $ grep diff .hg/patches/addbucephalus
1055 diff --git a/bucephalus b/bucephalus
1055 diff --git a/bucephalus b/bucephalus
1056
1056
1057
1057
1058 check binary patches can be popped and pushed
1058 check binary patches can be popped and pushed
1059
1059
1060 $ hg qpop
1060 $ hg qpop
1061 popping addbucephalus
1061 popping addbucephalus
1062 now at: addalexander
1062 now at: addalexander
1063 $ test -f bucephalus && echo % bucephalus should not be there
1063 $ test -f bucephalus && echo % bucephalus should not be there
1064 [1]
1064 [1]
1065 $ hg qpush
1065 $ hg qpush
1066 applying addbucephalus
1066 applying addbucephalus
1067 now at: addbucephalus
1067 now at: addbucephalus
1068 $ test -f bucephalus
1068 $ test -f bucephalus
1069 $ python "$TESTDIR/md5sum.py" bucephalus
1069 $ python "$TESTDIR/md5sum.py" bucephalus
1070 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
1070 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
1071
1071
1072
1072
1073
1073
1074 strip again
1074 strip again
1075
1075
1076 $ cd ..
1076 $ cd ..
1077 $ hg init strip
1077 $ hg init strip
1078 $ cd strip
1078 $ cd strip
1079 $ touch foo
1079 $ touch foo
1080 $ hg add foo
1080 $ hg add foo
1081 $ hg ci -m 'add foo'
1081 $ hg ci -m 'add foo'
1082 $ echo >> foo
1082 $ echo >> foo
1083 $ hg ci -m 'change foo 1'
1083 $ hg ci -m 'change foo 1'
1084 $ hg up -C 0
1084 $ hg up -C 0
1085 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1085 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1086 $ echo 1 >> foo
1086 $ echo 1 >> foo
1087 $ hg ci -m 'change foo 2'
1087 $ hg ci -m 'change foo 2'
1088 created new head
1088 created new head
1089 $ HGMERGE=true hg merge
1089 $ HGMERGE=true hg merge
1090 merging foo
1090 merging foo
1091 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1091 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1092 (branch merge, don't forget to commit)
1092 (branch merge, don't forget to commit)
1093 $ hg ci -m merge
1093 $ hg ci -m merge
1094 $ hg log
1094 $ hg log
1095 changeset: 3:99615015637b
1095 changeset: 3:99615015637b
1096 tag: tip
1096 tag: tip
1097 parent: 2:20cbbe65cff7
1097 parent: 2:20cbbe65cff7
1098 parent: 1:d2871fc282d4
1098 parent: 1:d2871fc282d4
1099 user: test
1099 user: test
1100 date: Thu Jan 01 00:00:00 1970 +0000
1100 date: Thu Jan 01 00:00:00 1970 +0000
1101 summary: merge
1101 summary: merge
1102
1102
1103 changeset: 2:20cbbe65cff7
1103 changeset: 2:20cbbe65cff7
1104 parent: 0:53245c60e682
1104 parent: 0:53245c60e682
1105 user: test
1105 user: test
1106 date: Thu Jan 01 00:00:00 1970 +0000
1106 date: Thu Jan 01 00:00:00 1970 +0000
1107 summary: change foo 2
1107 summary: change foo 2
1108
1108
1109 changeset: 1:d2871fc282d4
1109 changeset: 1:d2871fc282d4
1110 user: test
1110 user: test
1111 date: Thu Jan 01 00:00:00 1970 +0000
1111 date: Thu Jan 01 00:00:00 1970 +0000
1112 summary: change foo 1
1112 summary: change foo 1
1113
1113
1114 changeset: 0:53245c60e682
1114 changeset: 0:53245c60e682
1115 user: test
1115 user: test
1116 date: Thu Jan 01 00:00:00 1970 +0000
1116 date: Thu Jan 01 00:00:00 1970 +0000
1117 summary: add foo
1117 summary: add foo
1118
1118
1119 $ hg strip 1
1119 $ hg strip 1
1120 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1120 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1121 saved backup bundle to $TESTTMP/b/strip/.hg/strip-backup/*-backup.hg (glob)
1121 saved backup bundle to $TESTTMP/b/strip/.hg/strip-backup/*-backup.hg (glob)
1122 $ checkundo strip
1122 $ checkundo strip
1123 $ hg log
1123 $ hg log
1124 changeset: 1:20cbbe65cff7
1124 changeset: 1:20cbbe65cff7
1125 tag: tip
1125 tag: tip
1126 user: test
1126 user: test
1127 date: Thu Jan 01 00:00:00 1970 +0000
1127 date: Thu Jan 01 00:00:00 1970 +0000
1128 summary: change foo 2
1128 summary: change foo 2
1129
1129
1130 changeset: 0:53245c60e682
1130 changeset: 0:53245c60e682
1131 user: test
1131 user: test
1132 date: Thu Jan 01 00:00:00 1970 +0000
1132 date: Thu Jan 01 00:00:00 1970 +0000
1133 summary: add foo
1133 summary: add foo
1134
1134
1135 $ cd ..
1135 $ cd ..
1136
1136
1137
1137
1138 qclone
1138 qclone
1139
1139
1140 $ qlog()
1140 $ qlog()
1141 > {
1141 > {
1142 > echo 'main repo:'
1142 > echo 'main repo:'
1143 > hg log --template ' rev {rev}: {desc}\n'
1143 > hg log --template ' rev {rev}: {desc}\n'
1144 > echo 'patch repo:'
1144 > echo 'patch repo:'
1145 > hg -R .hg/patches log --template ' rev {rev}: {desc}\n'
1145 > hg -R .hg/patches log --template ' rev {rev}: {desc}\n'
1146 > }
1146 > }
1147 $ hg init qclonesource
1147 $ hg init qclonesource
1148 $ cd qclonesource
1148 $ cd qclonesource
1149 $ echo foo > foo
1149 $ echo foo > foo
1150 $ hg add foo
1150 $ hg add foo
1151 $ hg ci -m 'add foo'
1151 $ hg ci -m 'add foo'
1152 $ hg qinit
1152 $ hg qinit
1153 $ hg qnew patch1
1153 $ hg qnew patch1
1154 $ echo bar >> foo
1154 $ echo bar >> foo
1155 $ hg qrefresh -m 'change foo'
1155 $ hg qrefresh -m 'change foo'
1156 $ cd ..
1156 $ cd ..
1157
1157
1158
1158
1159 repo with unversioned patch dir
1159 repo with unversioned patch dir
1160
1160
1161 $ hg qclone qclonesource failure
1161 $ hg qclone qclonesource failure
1162 abort: versioned patch repository not found (see init --mq)
1162 abort: versioned patch repository not found (see init --mq)
1163 [255]
1163 [255]
1164
1164
1165 $ cd qclonesource
1165 $ cd qclonesource
1166 $ hg qinit -c
1166 $ hg qinit -c
1167 adding .hg/patches/patch1
1167 adding .hg/patches/patch1
1168 $ hg qci -m checkpoint
1168 $ hg qci -m checkpoint
1169 $ qlog
1169 $ qlog
1170 main repo:
1170 main repo:
1171 rev 1: change foo
1171 rev 1: change foo
1172 rev 0: add foo
1172 rev 0: add foo
1173 patch repo:
1173 patch repo:
1174 rev 0: checkpoint
1174 rev 0: checkpoint
1175 $ cd ..
1175 $ cd ..
1176
1176
1177
1177
1178 repo with patches applied
1178 repo with patches applied
1179
1179
1180 $ hg qclone qclonesource qclonedest
1180 $ hg qclone qclonesource qclonedest
1181 updating to branch default
1181 updating to branch default
1182 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1182 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1183 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1183 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1184 $ cd qclonedest
1184 $ cd qclonedest
1185 $ qlog
1185 $ qlog
1186 main repo:
1186 main repo:
1187 rev 0: add foo
1187 rev 0: add foo
1188 patch repo:
1188 patch repo:
1189 rev 0: checkpoint
1189 rev 0: checkpoint
1190 $ cd ..
1190 $ cd ..
1191
1191
1192
1192
1193 repo with patches unapplied
1193 repo with patches unapplied
1194
1194
1195 $ cd qclonesource
1195 $ cd qclonesource
1196 $ hg qpop -a
1196 $ hg qpop -a
1197 popping patch1
1197 popping patch1
1198 patch queue now empty
1198 patch queue now empty
1199 $ qlog
1199 $ qlog
1200 main repo:
1200 main repo:
1201 rev 0: add foo
1201 rev 0: add foo
1202 patch repo:
1202 patch repo:
1203 rev 0: checkpoint
1203 rev 0: checkpoint
1204 $ cd ..
1204 $ cd ..
1205 $ hg qclone qclonesource qclonedest2
1205 $ hg qclone qclonesource qclonedest2
1206 updating to branch default
1206 updating to branch default
1207 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1207 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1208 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1208 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1209 $ cd qclonedest2
1209 $ cd qclonedest2
1210 $ qlog
1210 $ qlog
1211 main repo:
1211 main repo:
1212 rev 0: add foo
1212 rev 0: add foo
1213 patch repo:
1213 patch repo:
1214 rev 0: checkpoint
1214 rev 0: checkpoint
1215 $ cd ..
1215 $ cd ..
1216
1216
1217
1217
1218 Issue1033: test applying on an empty file
1218 Issue1033: test applying on an empty file
1219
1219
1220 $ hg init empty
1220 $ hg init empty
1221 $ cd empty
1221 $ cd empty
1222 $ touch a
1222 $ touch a
1223 $ hg ci -Am addempty
1223 $ hg ci -Am addempty
1224 adding a
1224 adding a
1225 $ echo a > a
1225 $ echo a > a
1226 $ hg qnew -f -e changea
1226 $ hg qnew -f -e changea
1227 $ hg qpop
1227 $ hg qpop
1228 popping changea
1228 popping changea
1229 patch queue now empty
1229 patch queue now empty
1230 $ hg qpush
1230 $ hg qpush
1231 applying changea
1231 applying changea
1232 now at: changea
1232 now at: changea
1233 $ cd ..
1233 $ cd ..
1234
1234
1235
1235
1236 test qpush with --force, issue1087
1236 test qpush with --force, issue1087
1237
1237
1238 $ hg init forcepush
1238 $ hg init forcepush
1239 $ cd forcepush
1239 $ cd forcepush
1240 $ echo hello > hello.txt
1240 $ echo hello > hello.txt
1241 $ echo bye > bye.txt
1241 $ echo bye > bye.txt
1242 $ hg ci -Ama
1242 $ hg ci -Ama
1243 adding bye.txt
1243 adding bye.txt
1244 adding hello.txt
1244 adding hello.txt
1245 $ hg qnew -d '0 0' empty
1245 $ hg qnew -d '0 0' empty
1246 $ hg qpop
1246 $ hg qpop
1247 popping empty
1247 popping empty
1248 patch queue now empty
1248 patch queue now empty
1249 $ echo world >> hello.txt
1249 $ echo world >> hello.txt
1250
1250
1251
1251
1252 qpush should fail, local changes
1252 qpush should fail, local changes
1253
1253
1254 $ hg qpush
1254 $ hg qpush
1255 abort: local changes found, refresh first
1255 abort: local changes found, refresh first
1256 [255]
1256 [255]
1257
1257
1258
1258
1259 apply force, should not discard changes with empty patch
1259 apply force, should not discard changes with empty patch
1260
1260
1261 $ hg qpush -f
1261 $ hg qpush -f
1262 applying empty
1262 applying empty
1263 patch empty is empty
1263 patch empty is empty
1264 now at: empty
1264 now at: empty
1265 $ hg diff --config diff.nodates=True
1265 $ hg diff --config diff.nodates=True
1266 diff -r bf5fc3f07a0a hello.txt
1266 diff -r bf5fc3f07a0a hello.txt
1267 --- a/hello.txt
1267 --- a/hello.txt
1268 +++ b/hello.txt
1268 +++ b/hello.txt
1269 @@ -1,1 +1,2 @@
1269 @@ -1,1 +1,2 @@
1270 hello
1270 hello
1271 +world
1271 +world
1272 $ hg qdiff --config diff.nodates=True
1272 $ hg qdiff --config diff.nodates=True
1273 diff -r 9ecee4f634e3 hello.txt
1273 diff -r 9ecee4f634e3 hello.txt
1274 --- a/hello.txt
1274 --- a/hello.txt
1275 +++ b/hello.txt
1275 +++ b/hello.txt
1276 @@ -1,1 +1,2 @@
1276 @@ -1,1 +1,2 @@
1277 hello
1277 hello
1278 +world
1278 +world
1279 $ hg log -l1 -p
1279 $ hg log -l1 -p
1280 changeset: 1:bf5fc3f07a0a
1280 changeset: 1:bf5fc3f07a0a
1281 tag: empty
1281 tag: empty
1282 tag: qbase
1282 tag: qbase
1283 tag: qtip
1283 tag: qtip
1284 tag: tip
1284 tag: tip
1285 user: test
1285 user: test
1286 date: Thu Jan 01 00:00:00 1970 +0000
1286 date: Thu Jan 01 00:00:00 1970 +0000
1287 summary: imported patch empty
1287 summary: imported patch empty
1288
1288
1289
1289
1290 $ hg qref -d '0 0'
1290 $ hg qref -d '0 0'
1291 $ hg qpop
1291 $ hg qpop
1292 popping empty
1292 popping empty
1293 patch queue now empty
1293 patch queue now empty
1294 $ echo universe >> hello.txt
1294 $ echo universe >> hello.txt
1295 $ echo universe >> bye.txt
1295 $ echo universe >> bye.txt
1296
1296
1297
1297
1298 qpush should fail, local changes
1298 qpush should fail, local changes
1299
1299
1300 $ hg qpush
1300 $ hg qpush
1301 abort: local changes found, refresh first
1301 abort: local changes found, refresh first
1302 [255]
1302 [255]
1303
1303
1304
1304
1305 apply force, should discard changes in hello, but not bye
1305 apply force, should discard changes in hello, but not bye
1306
1306
1307 $ hg qpush -f
1307 $ hg qpush -f
1308 applying empty
1308 applying empty
1309 now at: empty
1309 now at: empty
1310 $ hg st
1310 $ hg st
1311 M bye.txt
1311 M bye.txt
1312 $ hg diff --config diff.nodates=True
1312 $ hg diff --config diff.nodates=True
1313 diff -r ba252371dbc1 bye.txt
1313 diff -r ba252371dbc1 bye.txt
1314 --- a/bye.txt
1314 --- a/bye.txt
1315 +++ b/bye.txt
1315 +++ b/bye.txt
1316 @@ -1,1 +1,2 @@
1316 @@ -1,1 +1,2 @@
1317 bye
1317 bye
1318 +universe
1318 +universe
1319 $ hg qdiff --config diff.nodates=True
1319 $ hg qdiff --config diff.nodates=True
1320 diff -r 9ecee4f634e3 bye.txt
1320 diff -r 9ecee4f634e3 bye.txt
1321 --- a/bye.txt
1321 --- a/bye.txt
1322 +++ b/bye.txt
1322 +++ b/bye.txt
1323 @@ -1,1 +1,2 @@
1323 @@ -1,1 +1,2 @@
1324 bye
1324 bye
1325 +universe
1325 +universe
1326 diff -r 9ecee4f634e3 hello.txt
1326 diff -r 9ecee4f634e3 hello.txt
1327 --- a/hello.txt
1327 --- a/hello.txt
1328 +++ b/hello.txt
1328 +++ b/hello.txt
1329 @@ -1,1 +1,3 @@
1329 @@ -1,1 +1,3 @@
1330 hello
1330 hello
1331 +world
1331 +world
1332 +universe
1332 +universe
1333
1333
1334
1334
1335 test popping revisions not in working dir ancestry
1335 test popping revisions not in working dir ancestry
1336
1336
1337 $ hg qseries -v
1337 $ hg qseries -v
1338 0 A empty
1338 0 A empty
1339 $ hg up qparent
1339 $ hg up qparent
1340 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1340 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1341 $ hg qpop
1341 $ hg qpop
1342 popping empty
1342 popping empty
1343 patch queue now empty
1343 patch queue now empty
1344
1344
1345 $ cd ..
1345 $ cd ..
1346 $ hg init deletion-order
1346 $ hg init deletion-order
1347 $ cd deletion-order
1347 $ cd deletion-order
1348
1348
1349 $ touch a
1349 $ touch a
1350 $ hg ci -Aqm0
1350 $ hg ci -Aqm0
1351
1351
1352 $ hg qnew rename-dir
1352 $ hg qnew rename-dir
1353 $ hg rm a
1353 $ hg rm a
1354 $ hg qrefresh
1354 $ hg qrefresh
1355
1355
1356 $ mkdir a b
1356 $ mkdir a b
1357 $ touch a/a b/b
1357 $ touch a/a b/b
1358 $ hg add -q a b
1358 $ hg add -q a b
1359 $ hg qrefresh
1359 $ hg qrefresh
1360
1360
1361
1361
1362 test popping must remove files added in subdirectories first
1362 test popping must remove files added in subdirectories first
1363
1363
1364 $ hg qpop
1364 $ hg qpop
1365 popping rename-dir
1365 popping rename-dir
1366 patch queue now empty
1366 patch queue now empty
1367 $ cd ..
1367 $ cd ..
1368
1368
@@ -1,2153 +1,2153 b''
1 $ fixheaders()
1 $ fixheaders()
2 > {
2 > {
3 > sed -e 's/\(Message-Id:.*@\).*/\1/' \
3 > sed -e 's/\(Message-Id:.*@\).*/\1/' \
4 > -e 's/\(In-Reply-To:.*@\).*/\1/' \
4 > -e 's/\(In-Reply-To:.*@\).*/\1/' \
5 > -e 's/\(References:.*@\).*/\1/' \
5 > -e 's/\(References:.*@\).*/\1/' \
6 > -e 's/\(User-Agent:.*\)\/.*/\1/' \
6 > -e 's/\(User-Agent:.*\)\/.*/\1/' \
7 > -e 's/===.*/===/'
7 > -e 's/===.*/===/'
8 > }
8 > }
9 $ echo "[extensions]" >> $HGRCPATH
9 $ echo "[extensions]" >> $HGRCPATH
10 $ echo "patchbomb=" >> $HGRCPATH
10 $ echo "patchbomb=" >> $HGRCPATH
11
11
12 $ hg init t
12 $ hg init t
13 $ cd t
13 $ cd t
14 $ echo a > a
14 $ echo a > a
15 $ hg commit -Ama -d '1 0'
15 $ hg commit -Ama -d '1 0'
16 adding a
16 adding a
17
17
18 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip
18 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip
19 This patch series consists of 1 patches.
19 This patch series consists of 1 patches.
20
20
21
21
22 Displaying [PATCH] a ...
22 Displaying [PATCH] a ...
23 Content-Type: text/plain; charset="us-ascii"
23 Content-Type: text/plain; charset="us-ascii"
24 MIME-Version: 1.0
24 MIME-Version: 1.0
25 Content-Transfer-Encoding: 7bit
25 Content-Transfer-Encoding: 7bit
26 Subject: [PATCH] a
26 Subject: [PATCH] a
27 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
27 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
28 Message-Id: <8580ff50825a50c8f716.60@* (glob)
28 Message-Id: <8580ff50825a50c8f716.60@* (glob)
29 User-Agent: Mercurial-patchbomb/* (glob)
29 User-Agent: Mercurial-patchbomb/* (glob)
30 Date: Thu, 01 Jan 1970 00:01:00 +0000
30 Date: Thu, 01 Jan 1970 00:01:00 +0000
31 From: quux
31 From: quux
32 To: foo
32 To: foo
33 Cc: bar
33 Cc: bar
34
34
35 # HG changeset patch
35 # HG changeset patch
36 # User test
36 # User test
37 # Date 1 0
37 # Date 1 0
38 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
38 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
39 # Parent 0000000000000000000000000000000000000000
39 # Parent 0000000000000000000000000000000000000000
40 a
40 a
41
41
42 diff -r 000000000000 -r 8580ff50825a a
42 diff -r 000000000000 -r 8580ff50825a a
43 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
43 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
44 +++ b/a Thu Jan 01 00:00:01 1970 +0000
44 +++ b/a Thu Jan 01 00:00:01 1970 +0000
45 @@ -0,0 +1,1 @@
45 @@ -0,0 +1,1 @@
46 +a
46 +a
47
47
48
48
49 $ hg --config ui.interactive=1 email --confirm -n -f quux -t foo -c bar -r tip<<EOF
49 $ hg --config ui.interactive=1 email --confirm -n -f quux -t foo -c bar -r tip<<EOF
50 > n
50 > n
51 > EOF
51 > EOF
52 This patch series consists of 1 patches.
52 This patch series consists of 1 patches.
53
53
54
54
55 Final summary:
55 Final summary:
56
56
57 From: quux
57 From: quux
58 To: foo
58 To: foo
59 Cc: bar
59 Cc: bar
60 Subject: [PATCH] a
60 Subject: [PATCH] a
61 a | 1 +
61 a | 1 +
62 1 files changed, 1 insertions(+), 0 deletions(-)
62 1 files changed, 1 insertions(+), 0 deletions(-)
63
63
64 are you sure you want to send (yn)? abort: patchbomb canceled
64 are you sure you want to send (yn)? abort: patchbomb canceled
65 [255]
65 [255]
66
66
67 $ echo b > b
67 $ echo b > b
68 $ hg commit -Amb -d '2 0'
68 $ hg commit -Amb -d '2 0'
69 adding b
69 adding b
70
70
71 $ hg email --date '1970-1-1 0:2' -n -f quux -t foo -c bar -s test -r 0:tip
71 $ hg email --date '1970-1-1 0:2' -n -f quux -t foo -c bar -s test -r 0:tip
72 This patch series consists of 2 patches.
72 This patch series consists of 2 patches.
73
73
74
74
75 Write the introductory message for the patch series.
75 Write the introductory message for the patch series.
76
76
77
77
78 Displaying [PATCH 0 of 2] test ...
78 Displaying [PATCH 0 of 2] test ...
79 Content-Type: text/plain; charset="us-ascii"
79 Content-Type: text/plain; charset="us-ascii"
80 MIME-Version: 1.0
80 MIME-Version: 1.0
81 Content-Transfer-Encoding: 7bit
81 Content-Transfer-Encoding: 7bit
82 Subject: [PATCH 0 of 2] test
82 Subject: [PATCH 0 of 2] test
83 Message-Id: <patchbomb\.120@[^>]*> (re)
83 Message-Id: <patchbomb\.120@[^>]*> (re)
84 User-Agent: Mercurial-patchbomb/* (glob)
84 User-Agent: Mercurial-patchbomb/* (glob)
85 Date: Thu, 01 Jan 1970 00:02:00 +0000
85 Date: Thu, 01 Jan 1970 00:02:00 +0000
86 From: quux
86 From: quux
87 To: foo
87 To: foo
88 Cc: bar
88 Cc: bar
89
89
90
90
91 Displaying [PATCH 1 of 2] a ...
91 Displaying [PATCH 1 of 2] a ...
92 Content-Type: text/plain; charset="us-ascii"
92 Content-Type: text/plain; charset="us-ascii"
93 MIME-Version: 1.0
93 MIME-Version: 1.0
94 Content-Transfer-Encoding: 7bit
94 Content-Transfer-Encoding: 7bit
95 Subject: [PATCH 1 of 2] a
95 Subject: [PATCH 1 of 2] a
96 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
96 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
97 Message-Id: <8580ff50825a50c8f716\.121@[^>]*> (re)
97 Message-Id: <8580ff50825a50c8f716\.121@[^>]*> (re)
98 In-Reply-To: <patchbomb\.120@[^>]*> (re)
98 In-Reply-To: <patchbomb\.120@[^>]*> (re)
99 References: <patchbomb\.120@[^>]*> (re)
99 References: <patchbomb\.120@[^>]*> (re)
100 User-Agent: Mercurial-patchbomb/* (glob)
100 User-Agent: Mercurial-patchbomb/* (glob)
101 Date: Thu, 01 Jan 1970 00:02:01 +0000
101 Date: Thu, 01 Jan 1970 00:02:01 +0000
102 From: quux
102 From: quux
103 To: foo
103 To: foo
104 Cc: bar
104 Cc: bar
105
105
106 # HG changeset patch
106 # HG changeset patch
107 # User test
107 # User test
108 # Date 1 0
108 # Date 1 0
109 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
109 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
110 # Parent 0000000000000000000000000000000000000000
110 # Parent 0000000000000000000000000000000000000000
111 a
111 a
112
112
113 diff -r 000000000000 -r 8580ff50825a a
113 diff -r 000000000000 -r 8580ff50825a a
114 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
114 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
115 +++ b/a Thu Jan 01 00:00:01 1970 +0000
115 +++ b/a Thu Jan 01 00:00:01 1970 +0000
116 @@ -0,0 +1,1 @@
116 @@ -0,0 +1,1 @@
117 +a
117 +a
118
118
119 Displaying [PATCH 2 of 2] b ...
119 Displaying [PATCH 2 of 2] b ...
120 Content-Type: text/plain; charset="us-ascii"
120 Content-Type: text/plain; charset="us-ascii"
121 MIME-Version: 1.0
121 MIME-Version: 1.0
122 Content-Transfer-Encoding: 7bit
122 Content-Transfer-Encoding: 7bit
123 Subject: [PATCH 2 of 2] b
123 Subject: [PATCH 2 of 2] b
124 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
124 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
125 Message-Id: <97d72e5f12c7e84f8506\.122@[^>]*> (re)
125 Message-Id: <97d72e5f12c7e84f8506\.122@[^>]*> (re)
126 In-Reply-To: <patchbomb\.120@[^>]*> (re)
126 In-Reply-To: <patchbomb\.120@[^>]*> (re)
127 References: <patchbomb\.120@[^>]*> (re)
127 References: <patchbomb\.120@[^>]*> (re)
128 User-Agent: Mercurial-patchbomb/* (glob)
128 User-Agent: Mercurial-patchbomb/* (glob)
129 Date: Thu, 01 Jan 1970 00:02:02 +0000
129 Date: Thu, 01 Jan 1970 00:02:02 +0000
130 From: quux
130 From: quux
131 To: foo
131 To: foo
132 Cc: bar
132 Cc: bar
133
133
134 # HG changeset patch
134 # HG changeset patch
135 # User test
135 # User test
136 # Date 2 0
136 # Date 2 0
137 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
137 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
138 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
138 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
139 b
139 b
140
140
141 diff -r 8580ff50825a -r 97d72e5f12c7 b
141 diff -r 8580ff50825a -r 97d72e5f12c7 b
142 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
142 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
143 +++ b/b Thu Jan 01 00:00:02 1970 +0000
143 +++ b/b Thu Jan 01 00:00:02 1970 +0000
144 @@ -0,0 +1,1 @@
144 @@ -0,0 +1,1 @@
145 +b
145 +b
146
146
147
147
148 $ hg email -m test.mbox -f quux -t foo -c bar -s test 0:tip \
148 $ hg email -m test.mbox -f quux -t foo -c bar -s test 0:tip \
149 > --config extensions.progress= --config progress.assume-tty=1 \
149 > --config extensions.progress= --config progress.assume-tty=1 \
150 > --config progress.delay=0 --config progress.refresh=0
150 > --config progress.delay=0 --config progress.refresh=0
151 \rwriting [ ] 0/3\rwriting [ ] 0/3\r \r\r \r\rwriting [====================> ] 1/3\rwriting [====================> ] 1/3\r \r\r \r\rwriting [==========================================> ] 2/3\rwriting [==========================================> ] 2/3\r \rThis patch series consists of 2 patches. (esc)
151 \rwriting [ ] 0/3\rwriting [ ] 0/3\r \r\r \r\rwriting [====================> ] 1/3\rwriting [====================> ] 1/3\r \r\r \r\rwriting [==========================================> ] 2/3\rwriting [==========================================> ] 2/3\r \rThis patch series consists of 2 patches. (esc)
152
152
153
153
154 Write the introductory message for the patch series.
154 Write the introductory message for the patch series.
155
155
156
156
157 Writing [PATCH 0 of 2] test ...
157 Writing [PATCH 0 of 2] test ...
158 Writing [PATCH 1 of 2] a ...
158 Writing [PATCH 1 of 2] a ...
159 Writing [PATCH 2 of 2] b ...
159 Writing [PATCH 2 of 2] b ...
160
160
161 $ cd ..
161 $ cd ..
162
162
163 $ hg clone -q t t2
163 $ hg clone -q t t2
164 $ cd t2
164 $ cd t2
165 $ echo c > c
165 $ echo c > c
166 $ hg commit -Amc -d '3 0'
166 $ hg commit -Amc -d '3 0'
167 adding c
167 adding c
168
168
169 $ cat > description <<EOF
169 $ cat > description <<EOF
170 > a multiline
170 > a multiline
171 >
171 >
172 > description
172 > description
173 > EOF
173 > EOF
174
174
175
175
176 test bundle and description:
176 test bundle and description:
177 $ hg email --date '1970-1-1 0:3' -n -f quux -t foo \
177 $ hg email --date '1970-1-1 0:3' -n -f quux -t foo \
178 > -c bar -s test -r tip -b --desc description | fixheaders
178 > -c bar -s test -r tip -b --desc description | fixheaders
179 searching for changes
179 searching for changes
180 1 changesets found
180 1 changesets found
181
181
182 Displaying test ...
182 Displaying test ...
183 Content-Type: multipart/mixed; boundary="===
183 Content-Type: multipart/mixed; boundary="===
184 MIME-Version: 1.0
184 MIME-Version: 1.0
185 Subject: test
185 Subject: test
186 Message-Id: <patchbomb.180@
186 Message-Id: <patchbomb.180@
187 User-Agent: Mercurial-patchbomb
187 User-Agent: Mercurial-patchbomb
188 Date: Thu, 01 Jan 1970 00:03:00 +0000
188 Date: Thu, 01 Jan 1970 00:03:00 +0000
189 From: quux
189 From: quux
190 To: foo
190 To: foo
191 Cc: bar
191 Cc: bar
192
192
193 --===
193 --===
194 Content-Type: text/plain; charset="us-ascii"
194 Content-Type: text/plain; charset="us-ascii"
195 MIME-Version: 1.0
195 MIME-Version: 1.0
196 Content-Transfer-Encoding: 7bit
196 Content-Transfer-Encoding: 7bit
197
197
198 a multiline
198 a multiline
199
199
200 description
200 description
201
201
202 --===
202 --===
203 Content-Type: application/x-mercurial-bundle
203 Content-Type: application/x-mercurial-bundle
204 MIME-Version: 1.0
204 MIME-Version: 1.0
205 Content-Disposition: attachment; filename="bundle.hg"
205 Content-Disposition: attachment; filename="bundle.hg"
206 Content-Transfer-Encoding: base64
206 Content-Transfer-Encoding: base64
207
207
208 SEcxMEJaaDkxQVkmU1nvR7I3AAAN////lFYQWj1/4HwRkdC/AywIAk0E4pfoSIIIgQCgGEQOcLAA
208 SEcxMEJaaDkxQVkmU1nvR7I3AAAN////lFYQWj1/4HwRkdC/AywIAk0E4pfoSIIIgQCgGEQOcLAA
209 2tA1VPyp4mkeoG0EaaPU0GTT1GjRiNPIg9CZGBqZ6UbU9J+KFU09DNUaGgAAAAAANAGgAAAAA1U8
209 2tA1VPyp4mkeoG0EaaPU0GTT1GjRiNPIg9CZGBqZ6UbU9J+KFU09DNUaGgAAAAAANAGgAAAAA1U8
210 oGgAADQGgAANNANAAAAAAZipFLz3XoakCEQB3PVPyHJVi1iYkAAKQAZQGpQGZESInRnCFMqLDla2
210 oGgAADQGgAANNANAAAAAAZipFLz3XoakCEQB3PVPyHJVi1iYkAAKQAZQGpQGZESInRnCFMqLDla2
211 Bx3qfRQeA2N4lnzKkAmP8kR2asievLLXXebVU8Vg4iEBqcJNJAxIapSU6SM4888ZAciRG6MYAIEE
211 Bx3qfRQeA2N4lnzKkAmP8kR2asievLLXXebVU8Vg4iEBqcJNJAxIapSU6SM4888ZAciRG6MYAIEE
212 SlIBpFisgGkyRjX//TMtfcUAEsGu56+YnE1OlTZmzKm8BSu2rvo4rHAYYaadIFFuTy0LYgIkgLVD
212 SlIBpFisgGkyRjX//TMtfcUAEsGu56+YnE1OlTZmzKm8BSu2rvo4rHAYYaadIFFuTy0LYgIkgLVD
213 sgVa2F19D1tx9+hgbAygLgQwaIqcDdgA4BjQgIiz/AEP72++llgDKhKducqodGE4B0ETqF3JFOFC
213 sgVa2F19D1tx9+hgbAygLgQwaIqcDdgA4BjQgIiz/AEP72++llgDKhKducqodGE4B0ETqF3JFOFC
214 Q70eyNw=
214 Q70eyNw=
215 --===
215 --===
216
216
217 utf-8 patch:
217 utf-8 patch:
218 $ python -c 'fp = open("utf", "wb"); fp.write("h\xC3\xB6mma!\n"); fp.close();'
218 $ python -c 'fp = open("utf", "wb"); fp.write("h\xC3\xB6mma!\n"); fp.close();'
219 $ hg commit -A -d '4 0' -m 'charset=utf-8; content-transfer-encoding: base64'
219 $ hg commit -A -d '4 0' -m 'charset=utf-8; content-transfer-encoding: base64'
220 adding description
220 adding description
221 adding utf
221 adding utf
222
222
223 no mime encoding for email --test:
223 no mime encoding for email --test:
224 $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n | fixheaders > mailtest
224 $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n | fixheaders > mailtest
225
225
226 md5sum of 8-bit output:
226 md5sum of 8-bit output:
227 $ $TESTDIR/md5sum.py mailtest
227 $ $TESTDIR/md5sum.py mailtest
228 e726c29b3008e77994c7572563e57c34 mailtest
228 e726c29b3008e77994c7572563e57c34 mailtest
229
229
230 $ rm mailtest
230 $ rm mailtest
231
231
232 mime encoded mbox (base64):
232 mime encoded mbox (base64):
233 $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox
233 $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox
234 This patch series consists of 1 patches.
234 This patch series consists of 1 patches.
235
235
236
236
237 Writing [PATCH] charset=utf-8; content-transfer-encoding: base64 ...
237 Writing [PATCH] charset=utf-8; content-transfer-encoding: base64 ...
238
238
239 $ cat mbox
239 $ cat mbox
240 From quux Thu Jan 01 00:04:01 1970
240 From quux Thu Jan 01 00:04:01 1970
241 Content-Type: text/plain; charset="utf-8"
241 Content-Type: text/plain; charset="utf-8"
242 MIME-Version: 1.0
242 MIME-Version: 1.0
243 Content-Transfer-Encoding: base64
243 Content-Transfer-Encoding: base64
244 Subject: [PATCH] charset=utf-8; content-transfer-encoding: base64
244 Subject: [PATCH] charset=utf-8; content-transfer-encoding: base64
245 X-Mercurial-Node: c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
245 X-Mercurial-Node: c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
246 Message-Id: <c3c9e37db9f4fe4882cd.240@* (glob)
246 Message-Id: <c3c9e37db9f4fe4882cd.240@* (glob)
247 User-Agent: Mercurial-patchbomb/* (glob)
247 User-Agent: Mercurial-patchbomb/* (glob)
248 Date: Thu, 01 Jan 1970 00:04:00 +0000
248 Date: Thu, 01 Jan 1970 00:04:00 +0000
249 From: quux
249 From: quux
250 To: foo
250 To: foo
251 Cc: bar
251 Cc: bar
252
252
253 IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIHRlc3QKIyBEYXRlIDQgMAojIE5vZGUgSUQgYzNj
253 IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIHRlc3QKIyBEYXRlIDQgMAojIE5vZGUgSUQgYzNj
254 OWUzN2RiOWY0ZmU0ODgyY2RhMzliYWY0MmZlZDZiYWQ4YjE1YQojIFBhcmVudCAgZmYyYzlmYTIw
254 OWUzN2RiOWY0ZmU0ODgyY2RhMzliYWY0MmZlZDZiYWQ4YjE1YQojIFBhcmVudCAgZmYyYzlmYTIw
255 MThiMTVmYTc0YjMzMzYzYmRhOTUyNzMyM2UyYTk5ZgpjaGFyc2V0PXV0Zi04OyBjb250ZW50LXRy
255 MThiMTVmYTc0YjMzMzYzYmRhOTUyNzMyM2UyYTk5ZgpjaGFyc2V0PXV0Zi04OyBjb250ZW50LXRy
256 YW5zZmVyLWVuY29kaW5nOiBiYXNlNjQKCmRpZmYgLXIgZmYyYzlmYTIwMThiIC1yIGMzYzllMzdk
256 YW5zZmVyLWVuY29kaW5nOiBiYXNlNjQKCmRpZmYgLXIgZmYyYzlmYTIwMThiIC1yIGMzYzllMzdk
257 YjlmNCBkZXNjcmlwdGlvbgotLS0gL2Rldi9udWxsCVRodSBKYW4gMDEgMDA6MDA6MDAgMTk3MCAr
257 YjlmNCBkZXNjcmlwdGlvbgotLS0gL2Rldi9udWxsCVRodSBKYW4gMDEgMDA6MDA6MDAgMTk3MCAr
258 MDAwMAorKysgYi9kZXNjcmlwdGlvbglUaHUgSmFuIDAxIDAwOjAwOjA0IDE5NzAgKzAwMDAKQEAg
258 MDAwMAorKysgYi9kZXNjcmlwdGlvbglUaHUgSmFuIDAxIDAwOjAwOjA0IDE5NzAgKzAwMDAKQEAg
259 LTAsMCArMSwzIEBACithIG11bHRpbGluZQorCitkZXNjcmlwdGlvbgpkaWZmIC1yIGZmMmM5ZmEy
259 LTAsMCArMSwzIEBACithIG11bHRpbGluZQorCitkZXNjcmlwdGlvbgpkaWZmIC1yIGZmMmM5ZmEy
260 MDE4YiAtciBjM2M5ZTM3ZGI5ZjQgdXRmCi0tLSAvZGV2L251bGwJVGh1IEphbiAwMSAwMDowMDow
260 MDE4YiAtciBjM2M5ZTM3ZGI5ZjQgdXRmCi0tLSAvZGV2L251bGwJVGh1IEphbiAwMSAwMDowMDow
261 MCAxOTcwICswMDAwCisrKyBiL3V0ZglUaHUgSmFuIDAxIDAwOjAwOjA0IDE5NzAgKzAwMDAKQEAg
261 MCAxOTcwICswMDAwCisrKyBiL3V0ZglUaHUgSmFuIDAxIDAwOjAwOjA0IDE5NzAgKzAwMDAKQEAg
262 LTAsMCArMSwxIEBACitow7ZtbWEhCg==
262 LTAsMCArMSwxIEBACitow7ZtbWEhCg==
263
263
264
264
265 $ rm mbox
265 $ rm mbox
266
266
267 mime encoded mbox (quoted-printable):
267 mime encoded mbox (quoted-printable):
268 $ python -c 'fp = open("qp", "wb"); fp.write("%s\nfoo\n\nbar\n" % ("x" * 1024)); fp.close();'
268 $ python -c 'fp = open("qp", "wb"); fp.write("%s\nfoo\n\nbar\n" % ("x" * 1024)); fp.close();'
269 $ hg commit -A -d '4 0' -m 'charset=utf-8; content-transfer-encoding: quoted-printable'
269 $ hg commit -A -d '4 0' -m 'charset=utf-8; content-transfer-encoding: quoted-printable'
270 adding qp
270 adding qp
271
271
272 no mime encoding for email --test:
272 no mime encoding for email --test:
273 $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n | \
273 $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n | \
274 > fixheaders > mailtest
274 > fixheaders > mailtest
275 md5sum of qp output:
275 md5sum of qp output:
276 $ $TESTDIR/md5sum.py mailtest
276 $ $TESTDIR/md5sum.py mailtest
277 0402c7d033e04044e423bb04816f9dae mailtest
277 0402c7d033e04044e423bb04816f9dae mailtest
278 $ rm mailtest
278 $ rm mailtest
279
279
280 mime encoded mbox (quoted-printable):
280 mime encoded mbox (quoted-printable):
281 $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox
281 $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox
282 This patch series consists of 1 patches.
282 This patch series consists of 1 patches.
283
283
284
284
285 Writing [PATCH] charset=utf-8; content-transfer-encoding: quoted-printable ...
285 Writing [PATCH] charset=utf-8; content-transfer-encoding: quoted-printable ...
286 $ cat mbox | fixheaders
286 $ cat mbox | fixheaders
287 From quux Thu Jan 01 00:04:01 1970
287 From quux Thu Jan 01 00:04:01 1970
288 Content-Type: text/plain; charset="us-ascii"
288 Content-Type: text/plain; charset="us-ascii"
289 MIME-Version: 1.0
289 MIME-Version: 1.0
290 Content-Transfer-Encoding: quoted-printable
290 Content-Transfer-Encoding: quoted-printable
291 Subject: [PATCH] charset=utf-8; content-transfer-encoding: quoted-printable
291 Subject: [PATCH] charset=utf-8; content-transfer-encoding: quoted-printable
292 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
292 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
293 Message-Id: <c655633f8c87700bb38c.240@
293 Message-Id: <c655633f8c87700bb38c.240@
294 User-Agent: Mercurial-patchbomb
294 User-Agent: Mercurial-patchbomb
295 Date: Thu, 01 Jan 1970 00:04:00 +0000
295 Date: Thu, 01 Jan 1970 00:04:00 +0000
296 From: quux
296 From: quux
297 To: foo
297 To: foo
298 Cc: bar
298 Cc: bar
299
299
300 # HG changeset patch
300 # HG changeset patch
301 # User test
301 # User test
302 # Date 4 0
302 # Date 4 0
303 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
303 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
304 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
304 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
305 charset=3Dutf-8; content-transfer-encoding: quoted-printable
305 charset=3Dutf-8; content-transfer-encoding: quoted-printable
306
306
307 diff -r c3c9e37db9f4 -r c655633f8c87 qp
307 diff -r c3c9e37db9f4 -r c655633f8c87 qp
308 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
308 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
309 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
309 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
310 @@ -0,0 +1,4 @@
310 @@ -0,0 +1,4 @@
311 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
311 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
312 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
312 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
313 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
313 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
314 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
314 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
315 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
315 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
316 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
316 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
317 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
317 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
318 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
318 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
319 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
319 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
320 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
320 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
321 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
321 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
322 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
322 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
323 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
323 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
324 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
324 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
325 +foo
325 +foo
326 +
326 +
327 +bar
327 +bar
328
328
329
329
330
330
331 $ rm mbox
331 $ rm mbox
332
332
333 iso-8859-1 patch:
333 iso-8859-1 patch:
334 $ python -c 'fp = open("isolatin", "wb"); fp.write("h\xF6mma!\n"); fp.close();'
334 $ python -c 'fp = open("isolatin", "wb"); fp.write("h\xF6mma!\n"); fp.close();'
335 $ hg commit -A -d '5 0' -m 'charset=us-ascii; content-transfer-encoding: 8bit'
335 $ hg commit -A -d '5 0' -m 'charset=us-ascii; content-transfer-encoding: 8bit'
336 adding isolatin
336 adding isolatin
337
337
338 fake ascii mbox:
338 fake ascii mbox:
339 $ hg email --date '1970-1-1 0:5' -f quux -t foo -c bar -r tip -m mbox
339 $ hg email --date '1970-1-1 0:5' -f quux -t foo -c bar -r tip -m mbox
340 This patch series consists of 1 patches.
340 This patch series consists of 1 patches.
341
341
342
342
343 Writing [PATCH] charset=us-ascii; content-transfer-encoding: 8bit ...
343 Writing [PATCH] charset=us-ascii; content-transfer-encoding: 8bit ...
344 $ fixheaders < mbox > mboxfix
344 $ fixheaders < mbox > mboxfix
345
345
346 md5sum of 8-bit output:
346 md5sum of 8-bit output:
347 $ $TESTDIR/md5sum.py mboxfix
347 $ $TESTDIR/md5sum.py mboxfix
348 9ea043d8fc43a71045114508baed144b mboxfix
348 9ea043d8fc43a71045114508baed144b mboxfix
349
349
350 test diffstat for single patch:
350 test diffstat for single patch:
351 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y -r 2 | \
351 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y -r 2 | \
352 > fixheaders
352 > fixheaders
353 This patch series consists of 1 patches.
353 This patch series consists of 1 patches.
354
354
355
355
356 Final summary:
356 Final summary:
357
357
358 From: quux
358 From: quux
359 To: foo
359 To: foo
360 Cc: bar
360 Cc: bar
361 Subject: [PATCH] test
361 Subject: [PATCH] test
362 c | 1 +
362 c | 1 +
363 1 files changed, 1 insertions(+), 0 deletions(-)
363 1 files changed, 1 insertions(+), 0 deletions(-)
364
364
365 are you sure you want to send (yn)? y
365 are you sure you want to send (yn)? y
366
366
367 Displaying [PATCH] test ...
367 Displaying [PATCH] test ...
368 Content-Type: text/plain; charset="us-ascii"
368 Content-Type: text/plain; charset="us-ascii"
369 MIME-Version: 1.0
369 MIME-Version: 1.0
370 Content-Transfer-Encoding: 7bit
370 Content-Transfer-Encoding: 7bit
371 Subject: [PATCH] test
371 Subject: [PATCH] test
372 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
372 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
373 Message-Id: <ff2c9fa2018b15fa74b3.60@
373 Message-Id: <ff2c9fa2018b15fa74b3.60@
374 User-Agent: Mercurial-patchbomb
374 User-Agent: Mercurial-patchbomb
375 Date: Thu, 01 Jan 1970 00:01:00 +0000
375 Date: Thu, 01 Jan 1970 00:01:00 +0000
376 From: quux
376 From: quux
377 To: foo
377 To: foo
378 Cc: bar
378 Cc: bar
379
379
380 c | 1 +
380 c | 1 +
381 1 files changed, 1 insertions(+), 0 deletions(-)
381 1 files changed, 1 insertions(+), 0 deletions(-)
382
382
383
383
384 # HG changeset patch
384 # HG changeset patch
385 # User test
385 # User test
386 # Date 3 0
386 # Date 3 0
387 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
387 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
388 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
388 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
389 c
389 c
390
390
391 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
391 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
392 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
392 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
393 +++ b/c Thu Jan 01 00:00:03 1970 +0000
393 +++ b/c Thu Jan 01 00:00:03 1970 +0000
394 @@ -0,0 +1,1 @@
394 @@ -0,0 +1,1 @@
395 +c
395 +c
396
396
397
397
398 test diffstat for multiple patches:
398 test diffstat for multiple patches:
399 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y \
399 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y \
400 > -r 0:1 | fixheaders
400 > -r 0:1 | fixheaders
401 This patch series consists of 2 patches.
401 This patch series consists of 2 patches.
402
402
403
403
404 Write the introductory message for the patch series.
404 Write the introductory message for the patch series.
405
405
406
406
407 Final summary:
407 Final summary:
408
408
409 From: quux
409 From: quux
410 To: foo
410 To: foo
411 Cc: bar
411 Cc: bar
412 Subject: [PATCH 0 of 2] test
412 Subject: [PATCH 0 of 2] test
413 a | 1 +
413 a | 1 +
414 b | 1 +
414 b | 1 +
415 2 files changed, 2 insertions(+), 0 deletions(-)
415 2 files changed, 2 insertions(+), 0 deletions(-)
416 Subject: [PATCH 1 of 2] a
416 Subject: [PATCH 1 of 2] a
417 a | 1 +
417 a | 1 +
418 1 files changed, 1 insertions(+), 0 deletions(-)
418 1 files changed, 1 insertions(+), 0 deletions(-)
419 Subject: [PATCH 2 of 2] b
419 Subject: [PATCH 2 of 2] b
420 b | 1 +
420 b | 1 +
421 1 files changed, 1 insertions(+), 0 deletions(-)
421 1 files changed, 1 insertions(+), 0 deletions(-)
422
422
423 are you sure you want to send (yn)? y
423 are you sure you want to send (yn)? y
424
424
425 Displaying [PATCH 0 of 2] test ...
425 Displaying [PATCH 0 of 2] test ...
426 Content-Type: text/plain; charset="us-ascii"
426 Content-Type: text/plain; charset="us-ascii"
427 MIME-Version: 1.0
427 MIME-Version: 1.0
428 Content-Transfer-Encoding: 7bit
428 Content-Transfer-Encoding: 7bit
429 Subject: [PATCH 0 of 2] test
429 Subject: [PATCH 0 of 2] test
430 Message-Id: <patchbomb.60@
430 Message-Id: <patchbomb.60@
431 User-Agent: Mercurial-patchbomb
431 User-Agent: Mercurial-patchbomb
432 Date: Thu, 01 Jan 1970 00:01:00 +0000
432 Date: Thu, 01 Jan 1970 00:01:00 +0000
433 From: quux
433 From: quux
434 To: foo
434 To: foo
435 Cc: bar
435 Cc: bar
436
436
437
437
438 a | 1 +
438 a | 1 +
439 b | 1 +
439 b | 1 +
440 2 files changed, 2 insertions(+), 0 deletions(-)
440 2 files changed, 2 insertions(+), 0 deletions(-)
441
441
442 Displaying [PATCH 1 of 2] a ...
442 Displaying [PATCH 1 of 2] a ...
443 Content-Type: text/plain; charset="us-ascii"
443 Content-Type: text/plain; charset="us-ascii"
444 MIME-Version: 1.0
444 MIME-Version: 1.0
445 Content-Transfer-Encoding: 7bit
445 Content-Transfer-Encoding: 7bit
446 Subject: [PATCH 1 of 2] a
446 Subject: [PATCH 1 of 2] a
447 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
447 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
448 Message-Id: <8580ff50825a50c8f716.61@
448 Message-Id: <8580ff50825a50c8f716.61@
449 In-Reply-To: <patchbomb.60@
449 In-Reply-To: <patchbomb.60@
450 References: <patchbomb.60@
450 References: <patchbomb.60@
451 User-Agent: Mercurial-patchbomb
451 User-Agent: Mercurial-patchbomb
452 Date: Thu, 01 Jan 1970 00:01:01 +0000
452 Date: Thu, 01 Jan 1970 00:01:01 +0000
453 From: quux
453 From: quux
454 To: foo
454 To: foo
455 Cc: bar
455 Cc: bar
456
456
457 a | 1 +
457 a | 1 +
458 1 files changed, 1 insertions(+), 0 deletions(-)
458 1 files changed, 1 insertions(+), 0 deletions(-)
459
459
460
460
461 # HG changeset patch
461 # HG changeset patch
462 # User test
462 # User test
463 # Date 1 0
463 # Date 1 0
464 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
464 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
465 # Parent 0000000000000000000000000000000000000000
465 # Parent 0000000000000000000000000000000000000000
466 a
466 a
467
467
468 diff -r 000000000000 -r 8580ff50825a a
468 diff -r 000000000000 -r 8580ff50825a a
469 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
469 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
470 +++ b/a Thu Jan 01 00:00:01 1970 +0000
470 +++ b/a Thu Jan 01 00:00:01 1970 +0000
471 @@ -0,0 +1,1 @@
471 @@ -0,0 +1,1 @@
472 +a
472 +a
473
473
474 Displaying [PATCH 2 of 2] b ...
474 Displaying [PATCH 2 of 2] b ...
475 Content-Type: text/plain; charset="us-ascii"
475 Content-Type: text/plain; charset="us-ascii"
476 MIME-Version: 1.0
476 MIME-Version: 1.0
477 Content-Transfer-Encoding: 7bit
477 Content-Transfer-Encoding: 7bit
478 Subject: [PATCH 2 of 2] b
478 Subject: [PATCH 2 of 2] b
479 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
479 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
480 Message-Id: <97d72e5f12c7e84f8506.62@
480 Message-Id: <97d72e5f12c7e84f8506.62@
481 In-Reply-To: <patchbomb.60@
481 In-Reply-To: <patchbomb.60@
482 References: <patchbomb.60@
482 References: <patchbomb.60@
483 User-Agent: Mercurial-patchbomb
483 User-Agent: Mercurial-patchbomb
484 Date: Thu, 01 Jan 1970 00:01:02 +0000
484 Date: Thu, 01 Jan 1970 00:01:02 +0000
485 From: quux
485 From: quux
486 To: foo
486 To: foo
487 Cc: bar
487 Cc: bar
488
488
489 b | 1 +
489 b | 1 +
490 1 files changed, 1 insertions(+), 0 deletions(-)
490 1 files changed, 1 insertions(+), 0 deletions(-)
491
491
492
492
493 # HG changeset patch
493 # HG changeset patch
494 # User test
494 # User test
495 # Date 2 0
495 # Date 2 0
496 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
496 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
497 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
497 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
498 b
498 b
499
499
500 diff -r 8580ff50825a -r 97d72e5f12c7 b
500 diff -r 8580ff50825a -r 97d72e5f12c7 b
501 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
501 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
502 +++ b/b Thu Jan 01 00:00:02 1970 +0000
502 +++ b/b Thu Jan 01 00:00:02 1970 +0000
503 @@ -0,0 +1,1 @@
503 @@ -0,0 +1,1 @@
504 +b
504 +b
505
505
506
506
507 test inline for single patch:
507 test inline for single patch:
508 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 2 | \
508 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 2 | \
509 > fixheaders
509 > fixheaders
510 This patch series consists of 1 patches.
510 This patch series consists of 1 patches.
511
511
512
512
513 Displaying [PATCH] test ...
513 Displaying [PATCH] test ...
514 Content-Type: multipart/mixed; boundary="===
514 Content-Type: multipart/mixed; boundary="===
515 MIME-Version: 1.0
515 MIME-Version: 1.0
516 Subject: [PATCH] test
516 Subject: [PATCH] test
517 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
517 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
518 Message-Id: <ff2c9fa2018b15fa74b3.60@
518 Message-Id: <ff2c9fa2018b15fa74b3.60@
519 User-Agent: Mercurial-patchbomb
519 User-Agent: Mercurial-patchbomb
520 Date: Thu, 01 Jan 1970 00:01:00 +0000
520 Date: Thu, 01 Jan 1970 00:01:00 +0000
521 From: quux
521 From: quux
522 To: foo
522 To: foo
523 Cc: bar
523 Cc: bar
524
524
525 --===
525 --===
526 Content-Type: text/x-patch; charset="us-ascii"
526 Content-Type: text/x-patch; charset="us-ascii"
527 MIME-Version: 1.0
527 MIME-Version: 1.0
528 Content-Transfer-Encoding: 7bit
528 Content-Transfer-Encoding: 7bit
529 Content-Disposition: inline; filename=t2.patch
529 Content-Disposition: inline; filename=t2.patch
530
530
531 # HG changeset patch
531 # HG changeset patch
532 # User test
532 # User test
533 # Date 3 0
533 # Date 3 0
534 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
534 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
535 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
535 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
536 c
536 c
537
537
538 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
538 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
539 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
539 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
540 +++ b/c Thu Jan 01 00:00:03 1970 +0000
540 +++ b/c Thu Jan 01 00:00:03 1970 +0000
541 @@ -0,0 +1,1 @@
541 @@ -0,0 +1,1 @@
542 +c
542 +c
543
543
544 --===
544 --===
545
545
546
546
547 test inline for single patch (quoted-printable):
547 test inline for single patch (quoted-printable):
548 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 4 | \
548 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 4 | \
549 > fixheaders
549 > fixheaders
550 This patch series consists of 1 patches.
550 This patch series consists of 1 patches.
551
551
552
552
553 Displaying [PATCH] test ...
553 Displaying [PATCH] test ...
554 Content-Type: multipart/mixed; boundary="===
554 Content-Type: multipart/mixed; boundary="===
555 MIME-Version: 1.0
555 MIME-Version: 1.0
556 Subject: [PATCH] test
556 Subject: [PATCH] test
557 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
557 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
558 Message-Id: <c655633f8c87700bb38c.60@
558 Message-Id: <c655633f8c87700bb38c.60@
559 User-Agent: Mercurial-patchbomb
559 User-Agent: Mercurial-patchbomb
560 Date: Thu, 01 Jan 1970 00:01:00 +0000
560 Date: Thu, 01 Jan 1970 00:01:00 +0000
561 From: quux
561 From: quux
562 To: foo
562 To: foo
563 Cc: bar
563 Cc: bar
564
564
565 --===
565 --===
566 Content-Type: text/x-patch; charset="us-ascii"
566 Content-Type: text/x-patch; charset="us-ascii"
567 MIME-Version: 1.0
567 MIME-Version: 1.0
568 Content-Transfer-Encoding: quoted-printable
568 Content-Transfer-Encoding: quoted-printable
569 Content-Disposition: inline; filename=t2.patch
569 Content-Disposition: inline; filename=t2.patch
570
570
571 # HG changeset patch
571 # HG changeset patch
572 # User test
572 # User test
573 # Date 4 0
573 # Date 4 0
574 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
574 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
575 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
575 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
576 charset=3Dutf-8; content-transfer-encoding: quoted-printable
576 charset=3Dutf-8; content-transfer-encoding: quoted-printable
577
577
578 diff -r c3c9e37db9f4 -r c655633f8c87 qp
578 diff -r c3c9e37db9f4 -r c655633f8c87 qp
579 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
579 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
580 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
580 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
581 @@ -0,0 +1,4 @@
581 @@ -0,0 +1,4 @@
582 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
582 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
583 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
583 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
584 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
584 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
585 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
585 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
586 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
586 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
587 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
587 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
588 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
588 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
589 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
589 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
590 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
590 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
591 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
591 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
592 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
592 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
593 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
593 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
594 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
594 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
595 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
595 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
596 +foo
596 +foo
597 +
597 +
598 +bar
598 +bar
599
599
600 --===
600 --===
601
601
602 test inline for multiple patches:
602 test inline for multiple patches:
603 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \
603 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \
604 > -r 0:1 -r 4 | fixheaders
604 > -r 0:1 -r 4 | fixheaders
605 This patch series consists of 3 patches.
605 This patch series consists of 3 patches.
606
606
607
607
608 Write the introductory message for the patch series.
608 Write the introductory message for the patch series.
609
609
610
610
611 Displaying [PATCH 0 of 3] test ...
611 Displaying [PATCH 0 of 3] test ...
612 Content-Type: text/plain; charset="us-ascii"
612 Content-Type: text/plain; charset="us-ascii"
613 MIME-Version: 1.0
613 MIME-Version: 1.0
614 Content-Transfer-Encoding: 7bit
614 Content-Transfer-Encoding: 7bit
615 Subject: [PATCH 0 of 3] test
615 Subject: [PATCH 0 of 3] test
616 Message-Id: <patchbomb.60@
616 Message-Id: <patchbomb.60@
617 User-Agent: Mercurial-patchbomb
617 User-Agent: Mercurial-patchbomb
618 Date: Thu, 01 Jan 1970 00:01:00 +0000
618 Date: Thu, 01 Jan 1970 00:01:00 +0000
619 From: quux
619 From: quux
620 To: foo
620 To: foo
621 Cc: bar
621 Cc: bar
622
622
623
623
624 Displaying [PATCH 1 of 3] a ...
624 Displaying [PATCH 1 of 3] a ...
625 Content-Type: multipart/mixed; boundary="===
625 Content-Type: multipart/mixed; boundary="===
626 MIME-Version: 1.0
626 MIME-Version: 1.0
627 Subject: [PATCH 1 of 3] a
627 Subject: [PATCH 1 of 3] a
628 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
628 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
629 Message-Id: <8580ff50825a50c8f716.61@
629 Message-Id: <8580ff50825a50c8f716.61@
630 In-Reply-To: <patchbomb.60@
630 In-Reply-To: <patchbomb.60@
631 References: <patchbomb.60@
631 References: <patchbomb.60@
632 User-Agent: Mercurial-patchbomb
632 User-Agent: Mercurial-patchbomb
633 Date: Thu, 01 Jan 1970 00:01:01 +0000
633 Date: Thu, 01 Jan 1970 00:01:01 +0000
634 From: quux
634 From: quux
635 To: foo
635 To: foo
636 Cc: bar
636 Cc: bar
637
637
638 --===
638 --===
639 Content-Type: text/x-patch; charset="us-ascii"
639 Content-Type: text/x-patch; charset="us-ascii"
640 MIME-Version: 1.0
640 MIME-Version: 1.0
641 Content-Transfer-Encoding: 7bit
641 Content-Transfer-Encoding: 7bit
642 Content-Disposition: inline; filename=t2-1.patch
642 Content-Disposition: inline; filename=t2-1.patch
643
643
644 # HG changeset patch
644 # HG changeset patch
645 # User test
645 # User test
646 # Date 1 0
646 # Date 1 0
647 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
647 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
648 # Parent 0000000000000000000000000000000000000000
648 # Parent 0000000000000000000000000000000000000000
649 a
649 a
650
650
651 diff -r 000000000000 -r 8580ff50825a a
651 diff -r 000000000000 -r 8580ff50825a a
652 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
652 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
653 +++ b/a Thu Jan 01 00:00:01 1970 +0000
653 +++ b/a Thu Jan 01 00:00:01 1970 +0000
654 @@ -0,0 +1,1 @@
654 @@ -0,0 +1,1 @@
655 +a
655 +a
656
656
657 --===
657 --===
658 Displaying [PATCH 2 of 3] b ...
658 Displaying [PATCH 2 of 3] b ...
659 Content-Type: multipart/mixed; boundary="===
659 Content-Type: multipart/mixed; boundary="===
660 MIME-Version: 1.0
660 MIME-Version: 1.0
661 Subject: [PATCH 2 of 3] b
661 Subject: [PATCH 2 of 3] b
662 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
662 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
663 Message-Id: <97d72e5f12c7e84f8506.62@
663 Message-Id: <97d72e5f12c7e84f8506.62@
664 In-Reply-To: <patchbomb.60@
664 In-Reply-To: <patchbomb.60@
665 References: <patchbomb.60@
665 References: <patchbomb.60@
666 User-Agent: Mercurial-patchbomb
666 User-Agent: Mercurial-patchbomb
667 Date: Thu, 01 Jan 1970 00:01:02 +0000
667 Date: Thu, 01 Jan 1970 00:01:02 +0000
668 From: quux
668 From: quux
669 To: foo
669 To: foo
670 Cc: bar
670 Cc: bar
671
671
672 --===
672 --===
673 Content-Type: text/x-patch; charset="us-ascii"
673 Content-Type: text/x-patch; charset="us-ascii"
674 MIME-Version: 1.0
674 MIME-Version: 1.0
675 Content-Transfer-Encoding: 7bit
675 Content-Transfer-Encoding: 7bit
676 Content-Disposition: inline; filename=t2-2.patch
676 Content-Disposition: inline; filename=t2-2.patch
677
677
678 # HG changeset patch
678 # HG changeset patch
679 # User test
679 # User test
680 # Date 2 0
680 # Date 2 0
681 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
681 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
682 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
682 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
683 b
683 b
684
684
685 diff -r 8580ff50825a -r 97d72e5f12c7 b
685 diff -r 8580ff50825a -r 97d72e5f12c7 b
686 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
686 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
687 +++ b/b Thu Jan 01 00:00:02 1970 +0000
687 +++ b/b Thu Jan 01 00:00:02 1970 +0000
688 @@ -0,0 +1,1 @@
688 @@ -0,0 +1,1 @@
689 +b
689 +b
690
690
691 --===
691 --===
692 Displaying [PATCH 3 of 3] charset=utf-8; content-transfer-encoding: quoted-printable ...
692 Displaying [PATCH 3 of 3] charset=utf-8; content-transfer-encoding: quoted-printable ...
693 Content-Type: multipart/mixed; boundary="===
693 Content-Type: multipart/mixed; boundary="===
694 MIME-Version: 1.0
694 MIME-Version: 1.0
695 Subject: [PATCH 3 of 3] charset=utf-8;
695 Subject: [PATCH 3 of 3] charset=utf-8;
696 content-transfer-encoding: quoted-printable
696 content-transfer-encoding: quoted-printable
697 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
697 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
698 Message-Id: <c655633f8c87700bb38c.63@
698 Message-Id: <c655633f8c87700bb38c.63@
699 In-Reply-To: <patchbomb.60@
699 In-Reply-To: <patchbomb.60@
700 References: <patchbomb.60@
700 References: <patchbomb.60@
701 User-Agent: Mercurial-patchbomb
701 User-Agent: Mercurial-patchbomb
702 Date: Thu, 01 Jan 1970 00:01:03 +0000
702 Date: Thu, 01 Jan 1970 00:01:03 +0000
703 From: quux
703 From: quux
704 To: foo
704 To: foo
705 Cc: bar
705 Cc: bar
706
706
707 --===
707 --===
708 Content-Type: text/x-patch; charset="us-ascii"
708 Content-Type: text/x-patch; charset="us-ascii"
709 MIME-Version: 1.0
709 MIME-Version: 1.0
710 Content-Transfer-Encoding: quoted-printable
710 Content-Transfer-Encoding: quoted-printable
711 Content-Disposition: inline; filename=t2-3.patch
711 Content-Disposition: inline; filename=t2-3.patch
712
712
713 # HG changeset patch
713 # HG changeset patch
714 # User test
714 # User test
715 # Date 4 0
715 # Date 4 0
716 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
716 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
717 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
717 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
718 charset=3Dutf-8; content-transfer-encoding: quoted-printable
718 charset=3Dutf-8; content-transfer-encoding: quoted-printable
719
719
720 diff -r c3c9e37db9f4 -r c655633f8c87 qp
720 diff -r c3c9e37db9f4 -r c655633f8c87 qp
721 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
721 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
722 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
722 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
723 @@ -0,0 +1,4 @@
723 @@ -0,0 +1,4 @@
724 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
724 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
725 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
725 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
726 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
726 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
727 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
727 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
728 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
728 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
729 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
729 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
730 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
730 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
731 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
731 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
732 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
732 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
733 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
733 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
734 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
734 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
735 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
735 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
736 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
736 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
737 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
737 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
738 +foo
738 +foo
739 +
739 +
740 +bar
740 +bar
741
741
742 --===
742 --===
743
743
744 test attach for single patch:
744 test attach for single patch:
745 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 2 | \
745 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 2 | \
746 > fixheaders
746 > fixheaders
747 This patch series consists of 1 patches.
747 This patch series consists of 1 patches.
748
748
749
749
750 Displaying [PATCH] test ...
750 Displaying [PATCH] test ...
751 Content-Type: multipart/mixed; boundary="===
751 Content-Type: multipart/mixed; boundary="===
752 MIME-Version: 1.0
752 MIME-Version: 1.0
753 Subject: [PATCH] test
753 Subject: [PATCH] test
754 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
754 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
755 Message-Id: <ff2c9fa2018b15fa74b3.60@
755 Message-Id: <ff2c9fa2018b15fa74b3.60@
756 User-Agent: Mercurial-patchbomb
756 User-Agent: Mercurial-patchbomb
757 Date: Thu, 01 Jan 1970 00:01:00 +0000
757 Date: Thu, 01 Jan 1970 00:01:00 +0000
758 From: quux
758 From: quux
759 To: foo
759 To: foo
760 Cc: bar
760 Cc: bar
761
761
762 --===
762 --===
763 Content-Type: text/plain; charset="us-ascii"
763 Content-Type: text/plain; charset="us-ascii"
764 MIME-Version: 1.0
764 MIME-Version: 1.0
765 Content-Transfer-Encoding: 7bit
765 Content-Transfer-Encoding: 7bit
766
766
767 Patch subject is complete summary.
767 Patch subject is complete summary.
768
768
769
769
770
770
771 --===
771 --===
772 Content-Type: text/x-patch; charset="us-ascii"
772 Content-Type: text/x-patch; charset="us-ascii"
773 MIME-Version: 1.0
773 MIME-Version: 1.0
774 Content-Transfer-Encoding: 7bit
774 Content-Transfer-Encoding: 7bit
775 Content-Disposition: attachment; filename=t2.patch
775 Content-Disposition: attachment; filename=t2.patch
776
776
777 # HG changeset patch
777 # HG changeset patch
778 # User test
778 # User test
779 # Date 3 0
779 # Date 3 0
780 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
780 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
781 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
781 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
782 c
782 c
783
783
784 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
784 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
785 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
785 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
786 +++ b/c Thu Jan 01 00:00:03 1970 +0000
786 +++ b/c Thu Jan 01 00:00:03 1970 +0000
787 @@ -0,0 +1,1 @@
787 @@ -0,0 +1,1 @@
788 +c
788 +c
789
789
790 --===
790 --===
791
791
792 test attach for single patch (quoted-printable):
792 test attach for single patch (quoted-printable):
793 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 4 | \
793 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 4 | \
794 > fixheaders
794 > fixheaders
795 This patch series consists of 1 patches.
795 This patch series consists of 1 patches.
796
796
797
797
798 Displaying [PATCH] test ...
798 Displaying [PATCH] test ...
799 Content-Type: multipart/mixed; boundary="===
799 Content-Type: multipart/mixed; boundary="===
800 MIME-Version: 1.0
800 MIME-Version: 1.0
801 Subject: [PATCH] test
801 Subject: [PATCH] test
802 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
802 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
803 Message-Id: <c655633f8c87700bb38c.60@
803 Message-Id: <c655633f8c87700bb38c.60@
804 User-Agent: Mercurial-patchbomb
804 User-Agent: Mercurial-patchbomb
805 Date: Thu, 01 Jan 1970 00:01:00 +0000
805 Date: Thu, 01 Jan 1970 00:01:00 +0000
806 From: quux
806 From: quux
807 To: foo
807 To: foo
808 Cc: bar
808 Cc: bar
809
809
810 --===
810 --===
811 Content-Type: text/plain; charset="us-ascii"
811 Content-Type: text/plain; charset="us-ascii"
812 MIME-Version: 1.0
812 MIME-Version: 1.0
813 Content-Transfer-Encoding: 7bit
813 Content-Transfer-Encoding: 7bit
814
814
815 Patch subject is complete summary.
815 Patch subject is complete summary.
816
816
817
817
818
818
819 --===
819 --===
820 Content-Type: text/x-patch; charset="us-ascii"
820 Content-Type: text/x-patch; charset="us-ascii"
821 MIME-Version: 1.0
821 MIME-Version: 1.0
822 Content-Transfer-Encoding: quoted-printable
822 Content-Transfer-Encoding: quoted-printable
823 Content-Disposition: attachment; filename=t2.patch
823 Content-Disposition: attachment; filename=t2.patch
824
824
825 # HG changeset patch
825 # HG changeset patch
826 # User test
826 # User test
827 # Date 4 0
827 # Date 4 0
828 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
828 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
829 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
829 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
830 charset=3Dutf-8; content-transfer-encoding: quoted-printable
830 charset=3Dutf-8; content-transfer-encoding: quoted-printable
831
831
832 diff -r c3c9e37db9f4 -r c655633f8c87 qp
832 diff -r c3c9e37db9f4 -r c655633f8c87 qp
833 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
833 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
834 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
834 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
835 @@ -0,0 +1,4 @@
835 @@ -0,0 +1,4 @@
836 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
836 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
837 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
837 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
838 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
838 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
839 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
839 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
840 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
840 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
841 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
841 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
842 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
842 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
843 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
843 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
844 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
844 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
845 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
845 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
846 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
846 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
847 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
847 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
848 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
848 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
849 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
849 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
850 +foo
850 +foo
851 +
851 +
852 +bar
852 +bar
853
853
854 --===
854 --===
855
855
856 test attach for multiple patches:
856 test attach for multiple patches:
857 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a \
857 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a \
858 > -r 0:1 -r 4 | fixheaders
858 > -r 0:1 -r 4 | fixheaders
859 This patch series consists of 3 patches.
859 This patch series consists of 3 patches.
860
860
861
861
862 Write the introductory message for the patch series.
862 Write the introductory message for the patch series.
863
863
864
864
865 Displaying [PATCH 0 of 3] test ...
865 Displaying [PATCH 0 of 3] test ...
866 Content-Type: text/plain; charset="us-ascii"
866 Content-Type: text/plain; charset="us-ascii"
867 MIME-Version: 1.0
867 MIME-Version: 1.0
868 Content-Transfer-Encoding: 7bit
868 Content-Transfer-Encoding: 7bit
869 Subject: [PATCH 0 of 3] test
869 Subject: [PATCH 0 of 3] test
870 Message-Id: <patchbomb.60@
870 Message-Id: <patchbomb.60@
871 User-Agent: Mercurial-patchbomb
871 User-Agent: Mercurial-patchbomb
872 Date: Thu, 01 Jan 1970 00:01:00 +0000
872 Date: Thu, 01 Jan 1970 00:01:00 +0000
873 From: quux
873 From: quux
874 To: foo
874 To: foo
875 Cc: bar
875 Cc: bar
876
876
877
877
878 Displaying [PATCH 1 of 3] a ...
878 Displaying [PATCH 1 of 3] a ...
879 Content-Type: multipart/mixed; boundary="===
879 Content-Type: multipart/mixed; boundary="===
880 MIME-Version: 1.0
880 MIME-Version: 1.0
881 Subject: [PATCH 1 of 3] a
881 Subject: [PATCH 1 of 3] a
882 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
882 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
883 Message-Id: <8580ff50825a50c8f716.61@
883 Message-Id: <8580ff50825a50c8f716.61@
884 In-Reply-To: <patchbomb.60@
884 In-Reply-To: <patchbomb.60@
885 References: <patchbomb.60@
885 References: <patchbomb.60@
886 User-Agent: Mercurial-patchbomb
886 User-Agent: Mercurial-patchbomb
887 Date: Thu, 01 Jan 1970 00:01:01 +0000
887 Date: Thu, 01 Jan 1970 00:01:01 +0000
888 From: quux
888 From: quux
889 To: foo
889 To: foo
890 Cc: bar
890 Cc: bar
891
891
892 --===
892 --===
893 Content-Type: text/plain; charset="us-ascii"
893 Content-Type: text/plain; charset="us-ascii"
894 MIME-Version: 1.0
894 MIME-Version: 1.0
895 Content-Transfer-Encoding: 7bit
895 Content-Transfer-Encoding: 7bit
896
896
897 Patch subject is complete summary.
897 Patch subject is complete summary.
898
898
899
899
900
900
901 --===
901 --===
902 Content-Type: text/x-patch; charset="us-ascii"
902 Content-Type: text/x-patch; charset="us-ascii"
903 MIME-Version: 1.0
903 MIME-Version: 1.0
904 Content-Transfer-Encoding: 7bit
904 Content-Transfer-Encoding: 7bit
905 Content-Disposition: attachment; filename=t2-1.patch
905 Content-Disposition: attachment; filename=t2-1.patch
906
906
907 # HG changeset patch
907 # HG changeset patch
908 # User test
908 # User test
909 # Date 1 0
909 # Date 1 0
910 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
910 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
911 # Parent 0000000000000000000000000000000000000000
911 # Parent 0000000000000000000000000000000000000000
912 a
912 a
913
913
914 diff -r 000000000000 -r 8580ff50825a a
914 diff -r 000000000000 -r 8580ff50825a a
915 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
915 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
916 +++ b/a Thu Jan 01 00:00:01 1970 +0000
916 +++ b/a Thu Jan 01 00:00:01 1970 +0000
917 @@ -0,0 +1,1 @@
917 @@ -0,0 +1,1 @@
918 +a
918 +a
919
919
920 --===
920 --===
921 Displaying [PATCH 2 of 3] b ...
921 Displaying [PATCH 2 of 3] b ...
922 Content-Type: multipart/mixed; boundary="===
922 Content-Type: multipart/mixed; boundary="===
923 MIME-Version: 1.0
923 MIME-Version: 1.0
924 Subject: [PATCH 2 of 3] b
924 Subject: [PATCH 2 of 3] b
925 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
925 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
926 Message-Id: <97d72e5f12c7e84f8506.62@
926 Message-Id: <97d72e5f12c7e84f8506.62@
927 In-Reply-To: <patchbomb.60@
927 In-Reply-To: <patchbomb.60@
928 References: <patchbomb.60@
928 References: <patchbomb.60@
929 User-Agent: Mercurial-patchbomb
929 User-Agent: Mercurial-patchbomb
930 Date: Thu, 01 Jan 1970 00:01:02 +0000
930 Date: Thu, 01 Jan 1970 00:01:02 +0000
931 From: quux
931 From: quux
932 To: foo
932 To: foo
933 Cc: bar
933 Cc: bar
934
934
935 --===
935 --===
936 Content-Type: text/plain; charset="us-ascii"
936 Content-Type: text/plain; charset="us-ascii"
937 MIME-Version: 1.0
937 MIME-Version: 1.0
938 Content-Transfer-Encoding: 7bit
938 Content-Transfer-Encoding: 7bit
939
939
940 Patch subject is complete summary.
940 Patch subject is complete summary.
941
941
942
942
943
943
944 --===
944 --===
945 Content-Type: text/x-patch; charset="us-ascii"
945 Content-Type: text/x-patch; charset="us-ascii"
946 MIME-Version: 1.0
946 MIME-Version: 1.0
947 Content-Transfer-Encoding: 7bit
947 Content-Transfer-Encoding: 7bit
948 Content-Disposition: attachment; filename=t2-2.patch
948 Content-Disposition: attachment; filename=t2-2.patch
949
949
950 # HG changeset patch
950 # HG changeset patch
951 # User test
951 # User test
952 # Date 2 0
952 # Date 2 0
953 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
953 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
954 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
954 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
955 b
955 b
956
956
957 diff -r 8580ff50825a -r 97d72e5f12c7 b
957 diff -r 8580ff50825a -r 97d72e5f12c7 b
958 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
958 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
959 +++ b/b Thu Jan 01 00:00:02 1970 +0000
959 +++ b/b Thu Jan 01 00:00:02 1970 +0000
960 @@ -0,0 +1,1 @@
960 @@ -0,0 +1,1 @@
961 +b
961 +b
962
962
963 --===
963 --===
964 Displaying [PATCH 3 of 3] charset=utf-8; content-transfer-encoding: quoted-printable ...
964 Displaying [PATCH 3 of 3] charset=utf-8; content-transfer-encoding: quoted-printable ...
965 Content-Type: multipart/mixed; boundary="===
965 Content-Type: multipart/mixed; boundary="===
966 MIME-Version: 1.0
966 MIME-Version: 1.0
967 Subject: [PATCH 3 of 3] charset=utf-8;
967 Subject: [PATCH 3 of 3] charset=utf-8;
968 content-transfer-encoding: quoted-printable
968 content-transfer-encoding: quoted-printable
969 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
969 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
970 Message-Id: <c655633f8c87700bb38c.63@
970 Message-Id: <c655633f8c87700bb38c.63@
971 In-Reply-To: <patchbomb.60@
971 In-Reply-To: <patchbomb.60@
972 References: <patchbomb.60@
972 References: <patchbomb.60@
973 User-Agent: Mercurial-patchbomb
973 User-Agent: Mercurial-patchbomb
974 Date: Thu, 01 Jan 1970 00:01:03 +0000
974 Date: Thu, 01 Jan 1970 00:01:03 +0000
975 From: quux
975 From: quux
976 To: foo
976 To: foo
977 Cc: bar
977 Cc: bar
978
978
979 --===
979 --===
980 Content-Type: text/plain; charset="us-ascii"
980 Content-Type: text/plain; charset="us-ascii"
981 MIME-Version: 1.0
981 MIME-Version: 1.0
982 Content-Transfer-Encoding: 7bit
982 Content-Transfer-Encoding: 7bit
983
983
984 Patch subject is complete summary.
984 Patch subject is complete summary.
985
985
986
986
987
987
988 --===
988 --===
989 Content-Type: text/x-patch; charset="us-ascii"
989 Content-Type: text/x-patch; charset="us-ascii"
990 MIME-Version: 1.0
990 MIME-Version: 1.0
991 Content-Transfer-Encoding: quoted-printable
991 Content-Transfer-Encoding: quoted-printable
992 Content-Disposition: attachment; filename=t2-3.patch
992 Content-Disposition: attachment; filename=t2-3.patch
993
993
994 # HG changeset patch
994 # HG changeset patch
995 # User test
995 # User test
996 # Date 4 0
996 # Date 4 0
997 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
997 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
998 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
998 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
999 charset=3Dutf-8; content-transfer-encoding: quoted-printable
999 charset=3Dutf-8; content-transfer-encoding: quoted-printable
1000
1000
1001 diff -r c3c9e37db9f4 -r c655633f8c87 qp
1001 diff -r c3c9e37db9f4 -r c655633f8c87 qp
1002 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1002 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1003 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
1003 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
1004 @@ -0,0 +1,4 @@
1004 @@ -0,0 +1,4 @@
1005 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1005 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1006 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1006 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1007 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1007 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1008 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1008 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1009 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1009 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1010 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1010 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1011 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1011 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1012 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1012 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1013 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1013 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1014 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1014 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1015 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1015 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1016 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1016 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1017 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1017 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1018 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1018 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1019 +foo
1019 +foo
1020 +
1020 +
1021 +bar
1021 +bar
1022
1022
1023 --===
1023 --===
1024
1024
1025 test intro for single patch:
1025 test intro for single patch:
1026 $ hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \
1026 $ hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \
1027 > -r 2 | fixheaders
1027 > -r 2 | fixheaders
1028 This patch series consists of 1 patches.
1028 This patch series consists of 1 patches.
1029
1029
1030
1030
1031 Write the introductory message for the patch series.
1031 Write the introductory message for the patch series.
1032
1032
1033
1033
1034 Displaying [PATCH 0 of 1] test ...
1034 Displaying [PATCH 0 of 1] test ...
1035 Content-Type: text/plain; charset="us-ascii"
1035 Content-Type: text/plain; charset="us-ascii"
1036 MIME-Version: 1.0
1036 MIME-Version: 1.0
1037 Content-Transfer-Encoding: 7bit
1037 Content-Transfer-Encoding: 7bit
1038 Subject: [PATCH 0 of 1] test
1038 Subject: [PATCH 0 of 1] test
1039 Message-Id: <patchbomb.60@
1039 Message-Id: <patchbomb.60@
1040 User-Agent: Mercurial-patchbomb
1040 User-Agent: Mercurial-patchbomb
1041 Date: Thu, 01 Jan 1970 00:01:00 +0000
1041 Date: Thu, 01 Jan 1970 00:01:00 +0000
1042 From: quux
1042 From: quux
1043 To: foo
1043 To: foo
1044 Cc: bar
1044 Cc: bar
1045
1045
1046
1046
1047 Displaying [PATCH 1 of 1] c ...
1047 Displaying [PATCH 1 of 1] c ...
1048 Content-Type: text/plain; charset="us-ascii"
1048 Content-Type: text/plain; charset="us-ascii"
1049 MIME-Version: 1.0
1049 MIME-Version: 1.0
1050 Content-Transfer-Encoding: 7bit
1050 Content-Transfer-Encoding: 7bit
1051 Subject: [PATCH 1 of 1] c
1051 Subject: [PATCH 1 of 1] c
1052 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1052 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1053 Message-Id: <ff2c9fa2018b15fa74b3.61@
1053 Message-Id: <ff2c9fa2018b15fa74b3.61@
1054 In-Reply-To: <patchbomb.60@
1054 In-Reply-To: <patchbomb.60@
1055 References: <patchbomb.60@
1055 References: <patchbomb.60@
1056 User-Agent: Mercurial-patchbomb
1056 User-Agent: Mercurial-patchbomb
1057 Date: Thu, 01 Jan 1970 00:01:01 +0000
1057 Date: Thu, 01 Jan 1970 00:01:01 +0000
1058 From: quux
1058 From: quux
1059 To: foo
1059 To: foo
1060 Cc: bar
1060 Cc: bar
1061
1061
1062 # HG changeset patch
1062 # HG changeset patch
1063 # User test
1063 # User test
1064 # Date 3 0
1064 # Date 3 0
1065 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1065 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1066 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1066 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1067 c
1067 c
1068
1068
1069 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1069 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1070 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1070 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1071 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1071 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1072 @@ -0,0 +1,1 @@
1072 @@ -0,0 +1,1 @@
1073 +c
1073 +c
1074
1074
1075
1075
1076 test --desc without --intro for a single patch:
1076 test --desc without --intro for a single patch:
1077 $ echo foo > intro.text
1077 $ echo foo > intro.text
1078 $ hg email --date '1970-1-1 0:1' -n --desc intro.text -f quux -t foo -c bar \
1078 $ hg email --date '1970-1-1 0:1' -n --desc intro.text -f quux -t foo -c bar \
1079 > -s test -r 2 | fixheaders
1079 > -s test -r 2 | fixheaders
1080 This patch series consists of 1 patches.
1080 This patch series consists of 1 patches.
1081
1081
1082
1082
1083 Displaying [PATCH 0 of 1] test ...
1083 Displaying [PATCH 0 of 1] test ...
1084 Content-Type: text/plain; charset="us-ascii"
1084 Content-Type: text/plain; charset="us-ascii"
1085 MIME-Version: 1.0
1085 MIME-Version: 1.0
1086 Content-Transfer-Encoding: 7bit
1086 Content-Transfer-Encoding: 7bit
1087 Subject: [PATCH 0 of 1] test
1087 Subject: [PATCH 0 of 1] test
1088 Message-Id: <patchbomb.60@
1088 Message-Id: <patchbomb.60@
1089 User-Agent: Mercurial-patchbomb
1089 User-Agent: Mercurial-patchbomb
1090 Date: Thu, 01 Jan 1970 00:01:00 +0000
1090 Date: Thu, 01 Jan 1970 00:01:00 +0000
1091 From: quux
1091 From: quux
1092 To: foo
1092 To: foo
1093 Cc: bar
1093 Cc: bar
1094
1094
1095 foo
1095 foo
1096
1096
1097 Displaying [PATCH 1 of 1] c ...
1097 Displaying [PATCH 1 of 1] c ...
1098 Content-Type: text/plain; charset="us-ascii"
1098 Content-Type: text/plain; charset="us-ascii"
1099 MIME-Version: 1.0
1099 MIME-Version: 1.0
1100 Content-Transfer-Encoding: 7bit
1100 Content-Transfer-Encoding: 7bit
1101 Subject: [PATCH 1 of 1] c
1101 Subject: [PATCH 1 of 1] c
1102 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1102 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1103 Message-Id: <ff2c9fa2018b15fa74b3.61@
1103 Message-Id: <ff2c9fa2018b15fa74b3.61@
1104 In-Reply-To: <patchbomb.60@
1104 In-Reply-To: <patchbomb.60@
1105 References: <patchbomb.60@
1105 References: <patchbomb.60@
1106 User-Agent: Mercurial-patchbomb
1106 User-Agent: Mercurial-patchbomb
1107 Date: Thu, 01 Jan 1970 00:01:01 +0000
1107 Date: Thu, 01 Jan 1970 00:01:01 +0000
1108 From: quux
1108 From: quux
1109 To: foo
1109 To: foo
1110 Cc: bar
1110 Cc: bar
1111
1111
1112 # HG changeset patch
1112 # HG changeset patch
1113 # User test
1113 # User test
1114 # Date 3 0
1114 # Date 3 0
1115 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1115 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1116 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1116 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1117 c
1117 c
1118
1118
1119 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1119 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1120 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1120 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1121 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1121 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1122 @@ -0,0 +1,1 @@
1122 @@ -0,0 +1,1 @@
1123 +c
1123 +c
1124
1124
1125
1125
1126 test intro for multiple patches:
1126 test intro for multiple patches:
1127 $ hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \
1127 $ hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \
1128 > -r 0:1 | fixheaders
1128 > -r 0:1 | fixheaders
1129 This patch series consists of 2 patches.
1129 This patch series consists of 2 patches.
1130
1130
1131
1131
1132 Write the introductory message for the patch series.
1132 Write the introductory message for the patch series.
1133
1133
1134
1134
1135 Displaying [PATCH 0 of 2] test ...
1135 Displaying [PATCH 0 of 2] test ...
1136 Content-Type: text/plain; charset="us-ascii"
1136 Content-Type: text/plain; charset="us-ascii"
1137 MIME-Version: 1.0
1137 MIME-Version: 1.0
1138 Content-Transfer-Encoding: 7bit
1138 Content-Transfer-Encoding: 7bit
1139 Subject: [PATCH 0 of 2] test
1139 Subject: [PATCH 0 of 2] test
1140 Message-Id: <patchbomb.60@
1140 Message-Id: <patchbomb.60@
1141 User-Agent: Mercurial-patchbomb
1141 User-Agent: Mercurial-patchbomb
1142 Date: Thu, 01 Jan 1970 00:01:00 +0000
1142 Date: Thu, 01 Jan 1970 00:01:00 +0000
1143 From: quux
1143 From: quux
1144 To: foo
1144 To: foo
1145 Cc: bar
1145 Cc: bar
1146
1146
1147
1147
1148 Displaying [PATCH 1 of 2] a ...
1148 Displaying [PATCH 1 of 2] a ...
1149 Content-Type: text/plain; charset="us-ascii"
1149 Content-Type: text/plain; charset="us-ascii"
1150 MIME-Version: 1.0
1150 MIME-Version: 1.0
1151 Content-Transfer-Encoding: 7bit
1151 Content-Transfer-Encoding: 7bit
1152 Subject: [PATCH 1 of 2] a
1152 Subject: [PATCH 1 of 2] a
1153 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1153 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1154 Message-Id: <8580ff50825a50c8f716.61@
1154 Message-Id: <8580ff50825a50c8f716.61@
1155 In-Reply-To: <patchbomb.60@
1155 In-Reply-To: <patchbomb.60@
1156 References: <patchbomb.60@
1156 References: <patchbomb.60@
1157 User-Agent: Mercurial-patchbomb
1157 User-Agent: Mercurial-patchbomb
1158 Date: Thu, 01 Jan 1970 00:01:01 +0000
1158 Date: Thu, 01 Jan 1970 00:01:01 +0000
1159 From: quux
1159 From: quux
1160 To: foo
1160 To: foo
1161 Cc: bar
1161 Cc: bar
1162
1162
1163 # HG changeset patch
1163 # HG changeset patch
1164 # User test
1164 # User test
1165 # Date 1 0
1165 # Date 1 0
1166 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1166 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1167 # Parent 0000000000000000000000000000000000000000
1167 # Parent 0000000000000000000000000000000000000000
1168 a
1168 a
1169
1169
1170 diff -r 000000000000 -r 8580ff50825a a
1170 diff -r 000000000000 -r 8580ff50825a a
1171 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1171 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1172 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1172 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1173 @@ -0,0 +1,1 @@
1173 @@ -0,0 +1,1 @@
1174 +a
1174 +a
1175
1175
1176 Displaying [PATCH 2 of 2] b ...
1176 Displaying [PATCH 2 of 2] b ...
1177 Content-Type: text/plain; charset="us-ascii"
1177 Content-Type: text/plain; charset="us-ascii"
1178 MIME-Version: 1.0
1178 MIME-Version: 1.0
1179 Content-Transfer-Encoding: 7bit
1179 Content-Transfer-Encoding: 7bit
1180 Subject: [PATCH 2 of 2] b
1180 Subject: [PATCH 2 of 2] b
1181 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1181 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1182 Message-Id: <97d72e5f12c7e84f8506.62@
1182 Message-Id: <97d72e5f12c7e84f8506.62@
1183 In-Reply-To: <patchbomb.60@
1183 In-Reply-To: <patchbomb.60@
1184 References: <patchbomb.60@
1184 References: <patchbomb.60@
1185 User-Agent: Mercurial-patchbomb
1185 User-Agent: Mercurial-patchbomb
1186 Date: Thu, 01 Jan 1970 00:01:02 +0000
1186 Date: Thu, 01 Jan 1970 00:01:02 +0000
1187 From: quux
1187 From: quux
1188 To: foo
1188 To: foo
1189 Cc: bar
1189 Cc: bar
1190
1190
1191 # HG changeset patch
1191 # HG changeset patch
1192 # User test
1192 # User test
1193 # Date 2 0
1193 # Date 2 0
1194 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1194 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1195 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1195 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1196 b
1196 b
1197
1197
1198 diff -r 8580ff50825a -r 97d72e5f12c7 b
1198 diff -r 8580ff50825a -r 97d72e5f12c7 b
1199 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1199 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1200 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1200 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1201 @@ -0,0 +1,1 @@
1201 @@ -0,0 +1,1 @@
1202 +b
1202 +b
1203
1203
1204
1204
1205 test reply-to via config:
1205 test reply-to via config:
1206 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \
1206 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \
1207 > --config patchbomb.reply-to='baz@example.com' | fixheaders
1207 > --config patchbomb.reply-to='baz@example.com' | fixheaders
1208 This patch series consists of 1 patches.
1208 This patch series consists of 1 patches.
1209
1209
1210
1210
1211 Displaying [PATCH] test ...
1211 Displaying [PATCH] test ...
1212 Content-Type: text/plain; charset="us-ascii"
1212 Content-Type: text/plain; charset="us-ascii"
1213 MIME-Version: 1.0
1213 MIME-Version: 1.0
1214 Content-Transfer-Encoding: 7bit
1214 Content-Transfer-Encoding: 7bit
1215 Subject: [PATCH] test
1215 Subject: [PATCH] test
1216 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1216 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1217 Message-Id: <ff2c9fa2018b15fa74b3.60@
1217 Message-Id: <ff2c9fa2018b15fa74b3.60@
1218 User-Agent: Mercurial-patchbomb
1218 User-Agent: Mercurial-patchbomb
1219 Date: Thu, 01 Jan 1970 00:01:00 +0000
1219 Date: Thu, 01 Jan 1970 00:01:00 +0000
1220 From: quux
1220 From: quux
1221 To: foo
1221 To: foo
1222 Cc: bar
1222 Cc: bar
1223 Reply-To: baz@example.com
1223 Reply-To: baz@example.com
1224
1224
1225 # HG changeset patch
1225 # HG changeset patch
1226 # User test
1226 # User test
1227 # Date 3 0
1227 # Date 3 0
1228 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1228 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1229 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1229 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1230 c
1230 c
1231
1231
1232 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1232 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1233 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1233 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1234 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1234 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1235 @@ -0,0 +1,1 @@
1235 @@ -0,0 +1,1 @@
1236 +c
1236 +c
1237
1237
1238
1238
1239 test reply-to via command line:
1239 test reply-to via command line:
1240 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \
1240 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \
1241 > --reply-to baz --reply-to fred | fixheaders
1241 > --reply-to baz --reply-to fred | fixheaders
1242 This patch series consists of 1 patches.
1242 This patch series consists of 1 patches.
1243
1243
1244
1244
1245 Displaying [PATCH] test ...
1245 Displaying [PATCH] test ...
1246 Content-Type: text/plain; charset="us-ascii"
1246 Content-Type: text/plain; charset="us-ascii"
1247 MIME-Version: 1.0
1247 MIME-Version: 1.0
1248 Content-Transfer-Encoding: 7bit
1248 Content-Transfer-Encoding: 7bit
1249 Subject: [PATCH] test
1249 Subject: [PATCH] test
1250 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1250 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1251 Message-Id: <ff2c9fa2018b15fa74b3.60@
1251 Message-Id: <ff2c9fa2018b15fa74b3.60@
1252 User-Agent: Mercurial-patchbomb
1252 User-Agent: Mercurial-patchbomb
1253 Date: Thu, 01 Jan 1970 00:01:00 +0000
1253 Date: Thu, 01 Jan 1970 00:01:00 +0000
1254 From: quux
1254 From: quux
1255 To: foo
1255 To: foo
1256 Cc: bar
1256 Cc: bar
1257 Reply-To: baz, fred
1257 Reply-To: baz, fred
1258
1258
1259 # HG changeset patch
1259 # HG changeset patch
1260 # User test
1260 # User test
1261 # Date 3 0
1261 # Date 3 0
1262 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1262 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1263 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1263 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1264 c
1264 c
1265
1265
1266 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1266 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1267 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1267 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1268 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1268 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1269 @@ -0,0 +1,1 @@
1269 @@ -0,0 +1,1 @@
1270 +c
1270 +c
1271
1271
1272
1272
1273 tagging csets:
1273 tagging csets:
1274 $ hg tag -r0 zero zero.foo
1274 $ hg tag -r0 zero zero.foo
1275 $ hg tag -r1 one one.patch
1275 $ hg tag -r1 one one.patch
1276 $ hg tag -r2 two two.diff
1276 $ hg tag -r2 two two.diff
1277
1277
1278 test inline for single named patch:
1278 test inline for single named patch:
1279 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 2 | \
1279 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 2 | \
1280 > fixheaders
1280 > fixheaders
1281 This patch series consists of 1 patches.
1281 This patch series consists of 1 patches.
1282
1282
1283
1283
1284 Displaying [PATCH] test ...
1284 Displaying [PATCH] test ...
1285 Content-Type: multipart/mixed; boundary="===
1285 Content-Type: multipart/mixed; boundary="===
1286 MIME-Version: 1.0
1286 MIME-Version: 1.0
1287 Subject: [PATCH] test
1287 Subject: [PATCH] test
1288 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1288 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1289 Message-Id: <ff2c9fa2018b15fa74b3.60@
1289 Message-Id: <ff2c9fa2018b15fa74b3.60@
1290 User-Agent: Mercurial-patchbomb
1290 User-Agent: Mercurial-patchbomb
1291 Date: Thu, 01 Jan 1970 00:01:00 +0000
1291 Date: Thu, 01 Jan 1970 00:01:00 +0000
1292 From: quux
1292 From: quux
1293 To: foo
1293 To: foo
1294 Cc: bar
1294 Cc: bar
1295
1295
1296 --===
1296 --===
1297 Content-Type: text/x-patch; charset="us-ascii"
1297 Content-Type: text/x-patch; charset="us-ascii"
1298 MIME-Version: 1.0
1298 MIME-Version: 1.0
1299 Content-Transfer-Encoding: 7bit
1299 Content-Transfer-Encoding: 7bit
1300 Content-Disposition: inline; filename=two.diff
1300 Content-Disposition: inline; filename=two.diff
1301
1301
1302 # HG changeset patch
1302 # HG changeset patch
1303 # User test
1303 # User test
1304 # Date 3 0
1304 # Date 3 0
1305 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1305 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1306 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1306 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1307 c
1307 c
1308
1308
1309 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1309 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1310 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1310 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1311 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1311 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1312 @@ -0,0 +1,1 @@
1312 @@ -0,0 +1,1 @@
1313 +c
1313 +c
1314
1314
1315 --===
1315 --===
1316
1316
1317 test inline for multiple named/unnamed patches:
1317 test inline for multiple named/unnamed patches:
1318 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 0:1 | \
1318 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 0:1 | \
1319 > fixheaders
1319 > fixheaders
1320 This patch series consists of 2 patches.
1320 This patch series consists of 2 patches.
1321
1321
1322
1322
1323 Write the introductory message for the patch series.
1323 Write the introductory message for the patch series.
1324
1324
1325
1325
1326 Displaying [PATCH 0 of 2] test ...
1326 Displaying [PATCH 0 of 2] test ...
1327 Content-Type: text/plain; charset="us-ascii"
1327 Content-Type: text/plain; charset="us-ascii"
1328 MIME-Version: 1.0
1328 MIME-Version: 1.0
1329 Content-Transfer-Encoding: 7bit
1329 Content-Transfer-Encoding: 7bit
1330 Subject: [PATCH 0 of 2] test
1330 Subject: [PATCH 0 of 2] test
1331 Message-Id: <patchbomb.60@
1331 Message-Id: <patchbomb.60@
1332 User-Agent: Mercurial-patchbomb
1332 User-Agent: Mercurial-patchbomb
1333 Date: Thu, 01 Jan 1970 00:01:00 +0000
1333 Date: Thu, 01 Jan 1970 00:01:00 +0000
1334 From: quux
1334 From: quux
1335 To: foo
1335 To: foo
1336 Cc: bar
1336 Cc: bar
1337
1337
1338
1338
1339 Displaying [PATCH 1 of 2] a ...
1339 Displaying [PATCH 1 of 2] a ...
1340 Content-Type: multipart/mixed; boundary="===
1340 Content-Type: multipart/mixed; boundary="===
1341 MIME-Version: 1.0
1341 MIME-Version: 1.0
1342 Subject: [PATCH 1 of 2] a
1342 Subject: [PATCH 1 of 2] a
1343 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1343 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1344 Message-Id: <8580ff50825a50c8f716.61@
1344 Message-Id: <8580ff50825a50c8f716.61@
1345 In-Reply-To: <patchbomb.60@
1345 In-Reply-To: <patchbomb.60@
1346 References: <patchbomb.60@
1346 References: <patchbomb.60@
1347 User-Agent: Mercurial-patchbomb
1347 User-Agent: Mercurial-patchbomb
1348 Date: Thu, 01 Jan 1970 00:01:01 +0000
1348 Date: Thu, 01 Jan 1970 00:01:01 +0000
1349 From: quux
1349 From: quux
1350 To: foo
1350 To: foo
1351 Cc: bar
1351 Cc: bar
1352
1352
1353 --===
1353 --===
1354 Content-Type: text/x-patch; charset="us-ascii"
1354 Content-Type: text/x-patch; charset="us-ascii"
1355 MIME-Version: 1.0
1355 MIME-Version: 1.0
1356 Content-Transfer-Encoding: 7bit
1356 Content-Transfer-Encoding: 7bit
1357 Content-Disposition: inline; filename=t2-1.patch
1357 Content-Disposition: inline; filename=t2-1.patch
1358
1358
1359 # HG changeset patch
1359 # HG changeset patch
1360 # User test
1360 # User test
1361 # Date 1 0
1361 # Date 1 0
1362 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1362 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1363 # Parent 0000000000000000000000000000000000000000
1363 # Parent 0000000000000000000000000000000000000000
1364 a
1364 a
1365
1365
1366 diff -r 000000000000 -r 8580ff50825a a
1366 diff -r 000000000000 -r 8580ff50825a a
1367 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1367 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1368 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1368 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1369 @@ -0,0 +1,1 @@
1369 @@ -0,0 +1,1 @@
1370 +a
1370 +a
1371
1371
1372 --===
1372 --===
1373 Displaying [PATCH 2 of 2] b ...
1373 Displaying [PATCH 2 of 2] b ...
1374 Content-Type: multipart/mixed; boundary="===
1374 Content-Type: multipart/mixed; boundary="===
1375 MIME-Version: 1.0
1375 MIME-Version: 1.0
1376 Subject: [PATCH 2 of 2] b
1376 Subject: [PATCH 2 of 2] b
1377 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1377 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1378 Message-Id: <97d72e5f12c7e84f8506.62@
1378 Message-Id: <97d72e5f12c7e84f8506.62@
1379 In-Reply-To: <patchbomb.60@
1379 In-Reply-To: <patchbomb.60@
1380 References: <patchbomb.60@
1380 References: <patchbomb.60@
1381 User-Agent: Mercurial-patchbomb
1381 User-Agent: Mercurial-patchbomb
1382 Date: Thu, 01 Jan 1970 00:01:02 +0000
1382 Date: Thu, 01 Jan 1970 00:01:02 +0000
1383 From: quux
1383 From: quux
1384 To: foo
1384 To: foo
1385 Cc: bar
1385 Cc: bar
1386
1386
1387 --===
1387 --===
1388 Content-Type: text/x-patch; charset="us-ascii"
1388 Content-Type: text/x-patch; charset="us-ascii"
1389 MIME-Version: 1.0
1389 MIME-Version: 1.0
1390 Content-Transfer-Encoding: 7bit
1390 Content-Transfer-Encoding: 7bit
1391 Content-Disposition: inline; filename=one.patch
1391 Content-Disposition: inline; filename=one.patch
1392
1392
1393 # HG changeset patch
1393 # HG changeset patch
1394 # User test
1394 # User test
1395 # Date 2 0
1395 # Date 2 0
1396 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1396 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1397 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1397 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1398 b
1398 b
1399
1399
1400 diff -r 8580ff50825a -r 97d72e5f12c7 b
1400 diff -r 8580ff50825a -r 97d72e5f12c7 b
1401 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1401 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1402 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1402 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1403 @@ -0,0 +1,1 @@
1403 @@ -0,0 +1,1 @@
1404 +b
1404 +b
1405
1405
1406 --===
1406 --===
1407
1407
1408
1408
1409 test inreplyto:
1409 test inreplyto:
1410 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
1410 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
1411 > -r tip | fixheaders
1411 > -r tip | fixheaders
1412 This patch series consists of 1 patches.
1412 This patch series consists of 1 patches.
1413
1413
1414
1414
1415 Displaying [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b ...
1415 Displaying [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b ...
1416 Content-Type: text/plain; charset="us-ascii"
1416 Content-Type: text/plain; charset="us-ascii"
1417 MIME-Version: 1.0
1417 MIME-Version: 1.0
1418 Content-Transfer-Encoding: 7bit
1418 Content-Transfer-Encoding: 7bit
1419 Subject: [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b
1419 Subject: [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b
1420 X-Mercurial-Node: e317db6a6f288748d1f6cb064f3810fcba66b1b6
1420 X-Mercurial-Node: e317db6a6f288748d1f6cb064f3810fcba66b1b6
1421 Message-Id: <e317db6a6f288748d1f6.60@
1421 Message-Id: <e317db6a6f288748d1f6.60@
1422 In-Reply-To: <baz>
1422 In-Reply-To: <baz>
1423 References: <baz>
1423 References: <baz>
1424 User-Agent: Mercurial-patchbomb
1424 User-Agent: Mercurial-patchbomb
1425 Date: Thu, 01 Jan 1970 00:01:00 +0000
1425 Date: Thu, 01 Jan 1970 00:01:00 +0000
1426 From: quux
1426 From: quux
1427 To: foo
1427 To: foo
1428 Cc: bar
1428 Cc: bar
1429
1429
1430 # HG changeset patch
1430 # HG changeset patch
1431 # User test
1431 # User test
1432 # Date 0 0
1432 # Date 0 0
1433 # Node ID e317db6a6f288748d1f6cb064f3810fcba66b1b6
1433 # Node ID e317db6a6f288748d1f6cb064f3810fcba66b1b6
1434 # Parent eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
1434 # Parent eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
1435 Added tag two, two.diff for changeset ff2c9fa2018b
1435 Added tag two, two.diff for changeset ff2c9fa2018b
1436
1436
1437 diff -r eae5fcf795ee -r e317db6a6f28 .hgtags
1437 diff -r eae5fcf795ee -r e317db6a6f28 .hgtags
1438 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
1438 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
1439 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
1439 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
1440 @@ -2,3 +2,5 @@
1440 @@ -2,3 +2,5 @@
1441 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
1441 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
1442 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
1442 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
1443 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
1443 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
1444 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two
1444 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two
1445 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff
1445 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff
1446
1446
1447
1447
1448 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
1448 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
1449 > -r 0:1
1449 > -r 0:1
1450 This patch series consists of 2 patches.
1450 This patch series consists of 2 patches.
1451
1451
1452 abort: Subject: [PATCH 0 of 2] Please enter a valid value
1452 abort: Subject: [PATCH 0 of 2] Please enter a valid value
1453 [255]
1453 [255]
1454
1454
1455 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
1455 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
1456 > -s test -r 0:1 | fixheaders
1456 > -s test -r 0:1 | fixheaders
1457 This patch series consists of 2 patches.
1457 This patch series consists of 2 patches.
1458
1458
1459
1459
1460 Write the introductory message for the patch series.
1460 Write the introductory message for the patch series.
1461
1461
1462
1462
1463 Displaying [PATCH 0 of 2] test ...
1463 Displaying [PATCH 0 of 2] test ...
1464 Content-Type: text/plain; charset="us-ascii"
1464 Content-Type: text/plain; charset="us-ascii"
1465 MIME-Version: 1.0
1465 MIME-Version: 1.0
1466 Content-Transfer-Encoding: 7bit
1466 Content-Transfer-Encoding: 7bit
1467 Subject: [PATCH 0 of 2] test
1467 Subject: [PATCH 0 of 2] test
1468 Message-Id: <patchbomb.60@
1468 Message-Id: <patchbomb.60@
1469 In-Reply-To: <baz>
1469 In-Reply-To: <baz>
1470 References: <baz>
1470 References: <baz>
1471 User-Agent: Mercurial-patchbomb
1471 User-Agent: Mercurial-patchbomb
1472 Date: Thu, 01 Jan 1970 00:01:00 +0000
1472 Date: Thu, 01 Jan 1970 00:01:00 +0000
1473 From: quux
1473 From: quux
1474 To: foo
1474 To: foo
1475 Cc: bar
1475 Cc: bar
1476
1476
1477
1477
1478 Displaying [PATCH 1 of 2] a ...
1478 Displaying [PATCH 1 of 2] a ...
1479 Content-Type: text/plain; charset="us-ascii"
1479 Content-Type: text/plain; charset="us-ascii"
1480 MIME-Version: 1.0
1480 MIME-Version: 1.0
1481 Content-Transfer-Encoding: 7bit
1481 Content-Transfer-Encoding: 7bit
1482 Subject: [PATCH 1 of 2] a
1482 Subject: [PATCH 1 of 2] a
1483 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1483 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1484 Message-Id: <8580ff50825a50c8f716.61@
1484 Message-Id: <8580ff50825a50c8f716.61@
1485 In-Reply-To: <patchbomb.60@
1485 In-Reply-To: <patchbomb.60@
1486 References: <patchbomb.60@
1486 References: <patchbomb.60@
1487 User-Agent: Mercurial-patchbomb
1487 User-Agent: Mercurial-patchbomb
1488 Date: Thu, 01 Jan 1970 00:01:01 +0000
1488 Date: Thu, 01 Jan 1970 00:01:01 +0000
1489 From: quux
1489 From: quux
1490 To: foo
1490 To: foo
1491 Cc: bar
1491 Cc: bar
1492
1492
1493 # HG changeset patch
1493 # HG changeset patch
1494 # User test
1494 # User test
1495 # Date 1 0
1495 # Date 1 0
1496 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1496 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1497 # Parent 0000000000000000000000000000000000000000
1497 # Parent 0000000000000000000000000000000000000000
1498 a
1498 a
1499
1499
1500 diff -r 000000000000 -r 8580ff50825a a
1500 diff -r 000000000000 -r 8580ff50825a a
1501 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1501 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1502 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1502 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1503 @@ -0,0 +1,1 @@
1503 @@ -0,0 +1,1 @@
1504 +a
1504 +a
1505
1505
1506 Displaying [PATCH 2 of 2] b ...
1506 Displaying [PATCH 2 of 2] b ...
1507 Content-Type: text/plain; charset="us-ascii"
1507 Content-Type: text/plain; charset="us-ascii"
1508 MIME-Version: 1.0
1508 MIME-Version: 1.0
1509 Content-Transfer-Encoding: 7bit
1509 Content-Transfer-Encoding: 7bit
1510 Subject: [PATCH 2 of 2] b
1510 Subject: [PATCH 2 of 2] b
1511 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1511 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1512 Message-Id: <97d72e5f12c7e84f8506.62@
1512 Message-Id: <97d72e5f12c7e84f8506.62@
1513 In-Reply-To: <patchbomb.60@
1513 In-Reply-To: <patchbomb.60@
1514 References: <patchbomb.60@
1514 References: <patchbomb.60@
1515 User-Agent: Mercurial-patchbomb
1515 User-Agent: Mercurial-patchbomb
1516 Date: Thu, 01 Jan 1970 00:01:02 +0000
1516 Date: Thu, 01 Jan 1970 00:01:02 +0000
1517 From: quux
1517 From: quux
1518 To: foo
1518 To: foo
1519 Cc: bar
1519 Cc: bar
1520
1520
1521 # HG changeset patch
1521 # HG changeset patch
1522 # User test
1522 # User test
1523 # Date 2 0
1523 # Date 2 0
1524 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1524 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1525 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1525 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1526 b
1526 b
1527
1527
1528 diff -r 8580ff50825a -r 97d72e5f12c7 b
1528 diff -r 8580ff50825a -r 97d72e5f12c7 b
1529 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1529 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1530 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1530 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1531 @@ -0,0 +1,1 @@
1531 @@ -0,0 +1,1 @@
1532 +b
1532 +b
1533
1533
1534
1534
1535 test single flag for single patch:
1535 test single flag for single patch:
1536 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \
1536 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \
1537 > -r 2 | fixheaders
1537 > -r 2 | fixheaders
1538 This patch series consists of 1 patches.
1538 This patch series consists of 1 patches.
1539
1539
1540
1540
1541 Displaying [PATCH fooFlag] test ...
1541 Displaying [PATCH fooFlag] test ...
1542 Content-Type: text/plain; charset="us-ascii"
1542 Content-Type: text/plain; charset="us-ascii"
1543 MIME-Version: 1.0
1543 MIME-Version: 1.0
1544 Content-Transfer-Encoding: 7bit
1544 Content-Transfer-Encoding: 7bit
1545 Subject: [PATCH fooFlag] test
1545 Subject: [PATCH fooFlag] test
1546 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1546 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1547 Message-Id: <ff2c9fa2018b15fa74b3.60@
1547 Message-Id: <ff2c9fa2018b15fa74b3.60@
1548 User-Agent: Mercurial-patchbomb
1548 User-Agent: Mercurial-patchbomb
1549 Date: Thu, 01 Jan 1970 00:01:00 +0000
1549 Date: Thu, 01 Jan 1970 00:01:00 +0000
1550 From: quux
1550 From: quux
1551 To: foo
1551 To: foo
1552 Cc: bar
1552 Cc: bar
1553
1553
1554 # HG changeset patch
1554 # HG changeset patch
1555 # User test
1555 # User test
1556 # Date 3 0
1556 # Date 3 0
1557 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1557 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1558 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1558 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1559 c
1559 c
1560
1560
1561 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1561 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1562 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1562 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1563 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1563 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1564 @@ -0,0 +1,1 @@
1564 @@ -0,0 +1,1 @@
1565 +c
1565 +c
1566
1566
1567
1567
1568 test single flag for multiple patches:
1568 test single flag for multiple patches:
1569 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \
1569 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \
1570 > -r 0:1 | fixheaders
1570 > -r 0:1 | fixheaders
1571 This patch series consists of 2 patches.
1571 This patch series consists of 2 patches.
1572
1572
1573
1573
1574 Write the introductory message for the patch series.
1574 Write the introductory message for the patch series.
1575
1575
1576
1576
1577 Displaying [PATCH 0 of 2 fooFlag] test ...
1577 Displaying [PATCH 0 of 2 fooFlag] test ...
1578 Content-Type: text/plain; charset="us-ascii"
1578 Content-Type: text/plain; charset="us-ascii"
1579 MIME-Version: 1.0
1579 MIME-Version: 1.0
1580 Content-Transfer-Encoding: 7bit
1580 Content-Transfer-Encoding: 7bit
1581 Subject: [PATCH 0 of 2 fooFlag] test
1581 Subject: [PATCH 0 of 2 fooFlag] test
1582 Message-Id: <patchbomb.60@
1582 Message-Id: <patchbomb.60@
1583 User-Agent: Mercurial-patchbomb
1583 User-Agent: Mercurial-patchbomb
1584 Date: Thu, 01 Jan 1970 00:01:00 +0000
1584 Date: Thu, 01 Jan 1970 00:01:00 +0000
1585 From: quux
1585 From: quux
1586 To: foo
1586 To: foo
1587 Cc: bar
1587 Cc: bar
1588
1588
1589
1589
1590 Displaying [PATCH 1 of 2 fooFlag] a ...
1590 Displaying [PATCH 1 of 2 fooFlag] a ...
1591 Content-Type: text/plain; charset="us-ascii"
1591 Content-Type: text/plain; charset="us-ascii"
1592 MIME-Version: 1.0
1592 MIME-Version: 1.0
1593 Content-Transfer-Encoding: 7bit
1593 Content-Transfer-Encoding: 7bit
1594 Subject: [PATCH 1 of 2 fooFlag] a
1594 Subject: [PATCH 1 of 2 fooFlag] a
1595 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1595 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1596 Message-Id: <8580ff50825a50c8f716.61@
1596 Message-Id: <8580ff50825a50c8f716.61@
1597 In-Reply-To: <patchbomb.60@
1597 In-Reply-To: <patchbomb.60@
1598 References: <patchbomb.60@
1598 References: <patchbomb.60@
1599 User-Agent: Mercurial-patchbomb
1599 User-Agent: Mercurial-patchbomb
1600 Date: Thu, 01 Jan 1970 00:01:01 +0000
1600 Date: Thu, 01 Jan 1970 00:01:01 +0000
1601 From: quux
1601 From: quux
1602 To: foo
1602 To: foo
1603 Cc: bar
1603 Cc: bar
1604
1604
1605 # HG changeset patch
1605 # HG changeset patch
1606 # User test
1606 # User test
1607 # Date 1 0
1607 # Date 1 0
1608 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1608 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1609 # Parent 0000000000000000000000000000000000000000
1609 # Parent 0000000000000000000000000000000000000000
1610 a
1610 a
1611
1611
1612 diff -r 000000000000 -r 8580ff50825a a
1612 diff -r 000000000000 -r 8580ff50825a a
1613 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1613 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1614 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1614 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1615 @@ -0,0 +1,1 @@
1615 @@ -0,0 +1,1 @@
1616 +a
1616 +a
1617
1617
1618 Displaying [PATCH 2 of 2 fooFlag] b ...
1618 Displaying [PATCH 2 of 2 fooFlag] b ...
1619 Content-Type: text/plain; charset="us-ascii"
1619 Content-Type: text/plain; charset="us-ascii"
1620 MIME-Version: 1.0
1620 MIME-Version: 1.0
1621 Content-Transfer-Encoding: 7bit
1621 Content-Transfer-Encoding: 7bit
1622 Subject: [PATCH 2 of 2 fooFlag] b
1622 Subject: [PATCH 2 of 2 fooFlag] b
1623 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1623 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1624 Message-Id: <97d72e5f12c7e84f8506.62@
1624 Message-Id: <97d72e5f12c7e84f8506.62@
1625 In-Reply-To: <patchbomb.60@
1625 In-Reply-To: <patchbomb.60@
1626 References: <patchbomb.60@
1626 References: <patchbomb.60@
1627 User-Agent: Mercurial-patchbomb
1627 User-Agent: Mercurial-patchbomb
1628 Date: Thu, 01 Jan 1970 00:01:02 +0000
1628 Date: Thu, 01 Jan 1970 00:01:02 +0000
1629 From: quux
1629 From: quux
1630 To: foo
1630 To: foo
1631 Cc: bar
1631 Cc: bar
1632
1632
1633 # HG changeset patch
1633 # HG changeset patch
1634 # User test
1634 # User test
1635 # Date 2 0
1635 # Date 2 0
1636 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1636 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1637 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1637 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1638 b
1638 b
1639
1639
1640 diff -r 8580ff50825a -r 97d72e5f12c7 b
1640 diff -r 8580ff50825a -r 97d72e5f12c7 b
1641 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1641 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1642 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1642 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1643 @@ -0,0 +1,1 @@
1643 @@ -0,0 +1,1 @@
1644 +b
1644 +b
1645
1645
1646
1646
1647 test mutiple flags for single patch:
1647 test mutiple flags for single patch:
1648 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \
1648 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \
1649 > -c bar -s test -r 2 | fixheaders
1649 > -c bar -s test -r 2 | fixheaders
1650 This patch series consists of 1 patches.
1650 This patch series consists of 1 patches.
1651
1651
1652
1652
1653 Displaying [PATCH fooFlag barFlag] test ...
1653 Displaying [PATCH fooFlag barFlag] test ...
1654 Content-Type: text/plain; charset="us-ascii"
1654 Content-Type: text/plain; charset="us-ascii"
1655 MIME-Version: 1.0
1655 MIME-Version: 1.0
1656 Content-Transfer-Encoding: 7bit
1656 Content-Transfer-Encoding: 7bit
1657 Subject: [PATCH fooFlag barFlag] test
1657 Subject: [PATCH fooFlag barFlag] test
1658 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1658 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1659 Message-Id: <ff2c9fa2018b15fa74b3.60@
1659 Message-Id: <ff2c9fa2018b15fa74b3.60@
1660 User-Agent: Mercurial-patchbomb
1660 User-Agent: Mercurial-patchbomb
1661 Date: Thu, 01 Jan 1970 00:01:00 +0000
1661 Date: Thu, 01 Jan 1970 00:01:00 +0000
1662 From: quux
1662 From: quux
1663 To: foo
1663 To: foo
1664 Cc: bar
1664 Cc: bar
1665
1665
1666 # HG changeset patch
1666 # HG changeset patch
1667 # User test
1667 # User test
1668 # Date 3 0
1668 # Date 3 0
1669 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1669 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1670 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1670 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1671 c
1671 c
1672
1672
1673 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1673 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1674 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1674 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1675 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1675 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1676 @@ -0,0 +1,1 @@
1676 @@ -0,0 +1,1 @@
1677 +c
1677 +c
1678
1678
1679
1679
1680 test multiple flags for multiple patches:
1680 test multiple flags for multiple patches:
1681 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \
1681 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \
1682 > -c bar -s test -r 0:1 | fixheaders
1682 > -c bar -s test -r 0:1 | fixheaders
1683 This patch series consists of 2 patches.
1683 This patch series consists of 2 patches.
1684
1684
1685
1685
1686 Write the introductory message for the patch series.
1686 Write the introductory message for the patch series.
1687
1687
1688
1688
1689 Displaying [PATCH 0 of 2 fooFlag barFlag] test ...
1689 Displaying [PATCH 0 of 2 fooFlag barFlag] test ...
1690 Content-Type: text/plain; charset="us-ascii"
1690 Content-Type: text/plain; charset="us-ascii"
1691 MIME-Version: 1.0
1691 MIME-Version: 1.0
1692 Content-Transfer-Encoding: 7bit
1692 Content-Transfer-Encoding: 7bit
1693 Subject: [PATCH 0 of 2 fooFlag barFlag] test
1693 Subject: [PATCH 0 of 2 fooFlag barFlag] test
1694 Message-Id: <patchbomb.60@
1694 Message-Id: <patchbomb.60@
1695 User-Agent: Mercurial-patchbomb
1695 User-Agent: Mercurial-patchbomb
1696 Date: Thu, 01 Jan 1970 00:01:00 +0000
1696 Date: Thu, 01 Jan 1970 00:01:00 +0000
1697 From: quux
1697 From: quux
1698 To: foo
1698 To: foo
1699 Cc: bar
1699 Cc: bar
1700
1700
1701
1701
1702 Displaying [PATCH 1 of 2 fooFlag barFlag] a ...
1702 Displaying [PATCH 1 of 2 fooFlag barFlag] a ...
1703 Content-Type: text/plain; charset="us-ascii"
1703 Content-Type: text/plain; charset="us-ascii"
1704 MIME-Version: 1.0
1704 MIME-Version: 1.0
1705 Content-Transfer-Encoding: 7bit
1705 Content-Transfer-Encoding: 7bit
1706 Subject: [PATCH 1 of 2 fooFlag barFlag] a
1706 Subject: [PATCH 1 of 2 fooFlag barFlag] a
1707 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1707 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1708 Message-Id: <8580ff50825a50c8f716.61@
1708 Message-Id: <8580ff50825a50c8f716.61@
1709 In-Reply-To: <patchbomb.60@
1709 In-Reply-To: <patchbomb.60@
1710 References: <patchbomb.60@
1710 References: <patchbomb.60@
1711 User-Agent: Mercurial-patchbomb
1711 User-Agent: Mercurial-patchbomb
1712 Date: Thu, 01 Jan 1970 00:01:01 +0000
1712 Date: Thu, 01 Jan 1970 00:01:01 +0000
1713 From: quux
1713 From: quux
1714 To: foo
1714 To: foo
1715 Cc: bar
1715 Cc: bar
1716
1716
1717 # HG changeset patch
1717 # HG changeset patch
1718 # User test
1718 # User test
1719 # Date 1 0
1719 # Date 1 0
1720 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1720 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1721 # Parent 0000000000000000000000000000000000000000
1721 # Parent 0000000000000000000000000000000000000000
1722 a
1722 a
1723
1723
1724 diff -r 000000000000 -r 8580ff50825a a
1724 diff -r 000000000000 -r 8580ff50825a a
1725 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1725 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1726 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1726 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1727 @@ -0,0 +1,1 @@
1727 @@ -0,0 +1,1 @@
1728 +a
1728 +a
1729
1729
1730 Displaying [PATCH 2 of 2 fooFlag barFlag] b ...
1730 Displaying [PATCH 2 of 2 fooFlag barFlag] b ...
1731 Content-Type: text/plain; charset="us-ascii"
1731 Content-Type: text/plain; charset="us-ascii"
1732 MIME-Version: 1.0
1732 MIME-Version: 1.0
1733 Content-Transfer-Encoding: 7bit
1733 Content-Transfer-Encoding: 7bit
1734 Subject: [PATCH 2 of 2 fooFlag barFlag] b
1734 Subject: [PATCH 2 of 2 fooFlag barFlag] b
1735 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1735 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1736 Message-Id: <97d72e5f12c7e84f8506.62@
1736 Message-Id: <97d72e5f12c7e84f8506.62@
1737 In-Reply-To: <patchbomb.60@
1737 In-Reply-To: <patchbomb.60@
1738 References: <patchbomb.60@
1738 References: <patchbomb.60@
1739 User-Agent: Mercurial-patchbomb
1739 User-Agent: Mercurial-patchbomb
1740 Date: Thu, 01 Jan 1970 00:01:02 +0000
1740 Date: Thu, 01 Jan 1970 00:01:02 +0000
1741 From: quux
1741 From: quux
1742 To: foo
1742 To: foo
1743 Cc: bar
1743 Cc: bar
1744
1744
1745 # HG changeset patch
1745 # HG changeset patch
1746 # User test
1746 # User test
1747 # Date 2 0
1747 # Date 2 0
1748 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1748 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1749 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1749 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1750 b
1750 b
1751
1751
1752 diff -r 8580ff50825a -r 97d72e5f12c7 b
1752 diff -r 8580ff50825a -r 97d72e5f12c7 b
1753 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1753 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1754 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1754 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1755 @@ -0,0 +1,1 @@
1755 @@ -0,0 +1,1 @@
1756 +b
1756 +b
1757
1757
1758
1758
1759 test multi-address parsing:
1759 test multi-address parsing:
1760 $ hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t 'spam<spam><eggs>' \
1760 $ hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t 'spam<spam><eggs>' \
1761 > -t toast -c 'foo,bar@example.com' -c '"A, B <>" <a@example.com>' -s test -r 0 \
1761 > -t toast -c 'foo,bar@example.com' -c '"A, B <>" <a@example.com>' -s test -r 0 \
1762 > --config email.bcc='"Quux, A." <quux>'
1762 > --config email.bcc='"Quux, A." <quux>'
1763 This patch series consists of 1 patches.
1763 This patch series consists of 1 patches.
1764
1764
1765
1765
1766 Writing [PATCH] test ...
1766 Writing [PATCH] test ...
1767 $ fixheaders < tmp.mbox
1767 $ fixheaders < tmp.mbox
1768 From quux Tue Jan 01 00:01:01 1980
1768 From quux Tue Jan 01 00:01:01 1980
1769 Content-Type: text/plain; charset="us-ascii"
1769 Content-Type: text/plain; charset="us-ascii"
1770 MIME-Version: 1.0
1770 MIME-Version: 1.0
1771 Content-Transfer-Encoding: 7bit
1771 Content-Transfer-Encoding: 7bit
1772 Subject: [PATCH] test
1772 Subject: [PATCH] test
1773 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1773 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1774 Message-Id: <8580ff50825a50c8f716.315532860@
1774 Message-Id: <8580ff50825a50c8f716.315532860@
1775 User-Agent: Mercurial-patchbomb
1775 User-Agent: Mercurial-patchbomb
1776 Date: Tue, 01 Jan 1980 00:01:00 +0000
1776 Date: Tue, 01 Jan 1980 00:01:00 +0000
1777 From: quux
1777 From: quux
1778 To: spam <spam>, eggs, toast
1778 To: spam <spam>, eggs, toast
1779 Cc: foo, bar@example.com, "A, B <>" <a@example.com>
1779 Cc: foo, bar@example.com, "A, B <>" <a@example.com>
1780 Bcc: "Quux, A." <quux>
1780 Bcc: "Quux, A." <quux>
1781
1781
1782 # HG changeset patch
1782 # HG changeset patch
1783 # User test
1783 # User test
1784 # Date 1 0
1784 # Date 1 0
1785 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1785 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1786 # Parent 0000000000000000000000000000000000000000
1786 # Parent 0000000000000000000000000000000000000000
1787 a
1787 a
1788
1788
1789 diff -r 000000000000 -r 8580ff50825a a
1789 diff -r 000000000000 -r 8580ff50825a a
1790 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1790 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1791 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1791 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1792 @@ -0,0 +1,1 @@
1792 @@ -0,0 +1,1 @@
1793 +a
1793 +a
1794
1794
1795
1795
1796
1796
1797 test multi-byte domain parsing:
1797 test multi-byte domain parsing:
1798 $ UUML=`python -c 'import sys; sys.stdout.write("\374")'`
1798 $ UUML=`python -c 'import sys; sys.stdout.write("\374")'`
1799 $ HGENCODING=iso-8859-1
1799 $ HGENCODING=iso-8859-1
1800 $ export HGENCODING
1800 $ export HGENCODING
1801 $ hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t "bar@${UUML}nicode.com" -s test -r 0
1801 $ hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t "bar@${UUML}nicode.com" -s test -r 0
1802 This patch series consists of 1 patches.
1802 This patch series consists of 1 patches.
1803
1803
1804 Cc:
1804 Cc:
1805
1805
1806 Writing [PATCH] test ...
1806 Writing [PATCH] test ...
1807
1807
1808 $ cat tmp.mbox
1808 $ cat tmp.mbox
1809 From quux Tue Jan 01 00:01:01 1980
1809 From quux Tue Jan 01 00:01:01 1980
1810 Content-Type: text/plain; charset="us-ascii"
1810 Content-Type: text/plain; charset="us-ascii"
1811 MIME-Version: 1.0
1811 MIME-Version: 1.0
1812 Content-Transfer-Encoding: 7bit
1812 Content-Transfer-Encoding: 7bit
1813 Subject: [PATCH] test
1813 Subject: [PATCH] test
1814 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1814 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1815 Message-Id: <8580ff50825a50c8f716.315532860@* (glob)
1815 Message-Id: <8580ff50825a50c8f716.315532860@* (glob)
1816 User-Agent: Mercurial-patchbomb/* (glob)
1816 User-Agent: Mercurial-patchbomb/* (glob)
1817 Date: Tue, 01 Jan 1980 00:01:00 +0000
1817 Date: Tue, 01 Jan 1980 00:01:00 +0000
1818 From: quux
1818 From: quux
1819 To: bar@xn--nicode-2ya.com
1819 To: bar@xn--nicode-2ya.com
1820
1820
1821 # HG changeset patch
1821 # HG changeset patch
1822 # User test
1822 # User test
1823 # Date 1 0
1823 # Date 1 0
1824 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1824 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1825 # Parent 0000000000000000000000000000000000000000
1825 # Parent 0000000000000000000000000000000000000000
1826 a
1826 a
1827
1827
1828 diff -r 000000000000 -r 8580ff50825a a
1828 diff -r 000000000000 -r 8580ff50825a a
1829 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1829 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1830 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1830 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1831 @@ -0,0 +1,1 @@
1831 @@ -0,0 +1,1 @@
1832 +a
1832 +a
1833
1833
1834
1834
1835
1835
1836 test outgoing:
1836 test outgoing:
1837 $ hg up 1
1837 $ hg up 1
1838 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
1838 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
1839
1839
1840 $ hg branch test
1840 $ hg branch test
1841 marked working directory as branch test
1841 marked working directory as branch test
1842
1842
1843 $ echo d > d
1843 $ echo d > d
1844 $ hg add d
1844 $ hg add d
1845 $ hg ci -md -d '4 0'
1845 $ hg ci -md -d '4 0'
1846 $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t
1846 $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t
1847 comparing with ../t
1847 comparing with ../t
1848 searching for changes
1848 searching for changes
1849 From [test]: test
1849 From [test]: test
1850 This patch series consists of 8 patches.
1850 This patch series consists of 8 patches.
1851
1851
1852
1852
1853 Write the introductory message for the patch series.
1853 Write the introductory message for the patch series.
1854
1854
1855 Cc:
1855 Cc:
1856
1856
1857 Displaying [PATCH 0 of 8] test ...
1857 Displaying [PATCH 0 of 8] test ...
1858 Content-Type: text/plain; charset="us-ascii"
1858 Content-Type: text/plain; charset="us-ascii"
1859 MIME-Version: 1.0
1859 MIME-Version: 1.0
1860 Content-Transfer-Encoding: 7bit
1860 Content-Transfer-Encoding: 7bit
1861 Subject: [PATCH 0 of 8] test
1861 Subject: [PATCH 0 of 8] test
1862 Message-Id: <patchbomb.315532860@* (glob)
1862 Message-Id: <patchbomb.315532860@* (glob)
1863 User-Agent: Mercurial-patchbomb/* (glob)
1863 User-Agent: Mercurial-patchbomb/* (glob)
1864 Date: Tue, 01 Jan 1980 00:01:00 +0000
1864 Date: Tue, 01 Jan 1980 00:01:00 +0000
1865 From: test
1865 From: test
1866 To: foo
1866 To: foo
1867
1867
1868
1868
1869 Displaying [PATCH 1 of 8] c ...
1869 Displaying [PATCH 1 of 8] c ...
1870 Content-Type: text/plain; charset="us-ascii"
1870 Content-Type: text/plain; charset="us-ascii"
1871 MIME-Version: 1.0
1871 MIME-Version: 1.0
1872 Content-Transfer-Encoding: 7bit
1872 Content-Transfer-Encoding: 7bit
1873 Subject: [PATCH 1 of 8] c
1873 Subject: [PATCH 1 of 8] c
1874 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1874 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1875 Message-Id: <ff2c9fa2018b15fa74b3.315532861@* (glob)
1875 Message-Id: <ff2c9fa2018b15fa74b3.315532861@* (glob)
1876 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
1876 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
1877 References: <patchbomb\.315532860@[^>]*> (re)
1877 References: <patchbomb\.315532860@[^>]*> (re)
1878 User-Agent: Mercurial-patchbomb/* (glob)
1878 User-Agent: Mercurial-patchbomb/* (glob)
1879 Date: Tue, 01 Jan 1980 00:01:01 +0000
1879 Date: Tue, 01 Jan 1980 00:01:01 +0000
1880 From: test
1880 From: test
1881 To: foo
1881 To: foo
1882
1882
1883 # HG changeset patch
1883 # HG changeset patch
1884 # User test
1884 # User test
1885 # Date 3 0
1885 # Date 3 0
1886 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1886 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1887 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1887 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1888 c
1888 c
1889
1889
1890 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1890 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1891 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1891 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1892 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1892 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1893 @@ -0,0 +1,1 @@
1893 @@ -0,0 +1,1 @@
1894 +c
1894 +c
1895
1895
1896 Displaying [PATCH 2 of 8] charset=utf-8; content-transfer-encoding: base64 ...
1896 Displaying [PATCH 2 of 8] charset=utf-8; content-transfer-encoding: base64 ...
1897 Content-Type: text/plain; charset="us-ascii"
1897 Content-Type: text/plain; charset="us-ascii"
1898 MIME-Version: 1.0
1898 MIME-Version: 1.0
1899 Content-Transfer-Encoding: 8bit
1899 Content-Transfer-Encoding: 8bit
1900 Subject: [PATCH 2 of 8] charset=utf-8; content-transfer-encoding: base64
1900 Subject: [PATCH 2 of 8] charset=utf-8; content-transfer-encoding: base64
1901 X-Mercurial-Node: c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
1901 X-Mercurial-Node: c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
1902 Message-Id: <c3c9e37db9f4fe4882cd.315532862@* (glob)
1902 Message-Id: <c3c9e37db9f4fe4882cd.315532862@* (glob)
1903 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
1903 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
1904 References: <patchbomb\.315532860@[^>]*> (re)
1904 References: <patchbomb\.315532860@[^>]*> (re)
1905 User-Agent: Mercurial-patchbomb/* (glob)
1905 User-Agent: Mercurial-patchbomb/* (glob)
1906 Date: Tue, 01 Jan 1980 00:01:02 +0000
1906 Date: Tue, 01 Jan 1980 00:01:02 +0000
1907 From: test
1907 From: test
1908 To: foo
1908 To: foo
1909
1909
1910 # HG changeset patch
1910 # HG changeset patch
1911 # User test
1911 # User test
1912 # Date 4 0
1912 # Date 4 0
1913 # Node ID c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
1913 # Node ID c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
1914 # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f
1914 # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f
1915 charset=utf-8; content-transfer-encoding: base64
1915 charset=utf-8; content-transfer-encoding: base64
1916
1916
1917 diff -r ff2c9fa2018b -r c3c9e37db9f4 description
1917 diff -r ff2c9fa2018b -r c3c9e37db9f4 description
1918 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1918 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1919 +++ b/description Thu Jan 01 00:00:04 1970 +0000
1919 +++ b/description Thu Jan 01 00:00:04 1970 +0000
1920 @@ -0,0 +1,3 @@
1920 @@ -0,0 +1,3 @@
1921 +a multiline
1921 +a multiline
1922 +
1922 +
1923 +description
1923 +description
1924 diff -r ff2c9fa2018b -r c3c9e37db9f4 utf
1924 diff -r ff2c9fa2018b -r c3c9e37db9f4 utf
1925 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1925 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1926 +++ b/utf Thu Jan 01 00:00:04 1970 +0000
1926 +++ b/utf Thu Jan 01 00:00:04 1970 +0000
1927 @@ -0,0 +1,1 @@
1927 @@ -0,0 +1,1 @@
1928 +hΓΆmma!
1928 +h\xc3\xb6mma! (esc)
1929
1929
1930 Displaying [PATCH 3 of 8] charset=utf-8; content-transfer-encoding: quoted-printable ...
1930 Displaying [PATCH 3 of 8] charset=utf-8; content-transfer-encoding: quoted-printable ...
1931 Content-Type: text/plain; charset="us-ascii"
1931 Content-Type: text/plain; charset="us-ascii"
1932 MIME-Version: 1.0
1932 MIME-Version: 1.0
1933 Content-Transfer-Encoding: quoted-printable
1933 Content-Transfer-Encoding: quoted-printable
1934 Subject: [PATCH 3 of 8] charset=utf-8;
1934 Subject: [PATCH 3 of 8] charset=utf-8;
1935 content-transfer-encoding: quoted-printable
1935 content-transfer-encoding: quoted-printable
1936 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
1936 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
1937 Message-Id: <c655633f8c87700bb38c.315532863@* (glob)
1937 Message-Id: <c655633f8c87700bb38c.315532863@* (glob)
1938 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
1938 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
1939 References: <patchbomb\.315532860@[^>]*> (re)
1939 References: <patchbomb\.315532860@[^>]*> (re)
1940 User-Agent: Mercurial-patchbomb/* (glob)
1940 User-Agent: Mercurial-patchbomb/* (glob)
1941 Date: Tue, 01 Jan 1980 00:01:03 +0000
1941 Date: Tue, 01 Jan 1980 00:01:03 +0000
1942 From: test
1942 From: test
1943 To: foo
1943 To: foo
1944
1944
1945 # HG changeset patch
1945 # HG changeset patch
1946 # User test
1946 # User test
1947 # Date 4 0
1947 # Date 4 0
1948 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
1948 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
1949 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
1949 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
1950 charset=3Dutf-8; content-transfer-encoding: quoted-printable
1950 charset=3Dutf-8; content-transfer-encoding: quoted-printable
1951
1951
1952 diff -r c3c9e37db9f4 -r c655633f8c87 qp
1952 diff -r c3c9e37db9f4 -r c655633f8c87 qp
1953 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1953 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1954 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
1954 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
1955 @@ -0,0 +1,4 @@
1955 @@ -0,0 +1,4 @@
1956 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1956 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1957 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1957 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1958 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1958 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1959 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1959 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1960 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1960 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1961 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1961 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1962 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1962 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1963 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1963 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1964 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1964 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1965 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1965 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1966 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1966 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1967 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1967 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1968 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1968 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1969 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1969 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1970 +foo
1970 +foo
1971 +
1971 +
1972 +bar
1972 +bar
1973
1973
1974 Displaying [PATCH 4 of 8] charset=us-ascii; content-transfer-encoding: 8bit ...
1974 Displaying [PATCH 4 of 8] charset=us-ascii; content-transfer-encoding: 8bit ...
1975 Content-Type: text/plain; charset="us-ascii"
1975 Content-Type: text/plain; charset="us-ascii"
1976 MIME-Version: 1.0
1976 MIME-Version: 1.0
1977 Content-Transfer-Encoding: 8bit
1977 Content-Transfer-Encoding: 8bit
1978 Subject: [PATCH 4 of 8] charset=us-ascii; content-transfer-encoding: 8bit
1978 Subject: [PATCH 4 of 8] charset=us-ascii; content-transfer-encoding: 8bit
1979 X-Mercurial-Node: 22d0f96be12f5945fd67d101af58f7bc8263c835
1979 X-Mercurial-Node: 22d0f96be12f5945fd67d101af58f7bc8263c835
1980 Message-Id: <22d0f96be12f5945fd67.315532864@* (glob)
1980 Message-Id: <22d0f96be12f5945fd67.315532864@* (glob)
1981 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
1981 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
1982 References: <patchbomb\.315532860@[^>]*> (re)
1982 References: <patchbomb\.315532860@[^>]*> (re)
1983 User-Agent: Mercurial-patchbomb/* (glob)
1983 User-Agent: Mercurial-patchbomb/* (glob)
1984 Date: Tue, 01 Jan 1980 00:01:04 +0000
1984 Date: Tue, 01 Jan 1980 00:01:04 +0000
1985 From: test
1985 From: test
1986 To: foo
1986 To: foo
1987
1987
1988 # HG changeset patch
1988 # HG changeset patch
1989 # User test
1989 # User test
1990 # Date 5 0
1990 # Date 5 0
1991 # Node ID 22d0f96be12f5945fd67d101af58f7bc8263c835
1991 # Node ID 22d0f96be12f5945fd67d101af58f7bc8263c835
1992 # Parent c655633f8c87700bb38cc6a59a2753bdc5a6c376
1992 # Parent c655633f8c87700bb38cc6a59a2753bdc5a6c376
1993 charset=us-ascii; content-transfer-encoding: 8bit
1993 charset=us-ascii; content-transfer-encoding: 8bit
1994
1994
1995 diff -r c655633f8c87 -r 22d0f96be12f isolatin
1995 diff -r c655633f8c87 -r 22d0f96be12f isolatin
1996 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1996 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1997 +++ b/isolatin Thu Jan 01 00:00:05 1970 +0000
1997 +++ b/isolatin Thu Jan 01 00:00:05 1970 +0000
1998 @@ -0,0 +1,1 @@
1998 @@ -0,0 +1,1 @@
1999 +hοΏ½mma!
1999 +h\xf6mma! (esc)
2000
2000
2001 Displaying [PATCH 5 of 8] Added tag zero, zero.foo for changeset 8580ff50825a ...
2001 Displaying [PATCH 5 of 8] Added tag zero, zero.foo for changeset 8580ff50825a ...
2002 Content-Type: text/plain; charset="us-ascii"
2002 Content-Type: text/plain; charset="us-ascii"
2003 MIME-Version: 1.0
2003 MIME-Version: 1.0
2004 Content-Transfer-Encoding: 7bit
2004 Content-Transfer-Encoding: 7bit
2005 Subject: [PATCH 5 of 8] Added tag zero, zero.foo for changeset 8580ff50825a
2005 Subject: [PATCH 5 of 8] Added tag zero, zero.foo for changeset 8580ff50825a
2006 X-Mercurial-Node: dd9c2b4b8a8a0934d5523c15f2c119b362360903
2006 X-Mercurial-Node: dd9c2b4b8a8a0934d5523c15f2c119b362360903
2007 Message-Id: <dd9c2b4b8a8a0934d552.315532865@* (glob)
2007 Message-Id: <dd9c2b4b8a8a0934d552.315532865@* (glob)
2008 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
2008 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
2009 References: <patchbomb\.315532860@[^>]*> (re)
2009 References: <patchbomb\.315532860@[^>]*> (re)
2010 User-Agent: Mercurial-patchbomb/* (glob)
2010 User-Agent: Mercurial-patchbomb/* (glob)
2011 Date: Tue, 01 Jan 1980 00:01:05 +0000
2011 Date: Tue, 01 Jan 1980 00:01:05 +0000
2012 From: test
2012 From: test
2013 To: foo
2013 To: foo
2014
2014
2015 # HG changeset patch
2015 # HG changeset patch
2016 # User test
2016 # User test
2017 # Date 0 0
2017 # Date 0 0
2018 # Node ID dd9c2b4b8a8a0934d5523c15f2c119b362360903
2018 # Node ID dd9c2b4b8a8a0934d5523c15f2c119b362360903
2019 # Parent 22d0f96be12f5945fd67d101af58f7bc8263c835
2019 # Parent 22d0f96be12f5945fd67d101af58f7bc8263c835
2020 Added tag zero, zero.foo for changeset 8580ff50825a
2020 Added tag zero, zero.foo for changeset 8580ff50825a
2021
2021
2022 diff -r 22d0f96be12f -r dd9c2b4b8a8a .hgtags
2022 diff -r 22d0f96be12f -r dd9c2b4b8a8a .hgtags
2023 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2023 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2024 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
2024 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
2025 @@ -0,0 +1,2 @@
2025 @@ -0,0 +1,2 @@
2026 +8580ff50825a50c8f716709acdf8de0deddcd6ab zero
2026 +8580ff50825a50c8f716709acdf8de0deddcd6ab zero
2027 +8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
2027 +8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
2028
2028
2029 Displaying [PATCH 6 of 8] Added tag one, one.patch for changeset 97d72e5f12c7 ...
2029 Displaying [PATCH 6 of 8] Added tag one, one.patch for changeset 97d72e5f12c7 ...
2030 Content-Type: text/plain; charset="us-ascii"
2030 Content-Type: text/plain; charset="us-ascii"
2031 MIME-Version: 1.0
2031 MIME-Version: 1.0
2032 Content-Transfer-Encoding: 7bit
2032 Content-Transfer-Encoding: 7bit
2033 Subject: [PATCH 6 of 8] Added tag one, one.patch for changeset 97d72e5f12c7
2033 Subject: [PATCH 6 of 8] Added tag one, one.patch for changeset 97d72e5f12c7
2034 X-Mercurial-Node: eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
2034 X-Mercurial-Node: eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
2035 Message-Id: <eae5fcf795eee29d0e45.315532866@* (glob)
2035 Message-Id: <eae5fcf795eee29d0e45.315532866@* (glob)
2036 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
2036 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
2037 References: <patchbomb\.315532860@[^>]*> (re)
2037 References: <patchbomb\.315532860@[^>]*> (re)
2038 User-Agent: Mercurial-patchbomb/* (glob)
2038 User-Agent: Mercurial-patchbomb/* (glob)
2039 Date: Tue, 01 Jan 1980 00:01:06 +0000
2039 Date: Tue, 01 Jan 1980 00:01:06 +0000
2040 From: test
2040 From: test
2041 To: foo
2041 To: foo
2042
2042
2043 # HG changeset patch
2043 # HG changeset patch
2044 # User test
2044 # User test
2045 # Date 0 0
2045 # Date 0 0
2046 # Node ID eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
2046 # Node ID eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
2047 # Parent dd9c2b4b8a8a0934d5523c15f2c119b362360903
2047 # Parent dd9c2b4b8a8a0934d5523c15f2c119b362360903
2048 Added tag one, one.patch for changeset 97d72e5f12c7
2048 Added tag one, one.patch for changeset 97d72e5f12c7
2049
2049
2050 diff -r dd9c2b4b8a8a -r eae5fcf795ee .hgtags
2050 diff -r dd9c2b4b8a8a -r eae5fcf795ee .hgtags
2051 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
2051 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
2052 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
2052 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
2053 @@ -1,2 +1,4 @@
2053 @@ -1,2 +1,4 @@
2054 8580ff50825a50c8f716709acdf8de0deddcd6ab zero
2054 8580ff50825a50c8f716709acdf8de0deddcd6ab zero
2055 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
2055 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
2056 +97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
2056 +97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
2057 +97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
2057 +97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
2058
2058
2059 Displaying [PATCH 7 of 8] Added tag two, two.diff for changeset ff2c9fa2018b ...
2059 Displaying [PATCH 7 of 8] Added tag two, two.diff for changeset ff2c9fa2018b ...
2060 Content-Type: text/plain; charset="us-ascii"
2060 Content-Type: text/plain; charset="us-ascii"
2061 MIME-Version: 1.0
2061 MIME-Version: 1.0
2062 Content-Transfer-Encoding: 7bit
2062 Content-Transfer-Encoding: 7bit
2063 Subject: [PATCH 7 of 8] Added tag two, two.diff for changeset ff2c9fa2018b
2063 Subject: [PATCH 7 of 8] Added tag two, two.diff for changeset ff2c9fa2018b
2064 X-Mercurial-Node: e317db6a6f288748d1f6cb064f3810fcba66b1b6
2064 X-Mercurial-Node: e317db6a6f288748d1f6cb064f3810fcba66b1b6
2065 Message-Id: <e317db6a6f288748d1f6.315532867@* (glob)
2065 Message-Id: <e317db6a6f288748d1f6.315532867@* (glob)
2066 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
2066 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
2067 References: <patchbomb\.315532860@[^>]*> (re)
2067 References: <patchbomb\.315532860@[^>]*> (re)
2068 User-Agent: Mercurial-patchbomb/* (glob)
2068 User-Agent: Mercurial-patchbomb/* (glob)
2069 Date: Tue, 01 Jan 1980 00:01:07 +0000
2069 Date: Tue, 01 Jan 1980 00:01:07 +0000
2070 From: test
2070 From: test
2071 To: foo
2071 To: foo
2072
2072
2073 # HG changeset patch
2073 # HG changeset patch
2074 # User test
2074 # User test
2075 # Date 0 0
2075 # Date 0 0
2076 # Node ID e317db6a6f288748d1f6cb064f3810fcba66b1b6
2076 # Node ID e317db6a6f288748d1f6cb064f3810fcba66b1b6
2077 # Parent eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
2077 # Parent eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
2078 Added tag two, two.diff for changeset ff2c9fa2018b
2078 Added tag two, two.diff for changeset ff2c9fa2018b
2079
2079
2080 diff -r eae5fcf795ee -r e317db6a6f28 .hgtags
2080 diff -r eae5fcf795ee -r e317db6a6f28 .hgtags
2081 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
2081 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
2082 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
2082 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
2083 @@ -2,3 +2,5 @@
2083 @@ -2,3 +2,5 @@
2084 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
2084 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
2085 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
2085 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
2086 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
2086 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
2087 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two
2087 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two
2088 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff
2088 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff
2089
2089
2090 Displaying [PATCH 8 of 8] d ...
2090 Displaying [PATCH 8 of 8] d ...
2091 Content-Type: text/plain; charset="us-ascii"
2091 Content-Type: text/plain; charset="us-ascii"
2092 MIME-Version: 1.0
2092 MIME-Version: 1.0
2093 Content-Transfer-Encoding: 7bit
2093 Content-Transfer-Encoding: 7bit
2094 Subject: [PATCH 8 of 8] d
2094 Subject: [PATCH 8 of 8] d
2095 X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2095 X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2096 Message-Id: <2f9fa9b998c5fe3ac2bd\.315532868[^>]*> (re)
2096 Message-Id: <2f9fa9b998c5fe3ac2bd\.315532868[^>]*> (re)
2097 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
2097 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
2098 References: <patchbomb\.315532860@[^>]*> (re)
2098 References: <patchbomb\.315532860@[^>]*> (re)
2099 User-Agent: Mercurial-patchbomb/* (glob)
2099 User-Agent: Mercurial-patchbomb/* (glob)
2100 Date: Tue, 01 Jan 1980 00:01:08 +0000
2100 Date: Tue, 01 Jan 1980 00:01:08 +0000
2101 From: test
2101 From: test
2102 To: foo
2102 To: foo
2103
2103
2104 # HG changeset patch
2104 # HG changeset patch
2105 # User test
2105 # User test
2106 # Date 4 0
2106 # Date 4 0
2107 # Branch test
2107 # Branch test
2108 # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2108 # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2109 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2109 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2110 d
2110 d
2111
2111
2112 diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d
2112 diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d
2113 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2113 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2114 +++ b/d Thu Jan 01 00:00:04 1970 +0000
2114 +++ b/d Thu Jan 01 00:00:04 1970 +0000
2115 @@ -0,0 +1,1 @@
2115 @@ -0,0 +1,1 @@
2116 +d
2116 +d
2117
2117
2118
2118
2119 dest#branch URIs:
2119 dest#branch URIs:
2120 $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t#test
2120 $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t#test
2121 comparing with ../t
2121 comparing with ../t
2122 searching for changes
2122 searching for changes
2123 From [test]: test
2123 From [test]: test
2124 This patch series consists of 1 patches.
2124 This patch series consists of 1 patches.
2125
2125
2126 Cc:
2126 Cc:
2127
2127
2128 Displaying [PATCH] test ...
2128 Displaying [PATCH] test ...
2129 Content-Type: text/plain; charset="us-ascii"
2129 Content-Type: text/plain; charset="us-ascii"
2130 MIME-Version: 1.0
2130 MIME-Version: 1.0
2131 Content-Transfer-Encoding: 7bit
2131 Content-Transfer-Encoding: 7bit
2132 Subject: [PATCH] test
2132 Subject: [PATCH] test
2133 X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2133 X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2134 Message-Id: <2f9fa9b998c5fe3ac2bd.315532860@* (glob)
2134 Message-Id: <2f9fa9b998c5fe3ac2bd.315532860@* (glob)
2135 User-Agent: Mercurial-patchbomb/* (glob)
2135 User-Agent: Mercurial-patchbomb/* (glob)
2136 Date: Tue, 01 Jan 1980 00:01:00 +0000
2136 Date: Tue, 01 Jan 1980 00:01:00 +0000
2137 From: test
2137 From: test
2138 To: foo
2138 To: foo
2139
2139
2140 # HG changeset patch
2140 # HG changeset patch
2141 # User test
2141 # User test
2142 # Date 4 0
2142 # Date 4 0
2143 # Branch test
2143 # Branch test
2144 # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2144 # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2145 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2145 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2146 d
2146 d
2147
2147
2148 diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d
2148 diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d
2149 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2149 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2150 +++ b/d Thu Jan 01 00:00:04 1970 +0000
2150 +++ b/d Thu Jan 01 00:00:04 1970 +0000
2151 @@ -0,0 +1,1 @@
2151 @@ -0,0 +1,1 @@
2152 +d
2152 +d
2153
2153
@@ -1,100 +1,100 b''
1
1
2 $ cat > loop.py <<EOF
2 $ cat > loop.py <<EOF
3 > from mercurial import commands
3 > from mercurial import commands
4 >
4 >
5 > def loop(ui, loops, **opts):
5 > def loop(ui, loops, **opts):
6 > loops = int(loops)
6 > loops = int(loops)
7 > total = None
7 > total = None
8 > if loops >= 0:
8 > if loops >= 0:
9 > total = loops
9 > total = loops
10 > if opts.get('total', None):
10 > if opts.get('total', None):
11 > total = int(opts.get('total'))
11 > total = int(opts.get('total'))
12 > loops = abs(loops)
12 > loops = abs(loops)
13 >
13 >
14 > for i in range(loops):
14 > for i in range(loops):
15 > ui.progress('loop', i, 'loop.%d' % i, 'loopnum', total)
15 > ui.progress('loop', i, 'loop.%d' % i, 'loopnum', total)
16 > ui.progress('loop', None, 'loop.done', 'loopnum', total)
16 > ui.progress('loop', None, 'loop.done', 'loopnum', total)
17 >
17 >
18 > commands.norepo += " loop"
18 > commands.norepo += " loop"
19 >
19 >
20 > cmdtable = {
20 > cmdtable = {
21 > "loop": (loop, [('', 'total', '', 'override for total')],
21 > "loop": (loop, [('', 'total', '', 'override for total')],
22 > 'hg loop LOOPS'),
22 > 'hg loop LOOPS'),
23 > }
23 > }
24 > EOF
24 > EOF
25
25
26 $ cat > filtercr.py <<EOF
26 $ cat > filtercr.py <<EOF
27 > import sys, re
27 > import sys, re
28 > for line in sys.stdin:
28 > for line in sys.stdin:
29 > line = re.sub(r'\r+[^\n]', lambda m: '\n' + m.group()[-1:], line)
29 > line = re.sub(r'\r+[^\n]', lambda m: '\n' + m.group()[-1:], line)
30 > sys.stdout.write(line)
30 > sys.stdout.write(line)
31 > print
31 > print
32 > EOF
32 > EOF
33
33
34 $ echo "[extensions]" >> $HGRCPATH
34 $ echo "[extensions]" >> $HGRCPATH
35 $ echo "progress=" >> $HGRCPATH
35 $ echo "progress=" >> $HGRCPATH
36 $ echo "loop=`pwd`/loop.py" >> $HGRCPATH
36 $ echo "loop=`pwd`/loop.py" >> $HGRCPATH
37 $ echo "[progress]" >> $HGRCPATH
37 $ echo "[progress]" >> $HGRCPATH
38 $ echo "assume-tty=1" >> $HGRCPATH
38 $ echo "assume-tty=1" >> $HGRCPATH
39
39
40 test default params, display nothing because of delay
40 test default params, display nothing because of delay
41
41
42 $ hg -y loop 3 2>&1 | python filtercr.py
42 $ hg -y loop 3 2>&1 | python filtercr.py
43
43
44 $ echo "delay=0" >> $HGRCPATH
44 $ echo "delay=0" >> $HGRCPATH
45 $ echo "refresh=0" >> $HGRCPATH
45 $ echo "refresh=0" >> $HGRCPATH
46
46
47 test with delay=0, refresh=0
47 test with delay=0, refresh=0
48
48
49 $ hg -y loop 3 2>&1 | python filtercr.py
49 $ hg -y loop 3 2>&1 | python filtercr.py
50
50
51 loop [ ] 0/3
51 loop [ ] 0/3
52 loop [=====================> ] 1/3
52 loop [=====================> ] 1/3
53 loop [============================================> ] 2/3
53 loop [============================================> ] 2/3
54
54 \r (esc)
55
55
56 test refresh is taken in account
56 test refresh is taken in account
57
57
58 $ hg -y --config progress.refresh=100 loop 3 2>&1 | python filtercr.py
58 $ hg -y --config progress.refresh=100 loop 3 2>&1 | python filtercr.py
59
59
60
60
61 test format options 1
61 test format options 1
62
62
63 $ hg -y --config 'progress.format=number topic item+2' loop 2 2>&1 | python filtercr.py
63 $ hg -y --config 'progress.format=number topic item+2' loop 2 2>&1 | python filtercr.py
64
64
65 0/2 loop lo
65 0/2 loop lo
66 1/2 loop lo
66 1/2 loop lo
67
67 \r (esc)
68
68
69 test format options 2
69 test format options 2
70
70
71 $ hg -y --config 'progress.format=number item-3 bar' loop 2 2>&1 | python filtercr.py
71 $ hg -y --config 'progress.format=number item-3 bar' loop 2 2>&1 | python filtercr.py
72
72
73 0/2 p.0 [ ]
73 0/2 p.0 [ ]
74 1/2 p.1 [=================================> ]
74 1/2 p.1 [=================================> ]
75
75 \r (esc)
76
76
77 test format options and indeterminate progress
77 test format options and indeterminate progress
78
78
79 $ hg -y --config 'progress.format=number item bar' loop -- -2 2>&1 | python filtercr.py
79 $ hg -y --config 'progress.format=number item bar' loop -- -2 2>&1 | python filtercr.py
80
80
81 0 loop.0 [ <=> ]
81 0 loop.0 [ <=> ]
82 1 loop.1 [ <=> ]
82 1 loop.1 [ <=> ]
83
83 \r (esc)
84
84
85 make sure things don't fall over if count > total
85 make sure things don't fall over if count > total
86
86
87 $ hg -y loop --total 4 6 2>&1 | python filtercr.py
87 $ hg -y loop --total 4 6 2>&1 | python filtercr.py
88
88
89 loop [ ] 0/4
89 loop [ ] 0/4
90 loop [================> ] 1/4
90 loop [================> ] 1/4
91 loop [=================================> ] 2/4
91 loop [=================================> ] 2/4
92 loop [==================================================> ] 3/4
92 loop [==================================================> ] 3/4
93 loop [===================================================================>] 4/4
93 loop [===================================================================>] 4/4
94 loop [ <=> ] 5/4
94 loop [ <=> ] 5/4
95
95 \r (esc)
96
96
97 test immediate progress completion
97 test immediate progress completion
98
98
99 $ hg -y loop 0 2>&1 | python filtercr.py
99 $ hg -y loop 0 2>&1 | python filtercr.py
100
100
@@ -1,358 +1,358 b''
1 $ HGENCODING=utf-8
1 $ HGENCODING=utf-8
2 $ export HGENCODING
2 $ export HGENCODING
3
3
4 $ try() {
4 $ try() {
5 > hg debugrevspec --debug $@
5 > hg debugrevspec --debug $@
6 > }
6 > }
7
7
8 $ log() {
8 $ log() {
9 > hg log --template '{rev}\n' -r "$1"
9 > hg log --template '{rev}\n' -r "$1"
10 > }
10 > }
11
11
12 $ hg init repo
12 $ hg init repo
13 $ cd repo
13 $ cd repo
14
14
15 $ echo a > a
15 $ echo a > a
16 $ hg branch a
16 $ hg branch a
17 marked working directory as branch a
17 marked working directory as branch a
18 $ hg ci -Aqm0
18 $ hg ci -Aqm0
19
19
20 $ echo b > b
20 $ echo b > b
21 $ hg branch b
21 $ hg branch b
22 marked working directory as branch b
22 marked working directory as branch b
23 $ hg ci -Aqm1
23 $ hg ci -Aqm1
24
24
25 $ rm a
25 $ rm a
26 $ hg branch a-b-c-
26 $ hg branch a-b-c-
27 marked working directory as branch a-b-c-
27 marked working directory as branch a-b-c-
28 $ hg ci -Aqm2 -u Bob
28 $ hg ci -Aqm2 -u Bob
29
29
30 $ hg co 1
30 $ hg co 1
31 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
31 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32 $ hg branch +a+b+c+
32 $ hg branch +a+b+c+
33 marked working directory as branch +a+b+c+
33 marked working directory as branch +a+b+c+
34 $ hg ci -Aqm3
34 $ hg ci -Aqm3
35
35
36 $ hg co 2 # interleave
36 $ hg co 2 # interleave
37 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
37 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
38 $ echo bb > b
38 $ echo bb > b
39 $ hg branch -- -a-b-c-
39 $ hg branch -- -a-b-c-
40 marked working directory as branch -a-b-c-
40 marked working directory as branch -a-b-c-
41 $ hg ci -Aqm4 -d "May 12 2005"
41 $ hg ci -Aqm4 -d "May 12 2005"
42
42
43 $ hg co 3
43 $ hg co 3
44 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
44 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 $ hg branch /a/b/c/
45 $ hg branch /a/b/c/
46 marked working directory as branch /a/b/c/
46 marked working directory as branch /a/b/c/
47 $ hg ci -Aqm"5 bug"
47 $ hg ci -Aqm"5 bug"
48
48
49 $ hg merge 4
49 $ hg merge 4
50 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
50 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
51 (branch merge, don't forget to commit)
51 (branch merge, don't forget to commit)
52 $ hg branch _a_b_c_
52 $ hg branch _a_b_c_
53 marked working directory as branch _a_b_c_
53 marked working directory as branch _a_b_c_
54 $ hg ci -Aqm"6 issue619"
54 $ hg ci -Aqm"6 issue619"
55
55
56 $ hg branch .a.b.c.
56 $ hg branch .a.b.c.
57 marked working directory as branch .a.b.c.
57 marked working directory as branch .a.b.c.
58 $ hg ci -Aqm7
58 $ hg ci -Aqm7
59
59
60 $ hg branch all
60 $ hg branch all
61 marked working directory as branch all
61 marked working directory as branch all
62 $ hg ci --close-branch -Aqm8
62 $ hg ci --close-branch -Aqm8
63 abort: can only close branch heads
63 abort: can only close branch heads
64 [255]
64 [255]
65
65
66 $ hg co 4
66 $ hg co 4
67 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
67 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
68 $ hg branch Γ©
68 $ hg branch Γ©
69 marked working directory as branch Γ©
69 marked working directory as branch \xc3\xa9 (esc)
70 $ hg ci -Aqm9
70 $ hg ci -Aqm9
71
71
72 $ hg tag -r6 1.0
72 $ hg tag -r6 1.0
73
73
74 $ hg clone --quiet -U -r 7 . ../remote1
74 $ hg clone --quiet -U -r 7 . ../remote1
75 $ hg clone --quiet -U -r 8 . ../remote2
75 $ hg clone --quiet -U -r 8 . ../remote2
76 $ echo "[paths]" >> .hg/hgrc
76 $ echo "[paths]" >> .hg/hgrc
77 $ echo "default = ../remote1" >> .hg/hgrc
77 $ echo "default = ../remote1" >> .hg/hgrc
78
78
79 names that should work without quoting
79 names that should work without quoting
80
80
81 $ try a
81 $ try a
82 ('symbol', 'a')
82 ('symbol', 'a')
83 0
83 0
84 $ try b-a
84 $ try b-a
85 ('minus', ('symbol', 'b'), ('symbol', 'a'))
85 ('minus', ('symbol', 'b'), ('symbol', 'a'))
86 1
86 1
87 $ try _a_b_c_
87 $ try _a_b_c_
88 ('symbol', '_a_b_c_')
88 ('symbol', '_a_b_c_')
89 6
89 6
90 $ try _a_b_c_-a
90 $ try _a_b_c_-a
91 ('minus', ('symbol', '_a_b_c_'), ('symbol', 'a'))
91 ('minus', ('symbol', '_a_b_c_'), ('symbol', 'a'))
92 6
92 6
93 $ try .a.b.c.
93 $ try .a.b.c.
94 ('symbol', '.a.b.c.')
94 ('symbol', '.a.b.c.')
95 7
95 7
96 $ try .a.b.c.-a
96 $ try .a.b.c.-a
97 ('minus', ('symbol', '.a.b.c.'), ('symbol', 'a'))
97 ('minus', ('symbol', '.a.b.c.'), ('symbol', 'a'))
98 7
98 7
99 $ try -- '-a-b-c-' # complains
99 $ try -- '-a-b-c-' # complains
100 hg: parse error at 7: not a prefix: end
100 hg: parse error at 7: not a prefix: end
101 [255]
101 [255]
102 $ log -a-b-c- # succeeds with fallback
102 $ log -a-b-c- # succeeds with fallback
103 4
103 4
104 $ try -- -a-b-c--a # complains
104 $ try -- -a-b-c--a # complains
105 ('minus', ('minus', ('minus', ('negate', ('symbol', 'a')), ('symbol', 'b')), ('symbol', 'c')), ('negate', ('symbol', 'a')))
105 ('minus', ('minus', ('minus', ('negate', ('symbol', 'a')), ('symbol', 'b')), ('symbol', 'c')), ('negate', ('symbol', 'a')))
106 abort: unknown revision '-a'!
106 abort: unknown revision '-a'!
107 [255]
107 [255]
108 $ try Γ©
108 $ try Γ©
109 ('symbol', '\xc3\xa9')
109 ('symbol', '\xc3\xa9')
110 9
110 9
111
111
112 quoting needed
112 quoting needed
113
113
114 $ try '"-a-b-c-"-a'
114 $ try '"-a-b-c-"-a'
115 ('minus', ('string', '-a-b-c-'), ('symbol', 'a'))
115 ('minus', ('string', '-a-b-c-'), ('symbol', 'a'))
116 4
116 4
117
117
118 $ log '1 or 2'
118 $ log '1 or 2'
119 1
119 1
120 2
120 2
121 $ log '1|2'
121 $ log '1|2'
122 1
122 1
123 2
123 2
124 $ log '1 and 2'
124 $ log '1 and 2'
125 $ log '1&2'
125 $ log '1&2'
126 $ try '1&2|3' # precedence - and is higher
126 $ try '1&2|3' # precedence - and is higher
127 ('or', ('and', ('symbol', '1'), ('symbol', '2')), ('symbol', '3'))
127 ('or', ('and', ('symbol', '1'), ('symbol', '2')), ('symbol', '3'))
128 3
128 3
129 $ try '1|2&3'
129 $ try '1|2&3'
130 ('or', ('symbol', '1'), ('and', ('symbol', '2'), ('symbol', '3')))
130 ('or', ('symbol', '1'), ('and', ('symbol', '2'), ('symbol', '3')))
131 1
131 1
132 $ try '1&2&3' # associativity
132 $ try '1&2&3' # associativity
133 ('and', ('and', ('symbol', '1'), ('symbol', '2')), ('symbol', '3'))
133 ('and', ('and', ('symbol', '1'), ('symbol', '2')), ('symbol', '3'))
134 $ try '1|(2|3)'
134 $ try '1|(2|3)'
135 ('or', ('symbol', '1'), ('group', ('or', ('symbol', '2'), ('symbol', '3'))))
135 ('or', ('symbol', '1'), ('group', ('or', ('symbol', '2'), ('symbol', '3'))))
136 1
136 1
137 2
137 2
138 3
138 3
139 $ log '1.0' # tag
139 $ log '1.0' # tag
140 6
140 6
141 $ log 'a' # branch
141 $ log 'a' # branch
142 0
142 0
143 $ log '2785f51ee'
143 $ log '2785f51ee'
144 0
144 0
145 $ log 'date(2005)'
145 $ log 'date(2005)'
146 4
146 4
147 $ log 'date(this is a test)'
147 $ log 'date(this is a test)'
148 hg: parse error at 10: unexpected token: symbol
148 hg: parse error at 10: unexpected token: symbol
149 [255]
149 [255]
150 $ log 'date()'
150 $ log 'date()'
151 hg: parse error: date requires a string
151 hg: parse error: date requires a string
152 [255]
152 [255]
153 $ log 'date'
153 $ log 'date'
154 hg: parse error: can't use date here
154 hg: parse error: can't use date here
155 [255]
155 [255]
156 $ log 'date('
156 $ log 'date('
157 hg: parse error at 5: not a prefix: end
157 hg: parse error at 5: not a prefix: end
158 [255]
158 [255]
159 $ log 'date(tip)'
159 $ log 'date(tip)'
160 abort: invalid date: 'tip'
160 abort: invalid date: 'tip'
161 [255]
161 [255]
162 $ log '"date"'
162 $ log '"date"'
163 abort: unknown revision 'date'!
163 abort: unknown revision 'date'!
164 [255]
164 [255]
165 $ log 'date(2005) and 1::'
165 $ log 'date(2005) and 1::'
166 4
166 4
167
167
168 $ log 'ancestor(1)'
168 $ log 'ancestor(1)'
169 hg: parse error: ancestor requires two arguments
169 hg: parse error: ancestor requires two arguments
170 [255]
170 [255]
171 $ log 'ancestor(4,5)'
171 $ log 'ancestor(4,5)'
172 1
172 1
173 $ log 'ancestor(4,5) and 4'
173 $ log 'ancestor(4,5) and 4'
174 $ log 'ancestors(5)'
174 $ log 'ancestors(5)'
175 0
175 0
176 1
176 1
177 3
177 3
178 5
178 5
179 $ log 'author(bob)'
179 $ log 'author(bob)'
180 2
180 2
181 $ log 'branch(Γ©)'
181 $ log 'branch(Γ©)'
182 8
182 8
183 9
183 9
184 $ log 'children(ancestor(4,5))'
184 $ log 'children(ancestor(4,5))'
185 2
185 2
186 3
186 3
187 $ log 'closed()'
187 $ log 'closed()'
188 $ log 'contains(a)'
188 $ log 'contains(a)'
189 0
189 0
190 1
190 1
191 3
191 3
192 5
192 5
193 $ log 'descendants(2 or 3)'
193 $ log 'descendants(2 or 3)'
194 2
194 2
195 3
195 3
196 4
196 4
197 5
197 5
198 6
198 6
199 7
199 7
200 8
200 8
201 9
201 9
202 $ log 'file(b)'
202 $ log 'file(b)'
203 1
203 1
204 4
204 4
205 $ log 'follow()'
205 $ log 'follow()'
206 0
206 0
207 1
207 1
208 2
208 2
209 4
209 4
210 8
210 8
211 9
211 9
212 $ log 'grep("issue\d+")'
212 $ log 'grep("issue\d+")'
213 6
213 6
214 $ try 'grep("(")' # invalid regular expression
214 $ try 'grep("(")' # invalid regular expression
215 ('func', ('symbol', 'grep'), ('string', '('))
215 ('func', ('symbol', 'grep'), ('string', '('))
216 hg: parse error: invalid match pattern: unbalanced parenthesis
216 hg: parse error: invalid match pattern: unbalanced parenthesis
217 [255]
217 [255]
218 $ try 'grep("\bissue\d+")'
218 $ try 'grep("\bissue\d+")'
219 ('func', ('symbol', 'grep'), ('string', '\x08issue\\d+'))
219 ('func', ('symbol', 'grep'), ('string', '\x08issue\\d+'))
220 $ try 'grep(r"\bissue\d+")'
220 $ try 'grep(r"\bissue\d+")'
221 ('func', ('symbol', 'grep'), ('string', '\\bissue\\d+'))
221 ('func', ('symbol', 'grep'), ('string', '\\bissue\\d+'))
222 6
222 6
223 $ try 'grep(r"\")'
223 $ try 'grep(r"\")'
224 hg: parse error at 7: unterminated string
224 hg: parse error at 7: unterminated string
225 [255]
225 [255]
226 $ log 'head()'
226 $ log 'head()'
227 0
227 0
228 1
228 1
229 2
229 2
230 3
230 3
231 4
231 4
232 5
232 5
233 6
233 6
234 7
234 7
235 9
235 9
236 $ log 'heads(6::)'
236 $ log 'heads(6::)'
237 7
237 7
238 $ log 'keyword(issue)'
238 $ log 'keyword(issue)'
239 6
239 6
240 $ log 'limit(head(), 1)'
240 $ log 'limit(head(), 1)'
241 0
241 0
242 $ log 'max(contains(a))'
242 $ log 'max(contains(a))'
243 5
243 5
244 $ log 'min(contains(a))'
244 $ log 'min(contains(a))'
245 0
245 0
246 $ log 'merge()'
246 $ log 'merge()'
247 6
247 6
248 $ log 'modifies(b)'
248 $ log 'modifies(b)'
249 4
249 4
250 $ log 'id(5)'
250 $ log 'id(5)'
251 2
251 2
252 $ log 'outgoing()'
252 $ log 'outgoing()'
253 8
253 8
254 9
254 9
255 $ log 'outgoing("../remote1")'
255 $ log 'outgoing("../remote1")'
256 8
256 8
257 9
257 9
258 $ log 'outgoing("../remote2")'
258 $ log 'outgoing("../remote2")'
259 3
259 3
260 5
260 5
261 6
261 6
262 7
262 7
263 9
263 9
264 $ log 'p1(merge())'
264 $ log 'p1(merge())'
265 5
265 5
266 $ log 'p2(merge())'
266 $ log 'p2(merge())'
267 4
267 4
268 $ log 'parents(merge())'
268 $ log 'parents(merge())'
269 4
269 4
270 5
270 5
271 $ log 'removes(a)'
271 $ log 'removes(a)'
272 2
272 2
273 6
273 6
274 $ log 'roots(all())'
274 $ log 'roots(all())'
275 0
275 0
276 $ log 'reverse(2 or 3 or 4 or 5)'
276 $ log 'reverse(2 or 3 or 4 or 5)'
277 5
277 5
278 4
278 4
279 3
279 3
280 2
280 2
281 $ log 'rev(5)'
281 $ log 'rev(5)'
282 5
282 5
283 $ log 'sort(limit(reverse(all()), 3))'
283 $ log 'sort(limit(reverse(all()), 3))'
284 7
284 7
285 8
285 8
286 9
286 9
287 $ log 'sort(2 or 3 or 4 or 5, date)'
287 $ log 'sort(2 or 3 or 4 or 5, date)'
288 2
288 2
289 3
289 3
290 5
290 5
291 4
291 4
292 $ log 'tagged()'
292 $ log 'tagged()'
293 6
293 6
294 $ log 'tag()'
294 $ log 'tag()'
295 6
295 6
296 $ log 'tag(1.0)'
296 $ log 'tag(1.0)'
297 6
297 6
298 $ log 'tag(tip)'
298 $ log 'tag(tip)'
299 9
299 9
300 $ log 'user(bob)'
300 $ log 'user(bob)'
301 2
301 2
302
302
303 $ log '4::8'
303 $ log '4::8'
304 4
304 4
305 8
305 8
306 $ log '4:8'
306 $ log '4:8'
307 4
307 4
308 5
308 5
309 6
309 6
310 7
310 7
311 8
311 8
312
312
313 $ log 'sort(!merge() & (modifies(b) | user(bob) | keyword(bug) | keyword(issue) & 1::9), "-date")'
313 $ log 'sort(!merge() & (modifies(b) | user(bob) | keyword(bug) | keyword(issue) & 1::9), "-date")'
314 4
314 4
315 2
315 2
316 5
316 5
317
317
318 $ log 'not 0 and 0:2'
318 $ log 'not 0 and 0:2'
319 1
319 1
320 2
320 2
321 $ log 'not 1 and 0:2'
321 $ log 'not 1 and 0:2'
322 0
322 0
323 2
323 2
324 $ log 'not 2 and 0:2'
324 $ log 'not 2 and 0:2'
325 0
325 0
326 1
326 1
327 $ log '(1 and 2)::'
327 $ log '(1 and 2)::'
328 $ log '(1 and 2):'
328 $ log '(1 and 2):'
329 $ log '(1 and 2):3'
329 $ log '(1 and 2):3'
330 $ log 'sort(head(), -rev)'
330 $ log 'sort(head(), -rev)'
331 9
331 9
332 7
332 7
333 6
333 6
334 5
334 5
335 4
335 4
336 3
336 3
337 2
337 2
338 1
338 1
339 0
339 0
340 $ log '4::8 - 8'
340 $ log '4::8 - 8'
341 4
341 4
342
342
343 issue2437
343 issue2437
344
344
345 $ log '3 and p1(5)'
345 $ log '3 and p1(5)'
346 3
346 3
347 $ log '4 and p2(6)'
347 $ log '4 and p2(6)'
348 4
348 4
349 $ log '1 and parents(:2)'
349 $ log '1 and parents(:2)'
350 1
350 1
351 $ log '2 and children(1:)'
351 $ log '2 and children(1:)'
352 2
352 2
353 $ log 'roots(all()) or roots(all())'
353 $ log 'roots(all()) or roots(all())'
354 0
354 0
355 $ log 'heads(branch(Γ©)) or heads(branch(Γ©))'
355 $ log 'heads(branch(Γ©)) or heads(branch(Γ©))'
356 9
356 9
357 $ log 'ancestors(8) and (heads(branch("-a-b-c-")) or heads(branch(Γ©)))'
357 $ log 'ancestors(8) and (heads(branch("-a-b-c-")) or heads(branch(Γ©)))'
358 4
358 4
@@ -1,279 +1,279 b''
1 $ echo "[extensions]" >> $HGRCPATH
1 $ echo "[extensions]" >> $HGRCPATH
2 $ echo "color=" >> $HGRCPATH
2 $ echo "color=" >> $HGRCPATH
3 $ echo "[color]" >> $HGRCPATH
3 $ echo "[color]" >> $HGRCPATH
4 $ echo "mode=ansi" >> $HGRCPATH
4 $ echo "mode=ansi" >> $HGRCPATH
5
5
6 $ hg init repo1
6 $ hg init repo1
7 $ cd repo1
7 $ cd repo1
8 $ mkdir a b a/1 b/1 b/2
8 $ mkdir a b a/1 b/1 b/2
9 $ touch in_root a/in_a b/in_b a/1/in_a_1 b/1/in_b_1 b/2/in_b_2
9 $ touch in_root a/in_a b/in_b a/1/in_a_1 b/1/in_b_1 b/2/in_b_2
10
10
11 hg status in repo root:
11 hg status in repo root:
12
12
13 $ hg status --color=always
13 $ hg status --color=always
14 ? a/1/in_a_1
14 \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
15 ? a/in_a
15 \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
16 ? b/1/in_b_1
16 \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
17 ? b/2/in_b_2
17 \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
18 ? b/in_b
18 \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
19 ? in_root
19 \x1b[0;35;1;4m? in_root\x1b[0m (esc)
20
20
21 hg status . in repo root:
21 hg status . in repo root:
22
22
23 $ hg status --color=always .
23 $ hg status --color=always .
24 ? a/1/in_a_1
24 \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
25 ? a/in_a
25 \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
26 ? b/1/in_b_1
26 \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
27 ? b/2/in_b_2
27 \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
28 ? b/in_b
28 \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
29 ? in_root
29 \x1b[0;35;1;4m? in_root\x1b[0m (esc)
30
30
31 $ hg status --color=always --cwd a
31 $ hg status --color=always --cwd a
32 ? a/1/in_a_1
32 \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
33 ? a/in_a
33 \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
34 ? b/1/in_b_1
34 \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
35 ? b/2/in_b_2
35 \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
36 ? b/in_b
36 \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
37 ? in_root
37 \x1b[0;35;1;4m? in_root\x1b[0m (esc)
38 $ hg status --color=always --cwd a .
38 $ hg status --color=always --cwd a .
39 ? 1/in_a_1
39 \x1b[0;35;1;4m? 1/in_a_1\x1b[0m (esc)
40 ? in_a
40 \x1b[0;35;1;4m? in_a\x1b[0m (esc)
41 $ hg status --color=always --cwd a ..
41 $ hg status --color=always --cwd a ..
42 ? 1/in_a_1
42 \x1b[0;35;1;4m? 1/in_a_1\x1b[0m (esc)
43 ? in_a
43 \x1b[0;35;1;4m? in_a\x1b[0m (esc)
44 ? ../b/1/in_b_1
44 \x1b[0;35;1;4m? ../b/1/in_b_1\x1b[0m (esc)
45 ? ../b/2/in_b_2
45 \x1b[0;35;1;4m? ../b/2/in_b_2\x1b[0m (esc)
46 ? ../b/in_b
46 \x1b[0;35;1;4m? ../b/in_b\x1b[0m (esc)
47 ? ../in_root
47 \x1b[0;35;1;4m? ../in_root\x1b[0m (esc)
48
48
49 $ hg status --color=always --cwd b
49 $ hg status --color=always --cwd b
50 ? a/1/in_a_1
50 \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
51 ? a/in_a
51 \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
52 ? b/1/in_b_1
52 \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
53 ? b/2/in_b_2
53 \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
54 ? b/in_b
54 \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
55 ? in_root
55 \x1b[0;35;1;4m? in_root\x1b[0m (esc)
56 $ hg status --color=always --cwd b .
56 $ hg status --color=always --cwd b .
57 ? 1/in_b_1
57 \x1b[0;35;1;4m? 1/in_b_1\x1b[0m (esc)
58 ? 2/in_b_2
58 \x1b[0;35;1;4m? 2/in_b_2\x1b[0m (esc)
59 ? in_b
59 \x1b[0;35;1;4m? in_b\x1b[0m (esc)
60 $ hg status --color=always --cwd b ..
60 $ hg status --color=always --cwd b ..
61 ? ../a/1/in_a_1
61 \x1b[0;35;1;4m? ../a/1/in_a_1\x1b[0m (esc)
62 ? ../a/in_a
62 \x1b[0;35;1;4m? ../a/in_a\x1b[0m (esc)
63 ? 1/in_b_1
63 \x1b[0;35;1;4m? 1/in_b_1\x1b[0m (esc)
64 ? 2/in_b_2
64 \x1b[0;35;1;4m? 2/in_b_2\x1b[0m (esc)
65 ? in_b
65 \x1b[0;35;1;4m? in_b\x1b[0m (esc)
66 ? ../in_root
66 \x1b[0;35;1;4m? ../in_root\x1b[0m (esc)
67
67
68 $ hg status --color=always --cwd a/1
68 $ hg status --color=always --cwd a/1
69 ? a/1/in_a_1
69 \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
70 ? a/in_a
70 \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
71 ? b/1/in_b_1
71 \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
72 ? b/2/in_b_2
72 \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
73 ? b/in_b
73 \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
74 ? in_root
74 \x1b[0;35;1;4m? in_root\x1b[0m (esc)
75 $ hg status --color=always --cwd a/1 .
75 $ hg status --color=always --cwd a/1 .
76 ? in_a_1
76 \x1b[0;35;1;4m? in_a_1\x1b[0m (esc)
77 $ hg status --color=always --cwd a/1 ..
77 $ hg status --color=always --cwd a/1 ..
78 ? in_a_1
78 \x1b[0;35;1;4m? in_a_1\x1b[0m (esc)
79 ? ../in_a
79 \x1b[0;35;1;4m? ../in_a\x1b[0m (esc)
80
80
81 $ hg status --color=always --cwd b/1
81 $ hg status --color=always --cwd b/1
82 ? a/1/in_a_1
82 \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
83 ? a/in_a
83 \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
84 ? b/1/in_b_1
84 \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
85 ? b/2/in_b_2
85 \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
86 ? b/in_b
86 \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
87 ? in_root
87 \x1b[0;35;1;4m? in_root\x1b[0m (esc)
88 $ hg status --color=always --cwd b/1 .
88 $ hg status --color=always --cwd b/1 .
89 ? in_b_1
89 \x1b[0;35;1;4m? in_b_1\x1b[0m (esc)
90 $ hg status --color=always --cwd b/1 ..
90 $ hg status --color=always --cwd b/1 ..
91 ? in_b_1
91 \x1b[0;35;1;4m? in_b_1\x1b[0m (esc)
92 ? ../2/in_b_2
92 \x1b[0;35;1;4m? ../2/in_b_2\x1b[0m (esc)
93 ? ../in_b
93 \x1b[0;35;1;4m? ../in_b\x1b[0m (esc)
94
94
95 $ hg status --color=always --cwd b/2
95 $ hg status --color=always --cwd b/2
96 ? a/1/in_a_1
96 \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
97 ? a/in_a
97 \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
98 ? b/1/in_b_1
98 \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
99 ? b/2/in_b_2
99 \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
100 ? b/in_b
100 \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
101 ? in_root
101 \x1b[0;35;1;4m? in_root\x1b[0m (esc)
102 $ hg status --color=always --cwd b/2 .
102 $ hg status --color=always --cwd b/2 .
103 ? in_b_2
103 \x1b[0;35;1;4m? in_b_2\x1b[0m (esc)
104 $ hg status --color=always --cwd b/2 ..
104 $ hg status --color=always --cwd b/2 ..
105 ? ../1/in_b_1
105 \x1b[0;35;1;4m? ../1/in_b_1\x1b[0m (esc)
106 ? in_b_2
106 \x1b[0;35;1;4m? in_b_2\x1b[0m (esc)
107 ? ../in_b
107 \x1b[0;35;1;4m? ../in_b\x1b[0m (esc)
108 $ cd ..
108 $ cd ..
109
109
110 $ hg init repo2
110 $ hg init repo2
111 $ cd repo2
111 $ cd repo2
112 $ touch modified removed deleted ignored
112 $ touch modified removed deleted ignored
113 $ echo "^ignored$" > .hgignore
113 $ echo "^ignored$" > .hgignore
114 $ hg ci -A -m 'initial checkin'
114 $ hg ci -A -m 'initial checkin'
115 adding .hgignore
115 adding .hgignore
116 adding deleted
116 adding deleted
117 adding modified
117 adding modified
118 adding removed
118 adding removed
119 $ touch modified added unknown ignored
119 $ touch modified added unknown ignored
120 $ hg add added
120 $ hg add added
121 $ hg remove removed
121 $ hg remove removed
122 $ rm deleted
122 $ rm deleted
123
123
124 hg status:
124 hg status:
125
125
126 $ hg status --color=always
126 $ hg status --color=always
127 A added
127 \x1b[0;32;1mA added\x1b[0m (esc)
128 R removed
128 \x1b[0;31;1mR removed\x1b[0m (esc)
129 ! deleted
129 \x1b[0;36;1;4m! deleted\x1b[0m (esc)
130 ? unknown
130 \x1b[0;35;1;4m? unknown\x1b[0m (esc)
131
131
132 hg status modified added removed deleted unknown never-existed ignored:
132 hg status modified added removed deleted unknown never-existed ignored:
133
133
134 $ hg status --color=always modified added removed deleted unknown never-existed ignored
134 $ hg status --color=always modified added removed deleted unknown never-existed ignored
135 never-existed: No such file or directory
135 never-existed: No such file or directory
136 A added
136 \x1b[0;32;1mA added\x1b[0m (esc)
137 R removed
137 \x1b[0;31;1mR removed\x1b[0m (esc)
138 ! deleted
138 \x1b[0;36;1;4m! deleted\x1b[0m (esc)
139 ? unknown
139 \x1b[0;35;1;4m? unknown\x1b[0m (esc)
140
140
141 $ hg copy modified copied
141 $ hg copy modified copied
142
142
143 hg status -C:
143 hg status -C:
144
144
145 $ hg status --color=always -C
145 $ hg status --color=always -C
146 A added
146 \x1b[0;32;1mA added\x1b[0m (esc)
147 A copied
147 \x1b[0;32;1mA copied\x1b[0m (esc)
148  modified
148 \x1b[0;0m modified\x1b[0m (esc)
149 R removed
149 \x1b[0;31;1mR removed\x1b[0m (esc)
150 ! deleted
150 \x1b[0;36;1;4m! deleted\x1b[0m (esc)
151 ? unknown
151 \x1b[0;35;1;4m? unknown\x1b[0m (esc)
152
152
153 hg status -A:
153 hg status -A:
154
154
155 $ hg status --color=always -A
155 $ hg status --color=always -A
156 A added
156 \x1b[0;32;1mA added\x1b[0m (esc)
157 A copied
157 \x1b[0;32;1mA copied\x1b[0m (esc)
158  modified
158 \x1b[0;0m modified\x1b[0m (esc)
159 R removed
159 \x1b[0;31;1mR removed\x1b[0m (esc)
160 ! deleted
160 \x1b[0;36;1;4m! deleted\x1b[0m (esc)
161 ? unknown
161 \x1b[0;35;1;4m? unknown\x1b[0m (esc)
162 I ignored
162 \x1b[0;30;1mI ignored\x1b[0m (esc)
163 C .hgignore
163 \x1b[0;0mC .hgignore\x1b[0m (esc)
164 C modified
164 \x1b[0;0mC modified\x1b[0m (esc)
165
165
166
166
167 $ echo "^ignoreddir$" > .hgignore
167 $ echo "^ignoreddir$" > .hgignore
168 $ mkdir ignoreddir
168 $ mkdir ignoreddir
169 $ touch ignoreddir/file
169 $ touch ignoreddir/file
170
170
171 hg status ignoreddir/file:
171 hg status ignoreddir/file:
172
172
173 $ hg status --color=always ignoreddir/file
173 $ hg status --color=always ignoreddir/file
174
174
175 hg status -i ignoreddir/file:
175 hg status -i ignoreddir/file:
176
176
177 $ hg status --color=always -i ignoreddir/file
177 $ hg status --color=always -i ignoreddir/file
178 I ignoreddir/file
178 \x1b[0;30;1mI ignoreddir/file\x1b[0m (esc)
179 $ cd ..
179 $ cd ..
180
180
181 check 'status -q' and some combinations
181 check 'status -q' and some combinations
182
182
183 $ hg init repo3
183 $ hg init repo3
184 $ cd repo3
184 $ cd repo3
185 $ touch modified removed deleted ignored
185 $ touch modified removed deleted ignored
186 $ echo "^ignored$" > .hgignore
186 $ echo "^ignored$" > .hgignore
187 $ hg commit -A -m 'initial checkin'
187 $ hg commit -A -m 'initial checkin'
188 adding .hgignore
188 adding .hgignore
189 adding deleted
189 adding deleted
190 adding modified
190 adding modified
191 adding removed
191 adding removed
192 $ touch added unknown ignored
192 $ touch added unknown ignored
193 $ hg add added
193 $ hg add added
194 $ echo "test" >> modified
194 $ echo "test" >> modified
195 $ hg remove removed
195 $ hg remove removed
196 $ rm deleted
196 $ rm deleted
197 $ hg copy modified copied
197 $ hg copy modified copied
198
198
199 test unknown color
199 test unknown color
200
200
201 $ hg --config color.status.modified=periwinkle status --color=always
201 $ hg --config color.status.modified=periwinkle status --color=always
202 ignoring unknown color/effect 'periwinkle' (configured in color.status.modified)
202 ignoring unknown color/effect 'periwinkle' (configured in color.status.modified)
203 M modified
203 M modified
204 A added
204 \x1b[0;32;1mA added\x1b[0m (esc)
205 A copied
205 \x1b[0;32;1mA copied\x1b[0m (esc)
206 R removed
206 \x1b[0;31;1mR removed\x1b[0m (esc)
207 ! deleted
207 \x1b[0;36;1;4m! deleted\x1b[0m (esc)
208 ? unknown
208 \x1b[0;35;1;4m? unknown\x1b[0m (esc)
209
209
210 Run status with 2 different flags.
210 Run status with 2 different flags.
211 Check if result is the same or different.
211 Check if result is the same or different.
212 If result is not as expected, raise error
212 If result is not as expected, raise error
213
213
214 $ assert() {
214 $ assert() {
215 > hg status --color=always $1 > ../a
215 > hg status --color=always $1 > ../a
216 > hg status --color=always $2 > ../b
216 > hg status --color=always $2 > ../b
217 > if diff ../a ../b > /dev/null; then
217 > if diff ../a ../b > /dev/null; then
218 > out=0
218 > out=0
219 > else
219 > else
220 > out=1
220 > out=1
221 > fi
221 > fi
222 > if [ $3 -eq 0 ]; then
222 > if [ $3 -eq 0 ]; then
223 > df="same"
223 > df="same"
224 > else
224 > else
225 > df="different"
225 > df="different"
226 > fi
226 > fi
227 > if [ $out -ne $3 ]; then
227 > if [ $out -ne $3 ]; then
228 > echo "Error on $1 and $2, should be $df."
228 > echo "Error on $1 and $2, should be $df."
229 > fi
229 > fi
230 > }
230 > }
231
231
232 assert flag1 flag2 [0-same | 1-different]
232 assert flag1 flag2 [0-same | 1-different]
233
233
234 $ assert "-q" "-mard" 0
234 $ assert "-q" "-mard" 0
235 $ assert "-A" "-marduicC" 0
235 $ assert "-A" "-marduicC" 0
236 $ assert "-qA" "-mardcC" 0
236 $ assert "-qA" "-mardcC" 0
237 $ assert "-qAui" "-A" 0
237 $ assert "-qAui" "-A" 0
238 $ assert "-qAu" "-marducC" 0
238 $ assert "-qAu" "-marducC" 0
239 $ assert "-qAi" "-mardicC" 0
239 $ assert "-qAi" "-mardicC" 0
240 $ assert "-qu" "-u" 0
240 $ assert "-qu" "-u" 0
241 $ assert "-q" "-u" 1
241 $ assert "-q" "-u" 1
242 $ assert "-m" "-a" 1
242 $ assert "-m" "-a" 1
243 $ assert "-r" "-d" 1
243 $ assert "-r" "-d" 1
244 $ cd ..
244 $ cd ..
245
245
246 test 'resolve -l'
246 test 'resolve -l'
247
247
248 $ hg init repo4
248 $ hg init repo4
249 $ cd repo4
249 $ cd repo4
250 $ echo "file a" > a
250 $ echo "file a" > a
251 $ echo "file b" > b
251 $ echo "file b" > b
252 $ hg add a b
252 $ hg add a b
253 $ hg commit -m "initial"
253 $ hg commit -m "initial"
254 $ echo "file a change 1" > a
254 $ echo "file a change 1" > a
255 $ echo "file b change 1" > b
255 $ echo "file b change 1" > b
256 $ hg commit -m "head 1"
256 $ hg commit -m "head 1"
257 $ hg update 0
257 $ hg update 0
258 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
258 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
259 $ echo "file a change 2" > a
259 $ echo "file a change 2" > a
260 $ echo "file b change 2" > b
260 $ echo "file b change 2" > b
261 $ hg commit -m "head 2"
261 $ hg commit -m "head 2"
262 created new head
262 created new head
263 $ hg merge
263 $ hg merge
264 merging a
264 merging a
265 warning: conflicts during merge.
265 warning: conflicts during merge.
266 merging a failed!
266 merging a failed!
267 merging b
267 merging b
268 warning: conflicts during merge.
268 warning: conflicts during merge.
269 merging b failed!
269 merging b failed!
270 0 files updated, 0 files merged, 0 files removed, 2 files unresolved
270 0 files updated, 0 files merged, 0 files removed, 2 files unresolved
271 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
271 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
272 [1]
272 [1]
273 $ hg resolve -m b
273 $ hg resolve -m b
274
274
275 hg resolve with one unresolved, one resolved:
275 hg resolve with one unresolved, one resolved:
276
276
277 $ hg resolve --color=always -l
277 $ hg resolve --color=always -l
278 U a
278 \x1b[0;31;1mU a\x1b[0m (esc)
279 R b
279 \x1b[0;32;1mR b\x1b[0m (esc)
General Comments 0
You need to be logged in to leave comments. Login now