##// 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 1 $ echo "[extensions]" >> $HGRCPATH
2 2 $ echo "bookmarks=" >> $HGRCPATH
3 3
4 4 $ echo "[bookmarks]" >> $HGRCPATH
5 5 $ echo "track.current = True" >> $HGRCPATH
6 6
7 7 $ hg init
8 8
9 9 no bookmarks
10 10
11 11 $ hg bookmarks
12 12 no bookmarks set
13 13
14 14 set bookmark X
15 15
16 16 $ hg bookmark X
17 17
18 18 list bookmarks
19 19
20 20 $ hg bookmark
21 21 * X -1:000000000000
22 22
23 23 list bookmarks with color
24 24
25 25 $ hg --config extensions.color= --config color.mode=ansi \
26 26 > bookmark --color=always
27  * X -1:000000000000
27 \x1b[0;32m * X -1:000000000000\x1b[0m (esc)
28 28
29 29 update to bookmark X
30 30
31 31 $ hg update X
32 32 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
33 33
34 34 list bookmarks
35 35
36 36 $ hg bookmarks
37 37 * X -1:000000000000
38 38
39 39 rename
40 40
41 41 $ hg bookmark -m X Z
42 42
43 43 list bookmarks
44 44
45 45 $ hg bookmarks
46 46 * Z -1:000000000000
47 47
48 48 new bookmark Y
49 49
50 50 $ hg bookmark Y
51 51
52 52 list bookmarks
53 53
54 54 $ hg bookmark
55 55 * Y -1:000000000000
56 56 Z -1:000000000000
57 57
58 58 commit
59 59
60 60 $ echo 'b' > b
61 61 $ hg add b
62 62 $ hg commit -m'test'
63 63
64 64 list bookmarks
65 65
66 66 $ hg bookmark
67 67 * Y 0:719295282060
68 68 Z -1:000000000000
69 69
70 70 delete bookmarks
71 71
72 72 $ hg bookmark -d Y
73 73 $ hg bookmark -d Z
74 74
75 75 list bookmarks
76 76
77 77 $ hg bookmark
78 78 no bookmarks set
79 79
80 80 update to tip
81 81
82 82 $ hg update tip
83 83 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
84 84
85 85 set bookmark Y using -r .
86 86
87 87 $ hg bookmark -r . Y
88 88
89 89 list bookmarks
90 90
91 91 $ hg bookmark
92 92 * Y 0:719295282060
@@ -1,213 +1,213 b''
1 1 $ echo "[extensions]" >> $HGRCPATH
2 2 $ echo "bookmarks=" >> $HGRCPATH
3 3
4 4 $ hg init
5 5
6 6 no bookmarks
7 7
8 8 $ hg bookmarks
9 9 no bookmarks set
10 10
11 11 bookmark rev -1
12 12
13 13 $ hg bookmark X
14 14
15 15 list bookmarks
16 16
17 17 $ hg bookmarks
18 18 * X -1:000000000000
19 19
20 20 list bookmarks with color
21 21
22 22 $ hg --config extensions.color= --config color.mode=ansi \
23 23 > bookmarks --color=always
24  * X -1:000000000000
24 \x1b[0;32m * X -1:000000000000\x1b[0m (esc)
25 25
26 26 $ echo a > a
27 27 $ hg add a
28 28 $ hg commit -m 0
29 29
30 30 bookmark X moved to rev 0
31 31
32 32 $ hg bookmarks
33 33 * X 0:f7b1eb17ad24
34 34
35 35 look up bookmark
36 36
37 37 $ hg log -r X
38 38 changeset: 0:f7b1eb17ad24
39 39 tag: X
40 40 tag: tip
41 41 user: test
42 42 date: Thu Jan 01 00:00:00 1970 +0000
43 43 summary: 0
44 44
45 45
46 46 second bookmark for rev 0
47 47
48 48 $ hg bookmark X2
49 49
50 50 bookmark rev -1 again
51 51
52 52 $ hg bookmark -r null Y
53 53
54 54 list bookmarks
55 55
56 56 $ hg bookmarks
57 57 * X2 0:f7b1eb17ad24
58 58 * X 0:f7b1eb17ad24
59 59 Y -1:000000000000
60 60
61 61 $ echo b > b
62 62 $ hg add b
63 63 $ hg commit -m 1
64 64
65 65 bookmarks revset
66 66
67 67 $ hg log -r 'bookmark()'
68 68 changeset: 1:925d80f479bb
69 69 tag: X
70 70 tag: X2
71 71 tag: tip
72 72 user: test
73 73 date: Thu Jan 01 00:00:00 1970 +0000
74 74 summary: 1
75 75
76 76 $ hg log -r 'bookmark(Y)'
77 77 $ hg log -r 'bookmark(X2)'
78 78 changeset: 1:925d80f479bb
79 79 tag: X
80 80 tag: X2
81 81 tag: tip
82 82 user: test
83 83 date: Thu Jan 01 00:00:00 1970 +0000
84 84 summary: 1
85 85
86 86 $ hg help revsets | grep 'bookmark('
87 87 "bookmark([name])"
88 88
89 89 bookmarks X and X2 moved to rev 1, Y at rev -1
90 90
91 91 $ hg bookmarks
92 92 * X2 1:925d80f479bb
93 93 * X 1:925d80f479bb
94 94 Y -1:000000000000
95 95
96 96 bookmark rev 0 again
97 97
98 98 $ hg bookmark -r 0 Z
99 99
100 100 $ echo c > c
101 101 $ hg add c
102 102 $ hg commit -m 2
103 103
104 104 bookmarks X and X2 moved to rev 2, Y at rev -1, Z at rev 0
105 105
106 106 $ hg bookmarks
107 107 * X2 2:0316ce92851d
108 108 * X 2:0316ce92851d
109 109 Z 0:f7b1eb17ad24
110 110 Y -1:000000000000
111 111
112 112 rename nonexistent bookmark
113 113
114 114 $ hg bookmark -m A B
115 115 abort: a bookmark of this name does not exist
116 116 [255]
117 117
118 118 rename to existent bookmark
119 119
120 120 $ hg bookmark -m X Y
121 121 abort: a bookmark of the same name already exists
122 122 [255]
123 123
124 124 force rename to existent bookmark
125 125
126 126 $ hg bookmark -f -m X Y
127 127
128 128 list bookmarks
129 129
130 130 $ hg bookmark
131 131 * X2 2:0316ce92851d
132 132 * Y 2:0316ce92851d
133 133 Z 0:f7b1eb17ad24
134 134
135 135 rename without new name
136 136
137 137 $ hg bookmark -m Y
138 138 abort: new bookmark name required
139 139 [255]
140 140
141 141 delete without name
142 142
143 143 $ hg bookmark -d
144 144 abort: bookmark name required
145 145 [255]
146 146
147 147 delete nonexistent bookmark
148 148
149 149 $ hg bookmark -d A
150 150 abort: a bookmark of this name does not exist
151 151 [255]
152 152
153 153 bookmark name with spaces should be stripped
154 154
155 155 $ hg bookmark ' x y '
156 156
157 157 list bookmarks
158 158
159 159 $ hg bookmarks
160 160 * X2 2:0316ce92851d
161 161 * Y 2:0316ce92851d
162 162 Z 0:f7b1eb17ad24
163 163 * x y 2:0316ce92851d
164 164
165 165 look up stripped bookmark name
166 166
167 167 $ hg log -r '"x y"'
168 168 changeset: 2:0316ce92851d
169 169 tag: X2
170 170 tag: Y
171 171 tag: tip
172 172 tag: x y
173 173 user: test
174 174 date: Thu Jan 01 00:00:00 1970 +0000
175 175 summary: 2
176 176
177 177
178 178 reject bookmark name with newline
179 179
180 180 $ hg bookmark '
181 181 > '
182 182 abort: bookmark name cannot contain newlines
183 183 [255]
184 184
185 185 bookmark with existing name
186 186
187 187 $ hg bookmark Z
188 188 abort: a bookmark of the same name already exists
189 189 [255]
190 190
191 191 force bookmark with existing name
192 192
193 193 $ hg bookmark -f Z
194 194
195 195 list bookmarks
196 196
197 197 $ hg bookmark
198 198 * X2 2:0316ce92851d
199 199 * Y 2:0316ce92851d
200 200 * Z 2:0316ce92851d
201 201 * x y 2:0316ce92851d
202 202
203 203 revision but no bookmark name
204 204
205 205 $ hg bookmark -r .
206 206 abort: bookmark name required
207 207 [255]
208 208
209 209 bookmark name with whitespace only
210 210
211 211 $ hg bookmark ' '
212 212 abort: bookmark names cannot consist entirely of whitespace
213 213 [255]
@@ -1,126 +1,126 b''
1 1 test branch selection options
2 2
3 3 $ hg init branch
4 4 $ cd branch
5 5 $ hg branch a
6 6 marked working directory as branch a
7 7 $ echo a > foo
8 8 $ hg ci -d '0 0' -Ama
9 9 adding foo
10 10 $ echo a2 > foo
11 11 $ hg ci -d '0 0' -ma2
12 12 $ hg up 0
13 13 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
14 14 $ hg branch c
15 15 marked working directory as branch c
16 16 $ echo c > foo
17 17 $ hg ci -d '0 0' -mc
18 18 $ hg tag -l z
19 19 $ cd ..
20 20 $ hg clone -r 0 branch branch2
21 21 adding changesets
22 22 adding manifests
23 23 adding file changes
24 24 added 1 changesets with 1 changes to 1 files
25 25 updating to branch a
26 26 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
27 27 $ cd branch2
28 28 $ hg up 0
29 29 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
30 30 $ hg branch b
31 31 marked working directory as branch b
32 32 $ echo b > foo
33 33 $ hg ci -d '0 0' -mb
34 34 $ hg up 0
35 35 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
36 36 $ hg --encoding utf-8 branch Γ¦
37 marked working directory as branch Γ¦
37 marked working directory as branch \xc3\xa6 (esc)
38 38 $ echo ae1 > foo
39 39 $ hg ci -d '0 0' -mae1
40 40 $ hg up 0
41 41 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
42 42 $ hg --encoding utf-8 branch -f Γ¦
43 marked working directory as branch Γ¦
43 marked working directory as branch \xc3\xa6 (esc)
44 44 $ echo ae2 > foo
45 45 $ hg ci -d '0 0' -mae2
46 46 created new head
47 47 $ hg up 0
48 48 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
49 49 $ hg branch -f b
50 50 marked working directory as branch b
51 51 $ echo b2 > foo
52 52 $ hg ci -d '0 0' -mb2
53 53 created new head
54 54
55 55 unknown branch and fallback
56 56
57 57 $ hg in -qbz
58 58 abort: unknown branch 'z'!
59 59 [255]
60 60 $ hg in -q ../branch#z
61 61 2:f25d57ab0566
62 62 $ hg out -qbz
63 63 abort: unknown branch 'z'!
64 64 [255]
65 65
66 66 in rev c branch a
67 67
68 68 $ hg in -qr c ../branch#a
69 69 1:dd6e60a716c6
70 70 2:f25d57ab0566
71 71 $ hg in -qr c -b a
72 72 1:dd6e60a716c6
73 73 2:f25d57ab0566
74 74
75 75 out branch .
76 76
77 77 $ hg out -q ../branch#.
78 78 1:b84708d77ab7
79 79 4:65511d0e2b55
80 80 $ hg out -q -b .
81 81 1:b84708d77ab7
82 82 4:65511d0e2b55
83 83
84 84 out branch . non-ascii
85 85
86 86 $ hg --encoding utf-8 up Γ¦
87 87 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
88 88 $ hg --encoding latin1 out -q ../branch#.
89 89 2:df5a44224d4e
90 90 3:4f4a5125ca10
91 91 $ hg --encoding latin1 out -q -b .
92 92 2:df5a44224d4e
93 93 3:4f4a5125ca10
94 94
95 95 clone branch b
96 96
97 97 $ cd ..
98 98 $ hg clone branch2#b branch3
99 99 adding changesets
100 100 adding manifests
101 101 adding file changes
102 102 added 3 changesets with 3 changes to 1 files (+1 heads)
103 103 updating to branch b
104 104 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
105 105 $ hg -q -R branch3 heads b
106 106 2:65511d0e2b55
107 107 1:b84708d77ab7
108 108 $ hg -q -R branch3 parents
109 109 2:65511d0e2b55
110 110 $ rm -rf branch3
111 111
112 112 clone rev a branch b
113 113
114 114 $ hg clone -r a branch2#b branch3
115 115 adding changesets
116 116 adding manifests
117 117 adding file changes
118 118 added 3 changesets with 3 changes to 1 files (+1 heads)
119 119 updating to branch a
120 120 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
121 121 $ hg -q -R branch3 heads b
122 122 2:65511d0e2b55
123 123 1:b84708d77ab7
124 124 $ hg -q -R branch3 parents
125 125 0:5b65ba7c951d
126 126 $ rm -rf branch3
@@ -1,398 +1,398 b''
1 1 $ hg init a
2 2 $ cd a
3 3 $ echo 'root' >root
4 4 $ hg add root
5 5 $ hg commit -d '0 0' -m "Adding root node"
6 6
7 7 $ echo 'a' >a
8 8 $ hg add a
9 9 $ hg branch a
10 10 marked working directory as branch a
11 11 $ hg commit -d '1 0' -m "Adding a branch"
12 12
13 13 $ hg branch q
14 14 marked working directory as branch q
15 15 $ echo 'aa' >a
16 16 $ hg branch -C
17 17 reset working directory to branch a
18 18 $ hg commit -d '2 0' -m "Adding to a branch"
19 19
20 20 $ hg update -C 0
21 21 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
22 22 $ echo 'b' >b
23 23 $ hg add b
24 24 $ hg branch b
25 25 marked working directory as branch b
26 26 $ hg commit -d '2 0' -m "Adding b branch"
27 27
28 28 $ echo 'bh1' >bh1
29 29 $ hg add bh1
30 30 $ hg commit -d '3 0' -m "Adding b branch head 1"
31 31
32 32 $ hg update -C 2
33 33 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
34 34 $ echo 'bh2' >bh2
35 35 $ hg add bh2
36 36 $ hg commit -d '4 0' -m "Adding b branch head 2"
37 37
38 38 $ echo 'c' >c
39 39 $ hg add c
40 40 $ hg branch c
41 41 marked working directory as branch c
42 42 $ hg commit -d '5 0' -m "Adding c branch"
43 43
44 44 $ hg branch tip
45 45 abort: the name 'tip' is reserved
46 46 [255]
47 47 $ hg branch null
48 48 abort: the name 'null' is reserved
49 49 [255]
50 50 $ hg branch .
51 51 abort: the name '.' is reserved
52 52 [255]
53 53
54 54 $ echo 'd' >d
55 55 $ hg add d
56 56 $ hg branch 'a branch name much longer than the default justification used by branches'
57 57 marked working directory as branch a branch name much longer than the default justification used by branches
58 58 $ hg commit -d '6 0' -m "Adding d branch"
59 59
60 60 $ hg branches
61 61 a branch name much longer than the default justification used by branches 7:10ff5895aa57
62 62 b 4:aee39cd168d0
63 63 c 6:589736a22561 (inactive)
64 64 a 5:d8cbc61dbaa6 (inactive)
65 65 default 0:19709c5a4e75 (inactive)
66 66
67 67 -------
68 68
69 69 $ hg branches -a
70 70 a branch name much longer than the default justification used by branches 7:10ff5895aa57
71 71 b 4:aee39cd168d0
72 72
73 73 --- Branch a
74 74
75 75 $ hg log -b a
76 76 changeset: 5:d8cbc61dbaa6
77 77 branch: a
78 78 parent: 2:881fe2b92ad0
79 79 user: test
80 80 date: Thu Jan 01 00:00:04 1970 +0000
81 81 summary: Adding b branch head 2
82 82
83 83 changeset: 2:881fe2b92ad0
84 84 branch: a
85 85 user: test
86 86 date: Thu Jan 01 00:00:02 1970 +0000
87 87 summary: Adding to a branch
88 88
89 89 changeset: 1:dd6b440dd85a
90 90 branch: a
91 91 user: test
92 92 date: Thu Jan 01 00:00:01 1970 +0000
93 93 summary: Adding a branch
94 94
95 95
96 96 ---- Branch b
97 97
98 98 $ hg log -b b
99 99 changeset: 4:aee39cd168d0
100 100 branch: b
101 101 user: test
102 102 date: Thu Jan 01 00:00:03 1970 +0000
103 103 summary: Adding b branch head 1
104 104
105 105 changeset: 3:ac22033332d1
106 106 branch: b
107 107 parent: 0:19709c5a4e75
108 108 user: test
109 109 date: Thu Jan 01 00:00:02 1970 +0000
110 110 summary: Adding b branch
111 111
112 112
113 113 ---- going to test branch closing
114 114
115 115 $ hg branches
116 116 a branch name much longer than the default justification used by branches 7:10ff5895aa57
117 117 b 4:aee39cd168d0
118 118 c 6:589736a22561 (inactive)
119 119 a 5:d8cbc61dbaa6 (inactive)
120 120 default 0:19709c5a4e75 (inactive)
121 121 $ hg up -C b
122 122 2 files updated, 0 files merged, 4 files removed, 0 files unresolved
123 123 $ echo 'xxx1' >> b
124 124 $ hg commit -d '7 0' -m 'adding cset to branch b'
125 125 $ hg up -C aee39cd168d0
126 126 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
127 127 $ echo 'xxx2' >> b
128 128 $ hg commit -d '8 0' -m 'adding head to branch b'
129 129 created new head
130 130 $ echo 'xxx3' >> b
131 131 $ hg commit -d '9 0' -m 'adding another cset to branch b'
132 132 $ hg branches
133 133 b 10:bfbe841b666e
134 134 a branch name much longer than the default justification used by branches 7:10ff5895aa57
135 135 c 6:589736a22561 (inactive)
136 136 a 5:d8cbc61dbaa6 (inactive)
137 137 default 0:19709c5a4e75 (inactive)
138 138 $ hg heads --closed
139 139 changeset: 10:bfbe841b666e
140 140 branch: b
141 141 tag: tip
142 142 user: test
143 143 date: Thu Jan 01 00:00:09 1970 +0000
144 144 summary: adding another cset to branch b
145 145
146 146 changeset: 8:eebb944467c9
147 147 branch: b
148 148 parent: 4:aee39cd168d0
149 149 user: test
150 150 date: Thu Jan 01 00:00:07 1970 +0000
151 151 summary: adding cset to branch b
152 152
153 153 changeset: 7:10ff5895aa57
154 154 branch: a branch name much longer than the default justification used by branches
155 155 user: test
156 156 date: Thu Jan 01 00:00:06 1970 +0000
157 157 summary: Adding d branch
158 158
159 159 changeset: 6:589736a22561
160 160 branch: c
161 161 user: test
162 162 date: Thu Jan 01 00:00:05 1970 +0000
163 163 summary: Adding c branch
164 164
165 165 changeset: 5:d8cbc61dbaa6
166 166 branch: a
167 167 parent: 2:881fe2b92ad0
168 168 user: test
169 169 date: Thu Jan 01 00:00:04 1970 +0000
170 170 summary: Adding b branch head 2
171 171
172 172 changeset: 0:19709c5a4e75
173 173 user: test
174 174 date: Thu Jan 01 00:00:00 1970 +0000
175 175 summary: Adding root node
176 176
177 177 $ hg heads
178 178 changeset: 10:bfbe841b666e
179 179 branch: b
180 180 tag: tip
181 181 user: test
182 182 date: Thu Jan 01 00:00:09 1970 +0000
183 183 summary: adding another cset to branch b
184 184
185 185 changeset: 8:eebb944467c9
186 186 branch: b
187 187 parent: 4:aee39cd168d0
188 188 user: test
189 189 date: Thu Jan 01 00:00:07 1970 +0000
190 190 summary: adding cset to branch b
191 191
192 192 changeset: 7:10ff5895aa57
193 193 branch: a branch name much longer than the default justification used by branches
194 194 user: test
195 195 date: Thu Jan 01 00:00:06 1970 +0000
196 196 summary: Adding d branch
197 197
198 198 changeset: 6:589736a22561
199 199 branch: c
200 200 user: test
201 201 date: Thu Jan 01 00:00:05 1970 +0000
202 202 summary: Adding c branch
203 203
204 204 changeset: 5:d8cbc61dbaa6
205 205 branch: a
206 206 parent: 2:881fe2b92ad0
207 207 user: test
208 208 date: Thu Jan 01 00:00:04 1970 +0000
209 209 summary: Adding b branch head 2
210 210
211 211 changeset: 0:19709c5a4e75
212 212 user: test
213 213 date: Thu Jan 01 00:00:00 1970 +0000
214 214 summary: Adding root node
215 215
216 216 $ hg commit -d '9 0' --close-branch -m 'prune bad branch'
217 217 $ hg branches -a
218 218 b 8:eebb944467c9
219 219 a branch name much longer than the default justification used by branches 7:10ff5895aa57
220 220 $ hg up -C b
221 221 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
222 222 $ hg commit -d '9 0' --close-branch -m 'close this part branch too'
223 223
224 224 --- b branch should be inactive
225 225
226 226 $ hg branches
227 227 a branch name much longer than the default justification used by branches 7:10ff5895aa57
228 228 c 6:589736a22561 (inactive)
229 229 a 5:d8cbc61dbaa6 (inactive)
230 230 default 0:19709c5a4e75 (inactive)
231 231 $ hg branches -c
232 232 a branch name much longer than the default justification used by branches 7:10ff5895aa57
233 233 b 12:2da6583810df (closed)
234 234 c 6:589736a22561 (inactive)
235 235 a 5:d8cbc61dbaa6 (inactive)
236 236 default 0:19709c5a4e75 (inactive)
237 237 $ hg branches -a
238 238 a branch name much longer than the default justification used by branches 7:10ff5895aa57
239 239 $ hg heads b
240 240 no open branch heads found on branches b
241 241 [1]
242 242 $ hg heads --closed b
243 243 changeset: 12:2da6583810df
244 244 branch: b
245 245 tag: tip
246 246 parent: 8:eebb944467c9
247 247 user: test
248 248 date: Thu Jan 01 00:00:09 1970 +0000
249 249 summary: close this part branch too
250 250
251 251 changeset: 11:c84627f3c15d
252 252 branch: b
253 253 user: test
254 254 date: Thu Jan 01 00:00:09 1970 +0000
255 255 summary: prune bad branch
256 256
257 257 $ echo 'xxx4' >> b
258 258 $ hg commit -d '9 0' -m 'reopen branch with a change'
259 259 reopening closed branch head 12
260 260
261 261 --- branch b is back in action
262 262
263 263 $ hg branches -a
264 264 b 13:6ac12926b8c3
265 265 a branch name much longer than the default justification used by branches 7:10ff5895aa57
266 266
267 267 ---- test heads listings
268 268
269 269 $ hg heads
270 270 changeset: 13:6ac12926b8c3
271 271 branch: b
272 272 tag: tip
273 273 user: test
274 274 date: Thu Jan 01 00:00:09 1970 +0000
275 275 summary: reopen branch with a change
276 276
277 277 changeset: 7:10ff5895aa57
278 278 branch: a branch name much longer than the default justification used by branches
279 279 user: test
280 280 date: Thu Jan 01 00:00:06 1970 +0000
281 281 summary: Adding d branch
282 282
283 283 changeset: 6:589736a22561
284 284 branch: c
285 285 user: test
286 286 date: Thu Jan 01 00:00:05 1970 +0000
287 287 summary: Adding c branch
288 288
289 289 changeset: 5:d8cbc61dbaa6
290 290 branch: a
291 291 parent: 2:881fe2b92ad0
292 292 user: test
293 293 date: Thu Jan 01 00:00:04 1970 +0000
294 294 summary: Adding b branch head 2
295 295
296 296 changeset: 0:19709c5a4e75
297 297 user: test
298 298 date: Thu Jan 01 00:00:00 1970 +0000
299 299 summary: Adding root node
300 300
301 301
302 302 branch default
303 303
304 304 $ hg heads default
305 305 changeset: 0:19709c5a4e75
306 306 user: test
307 307 date: Thu Jan 01 00:00:00 1970 +0000
308 308 summary: Adding root node
309 309
310 310
311 311 branch a
312 312
313 313 $ hg heads a
314 314 changeset: 5:d8cbc61dbaa6
315 315 branch: a
316 316 parent: 2:881fe2b92ad0
317 317 user: test
318 318 date: Thu Jan 01 00:00:04 1970 +0000
319 319 summary: Adding b branch head 2
320 320
321 321 $ hg heads --active a
322 322 no open branch heads found on branches a
323 323 [1]
324 324
325 325 branch b
326 326
327 327 $ hg heads b
328 328 changeset: 13:6ac12926b8c3
329 329 branch: b
330 330 tag: tip
331 331 user: test
332 332 date: Thu Jan 01 00:00:09 1970 +0000
333 333 summary: reopen branch with a change
334 334
335 335 $ hg heads --closed b
336 336 changeset: 13:6ac12926b8c3
337 337 branch: b
338 338 tag: tip
339 339 user: test
340 340 date: Thu Jan 01 00:00:09 1970 +0000
341 341 summary: reopen branch with a change
342 342
343 343 changeset: 11:c84627f3c15d
344 344 branch: b
345 345 user: test
346 346 date: Thu Jan 01 00:00:09 1970 +0000
347 347 summary: prune bad branch
348 348
349 349 default branch colors:
350 350
351 351 $ echo "[extensions]" >> $HGRCPATH
352 352 $ echo "color =" >> $HGRCPATH
353 353
354 354 $ hg up -C c
355 355 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
356 356 $ hg commit -d '9 0' --close-branch -m 'reclosing this branch'
357 357 $ hg up -C b
358 358 2 files updated, 0 files merged, 3 files removed, 0 files unresolved
359 359 $ hg branches --color=always
360 b  13:6ac12926b8c3
361 a branch name much longer than the default justification used by branches 7:10ff5895aa57
362 a  5:d8cbc61dbaa6 (inactive)
363 default  0:19709c5a4e75 (inactive)
360 \x1b[0;32mb\x1b[0m \x1b[0;33m 13:6ac12926b8c3\x1b[0m (esc)
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 \x1b[0;0ma\x1b[0m \x1b[0;33m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
363 \x1b[0;0mdefault\x1b[0m \x1b[0;33m 0:19709c5a4e75\x1b[0m (inactive) (esc)
364 364
365 365 default closed branch color:
366 366
367 367 $ hg branches --color=always --closed
368 b  13:6ac12926b8c3
369 a branch name much longer than the default justification used by branches 7:10ff5895aa57
370 c  14:717d2e6fabe1 (closed)
371 a  5:d8cbc61dbaa6 (inactive)
372 default  0:19709c5a4e75 (inactive)
368 \x1b[0;32mb\x1b[0m \x1b[0;33m 13:6ac12926b8c3\x1b[0m (esc)
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 \x1b[0;30;1mc\x1b[0m \x1b[0;33m 14:717d2e6fabe1\x1b[0m (closed) (esc)
371 \x1b[0;0ma\x1b[0m \x1b[0;33m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
372 \x1b[0;0mdefault\x1b[0m \x1b[0;33m 0:19709c5a4e75\x1b[0m (inactive) (esc)
373 373
374 374 $ echo "[extensions]" >> $HGRCPATH
375 375 $ echo "color =" >> $HGRCPATH
376 376 $ echo "[color]" >> $HGRCPATH
377 377 $ echo "branches.active = green" >> $HGRCPATH
378 378 $ echo "branches.closed = blue" >> $HGRCPATH
379 379 $ echo "branches.current = red" >> $HGRCPATH
380 380 $ echo "branches.inactive = magenta" >> $HGRCPATH
381 381 $ echo "log.changeset = cyan" >> $HGRCPATH
382 382
383 383 custom branch colors:
384 384
385 385 $ hg branches --color=always
386 b  13:6ac12926b8c3
387 a branch name much longer than the default justification used by branches 7:10ff5895aa57
388 a  5:d8cbc61dbaa6 (inactive)
389 default  0:19709c5a4e75 (inactive)
386 \x1b[0;31mb\x1b[0m \x1b[0;36m 13:6ac12926b8c3\x1b[0m (esc)
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 \x1b[0;35ma\x1b[0m \x1b[0;36m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
389 \x1b[0;35mdefault\x1b[0m \x1b[0;36m 0:19709c5a4e75\x1b[0m (inactive) (esc)
390 390
391 391 custom closed branch color:
392 392
393 393 $ hg branches --color=always --closed
394 b  13:6ac12926b8c3
395 a branch name much longer than the default justification used by branches 7:10ff5895aa57
396 c  14:717d2e6fabe1 (closed)
397 a  5:d8cbc61dbaa6 (inactive)
398 default  0:19709c5a4e75 (inactive)
394 \x1b[0;31mb\x1b[0m \x1b[0;36m 13:6ac12926b8c3\x1b[0m (esc)
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 \x1b[0;34mc\x1b[0m \x1b[0;36m 14:717d2e6fabe1\x1b[0m (closed) (esc)
397 \x1b[0;35ma\x1b[0m \x1b[0;36m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
398 \x1b[0;35mdefault\x1b[0m \x1b[0;36m 0:19709c5a4e75\x1b[0m (inactive) (esc)
@@ -1,141 +1,141 b''
1 1 $ echo "[extensions]" >> $HGRCPATH
2 2 $ echo "churn=" >> $HGRCPATH
3 3
4 4 create test repository
5 5
6 6 $ hg init repo
7 7 $ cd repo
8 8 $ echo a > a
9 9 $ hg ci -Am adda -u user1 -d 6:00
10 10 adding a
11 11 $ echo b >> a
12 12 $ echo b > b
13 13 $ hg ci -m changeba -u user2 -d 9:00 a
14 14 $ hg ci -Am addb -u user2 -d 9:30
15 15 adding b
16 16 $ echo c >> a
17 17 $ echo c >> b
18 18 $ echo c > c
19 19 $ hg ci -m changeca -u user3 -d 12:00 a
20 20 $ hg ci -m changecb -u user3 -d 12:15 b
21 21 $ hg ci -Am addc -u user3 -d 12:30
22 22 adding c
23 23 $ mkdir -p d/e
24 24 $ echo abc > d/e/f1.txt
25 25 $ hg ci -Am "add d/e/f1.txt" -u user1 -d 12:45 d/e/f1.txt
26 26 $ mkdir -p d/g
27 27 $ echo def > d/g/f2.txt
28 28 $ hg ci -Am "add d/g/f2.txt" -u user1 -d 13:00 d/g/f2.txt
29 29
30 30
31 31 churn separate directories
32 32
33 33 $ cd d
34 34 $ hg churn e
35 35 user1 1 ***************************************************************
36 36
37 37 churn all
38 38
39 39 $ hg churn
40 40 user3 3 ***************************************************************
41 41 user1 3 ***************************************************************
42 42 user2 2 ******************************************
43 43
44 44 churn excluding one dir
45 45
46 46 $ hg churn -X e
47 47 user3 3 ***************************************************************
48 48 user2 2 ******************************************
49 49 user1 2 ******************************************
50 50
51 51 churn up to rev 2
52 52
53 53 $ hg churn -r :2
54 54 user2 2 ***************************************************************
55 55 user1 1 ********************************
56 56 $ cd ..
57 57
58 58 churn with aliases
59 59
60 60 $ cat > ../aliases <<EOF
61 61 > user1 alias1
62 62 > user3 alias3
63 63 > not-an-alias
64 64 > EOF
65 65
66 66 churn with .hgchurn
67 67
68 68 $ mv ../aliases .hgchurn
69 69 $ hg churn
70 70 skipping malformed alias: not-an-alias
71 71 alias3 3 **************************************************************
72 72 alias1 3 **************************************************************
73 73 user2 2 *****************************************
74 74 $ rm .hgchurn
75 75
76 76 churn with column specifier
77 77
78 78 $ COLUMNS=40 hg churn
79 79 user3 3 ***********************
80 80 user1 3 ***********************
81 81 user2 2 ***************
82 82
83 83 churn by hour
84 84
85 85 $ hg churn -f '%H' -s
86 86 06 1 *****************
87 87 09 2 *********************************
88 88 12 4 ******************************************************************
89 89 13 1 *****************
90 90
91 91
92 92 churn with separated added/removed lines
93 93
94 94 $ hg rm d/g/f2.txt
95 95 $ hg ci -Am "removed d/g/f2.txt" -u user1 -d 14:00 d/g/f2.txt
96 96 $ hg churn --diffstat
97 97 user1 +3/-1 +++++++++++++++++++++++++++++++++++++++++--------------
98 98 user3 +3/-0 +++++++++++++++++++++++++++++++++++++++++
99 99 user2 +2/-0 +++++++++++++++++++++++++++
100 100
101 101 churn --diffstat with color
102 102
103 103 $ hg --config extensions.color= churn --config color.mode=ansi \
104 104 > --diffstat --color=always
105 user1 +3/-1 +++++++++++++++++++++++++++++++++++++++++--------------
106 user3 +3/-0 +++++++++++++++++++++++++++++++++++++++++
107 user2 +2/-0 +++++++++++++++++++++++++++
105 user1 +3/-1 \x1b[0;32m+++++++++++++++++++++++++++++++++++++++++\x1b[0m\x1b[0;31m--------------\x1b[0m (esc)
106 user3 +3/-0 \x1b[0;32m+++++++++++++++++++++++++++++++++++++++++\x1b[0m (esc)
107 user2 +2/-0 \x1b[0;32m+++++++++++++++++++++++++++\x1b[0m (esc)
108 108
109 109
110 110 changeset number churn
111 111
112 112 $ hg churn -c
113 113 user1 4 ***************************************************************
114 114 user3 3 ***********************************************
115 115 user2 2 ********************************
116 116
117 117 $ echo 'with space = no-space' >> ../aliases
118 118 $ echo a >> a
119 119 $ hg commit -m a -u 'with space' -d 15:00
120 120
121 121 churn with space in alias
122 122
123 123 $ hg churn --aliases ../aliases -r tip
124 124 no-space 1 ************************************************************
125 125
126 126 $ cd ..
127 127
128 128
129 129 Issue833: ZeroDivisionError
130 130
131 131 $ hg init issue-833
132 132 $ cd issue-833
133 133 $ touch foo
134 134 $ hg ci -Am foo
135 135 adding foo
136 136
137 137 this was failing with a ZeroDivisionError
138 138
139 139 $ hg churn
140 140 test 0
141 141 $ cd ..
@@ -1,144 +1,144 b''
1 1
2 2 $ "$TESTDIR/hghave" darcs || exit 80
3 3 $ echo "[extensions]" >> $HGRCPATH
4 4 $ echo "convert=" >> $HGRCPATH
5 5 $ echo 'graphlog =' >> $HGRCPATH
6 6 $ DARCS_EMAIL='test@example.org'; export DARCS_EMAIL
7 7 $ HOME=`pwd`/do_not_use_HOME_darcs; export HOME
8 8
9 9 skip if we can't import elementtree
10 10
11 11 $ mkdir dummy
12 12 $ mkdir dummy/_darcs
13 13 $ if hg convert dummy 2>&1 | grep ElementTree > /dev/null; then
14 14 > echo 'skipped: missing feature: elementtree module'
15 15 > exit 80
16 16 > fi
17 17
18 18 try converting darcs1 repository
19 19
20 20 $ hg clone -q "$TESTDIR/darcs1.hg" darcs
21 21 $ hg convert -s darcs darcs/darcs1 2>&1 | grep darcs-1.0
22 22 darcs-1.0 repository format is unsupported, please upgrade
23 23
24 24 initialize darcs repo
25 25
26 26 $ mkdir darcs-repo
27 27 $ cd darcs-repo
28 28 $ darcs init
29 29 $ echo a > a
30 30 $ darcs record -a -l -m p0
31 31 Finished recording patch 'p0'
32 32 $ cd ..
33 33
34 34 branch and update
35 35
36 36 $ darcs get darcs-repo darcs-clone >/dev/null
37 37 $ cd darcs-clone
38 38 $ echo c >> a
39 39 $ echo c > c
40 40 $ darcs record -a -l -m p1.1
41 41 Finished recording patch 'p1.1'
42 42 $ cd ..
43 43
44 44 update source
45 45
46 46 $ cd darcs-repo
47 47 $ echo b >> a
48 48 $ echo b > b
49 49 $ darcs record -a -l -m p1.2
50 50 Finished recording patch 'p1.2'
51 51
52 52 $ darcs pull -a ../darcs-clone
53 53 Backing up ./a(-darcs-backup0)
54 54 We have conflicts in the following files:
55 55 ./a
56 56 Finished pulling and applying.
57 57 $ sleep 1
58 58 $ echo e > a
59 59 $ echo f > f
60 60 $ mkdir dir
61 61 $ echo d > dir/d
62 62 $ echo d > dir/d2
63 63 $ darcs record -a -l -m p2
64 64 Finished recording patch 'p2'
65 65
66 66 test file and directory move
67 67
68 68 $ darcs mv f ff
69 69
70 70 Test remove + move
71 71
72 72 $ darcs remove dir/d2
73 73 $ rm dir/d2
74 74 $ darcs mv dir dir2
75 75 $ darcs record -a -l -m p3
76 76 Finished recording patch 'p3'
77 77
78 78 test utf-8 commit message and author
79 79
80 80 $ echo g > g
81 81
82 82 darcs is encoding agnostic, so it takes whatever bytes it's given
83 83
84 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 87 Test latin-1 commit message
88 88
89 89 $ echo h > h
90 90 $ printf "p5: desc " > ../p5
91 91 $ python -c 'print "".join([chr(i) for i in range(128, 256)])' >> ../p5
92 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 95 $ glog()
96 96 > {
97 97 > HGENCODING=utf-8 hg glog --template '{rev} "{desc|firstline}" ({author}) files: {files}\n' "$@"
98 98 > }
99 99 $ cd ..
100 100 $ hg convert darcs-repo darcs-repo-hg
101 101 initializing destination darcs-repo-hg repository
102 102 scanning source...
103 103 sorting...
104 104 converting...
105 105 6 p0
106 106 5 p1.2
107 107 4 p1.1
108 108 3 p2
109 109 2 p3
110 110 1 p4: desc ?
111 111 0 p5: desc ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
112 112
113 113 The converter does not currently handle patch conflicts very well.
114 114 When they occur, it reverts *all* changes and moves forward,
115 115 letting the conflict resolving patch fix collisions.
116 116 Unfortunately, non-conflicting changes, like the addition of the
117 117 "c" file in p1.1 patch are reverted too.
118 118 Just to say that manifest not listing "c" here is a bug.
119 119
120 120 $ HGENCODING=latin-1 glog -R darcs-repo-hg -r 6 | "$TESTDIR"/printrepr.py
121 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 123 $ HGENCODING=utf-8 glog -R darcs-repo-hg -r 0:5 | "$TESTDIR"/printrepr.py
124 124 o 5 "p4: desc \xc3\xb1" (author \xc3\xb1) files: g
125 125 |
126 126 o 4 "p3" (test@example.org) files: dir/d dir/d2 dir2/d f ff
127 127 |
128 128 o 3 "p2" (test@example.org) files: a dir/d dir/d2 f
129 129 |
130 130 o 2 "p1.1" (test@example.org) files:
131 131 |
132 132 o 1 "p1.2" (test@example.org) files: a b
133 133 |
134 134 o 0 "p0" (test@example.org) files: a
135 135
136 136
137 137 $ hg up -q -R darcs-repo-hg
138 138 $ hg -R darcs-repo-hg manifest --debug
139 139 7225b30cdf38257d5cc7780772c051b6f33e6d6b 644 a
140 140 1e88685f5ddec574a34c70af492f95b6debc8741 644 b
141 141 37406831adc447ec2385014019599dfec953c806 644 dir2/d
142 142 b783a337463792a5c7d548ad85a7d3253c16ba8c 644 ff
143 143 0973eb1b2ecc4de7fafe7447ce1b7462108b4848 644 g
144 144 fe6f8b4f507fe3eb524c527192a84920a4288dac 644 h
@@ -1,135 +1,135 b''
1 1
2 2 $ "$TESTDIR/hghave" svn svn-bindings || exit 80
3 3
4 4 $ cat > $HGRCPATH <<EOF
5 5 > [extensions]
6 6 > convert =
7 7 > graphlog =
8 8 > EOF
9 9
10 10 $ svnadmin create svn-repo
11 11 $ svnadmin load -q svn-repo < "$TESTDIR/svn/encoding.svndump"
12 12
13 13 Convert while testing all possible outputs
14 14
15 15 $ hg --debug convert svn-repo A-hg
16 16 initializing destination A-hg repository
17 17 reparent to file://*/svn-repo (glob)
18 18 run hg sink pre-conversion action
19 19 scanning source...
20 20 found trunk at 'trunk'
21 21 found tags at 'tags'
22 22 found branches at 'branches'
23 found branch branchΓ© at 5
24 found branch branchΓ©e at 6
23 found branch branch\xc3\xa9 at 5 (esc)
24 found branch branch\xc3\xa9e at 6 (esc)
25 25 scanning: 1 revisions
26 26 reparent to file://*/svn-repo/trunk (glob)
27 27 fetching revision log for "/trunk" from 4 to 0
28 28 parsing revision 4 (2 changes)
29 29 parsing revision 3 (4 changes)
30 30 parsing revision 2 (3 changes)
31 31 parsing revision 1 (3 changes)
32 32 no copyfrom path, don't know what to do.
33 33 '/branches' is not under '/trunk', ignoring
34 34 '/tags' is not under '/trunk', ignoring
35 35 scanning: 2 revisions
36 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 38 parsing revision 5 (1 changes)
39 39 reparent to file://*/svn-repo (glob)
40 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 42 scanning: 3 revisions
43 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 45 parsing revision 6 (1 changes)
46 46 reparent to file://*/svn-repo (glob)
47 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 49 scanning: 4 revisions
50 50 scanning: 5 revisions
51 51 scanning: 6 revisions
52 52 sorting...
53 53 converting...
54 54 5 init projA
55 55 source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@1
56 56 converting: 0/6 revisions (0.00%)
57 57 4 hello
58 58 source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@2
59 59 converting: 1/6 revisions (16.67%)
60 60 reparent to file://*/svn-repo/trunk (glob)
61 scanning paths: /trunk/Γ  0/3 (0.00%)
62 scanning paths: /trunk/à/é 1/3 (33.33%)
63 scanning paths: /trunk/Γ© 2/3 (66.67%)
64 à/é
65 getting files: à/é 1/2 (50.00%)
66 Γ©
67 getting files: Γ© 2/2 (100.00%)
61 scanning paths: /trunk/\xc3\xa0 0/3 (0.00%) (esc)
62 scanning paths: /trunk/\xc3\xa0/e\xcc\x81 1/3 (33.33%) (esc)
63 scanning paths: /trunk/\xc3\xa9 2/3 (66.67%) (esc)
64 \xc3\xa0/e\xcc\x81 (esc)
65 getting files: \xc3\xa0/e\xcc\x81 1/2 (50.00%) (esc)
66 \xc3\xa9 (esc)
67 getting files: \xc3\xa9 2/2 (100.00%) (esc)
68 68 3 copy files
69 69 source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@3
70 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 72 gone from -1
73 73 reparent to file://*/svn-repo (glob)
74 74 reparent to file://*/svn-repo/trunk (glob)
75 scanning paths: /trunk/Γ¨ 1/4 (25.00%)
76 copied to Γ¨ from Γ©@2
77 scanning paths: /trunk/Γ© 2/4 (50.00%)
75 scanning paths: /trunk/\xc3\xa8 1/4 (25.00%) (esc)
76 copied to \xc3\xa8 from \xc3\xa9@2 (esc)
77 scanning paths: /trunk/\xc3\xa9 2/4 (50.00%) (esc)
78 78 gone from -1
79 79 reparent to file://*/svn-repo (glob)
80 80 reparent to file://*/svn-repo/trunk (glob)
81 scanning paths: /trunk/ΓΉ 3/4 (75.00%)
82 mark /trunk/ΓΉ came from Γ :2
83 à/é
84 getting files: à/é 1/4 (25.00%)
85 Γ¨
86 getting files: Γ¨ 2/4 (50.00%)
87 Γ¨: copy Γ©:6b67ccefd5ce6de77e7ead4f5292843a0255329f
88 Γ©
89 getting files: Γ© 3/4 (75.00%)
90 ù/é
91 getting files: ù/é 4/4 (100.00%)
92 ù/é: copy à/é:a9092a3d84a37b9993b5c73576f6de29b7ea50f6
81 scanning paths: /trunk/\xc3\xb9 3/4 (75.00%) (esc)
82 mark /trunk/\xc3\xb9 came from \xc3\xa0:2 (esc)
83 \xc3\xa0/e\xcc\x81 (esc)
84 getting files: \xc3\xa0/e\xcc\x81 1/4 (25.00%) (esc)
85 \xc3\xa8 (esc)
86 getting files: \xc3\xa8 2/4 (50.00%) (esc)
87 \xc3\xa8: copy \xc3\xa9:6b67ccefd5ce6de77e7ead4f5292843a0255329f (esc)
88 \xc3\xa9 (esc)
89 getting files: \xc3\xa9 3/4 (75.00%) (esc)
90 \xc3\xb9/e\xcc\x81 (esc)
91 getting files: \xc3\xb9/e\xcc\x81 4/4 (100.00%) (esc)
92 \xc3\xb9/e\xcc\x81: copy \xc3\xa0/e\xcc\x81:a9092a3d84a37b9993b5c73576f6de29b7ea50f6 (esc)
93 93 2 remove files
94 94 source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@4
95 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 97 gone from -1
98 98 reparent to file://*/svn-repo (glob)
99 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 101 gone from -1
102 102 reparent to file://*/svn-repo (glob)
103 103 reparent to file://*/svn-repo/trunk (glob)
104 Γ¨
105 getting files: Γ¨ 1/2 (50.00%)
106 ù/é
107 getting files: ù/é 2/2 (100.00%)
104 \xc3\xa8 (esc)
105 getting files: \xc3\xa8 1/2 (50.00%) (esc)
106 \xc3\xb9/e\xcc\x81 (esc)
107 getting files: \xc3\xb9/e\xcc\x81 2/2 (100.00%) (esc)
108 108 1 branch to branch?
109 109 source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/branches/branch?@5
110 110 converting: 4/6 revisions (66.67%)
111 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 113 0 branch to branch?e
114 114 source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/branches/branch?e@6
115 115 converting: 5/6 revisions (83.33%)
116 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 118 reparent to file://*/svn-repo (glob)
119 119 reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
120 120 reparent to file://*/svn-repo (glob)
121 121 reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
122 122 updating tags
123 123 .hgtags
124 124 run hg sink post-conversion action
125 125 $ cd A-hg
126 126 $ hg up
127 127 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
128 128
129 129 Check tags are in UTF-8
130 130
131 131 $ python -c "print '\n'.join([('%r' % l) for l in file('.hgtags', 'rb').readlines()])"
132 132 '221c3fdaf24df5f14c0a64c597581e2eacfb47bb branch\xc3\xa9e\n'
133 133 '7a40952c2db29cf00d9e31df3749e98d8a4bdcbf branch\xc3\xa9\n'
134 134
135 135 $ cd ..
@@ -1,124 +1,124 b''
1 1 Setup
2 2
3 3 $ echo "[extensions]" >> $HGRCPATH
4 4 $ echo "color=" >> $HGRCPATH
5 5 $ hg init repo
6 6 $ cd repo
7 7 $ cat > a <<EOF
8 8 > c
9 9 > c
10 10 > a
11 11 > a
12 12 > b
13 13 > a
14 14 > a
15 15 > c
16 16 > c
17 17 > EOF
18 18 $ hg ci -Am adda
19 19 adding a
20 20 $ cat > a <<EOF
21 21 > c
22 22 > c
23 23 > a
24 24 > a
25 25 > dd
26 26 > a
27 27 > a
28 28 > c
29 29 > c
30 30 > EOF
31 31
32 32 default context
33 33
34 34 $ hg diff --nodates --color=always
35 diff -r cf9f4ba66af2 a
36 --- a/a
37 +++ b/a
38 @@ -2,7 +2,7 @@
35 \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc)
36 \x1b[0;31;1m--- a/a\x1b[0m (esc)
37 \x1b[0;32;1m+++ b/a\x1b[0m (esc)
38 \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc)
39 39 c
40 40 a
41 41 a
42 -b
43 +dd
42 \x1b[0;31m-b\x1b[0m (esc)
43 \x1b[0;32m+dd\x1b[0m (esc)
44 44 a
45 45 a
46 46 c
47 47
48 48 --unified=2
49 49
50 50 $ hg diff --nodates -U 2 --color=always
51 diff -r cf9f4ba66af2 a
52 --- a/a
53 +++ b/a
54 @@ -3,5 +3,5 @@
51 \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc)
52 \x1b[0;31;1m--- a/a\x1b[0m (esc)
53 \x1b[0;32;1m+++ b/a\x1b[0m (esc)
54 \x1b[0;35m@@ -3,5 +3,5 @@\x1b[0m (esc)
55 55 a
56 56 a
57 -b
58 +dd
57 \x1b[0;31m-b\x1b[0m (esc)
58 \x1b[0;32m+dd\x1b[0m (esc)
59 59 a
60 60 a
61 61
62 62 diffstat
63 63
64 64 $ hg diff --stat --color=always
65 a | 2 +-
65 a | 2 \x1b[0;32m+\x1b[0m\x1b[0;31m-\x1b[0m (esc)
66 66 1 files changed, 1 insertions(+), 1 deletions(-)
67 67 $ echo "record=" >> $HGRCPATH
68 68 $ echo "[ui]" >> $HGRCPATH
69 69 $ echo "interactive=true" >> $HGRCPATH
70 70 $ echo "[diff]" >> $HGRCPATH
71 71 $ echo "git=True" >> $HGRCPATH
72 72
73 73 record
74 74
75 75 $ chmod 0755 a
76 76 $ hg record --color=always -m moda a <<EOF
77 77 > y
78 78 > y
79 79 > EOF
80 diff --git a/a b/a
81 old mode 100644
82 new mode 100755
80 \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc)
81 \x1b[0;36;1mold mode 100644\x1b[0m (esc)
82 \x1b[0;36;1mnew mode 100755\x1b[0m (esc)
83 83 1 hunks, 1 lines changed
84 84 examine changes to 'a'? [Ynsfdaq?]
85 @@ -2,7 +2,7 @@
85 \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc)
86 86 c
87 87 a
88 88 a
89 -b
90 +dd
89 \x1b[0;31m-b\x1b[0m (esc)
90 \x1b[0;32m+dd\x1b[0m (esc)
91 91 a
92 92 a
93 93 c
94 94 record this change to 'a'? [Ynsfdaq?]
95 95 $ echo
96 96
97 97 $ echo "[extensions]" >> $HGRCPATH
98 98 $ echo "mq=" >> $HGRCPATH
99 99 $ hg rollback
100 100 rolling back to revision 0 (undo commit)
101 101
102 102 qrecord
103 103
104 104 $ hg qrecord --color=always -m moda patch <<EOF
105 105 > y
106 106 > y
107 107 > EOF
108 diff --git a/a b/a
109 old mode 100644
110 new mode 100755
108 \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc)
109 \x1b[0;36;1mold mode 100644\x1b[0m (esc)
110 \x1b[0;36;1mnew mode 100755\x1b[0m (esc)
111 111 1 hunks, 1 lines changed
112 112 examine changes to 'a'? [Ynsfdaq?]
113 @@ -2,7 +2,7 @@
113 \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc)
114 114 c
115 115 a
116 116 a
117 -b
118 +dd
117 \x1b[0;31m-b\x1b[0m (esc)
118 \x1b[0;32m+dd\x1b[0m (esc)
119 119 a
120 120 a
121 121 c
122 122 record this change to 'a'? [Ynsfdaq?]
123 123 $ echo
124 124
@@ -1,446 +1,444 b''
1 1 GNU diff is the reference for all of these results.
2 2
3 3 Prepare tests:
4 4
5 5 $ echo '[alias]' >> $HGRCPATH
6 6 $ echo 'ndiff = diff --nodates' >> $HGRCPATH
7 7
8 8 $ hg init
9 9 $ printf 'hello world\ngoodbye world\n' >foo
10 10 $ hg ci -Amfoo -ufoo
11 11 adding foo
12 12
13 13
14 14 Test added blank lines:
15 15
16 16 $ printf '\nhello world\n\ngoodbye world\n\n' >foo
17 17
18 18 >>> two diffs showing three added lines <<<
19 19
20 20 $ hg ndiff
21 21 diff -r 540c40a65b78 foo
22 22 --- a/foo
23 23 +++ b/foo
24 24 @@ -1,2 +1,5 @@
25 25 +
26 26 hello world
27 27 +
28 28 goodbye world
29 29 +
30 30 $ hg ndiff -b
31 31 diff -r 540c40a65b78 foo
32 32 --- a/foo
33 33 +++ b/foo
34 34 @@ -1,2 +1,5 @@
35 35 +
36 36 hello world
37 37 +
38 38 goodbye world
39 39 +
40 40
41 41 >>> no diffs <<<
42 42
43 43 $ hg ndiff -B
44 44 $ hg ndiff -Bb
45 45
46 46
47 47 Test added horizontal space first on a line():
48 48
49 49 $ printf '\t hello world\ngoodbye world\n' >foo
50 50
51 51 >>> four diffs showing added space first on the first line <<<
52 52
53 53 $ hg ndiff
54 54 diff -r 540c40a65b78 foo
55 55 --- a/foo
56 56 +++ b/foo
57 57 @@ -1,2 +1,2 @@
58 58 -hello world
59 59 + hello world
60 60 goodbye world
61 61
62 62 $ hg ndiff -b
63 63 diff -r 540c40a65b78 foo
64 64 --- a/foo
65 65 +++ b/foo
66 66 @@ -1,2 +1,2 @@
67 67 -hello world
68 68 + hello world
69 69 goodbye world
70 70
71 71 $ hg ndiff -B
72 72 diff -r 540c40a65b78 foo
73 73 --- a/foo
74 74 +++ b/foo
75 75 @@ -1,2 +1,2 @@
76 76 -hello world
77 77 + hello world
78 78 goodbye world
79 79
80 80 $ hg ndiff -Bb
81 81 diff -r 540c40a65b78 foo
82 82 --- a/foo
83 83 +++ b/foo
84 84 @@ -1,2 +1,2 @@
85 85 -hello world
86 86 + hello world
87 87 goodbye world
88 88
89 89
90 90 Test added horizontal space last on a line:
91 91
92 92 $ printf 'hello world\t \ngoodbye world\n' >foo
93 93
94 94 >>> two diffs showing space appended to the first line <<<
95 95
96 96 $ hg ndiff
97 97 diff -r 540c40a65b78 foo
98 98 --- a/foo
99 99 +++ b/foo
100 100 @@ -1,2 +1,2 @@
101 101 -hello world
102 102 +hello world
103 103 goodbye world
104 104
105 105 $ hg ndiff -B
106 106 diff -r 540c40a65b78 foo
107 107 --- a/foo
108 108 +++ b/foo
109 109 @@ -1,2 +1,2 @@
110 110 -hello world
111 111 +hello world
112 112 goodbye world
113 113
114 114 >>> no diffs <<<
115 115
116 116 $ hg ndiff -b
117 117 $ hg ndiff -Bb
118 118
119 119
120 120 Test added horizontal space in the middle of a word:
121 121
122 122 $ printf 'hello world\ngood bye world\n' >foo
123 123
124 124 >>> four diffs showing space inserted into "goodbye" <<<
125 125
126 126 $ hg ndiff
127 127 diff -r 540c40a65b78 foo
128 128 --- a/foo
129 129 +++ b/foo
130 130 @@ -1,2 +1,2 @@
131 131 hello world
132 132 -goodbye world
133 133 +good bye world
134 134
135 135 $ hg ndiff -B
136 136 diff -r 540c40a65b78 foo
137 137 --- a/foo
138 138 +++ b/foo
139 139 @@ -1,2 +1,2 @@
140 140 hello world
141 141 -goodbye world
142 142 +good bye world
143 143
144 144 $ hg ndiff -b
145 145 diff -r 540c40a65b78 foo
146 146 --- a/foo
147 147 +++ b/foo
148 148 @@ -1,2 +1,2 @@
149 149 hello world
150 150 -goodbye world
151 151 +good bye world
152 152
153 153 $ hg ndiff -Bb
154 154 diff -r 540c40a65b78 foo
155 155 --- a/foo
156 156 +++ b/foo
157 157 @@ -1,2 +1,2 @@
158 158 hello world
159 159 -goodbye world
160 160 +good bye world
161 161
162 162
163 163 Test increased horizontal whitespace amount:
164 164
165 165 $ printf 'hello world\ngoodbye\t\t \tworld\n' >foo
166 166
167 167 >>> two diffs showing changed whitespace amount in the last line <<<
168 168
169 169 $ hg ndiff
170 170 diff -r 540c40a65b78 foo
171 171 --- a/foo
172 172 +++ b/foo
173 173 @@ -1,2 +1,2 @@
174 174 hello world
175 175 -goodbye world
176 176 +goodbye world
177 177
178 178 $ hg ndiff -B
179 179 diff -r 540c40a65b78 foo
180 180 --- a/foo
181 181 +++ b/foo
182 182 @@ -1,2 +1,2 @@
183 183 hello world
184 184 -goodbye world
185 185 +goodbye world
186 186
187 187 >>> no diffs <<<
188 188
189 189 $ hg ndiff -b
190 190 $ hg ndiff -Bb
191 191
192 192
193 193 Test added blank line with horizontal whitespace:
194 194
195 195 $ printf 'hello world\n \t\ngoodbye world\n' >foo
196 196
197 197 >>> three diffs showing added blank line with horizontal space <<<
198 198
199 199 $ hg ndiff
200 200 diff -r 540c40a65b78 foo
201 201 --- a/foo
202 202 +++ b/foo
203 203 @@ -1,2 +1,3 @@
204 204 hello world
205 205 +
206 206 goodbye world
207 207
208 208 $ hg ndiff -B
209 209 diff -r 540c40a65b78 foo
210 210 --- a/foo
211 211 +++ b/foo
212 212 @@ -1,2 +1,3 @@
213 213 hello world
214 214 +
215 215 goodbye world
216 216
217 217 $ hg ndiff -b
218 218 diff -r 540c40a65b78 foo
219 219 --- a/foo
220 220 +++ b/foo
221 221 @@ -1,2 +1,3 @@
222 222 hello world
223 223 +
224 224 goodbye world
225 225
226 226 >>> no diffs <<<
227 227
228 228 $ hg ndiff -Bb
229 229
230 230
231 231 Test added blank line with other whitespace:
232 232
233 233 $ printf 'hello world\n \t\ngoodbye world \n' >foo
234 234
235 235 >>> three diffs showing added blank line with other space <<<
236 236
237 237 $ hg ndiff
238 238 diff -r 540c40a65b78 foo
239 239 --- a/foo
240 240 +++ b/foo
241 241 @@ -1,2 +1,3 @@
242 242 -hello world
243 243 -goodbye world
244 244 +hello world
245 245 +
246 246 +goodbye world
247 247
248 248 $ hg ndiff -B
249 249 diff -r 540c40a65b78 foo
250 250 --- a/foo
251 251 +++ b/foo
252 252 @@ -1,2 +1,3 @@
253 253 -hello world
254 254 -goodbye world
255 255 +hello world
256 256 +
257 257 +goodbye world
258 258
259 259 $ hg ndiff -b
260 260 diff -r 540c40a65b78 foo
261 261 --- a/foo
262 262 +++ b/foo
263 263 @@ -1,2 +1,3 @@
264 264 hello world
265 265 +
266 266 goodbye world
267 267
268 268 >>> no diffs <<<
269 269
270 270 $ hg ndiff -Bb
271 271
272 272
273 273 Test whitespace changes:
274 274
275 275 $ printf 'helloworld\ngoodbye\tworld \n' >foo
276 276
277 277 >>> four diffs showing changed whitespace <<<
278 278
279 279 $ hg ndiff
280 280 diff -r 540c40a65b78 foo
281 281 --- a/foo
282 282 +++ b/foo
283 283 @@ -1,2 +1,2 @@
284 284 -hello world
285 285 -goodbye world
286 286 +helloworld
287 287 +goodbye world
288 288
289 289 $ hg ndiff -B
290 290 diff -r 540c40a65b78 foo
291 291 --- a/foo
292 292 +++ b/foo
293 293 @@ -1,2 +1,2 @@
294 294 -hello world
295 295 -goodbye world
296 296 +helloworld
297 297 +goodbye world
298 298
299 299 $ hg ndiff -b
300 300 diff -r 540c40a65b78 foo
301 301 --- a/foo
302 302 +++ b/foo
303 303 @@ -1,2 +1,2 @@
304 304 -hello world
305 305 +helloworld
306 306 goodbye world
307 307
308 308 $ hg ndiff -Bb
309 309 diff -r 540c40a65b78 foo
310 310 --- a/foo
311 311 +++ b/foo
312 312 @@ -1,2 +1,2 @@
313 313 -hello world
314 314 +helloworld
315 315 goodbye world
316 316
317 317 >>> no diffs <<<
318 318
319 319 $ hg ndiff -w
320 320
321 321
322 322 Test whitespace changes and blank lines:
323 323
324 324 $ printf 'helloworld\n\n\n\ngoodbye\tworld \n' >foo
325 325
326 326 >>> five diffs showing changed whitespace <<<
327 327
328 328 $ hg ndiff
329 329 diff -r 540c40a65b78 foo
330 330 --- a/foo
331 331 +++ b/foo
332 332 @@ -1,2 +1,5 @@
333 333 -hello world
334 334 -goodbye world
335 335 +helloworld
336 336 +
337 337 +
338 338 +
339 339 +goodbye world
340 340
341 341 $ hg ndiff -B
342 342 diff -r 540c40a65b78 foo
343 343 --- a/foo
344 344 +++ b/foo
345 345 @@ -1,2 +1,5 @@
346 346 -hello world
347 347 -goodbye world
348 348 +helloworld
349 349 +
350 350 +
351 351 +
352 352 +goodbye world
353 353
354 354 $ hg ndiff -b
355 355 diff -r 540c40a65b78 foo
356 356 --- a/foo
357 357 +++ b/foo
358 358 @@ -1,2 +1,5 @@
359 359 -hello world
360 360 +helloworld
361 361 +
362 362 +
363 363 +
364 364 goodbye world
365 365
366 366 $ hg ndiff -Bb
367 367 diff -r 540c40a65b78 foo
368 368 --- a/foo
369 369 +++ b/foo
370 370 @@ -1,2 +1,5 @@
371 371 -hello world
372 372 +helloworld
373 373 +
374 374 +
375 375 +
376 376 goodbye world
377 377
378 378 $ hg ndiff -w
379 379 diff -r 540c40a65b78 foo
380 380 --- a/foo
381 381 +++ b/foo
382 382 @@ -1,2 +1,5 @@
383 383 hello world
384 384 +
385 385 +
386 386 +
387 387 goodbye world
388 388
389 389 >>> no diffs <<<
390 390
391 391 $ hg ndiff -wB
392 392
393 393
394 394 Test \r (carriage return) as used in "DOS" line endings:
395 395
396 396 $ printf 'hello world\r\n\r\ngoodbye\rworld\n' >foo
397 397
398 398 $ hg ndiff
399 399 diff -r 540c40a65b78 foo
400 400 --- a/foo
401 401 +++ b/foo
402 402 @@ -1,2 +1,3 @@
403 403 -hello world
404 404 -goodbye world
405 +hello world
406 +
407 +goodbye
408 world
405 +hello world\r (esc)
406 +\r (esc)
407 +goodbye\rworld (esc)
409 408 world
410 409
411 410 No completely blank lines to ignore:
412 411
413 412 $ hg ndiff --ignore-blank-lines
414 413 diff -r 540c40a65b78 foo
415 414 --- a/foo
416 415 +++ b/foo
417 416 @@ -1,2 +1,3 @@
418 417 -hello world
419 -goodbye world
420 +hello world
421 +
422 +goodbye
418 +hello world\r (esc)
419 +\r (esc)
420 +goodbye\rworld (esc)
423 421 world
424 422 world
425 423
426 424 Only new line noticed:
427 425
428 426 $ hg ndiff --ignore-space-change
429 427 diff -r 540c40a65b78 foo
430 428 --- a/foo
431 429 +++ b/foo
432 @@ -1,2 +1,3 @@
430 +\r (esc)
433 431 hello world
434 432 +
435 433 goodbye world
436 434
437 435 $ hg ndiff --ignore-all-space
438 436 diff -r 540c40a65b78 foo
439 437 --- a/foo
440 438 +++ b/foo
441 @@ -1,2 +1,3 @@
439 +\r (esc)
442 440 hello world
443 441 +
444 442 goodbye world
445 443
446 444 New line not noticed when space change ignored:
@@ -1,18 +1,18 b''
1 1 $ hg init
2 2
3 3 $ python -c 'print "confuse str.splitlines\nembedded\rnewline"' > a
4 4 $ hg ci -Ama -d '1 0'
5 5 adding a
6 6
7 7 $ echo clean diff >> a
8 8 $ hg ci -mb -d '2 0'
9 9
10 10 $ hg diff -r0 -r1
11 11 diff -r 107ba6f817b5 -r 310ce7989cdc a
12 12 --- a/a Thu Jan 01 00:00:01 1970 +0000
13 13 +++ b/a Thu Jan 01 00:00:02 1970 +0000
14 14 @@ -1,2 +1,3 @@
15 15 confuse str.splitlines
16 embedded
16 embedded\rnewline (esc)
17 17 newline
18 18 +clean diff
@@ -1,245 +1,245 b''
1 1 Test character encoding
2 2
3 3 $ hg init t
4 4 $ cd t
5 5
6 6 we need a repo with some legacy latin-1 changesets
7 7
8 8 $ hg unbundle $TESTDIR/legacy-encoding.hg
9 9 adding changesets
10 10 adding manifests
11 11 adding file changes
12 12 added 2 changesets with 2 changes to 1 files
13 13 (run 'hg update' to get a working copy)
14 14 $ hg co
15 15 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
16 16 $ python << EOF
17 17 > f = file('latin-1', 'w'); f.write("latin-1 e' encoded: \xe9"); f.close()
18 18 > f = file('utf-8', 'w'); f.write("utf-8 e' encoded: \xc3\xa9"); f.close()
19 19 > f = file('latin-1-tag', 'w'); f.write("\xe9"); f.close()
20 20 > EOF
21 21
22 22 should fail with encoding error
23 23
24 24 $ echo "plain old ascii" > a
25 25 $ hg st
26 26 M a
27 27 ? latin-1
28 28 ? latin-1-tag
29 29 ? utf-8
30 30 $ HGENCODING=ascii hg ci -l latin-1
31 31 transaction abort!
32 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 34 [255]
35 35
36 36 these should work
37 37
38 38 $ echo "latin-1" > a
39 39 $ HGENCODING=latin-1 hg ci -l latin-1
40 40 $ echo "utf-8" > a
41 41 $ HGENCODING=utf-8 hg ci -l utf-8
42 42 $ HGENCODING=latin-1 hg tag `cat latin-1-tag`
43 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 45 $ HGENCODING=latin-1 hg ci -m 'latin1 branch'
46 46 $ rm .hg/branch
47 47
48 48 hg log (ascii)
49 49
50 50 $ hg --encoding ascii log
51 51 changeset: 5:093c6077d1c8
52 52 branch: ?
53 53 tag: tip
54 54 user: test
55 55 date: Thu Jan 01 00:00:00 1970 +0000
56 56 summary: latin1 branch
57 57
58 58 changeset: 4:94db611b4196
59 59 user: test
60 60 date: Thu Jan 01 00:00:00 1970 +0000
61 61 summary: Added tag ? for changeset ca661e7520de
62 62
63 63 changeset: 3:ca661e7520de
64 64 tag: ?
65 65 user: test
66 66 date: Thu Jan 01 00:00:00 1970 +0000
67 67 summary: utf-8 e' encoded: ?
68 68
69 69 changeset: 2:650c6f3d55dd
70 70 user: test
71 71 date: Thu Jan 01 00:00:00 1970 +0000
72 72 summary: latin-1 e' encoded: ?
73 73
74 74 changeset: 1:0e5b7e3f9c4a
75 75 user: test
76 76 date: Mon Jan 12 13:46:40 1970 +0000
77 77 summary: koi8-r: ????? = u'\u0440\u0442\u0443\u0442\u044c'
78 78
79 79 changeset: 0:1e78a93102a3
80 80 user: test
81 81 date: Mon Jan 12 13:46:40 1970 +0000
82 82 summary: latin-1 e': ? = u'\xe9'
83 83
84 84
85 85 hg log (latin-1)
86 86
87 87 $ hg --encoding latin-1 log
88 88 changeset: 5:093c6077d1c8
89 branch: οΏ½
89 branch: \xe9 (esc)
90 90 tag: tip
91 91 user: test
92 92 date: Thu Jan 01 00:00:00 1970 +0000
93 93 summary: latin1 branch
94 94
95 95 changeset: 4:94db611b4196
96 96 user: test
97 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 100 changeset: 3:ca661e7520de
101 tag: οΏ½
101 tag: \xe9 (esc)
102 102 user: test
103 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 106 changeset: 2:650c6f3d55dd
107 107 user: test
108 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 111 changeset: 1:0e5b7e3f9c4a
112 112 user: test
113 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 116 changeset: 0:1e78a93102a3
117 117 user: test
118 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 122 hg log (utf-8)
123 123
124 124 $ hg --encoding utf-8 log
125 125 changeset: 5:093c6077d1c8
126 branch: Γ©
126 branch: \xc3\xa9 (esc)
127 127 tag: tip
128 128 user: test
129 129 date: Thu Jan 01 00:00:00 1970 +0000
130 130 summary: latin1 branch
131 131
132 132 changeset: 4:94db611b4196
133 133 user: test
134 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 137 changeset: 3:ca661e7520de
138 tag: Γ©
138 tag: \xc3\xa9 (esc)
139 139 user: test
140 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 143 changeset: 2:650c6f3d55dd
144 144 user: test
145 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 148 changeset: 1:0e5b7e3f9c4a
149 149 user: test
150 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 153 changeset: 0:1e78a93102a3
154 154 user: test
155 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 159 hg tags (ascii)
160 160
161 161 $ HGENCODING=ascii hg tags
162 162 tip 5:093c6077d1c8
163 163 ? 3:ca661e7520de
164 164
165 165 hg tags (latin-1)
166 166
167 167 $ HGENCODING=latin-1 hg tags
168 168 tip 5:093c6077d1c8
169 οΏ½ 3:ca661e7520de
169 \xe9 3:ca661e7520de (esc)
170 170
171 171 hg tags (utf-8)
172 172
173 173 $ HGENCODING=utf-8 hg tags
174 174 tip 5:093c6077d1c8
175 Γ© 3:ca661e7520de
175 \xc3\xa9 3:ca661e7520de (esc)
176 176
177 177 hg branches (ascii)
178 178
179 179 $ HGENCODING=ascii hg branches
180 180 ? 5:093c6077d1c8
181 181 default 4:94db611b4196 (inactive)
182 182
183 183 hg branches (latin-1)
184 184
185 185 $ HGENCODING=latin-1 hg branches
186 οΏ½ 5:093c6077d1c8
186 \xe9 5:093c6077d1c8 (esc)
187 187 default 4:94db611b4196 (inactive)
188 188
189 189 hg branches (utf-8)
190 190
191 191 $ HGENCODING=utf-8 hg branches
192 Γ© 5:093c6077d1c8
192 \xc3\xa9 5:093c6077d1c8 (esc)
193 193 default 4:94db611b4196 (inactive)
194 194 $ echo '[ui]' >> .hg/hgrc
195 195 $ echo 'fallbackencoding = koi8-r' >> .hg/hgrc
196 196
197 197 hg log (utf-8)
198 198
199 199 $ HGENCODING=utf-8 hg log
200 200 changeset: 5:093c6077d1c8
201 branch: Γ©
201 branch: \xc3\xa9 (esc)
202 202 tag: tip
203 203 user: test
204 204 date: Thu Jan 01 00:00:00 1970 +0000
205 205 summary: latin1 branch
206 206
207 207 changeset: 4:94db611b4196
208 208 user: test
209 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 212 changeset: 3:ca661e7520de
213 tag: Γ©
213 tag: \xc3\xa9 (esc)
214 214 user: test
215 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 218 changeset: 2:650c6f3d55dd
219 219 user: test
220 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 223 changeset: 1:0e5b7e3f9c4a
224 224 user: test
225 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 228 changeset: 0:1e78a93102a3
229 229 user: test
230 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 234 hg log (dolphin)
235 235
236 236 $ HGENCODING=dolphin hg log
237 237 abort: unknown encoding: dolphin, please check your locale settings
238 238 [255]
239 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 241 [255]
242 242 $ cp latin-1-tag .hg/branch
243 243 $ HGENCODING=latin-1 hg ci -m 'should fail'
244 244 abort: branch name not in UTF-8!
245 245 [255]
@@ -1,57 +1,57 b''
1 1 http://mercurial.selenic.com/bts/issue352
2 2
3 3 $ "$TESTDIR/hghave" eol-in-paths || exit 80
4 4
5 5 test issue352
6 6
7 7 $ hg init foo
8 8 $ cd foo
9 9 $ A=`printf 'he\rllo'`
10 10 $ echo foo > "$A"
11 11 $ hg add
12 adding he
12 adding he\rllo (esc)
13 13 llo
14 14 abort: '\n' and '\r' disallowed in filenames: 'he\rllo'
15 15 [255]
16 $ hg ci -A -m m
16 adding he\rllo (esc)
17 17 adding he
18 18 llo
19 19 abort: '\n' and '\r' disallowed in filenames: 'he\rllo'
20 20 [255]
21 21 $ rm "$A"
22 22 $ echo foo > "hell
23 23 > o"
24 24 $ hg add
25 25 adding hell
26 26 o
27 27 abort: '\n' and '\r' disallowed in filenames: 'hell\no'
28 28 [255]
29 29 $ hg ci -A -m m
30 30 adding hell
31 31 o
32 32 abort: '\n' and '\r' disallowed in filenames: 'hell\no'
33 33 [255]
34 $ echo foo > "$A"
34 f he\rllo he\rllo (esc)
35 35 $ hg debugwalk
36 36 f he
37 37 llo he
38 38 llo
39 39 f hell
40 40 o hell
41 41 o
42 42
43 43 http://mercurial.selenic.com/bts/issue2036
44 44
45 45 $ cd ..
46 46
47 47 test issue2039
48 48
49 49 $ hg init bar
50 50 $ cd bar
51 51 $ echo "[extensions]" >> $HGRCPATH
52 52 $ echo "color=" >> $HGRCPATH
53 53 $ A=`printf 'foo\nbar'`
54 $ B=`printf 'foo\nbar.baz'`
55 $ touch "$A"
56 $ touch "$B"
57 $ hg status --color=always
54 \x1b[0;35;1;4m? foo\x1b[0m (esc)
55 \x1b[0;35;1;4mbar\x1b[0m (esc)
56 \x1b[0;35;1;4m? foo\x1b[0m (esc)
57 \x1b[0;35;1;4mbar.baz\x1b[0m (esc)
@@ -1,168 +1,168 b''
1 1 $ mkdir t
2 2 $ cd t
3 3 $ hg init
4 4 $ echo import > port
5 5 $ hg add port
6 6 $ hg commit -m 0 -u spam -d '0 0'
7 7 $ echo export >> port
8 8 $ hg commit -m 1 -u eggs -d '1 0'
9 9 $ echo export > port
10 10 $ echo vaportight >> port
11 11 $ echo 'import/export' >> port
12 12 $ hg commit -m 2 -u spam -d '2 0'
13 13 $ echo 'import/export' >> port
14 14 $ hg commit -m 3 -u eggs -d '3 0'
15 15 $ head -n 3 port > port1
16 16 $ mv port1 port
17 17 $ hg commit -m 4 -u spam -d '4 0'
18 18
19 19 pattern error
20 20
21 21 $ hg grep '**test**'
22 22 grep: invalid match pattern: nothing to repeat
23 23 [1]
24 24
25 25 simple
26 26
27 27 $ hg grep port port
28 28 port:4:export
29 29 port:4:vaportight
30 30 port:4:import/export
31 31
32 32 simple with color
33 33
34 34 $ hg --config extensions.color= grep --config color.mode=ansi \
35 35 > --color=always port port
36 port:4:export
37 port:4:vaportight
38 port:4:import/export
36 port:4:ex\x1b[0;31;1mport\x1b[0m (esc)
37 port:4:va\x1b[0;31;1mport\x1b[0might (esc)
38 port:4:im\x1b[0;31;1mport\x1b[0m/export (esc)
39 39
40 40 all
41 41
42 42 $ hg grep --traceback --all -nu port port
43 43 port:4:4:-:spam:import/export
44 44 port:3:4:+:eggs:import/export
45 45 port:2:1:-:spam:import
46 46 port:2:2:-:spam:export
47 47 port:2:1:+:spam:export
48 48 port:2:2:+:spam:vaportight
49 49 port:2:3:+:spam:import/export
50 50 port:1:2:+:eggs:export
51 51 port:0:1:+:spam:import
52 52
53 53 other
54 54
55 55 $ hg grep import port
56 56 port:4:import/export
57 57
58 58 $ hg cp port port2
59 59 $ hg commit -m 4 -u spam -d '5 0'
60 60
61 61 follow
62 62
63 63 $ hg grep --traceback -f 'import$' port2
64 64 port:0:import
65 65 $ echo deport >> port2
66 66 $ hg commit -m 5 -u eggs -d '6 0'
67 67 $ hg grep -f --all -nu port port2
68 68 port2:6:4:+:eggs:deport
69 69 port:4:4:-:spam:import/export
70 70 port:3:4:+:eggs:import/export
71 71 port:2:1:-:spam:import
72 72 port:2:2:-:spam:export
73 73 port:2:1:+:spam:export
74 74 port:2:2:+:spam:vaportight
75 75 port:2:3:+:spam:import/export
76 76 port:1:2:+:eggs:export
77 77 port:0:1:+:spam:import
78 78
79 79 $ cd ..
80 80 $ hg init t2
81 81 $ cd t2
82 82 $ hg grep foobar foo
83 83 [1]
84 84 $ hg grep foobar
85 85 [1]
86 86 $ echo blue >> color
87 87 $ echo black >> color
88 88 $ hg add color
89 89 $ hg ci -m 0
90 90 $ echo orange >> color
91 91 $ hg ci -m 1
92 92 $ echo black > color
93 93 $ hg ci -m 2
94 94 $ echo orange >> color
95 95 $ echo blue >> color
96 96 $ hg ci -m 3
97 97 $ hg grep orange
98 98 color:3:orange
99 99 $ hg grep --all orange
100 100 color:3:+:orange
101 101 color:2:-:orange
102 102 color:1:+:orange
103 103
104 104
105 105 match in last "line" without newline
106 106
107 107 $ python -c 'fp = open("noeol", "wb"); fp.write("no infinite loop"); fp.close();'
108 108 $ hg ci -Amnoeol
109 109 adding noeol
110 110
111 111 last character omitted in output to avoid infinite loop
112 112
113 113 $ hg grep loop
114 114 noeol:4:no infinite loo
115 115
116 116
117 117 $ cd ..
118 118
119 119 Issue685: trackback in grep -r after rename
120 120
121 121 Got a traceback when using grep on a single
122 122 revision with renamed files.
123 123
124 124 $ hg init issue685
125 125 $ cd issue685
126 126 $ echo octarine > color
127 127 $ hg ci -Amcolor
128 128 adding color
129 129 $ hg rename color colour
130 130 $ hg ci -Am rename
131 131 $ hg grep octarine
132 132 colour:1:octarine
133 133 color:0:octarine
134 134
135 135 Used to crash here
136 136
137 137 $ hg grep -r 1 octarine
138 138 colour:1:octarine
139 139 $ cd ..
140 140
141 141
142 142 Issue337: test that grep follows parent-child relationships instead
143 143 of just using revision numbers.
144 144
145 145 $ hg init issue337
146 146 $ cd issue337
147 147
148 148 $ echo white > color
149 149 $ hg commit -A -m "0 white"
150 150 adding color
151 151
152 152 $ echo red > color
153 153 $ hg commit -A -m "1 red"
154 154
155 155 $ hg update 0
156 156 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
157 157 $ echo black > color
158 158 $ hg commit -A -m "2 black"
159 159 created new head
160 160
161 161 $ hg update --clean 1
162 162 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
163 163 $ echo blue > color
164 164 $ hg commit -A -m "3 blue"
165 165
166 166 $ hg grep --all red
167 167 color:3:-:red
168 168 color:1:+:red
@@ -1,92 +1,92 b''
1 1
2 2 $ hgserve() {
3 3 > hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -E errors.log -v $@
4 4 > cat hg.pid >> "$DAEMON_PIDS"
5 5 > }
6 6 $ hg init a
7 7 $ hg --encoding utf-8 -R a branch Γ¦
8 marked working directory as branch Γ¦
8 marked working directory as branch \xc3\xa6 (esc)
9 9 $ echo foo > a/foo
10 10 $ hg -R a ci -Am foo
11 11 adding foo
12 12 $ hgserve -R a --config web.push_ssl=False --config web.allow_push=* --encoding latin1
13 13 listening at http://*:$HGPORT1/ (bound to 127.0.0.1:$HGPORT1) (glob)
14 14 $ hg --encoding utf-8 clone http://localhost:$HGPORT1 b
15 15 requesting all changes
16 16 adding changesets
17 17 adding manifests
18 18 adding file changes
19 19 added 1 changesets with 1 changes to 1 files
20 updating to branch Γ¦
20 updating to branch \xc3\xa6 (esc)
21 21 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
22 22 $ hg --encoding utf-8 -R b log
23 23 changeset: 0:867c11ce77b8
24 branch: Γ¦
24 branch: \xc3\xa6 (esc)
25 25 tag: tip
26 26 user: test
27 27 date: Thu Jan 01 00:00:00 1970 +0000
28 28 summary: foo
29 29
30 30 $ echo bar >> b/foo
31 31 $ hg -R b ci -m bar
32 32 $ hg --encoding utf-8 -R b push
33 33 pushing to http://localhost:$HGPORT1
34 34 searching for changes
35 35 remote: adding changesets
36 36 remote: adding manifests
37 37 remote: adding file changes
38 38 remote: added 1 changesets with 1 changes to 1 files
39 39 $ hg -R a --encoding utf-8 log
40 40 changeset: 1:58e7c90d67cb
41 branch: Γ¦
41 branch: \xc3\xa6 (esc)
42 42 tag: tip
43 43 user: test
44 44 date: Thu Jan 01 00:00:00 1970 +0000
45 45 summary: bar
46 46
47 47 changeset: 0:867c11ce77b8
48 branch: Γ¦
48 branch: \xc3\xa6 (esc)
49 49 user: test
50 50 date: Thu Jan 01 00:00:00 1970 +0000
51 51 summary: foo
52 52
53 53 $ kill `cat hg.pid`
54 54
55 55 verify 7e7d56fe4833 (encoding fallback in branchmap to maintain compatibility with 1.3.x)
56 56
57 57 $ cat <<EOF > oldhg
58 58 > import sys
59 59 > from mercurial import ui, hg, commands
60 60 >
61 61 > class StdoutWrapper(object):
62 62 > def __init__(self, stdout):
63 63 > self._file = stdout
64 64 >
65 65 > def write(self, data):
66 66 > if data == '47\n':
67 67 > # latin1 encoding is one %xx (3 bytes) shorter
68 68 > data = '44\n'
69 69 > elif data.startswith('%C3%A6 '):
70 70 > # translate to latin1 encoding
71 71 > data = '%%E6 %s' % data[7:]
72 72 > self._file.write(data)
73 73 >
74 74 > def __getattr__(self, name):
75 75 > return getattr(self._file, name)
76 76 >
77 77 > sys.stdout = StdoutWrapper(sys.stdout)
78 78 > sys.stderr = StdoutWrapper(sys.stderr)
79 79 >
80 80 > myui = ui.ui()
81 81 > repo = hg.repository(myui, 'a')
82 82 > commands.serve(myui, repo, stdio=True)
83 83 > EOF
84 84 $ echo baz >> b/foo
85 85 $ hg -R b ci -m baz
86 86 $ hg push -R b -e 'python oldhg' ssh://dummy/ --encoding latin1
87 87 pushing to ssh://dummy/
88 88 searching for changes
89 89 remote: adding changesets
90 90 remote: adding manifests
91 91 remote: adding file changes
92 92 remote: added 1 changesets with 1 changes to 1 files
@@ -1,1094 +1,1094 b''
1 1 $ hg init a
2 2
3 3 $ cd a
4 4 $ echo a > a
5 5 $ hg ci -Ama -d '1 0'
6 6 adding a
7 7
8 8 $ hg cp a b
9 9 $ hg ci -mb -d '2 0'
10 10
11 11 $ mkdir dir
12 12 $ hg mv b dir
13 13 $ hg ci -mc -d '3 0'
14 14
15 15 $ hg mv a b
16 16 $ echo a > d
17 17 $ hg add d
18 18 $ hg ci -md -d '4 0'
19 19
20 20 $ hg mv dir/b e
21 21 $ hg ci -me -d '5 0'
22 22
23 23 $ hg log a
24 24 changeset: 0:8580ff50825a
25 25 user: test
26 26 date: Thu Jan 01 00:00:01 1970 +0000
27 27 summary: a
28 28
29 29
30 30 -f, directory
31 31
32 32 $ hg log -f dir
33 33 abort: cannot follow nonexistent file: "dir"
34 34 [255]
35 35
36 36 -f, but no args
37 37
38 38 $ hg log -f
39 39 changeset: 4:66c1345dc4f9
40 40 tag: tip
41 41 user: test
42 42 date: Thu Jan 01 00:00:05 1970 +0000
43 43 summary: e
44 44
45 45 changeset: 3:7c6c671bb7cc
46 46 user: test
47 47 date: Thu Jan 01 00:00:04 1970 +0000
48 48 summary: d
49 49
50 50 changeset: 2:41dd4284081e
51 51 user: test
52 52 date: Thu Jan 01 00:00:03 1970 +0000
53 53 summary: c
54 54
55 55 changeset: 1:784de7cef101
56 56 user: test
57 57 date: Thu Jan 01 00:00:02 1970 +0000
58 58 summary: b
59 59
60 60 changeset: 0:8580ff50825a
61 61 user: test
62 62 date: Thu Jan 01 00:00:01 1970 +0000
63 63 summary: a
64 64
65 65
66 66 one rename
67 67
68 68 $ hg log -vf a
69 69 changeset: 0:8580ff50825a
70 70 user: test
71 71 date: Thu Jan 01 00:00:01 1970 +0000
72 72 files: a
73 73 description:
74 74 a
75 75
76 76
77 77
78 78 many renames
79 79
80 80 $ hg log -vf e
81 81 changeset: 4:66c1345dc4f9
82 82 tag: tip
83 83 user: test
84 84 date: Thu Jan 01 00:00:05 1970 +0000
85 85 files: dir/b e
86 86 description:
87 87 e
88 88
89 89
90 90 changeset: 2:41dd4284081e
91 91 user: test
92 92 date: Thu Jan 01 00:00:03 1970 +0000
93 93 files: b dir/b
94 94 description:
95 95 c
96 96
97 97
98 98 changeset: 1:784de7cef101
99 99 user: test
100 100 date: Thu Jan 01 00:00:02 1970 +0000
101 101 files: b
102 102 description:
103 103 b
104 104
105 105
106 106 changeset: 0:8580ff50825a
107 107 user: test
108 108 date: Thu Jan 01 00:00:01 1970 +0000
109 109 files: a
110 110 description:
111 111 a
112 112
113 113
114 114
115 115
116 116 log -pf dir/b
117 117
118 118 $ hg log -pf dir/b
119 119 changeset: 2:41dd4284081e
120 120 user: test
121 121 date: Thu Jan 01 00:00:03 1970 +0000
122 122 summary: c
123 123
124 124 diff -r 784de7cef101 -r 41dd4284081e dir/b
125 125 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
126 126 +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000
127 127 @@ -0,0 +1,1 @@
128 128 +a
129 129
130 130 changeset: 1:784de7cef101
131 131 user: test
132 132 date: Thu Jan 01 00:00:02 1970 +0000
133 133 summary: b
134 134
135 135 diff -r 8580ff50825a -r 784de7cef101 b
136 136 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
137 137 +++ b/b Thu Jan 01 00:00:02 1970 +0000
138 138 @@ -0,0 +1,1 @@
139 139 +a
140 140
141 141 changeset: 0:8580ff50825a
142 142 user: test
143 143 date: Thu Jan 01 00:00:01 1970 +0000
144 144 summary: a
145 145
146 146 diff -r 000000000000 -r 8580ff50825a a
147 147 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
148 148 +++ b/a Thu Jan 01 00:00:01 1970 +0000
149 149 @@ -0,0 +1,1 @@
150 150 +a
151 151
152 152
153 153 log -vf dir/b
154 154
155 155 $ hg log -vf dir/b
156 156 changeset: 2:41dd4284081e
157 157 user: test
158 158 date: Thu Jan 01 00:00:03 1970 +0000
159 159 files: b dir/b
160 160 description:
161 161 c
162 162
163 163
164 164 changeset: 1:784de7cef101
165 165 user: test
166 166 date: Thu Jan 01 00:00:02 1970 +0000
167 167 files: b
168 168 description:
169 169 b
170 170
171 171
172 172 changeset: 0:8580ff50825a
173 173 user: test
174 174 date: Thu Jan 01 00:00:01 1970 +0000
175 175 files: a
176 176 description:
177 177 a
178 178
179 179
180 180
181 181
182 182 log copies with --copies
183 183
184 184 $ hg log -vC --template '{rev} {file_copies}\n'
185 185 4 e (dir/b)
186 186 3 b (a)
187 187 2 dir/b (b)
188 188 1 b (a)
189 189 0
190 190
191 191 log copies switch without --copies, with old filecopy template
192 192
193 193 $ hg log -v --template '{rev} {file_copies_switch%filecopy}\n'
194 194 4
195 195 3
196 196 2
197 197 1
198 198 0
199 199
200 200 log copies switch with --copies
201 201
202 202 $ hg log -vC --template '{rev} {file_copies_switch}\n'
203 203 4 e (dir/b)
204 204 3 b (a)
205 205 2 dir/b (b)
206 206 1 b (a)
207 207 0
208 208
209 209
210 210 log copies with hardcoded style and with --style=default
211 211
212 212 $ hg log -vC -r4
213 213 changeset: 4:66c1345dc4f9
214 214 tag: tip
215 215 user: test
216 216 date: Thu Jan 01 00:00:05 1970 +0000
217 217 files: dir/b e
218 218 copies: e (dir/b)
219 219 description:
220 220 e
221 221
222 222
223 223 $ hg log -vC -r4 --style=default
224 224 changeset: 4:66c1345dc4f9
225 225 tag: tip
226 226 user: test
227 227 date: Thu Jan 01 00:00:05 1970 +0000
228 228 files: dir/b e
229 229 copies: e (dir/b)
230 230 description:
231 231 e
232 232
233 233
234 234
235 235
236 236 log copies, non-linear manifest
237 237
238 238 $ hg up -C 3
239 239 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
240 240 $ hg mv dir/b e
241 241 $ echo foo > foo
242 242 $ hg ci -Ame2 -d '6 0'
243 243 adding foo
244 244 created new head
245 245 $ hg log -v --template '{rev} {file_copies}\n' -r 5
246 246 5 e (dir/b)
247 247
248 248
249 249 log copies, execute bit set
250 250
251 251 $ chmod +x e
252 252 $ hg ci -me3 -d '7 0'
253 253 $ hg log -v --template '{rev} {file_copies}\n' -r 6
254 254 6
255 255
256 256
257 257 log -p d
258 258
259 259 $ hg log -pv d
260 260 changeset: 3:7c6c671bb7cc
261 261 user: test
262 262 date: Thu Jan 01 00:00:04 1970 +0000
263 263 files: a b d
264 264 description:
265 265 d
266 266
267 267
268 268 diff -r 41dd4284081e -r 7c6c671bb7cc d
269 269 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
270 270 +++ b/d Thu Jan 01 00:00:04 1970 +0000
271 271 @@ -0,0 +1,1 @@
272 272 +a
273 273
274 274
275 275
276 276 log --removed file
277 277
278 278 $ hg log --removed -v a
279 279 changeset: 3:7c6c671bb7cc
280 280 user: test
281 281 date: Thu Jan 01 00:00:04 1970 +0000
282 282 files: a b d
283 283 description:
284 284 d
285 285
286 286
287 287 changeset: 0:8580ff50825a
288 288 user: test
289 289 date: Thu Jan 01 00:00:01 1970 +0000
290 290 files: a
291 291 description:
292 292 a
293 293
294 294
295 295
296 296 log --removed revrange file
297 297
298 298 $ hg log --removed -v -r0:2 a
299 299 changeset: 0:8580ff50825a
300 300 user: test
301 301 date: Thu Jan 01 00:00:01 1970 +0000
302 302 files: a
303 303 description:
304 304 a
305 305
306 306
307 307
308 308
309 309 log --follow tests
310 310
311 311 $ hg init ../follow
312 312 $ cd ../follow
313 313
314 314 $ echo base > base
315 315 $ hg ci -Ambase -d '1 0'
316 316 adding base
317 317
318 318 $ echo r1 >> base
319 319 $ hg ci -Amr1 -d '1 0'
320 320 $ echo r2 >> base
321 321 $ hg ci -Amr2 -d '1 0'
322 322
323 323 $ hg up -C 1
324 324 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
325 325 $ echo b1 > b1
326 326 $ hg ci -Amb1 -d '1 0'
327 327 adding b1
328 328 created new head
329 329
330 330
331 331 log -f
332 332
333 333 $ hg log -f
334 334 changeset: 3:e62f78d544b4
335 335 tag: tip
336 336 parent: 1:3d5bf5654eda
337 337 user: test
338 338 date: Thu Jan 01 00:00:01 1970 +0000
339 339 summary: b1
340 340
341 341 changeset: 1:3d5bf5654eda
342 342 user: test
343 343 date: Thu Jan 01 00:00:01 1970 +0000
344 344 summary: r1
345 345
346 346 changeset: 0:67e992f2c4f3
347 347 user: test
348 348 date: Thu Jan 01 00:00:01 1970 +0000
349 349 summary: base
350 350
351 351
352 352
353 353 log -f -r 1:tip
354 354
355 355 $ hg up -C 0
356 356 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
357 357 $ echo b2 > b2
358 358 $ hg ci -Amb2 -d '1 0'
359 359 adding b2
360 360 created new head
361 361 $ hg log -f -r 1:tip
362 362 changeset: 1:3d5bf5654eda
363 363 user: test
364 364 date: Thu Jan 01 00:00:01 1970 +0000
365 365 summary: r1
366 366
367 367 changeset: 2:60c670bf5b30
368 368 user: test
369 369 date: Thu Jan 01 00:00:01 1970 +0000
370 370 summary: r2
371 371
372 372 changeset: 3:e62f78d544b4
373 373 parent: 1:3d5bf5654eda
374 374 user: test
375 375 date: Thu Jan 01 00:00:01 1970 +0000
376 376 summary: b1
377 377
378 378
379 379
380 380 log -r . with two parents
381 381
382 382 $ hg up -C 3
383 383 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
384 384 $ hg merge tip
385 385 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
386 386 (branch merge, don't forget to commit)
387 387 $ hg log -r .
388 388 changeset: 3:e62f78d544b4
389 389 parent: 1:3d5bf5654eda
390 390 user: test
391 391 date: Thu Jan 01 00:00:01 1970 +0000
392 392 summary: b1
393 393
394 394
395 395
396 396 log -r . with one parent
397 397
398 398 $ hg ci -mm12 -d '1 0'
399 399 $ hg log -r .
400 400 changeset: 5:302e9dd6890d
401 401 tag: tip
402 402 parent: 3:e62f78d544b4
403 403 parent: 4:ddb82e70d1a1
404 404 user: test
405 405 date: Thu Jan 01 00:00:01 1970 +0000
406 406 summary: m12
407 407
408 408
409 409 $ echo postm >> b1
410 410 $ hg ci -Amb1.1 -d'1 0'
411 411
412 412
413 413 log --follow-first
414 414
415 415 $ hg log --follow-first
416 416 changeset: 6:2404bbcab562
417 417 tag: tip
418 418 user: test
419 419 date: Thu Jan 01 00:00:01 1970 +0000
420 420 summary: b1.1
421 421
422 422 changeset: 5:302e9dd6890d
423 423 parent: 3:e62f78d544b4
424 424 parent: 4:ddb82e70d1a1
425 425 user: test
426 426 date: Thu Jan 01 00:00:01 1970 +0000
427 427 summary: m12
428 428
429 429 changeset: 3:e62f78d544b4
430 430 parent: 1:3d5bf5654eda
431 431 user: test
432 432 date: Thu Jan 01 00:00:01 1970 +0000
433 433 summary: b1
434 434
435 435 changeset: 1:3d5bf5654eda
436 436 user: test
437 437 date: Thu Jan 01 00:00:01 1970 +0000
438 438 summary: r1
439 439
440 440 changeset: 0:67e992f2c4f3
441 441 user: test
442 442 date: Thu Jan 01 00:00:01 1970 +0000
443 443 summary: base
444 444
445 445
446 446
447 447 log -P 2
448 448
449 449 $ hg log -P 2
450 450 changeset: 6:2404bbcab562
451 451 tag: tip
452 452 user: test
453 453 date: Thu Jan 01 00:00:01 1970 +0000
454 454 summary: b1.1
455 455
456 456 changeset: 5:302e9dd6890d
457 457 parent: 3:e62f78d544b4
458 458 parent: 4:ddb82e70d1a1
459 459 user: test
460 460 date: Thu Jan 01 00:00:01 1970 +0000
461 461 summary: m12
462 462
463 463 changeset: 4:ddb82e70d1a1
464 464 parent: 0:67e992f2c4f3
465 465 user: test
466 466 date: Thu Jan 01 00:00:01 1970 +0000
467 467 summary: b2
468 468
469 469 changeset: 3:e62f78d544b4
470 470 parent: 1:3d5bf5654eda
471 471 user: test
472 472 date: Thu Jan 01 00:00:01 1970 +0000
473 473 summary: b1
474 474
475 475
476 476
477 477 log -r tip -p --git
478 478
479 479 $ hg log -r tip -p --git
480 480 changeset: 6:2404bbcab562
481 481 tag: tip
482 482 user: test
483 483 date: Thu Jan 01 00:00:01 1970 +0000
484 484 summary: b1.1
485 485
486 486 diff --git a/b1 b/b1
487 487 --- a/b1
488 488 +++ b/b1
489 489 @@ -1,1 +1,2 @@
490 490 b1
491 491 +postm
492 492
493 493
494 494
495 495 log -r ""
496 496
497 497 $ hg log -r ''
498 498 hg: parse error: empty query
499 499 [255]
500 500
501 501 log -r <some unknown node id>
502 502
503 503 $ hg log -r 1000000000000000000000000000000000000000
504 504 abort: unknown revision '1000000000000000000000000000000000000000'!
505 505 [255]
506 506
507 507 log -k r1
508 508
509 509 $ hg log -k r1
510 510 changeset: 1:3d5bf5654eda
511 511 user: test
512 512 date: Thu Jan 01 00:00:01 1970 +0000
513 513 summary: r1
514 514
515 515
516 516
517 517 log -d -1
518 518
519 519 $ hg log -d -1
520 520
521 521
522 522 log -p -l2 --color=always
523 523
524 524 $ hg --config extensions.color= --config color.mode=ansi \
525 525 > log -p -l2 --color=always
526 changeset: 6:2404bbcab562
526 \x1b[0;33mchangeset: 6:2404bbcab562\x1b[0m (esc)
527 527 tag: tip
528 528 user: test
529 529 date: Thu Jan 01 00:00:01 1970 +0000
530 530 summary: b1.1
531 531
532 diff -r 302e9dd6890d -r 2404bbcab562 b1
533 --- a/b1 Thu Jan 01 00:00:01 1970 +0000
534 +++ b/b1 Thu Jan 01 00:00:01 1970 +0000
535 @@ -1,1 +1,2 @@
532 \x1b[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1\x1b[0m (esc)
533 \x1b[0;31;1m--- a/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
534 \x1b[0;32;1m+++ b/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
535 \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc)
536 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 540 parent: 3:e62f78d544b4
541 541 parent: 4:ddb82e70d1a1
542 542 user: test
543 543 date: Thu Jan 01 00:00:01 1970 +0000
544 544 summary: m12
545 545
546 diff -r e62f78d544b4 -r 302e9dd6890d b2
547 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
548 +++ b/b2 Thu Jan 01 00:00:01 1970 +0000
549 @@ -0,0 +1,1 @@
550 +b2
546 \x1b[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2\x1b[0m (esc)
547 \x1b[0;31;1m--- /dev/null Thu Jan 01 00:00:00 1970 +0000\x1b[0m (esc)
548 \x1b[0;32;1m+++ b/b2 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
549 \x1b[0;35m@@ -0,0 +1,1 @@\x1b[0m (esc)
550 \x1b[0;32m+b2\x1b[0m (esc)
551 551
552 552
553 553
554 554 log -r tip --stat
555 555
556 556 $ hg log -r tip --stat
557 557 changeset: 6:2404bbcab562
558 558 tag: tip
559 559 user: test
560 560 date: Thu Jan 01 00:00:01 1970 +0000
561 561 summary: b1.1
562 562
563 563 b1 | 1 +
564 564 1 files changed, 1 insertions(+), 0 deletions(-)
565 565
566 566
567 567 $ cd ..
568 568
569 569 $ hg init usertest
570 570 $ cd usertest
571 571
572 572 $ echo a > a
573 573 $ hg ci -A -m "a" -u "User One <user1@example.org>"
574 574 adding a
575 575 $ echo b > b
576 576 $ hg ci -A -m "b" -u "User Two <user2@example.org>"
577 577 adding b
578 578
579 579 $ hg log -u "User One <user1@example.org>"
580 580 changeset: 0:29a4c94f1924
581 581 user: User One <user1@example.org>
582 582 date: Thu Jan 01 00:00:00 1970 +0000
583 583 summary: a
584 584
585 585 $ hg log -u "user1" -u "user2"
586 586 changeset: 1:e834b5e69c0e
587 587 tag: tip
588 588 user: User Two <user2@example.org>
589 589 date: Thu Jan 01 00:00:00 1970 +0000
590 590 summary: b
591 591
592 592 changeset: 0:29a4c94f1924
593 593 user: User One <user1@example.org>
594 594 date: Thu Jan 01 00:00:00 1970 +0000
595 595 summary: a
596 596
597 597 $ hg log -u "user3"
598 598
599 599 $ cd ..
600 600
601 601 $ hg init branches
602 602 $ cd branches
603 603
604 604 $ echo a > a
605 605 $ hg ci -A -m "commit on default"
606 606 adding a
607 607 $ hg branch test
608 608 marked working directory as branch test
609 609 $ echo b > b
610 610 $ hg ci -A -m "commit on test"
611 611 adding b
612 612
613 613 $ hg up default
614 614 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
615 615 $ echo c > c
616 616 $ hg ci -A -m "commit on default"
617 617 adding c
618 618 $ hg up test
619 619 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
620 620 $ echo c > c
621 621 $ hg ci -A -m "commit on test"
622 622 adding c
623 623
624 624
625 625 log -b default
626 626
627 627 $ hg log -b default
628 628 changeset: 2:c3a4f03cc9a7
629 629 parent: 0:24427303d56f
630 630 user: test
631 631 date: Thu Jan 01 00:00:00 1970 +0000
632 632 summary: commit on default
633 633
634 634 changeset: 0:24427303d56f
635 635 user: test
636 636 date: Thu Jan 01 00:00:00 1970 +0000
637 637 summary: commit on default
638 638
639 639
640 640
641 641 log -b test
642 642
643 643 $ hg log -b test
644 644 changeset: 3:f5d8de11c2e2
645 645 branch: test
646 646 tag: tip
647 647 parent: 1:d32277701ccb
648 648 user: test
649 649 date: Thu Jan 01 00:00:00 1970 +0000
650 650 summary: commit on test
651 651
652 652 changeset: 1:d32277701ccb
653 653 branch: test
654 654 user: test
655 655 date: Thu Jan 01 00:00:00 1970 +0000
656 656 summary: commit on test
657 657
658 658
659 659
660 660 log -b dummy
661 661
662 662 $ hg log -b dummy
663 663 abort: unknown revision 'dummy'!
664 664 [255]
665 665
666 666
667 667 log -b .
668 668
669 669 $ hg log -b .
670 670 changeset: 3:f5d8de11c2e2
671 671 branch: test
672 672 tag: tip
673 673 parent: 1:d32277701ccb
674 674 user: test
675 675 date: Thu Jan 01 00:00:00 1970 +0000
676 676 summary: commit on test
677 677
678 678 changeset: 1:d32277701ccb
679 679 branch: test
680 680 user: test
681 681 date: Thu Jan 01 00:00:00 1970 +0000
682 682 summary: commit on test
683 683
684 684
685 685
686 686 log -b default -b test
687 687
688 688 $ hg log -b default -b test
689 689 changeset: 3:f5d8de11c2e2
690 690 branch: test
691 691 tag: tip
692 692 parent: 1:d32277701ccb
693 693 user: test
694 694 date: Thu Jan 01 00:00:00 1970 +0000
695 695 summary: commit on test
696 696
697 697 changeset: 2:c3a4f03cc9a7
698 698 parent: 0:24427303d56f
699 699 user: test
700 700 date: Thu Jan 01 00:00:00 1970 +0000
701 701 summary: commit on default
702 702
703 703 changeset: 1:d32277701ccb
704 704 branch: test
705 705 user: test
706 706 date: Thu Jan 01 00:00:00 1970 +0000
707 707 summary: commit on test
708 708
709 709 changeset: 0:24427303d56f
710 710 user: test
711 711 date: Thu Jan 01 00:00:00 1970 +0000
712 712 summary: commit on default
713 713
714 714
715 715
716 716 log -b default -b .
717 717
718 718 $ hg log -b default -b .
719 719 changeset: 3:f5d8de11c2e2
720 720 branch: test
721 721 tag: tip
722 722 parent: 1:d32277701ccb
723 723 user: test
724 724 date: Thu Jan 01 00:00:00 1970 +0000
725 725 summary: commit on test
726 726
727 727 changeset: 2:c3a4f03cc9a7
728 728 parent: 0:24427303d56f
729 729 user: test
730 730 date: Thu Jan 01 00:00:00 1970 +0000
731 731 summary: commit on default
732 732
733 733 changeset: 1:d32277701ccb
734 734 branch: test
735 735 user: test
736 736 date: Thu Jan 01 00:00:00 1970 +0000
737 737 summary: commit on test
738 738
739 739 changeset: 0:24427303d56f
740 740 user: test
741 741 date: Thu Jan 01 00:00:00 1970 +0000
742 742 summary: commit on default
743 743
744 744
745 745
746 746 log -b . -b test
747 747
748 748 $ hg log -b . -b test
749 749 changeset: 3:f5d8de11c2e2
750 750 branch: test
751 751 tag: tip
752 752 parent: 1:d32277701ccb
753 753 user: test
754 754 date: Thu Jan 01 00:00:00 1970 +0000
755 755 summary: commit on test
756 756
757 757 changeset: 1:d32277701ccb
758 758 branch: test
759 759 user: test
760 760 date: Thu Jan 01 00:00:00 1970 +0000
761 761 summary: commit on test
762 762
763 763
764 764
765 765 log -b 2
766 766
767 767 $ hg log -b 2
768 768 changeset: 2:c3a4f03cc9a7
769 769 parent: 0:24427303d56f
770 770 user: test
771 771 date: Thu Jan 01 00:00:00 1970 +0000
772 772 summary: commit on default
773 773
774 774 changeset: 0:24427303d56f
775 775 user: test
776 776 date: Thu Jan 01 00:00:00 1970 +0000
777 777 summary: commit on default
778 778
779 779
780 780
781 781 log -p --cwd dir (in subdir)
782 782
783 783 $ mkdir dir
784 784 $ hg log -p --cwd dir
785 785 changeset: 3:f5d8de11c2e2
786 786 branch: test
787 787 tag: tip
788 788 parent: 1:d32277701ccb
789 789 user: test
790 790 date: Thu Jan 01 00:00:00 1970 +0000
791 791 summary: commit on test
792 792
793 793 diff -r d32277701ccb -r f5d8de11c2e2 c
794 794 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
795 795 +++ b/c Thu Jan 01 00:00:00 1970 +0000
796 796 @@ -0,0 +1,1 @@
797 797 +c
798 798
799 799 changeset: 2:c3a4f03cc9a7
800 800 parent: 0:24427303d56f
801 801 user: test
802 802 date: Thu Jan 01 00:00:00 1970 +0000
803 803 summary: commit on default
804 804
805 805 diff -r 24427303d56f -r c3a4f03cc9a7 c
806 806 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
807 807 +++ b/c Thu Jan 01 00:00:00 1970 +0000
808 808 @@ -0,0 +1,1 @@
809 809 +c
810 810
811 811 changeset: 1:d32277701ccb
812 812 branch: test
813 813 user: test
814 814 date: Thu Jan 01 00:00:00 1970 +0000
815 815 summary: commit on test
816 816
817 817 diff -r 24427303d56f -r d32277701ccb b
818 818 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
819 819 +++ b/b Thu Jan 01 00:00:00 1970 +0000
820 820 @@ -0,0 +1,1 @@
821 821 +b
822 822
823 823 changeset: 0:24427303d56f
824 824 user: test
825 825 date: Thu Jan 01 00:00:00 1970 +0000
826 826 summary: commit on default
827 827
828 828 diff -r 000000000000 -r 24427303d56f a
829 829 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
830 830 +++ b/a Thu Jan 01 00:00:00 1970 +0000
831 831 @@ -0,0 +1,1 @@
832 832 +a
833 833
834 834
835 835
836 836 log -p -R repo
837 837
838 838 $ cd dir
839 839 $ hg log -p -R .. ../a
840 840 changeset: 0:24427303d56f
841 841 user: test
842 842 date: Thu Jan 01 00:00:00 1970 +0000
843 843 summary: commit on default
844 844
845 845 diff -r 000000000000 -r 24427303d56f a
846 846 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
847 847 +++ b/a Thu Jan 01 00:00:00 1970 +0000
848 848 @@ -0,0 +1,1 @@
849 849 +a
850 850
851 851
852 852
853 853 $ cd ..
854 854 $ hg init follow2
855 855 $ cd follow2
856 856
857 857
858 858 # Build the following history:
859 859 # tip - o - x - o - x - x
860 860 # \ /
861 861 # o - o - o - x
862 862 # \ /
863 863 # o
864 864 #
865 865 # Where "o" is a revision containing "foo" and
866 866 # "x" is a revision without "foo"
867 867
868 868 $ touch init
869 869 $ hg ci -A -m "init, unrelated"
870 870 adding init
871 871 $ echo 'foo' > init
872 872 $ hg ci -m "change, unrelated"
873 873 $ echo 'foo' > foo
874 874 $ hg ci -A -m "add unrelated old foo"
875 875 adding foo
876 876 $ hg rm foo
877 877 $ hg ci -m "delete foo, unrelated"
878 878 $ echo 'related' > foo
879 879 $ hg ci -A -m "add foo, related"
880 880 adding foo
881 881
882 882 $ hg up 0
883 883 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
884 884 $ touch branch
885 885 $ hg ci -A -m "first branch, unrelated"
886 886 adding branch
887 887 created new head
888 888 $ touch foo
889 889 $ hg ci -A -m "create foo, related"
890 890 adding foo
891 891 $ echo 'change' > foo
892 892 $ hg ci -m "change foo, related"
893 893
894 894 $ hg up 6
895 895 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
896 896 $ echo 'change foo in branch' > foo
897 897 $ hg ci -m "change foo in branch, related"
898 898 created new head
899 899 $ hg merge 7
900 900 merging foo
901 901 warning: conflicts during merge.
902 902 merging foo failed!
903 903 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
904 904 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
905 905 [1]
906 906 $ echo 'merge 1' > foo
907 907 $ hg resolve -m foo
908 908 $ hg ci -m "First merge, related"
909 909
910 910 $ hg merge 4
911 911 merging foo
912 912 warning: conflicts during merge.
913 913 merging foo failed!
914 914 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
915 915 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
916 916 [1]
917 917 $ echo 'merge 2' > foo
918 918 $ hg resolve -m foo
919 919 $ hg ci -m "Last merge, related"
920 920
921 921 $ hg --config "extensions.graphlog=" glog
922 922 @ changeset: 10:4dae8563d2c5
923 923 |\ tag: tip
924 924 | | parent: 9:7b35701b003e
925 925 | | parent: 4:88176d361b69
926 926 | | user: test
927 927 | | date: Thu Jan 01 00:00:00 1970 +0000
928 928 | | summary: Last merge, related
929 929 | |
930 930 | o changeset: 9:7b35701b003e
931 931 | |\ parent: 8:e5416ad8a855
932 932 | | | parent: 7:87fe3144dcfa
933 933 | | | user: test
934 934 | | | date: Thu Jan 01 00:00:00 1970 +0000
935 935 | | | summary: First merge, related
936 936 | | |
937 937 | | o changeset: 8:e5416ad8a855
938 938 | | | parent: 6:dc6c325fe5ee
939 939 | | | user: test
940 940 | | | date: Thu Jan 01 00:00:00 1970 +0000
941 941 | | | summary: change foo in branch, related
942 942 | | |
943 943 | o | changeset: 7:87fe3144dcfa
944 944 | |/ user: test
945 945 | | date: Thu Jan 01 00:00:00 1970 +0000
946 946 | | summary: change foo, related
947 947 | |
948 948 | o changeset: 6:dc6c325fe5ee
949 949 | | user: test
950 950 | | date: Thu Jan 01 00:00:00 1970 +0000
951 951 | | summary: create foo, related
952 952 | |
953 953 | o changeset: 5:73db34516eb9
954 954 | | parent: 0:e87515fd044a
955 955 | | user: test
956 956 | | date: Thu Jan 01 00:00:00 1970 +0000
957 957 | | summary: first branch, unrelated
958 958 | |
959 959 o | changeset: 4:88176d361b69
960 960 | | user: test
961 961 | | date: Thu Jan 01 00:00:00 1970 +0000
962 962 | | summary: add foo, related
963 963 | |
964 964 o | changeset: 3:dd78ae4afb56
965 965 | | user: test
966 966 | | date: Thu Jan 01 00:00:00 1970 +0000
967 967 | | summary: delete foo, unrelated
968 968 | |
969 969 o | changeset: 2:c4c64aedf0f7
970 970 | | user: test
971 971 | | date: Thu Jan 01 00:00:00 1970 +0000
972 972 | | summary: add unrelated old foo
973 973 | |
974 974 o | changeset: 1:e5faa7440653
975 975 |/ user: test
976 976 | date: Thu Jan 01 00:00:00 1970 +0000
977 977 | summary: change, unrelated
978 978 |
979 979 o changeset: 0:e87515fd044a
980 980 user: test
981 981 date: Thu Jan 01 00:00:00 1970 +0000
982 982 summary: init, unrelated
983 983
984 984
985 985 $ hg --traceback log -f foo
986 986 changeset: 10:4dae8563d2c5
987 987 tag: tip
988 988 parent: 9:7b35701b003e
989 989 parent: 4:88176d361b69
990 990 user: test
991 991 date: Thu Jan 01 00:00:00 1970 +0000
992 992 summary: Last merge, related
993 993
994 994 changeset: 9:7b35701b003e
995 995 parent: 8:e5416ad8a855
996 996 parent: 7:87fe3144dcfa
997 997 user: test
998 998 date: Thu Jan 01 00:00:00 1970 +0000
999 999 summary: First merge, related
1000 1000
1001 1001 changeset: 8:e5416ad8a855
1002 1002 parent: 6:dc6c325fe5ee
1003 1003 user: test
1004 1004 date: Thu Jan 01 00:00:00 1970 +0000
1005 1005 summary: change foo in branch, related
1006 1006
1007 1007 changeset: 7:87fe3144dcfa
1008 1008 user: test
1009 1009 date: Thu Jan 01 00:00:00 1970 +0000
1010 1010 summary: change foo, related
1011 1011
1012 1012 changeset: 6:dc6c325fe5ee
1013 1013 user: test
1014 1014 date: Thu Jan 01 00:00:00 1970 +0000
1015 1015 summary: create foo, related
1016 1016
1017 1017 changeset: 4:88176d361b69
1018 1018 user: test
1019 1019 date: Thu Jan 01 00:00:00 1970 +0000
1020 1020 summary: add foo, related
1021 1021
1022 1022
1023 1023 Issue2383: hg log showing _less_ differences than hg diff
1024 1024
1025 1025 $ hg init issue2383
1026 1026 $ cd issue2383
1027 1027
1028 1028 Create a test repo:
1029 1029
1030 1030 $ echo a > a
1031 1031 $ hg ci -Am0
1032 1032 adding a
1033 1033 $ echo b > b
1034 1034 $ hg ci -Am1
1035 1035 adding b
1036 1036 $ hg co 0
1037 1037 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1038 1038 $ echo b > a
1039 1039 $ hg ci -m2
1040 1040 created new head
1041 1041
1042 1042 Merge:
1043 1043
1044 1044 $ hg merge
1045 1045 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1046 1046 (branch merge, don't forget to commit)
1047 1047
1048 1048 Make sure there's a file listed in the merge to trigger the bug:
1049 1049
1050 1050 $ echo c > a
1051 1051 $ hg ci -m3
1052 1052
1053 1053 Two files shown here in diff:
1054 1054
1055 1055 $ hg diff --rev 2:3
1056 1056 diff -r b09be438c43a -r 8e07aafe1edc a
1057 1057 --- a/a Thu Jan 01 00:00:00 1970 +0000
1058 1058 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1059 1059 @@ -1,1 +1,1 @@
1060 1060 -b
1061 1061 +c
1062 1062 diff -r b09be438c43a -r 8e07aafe1edc b
1063 1063 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1064 1064 +++ b/b Thu Jan 01 00:00:00 1970 +0000
1065 1065 @@ -0,0 +1,1 @@
1066 1066 +b
1067 1067
1068 1068 Diff here should be the same:
1069 1069
1070 1070 $ hg log -vpr 3
1071 1071 changeset: 3:8e07aafe1edc
1072 1072 tag: tip
1073 1073 parent: 2:b09be438c43a
1074 1074 parent: 1:925d80f479bb
1075 1075 user: test
1076 1076 date: Thu Jan 01 00:00:00 1970 +0000
1077 1077 files: a
1078 1078 description:
1079 1079 3
1080 1080
1081 1081
1082 1082 diff -r b09be438c43a -r 8e07aafe1edc a
1083 1083 --- a/a Thu Jan 01 00:00:00 1970 +0000
1084 1084 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1085 1085 @@ -1,1 +1,1 @@
1086 1086 -b
1087 1087 +c
1088 1088 diff -r b09be438c43a -r 8e07aafe1edc b
1089 1089 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1090 1090 +++ b/b Thu Jan 01 00:00:00 1970 +0000
1091 1091 @@ -0,0 +1,1 @@
1092 1092 +b
1093 1093
1094 1094 $ cd ..
@@ -1,436 +1,436 b''
1 1 $ echo "[extensions]" >> $HGRCPATH
2 2 $ echo "mq=" >> $HGRCPATH
3 3
4 4 $ hg init
5 5 $ hg qinit
6 6
7 7 $ echo x > x
8 8 $ hg ci -Ama
9 9 adding x
10 10
11 11 $ hg qnew a.patch
12 12 $ echo a > a
13 13 $ hg add a
14 14 $ hg qrefresh
15 15
16 16 $ hg qnew b.patch
17 17 $ echo b > b
18 18 $ hg add b
19 19 $ hg qrefresh
20 20
21 21 $ hg qnew c.patch
22 22 $ echo c > c
23 23 $ hg add c
24 24 $ hg qrefresh
25 25
26 26 $ hg qpop -a
27 27 popping c.patch
28 28 popping b.patch
29 29 popping a.patch
30 30 patch queue now empty
31 31
32 32
33 33 should fail
34 34
35 35 $ hg qguard does-not-exist.patch +bleh
36 36 abort: no patch named does-not-exist.patch
37 37 [255]
38 38
39 39
40 40 should fail
41 41
42 42 $ hg qguard +fail
43 43 abort: no patches applied
44 44 [255]
45 45
46 46 $ hg qpush
47 47 applying a.patch
48 48 now at: a.patch
49 49
50 50 should guard a.patch
51 51
52 52 $ hg qguard +a
53 53
54 54 should print +a
55 55
56 56 $ hg qguard
57 57 a.patch: +a
58 58 $ hg qpop
59 59 popping a.patch
60 60 patch queue now empty
61 61
62 62
63 63 should fail
64 64
65 65 $ hg qpush a.patch
66 66 cannot push 'a.patch' - guarded by ['+a']
67 67 [1]
68 68
69 69 $ hg qguard a.patch
70 70 a.patch: +a
71 71
72 72 should push b.patch
73 73
74 74 $ hg qpush
75 75 applying b.patch
76 76 now at: b.patch
77 77
78 78 $ hg qpop
79 79 popping b.patch
80 80 patch queue now empty
81 81
82 82 test selection of an empty guard
83 83
84 84 $ hg qselect ""
85 85 abort: guard cannot be an empty string
86 86 [255]
87 87 $ hg qselect a
88 88 number of unguarded, unapplied patches has changed from 2 to 3
89 89
90 90 should push a.patch
91 91
92 92 $ hg qpush
93 93 applying a.patch
94 94 now at: a.patch
95 95
96 96 $ hg qguard -- c.patch -a
97 97
98 98 should print -a
99 99
100 100 $ hg qguard c.patch
101 101 c.patch: -a
102 102
103 103
104 104 should skip c.patch
105 105
106 106 $ hg qpush -a
107 107 applying b.patch
108 108 skipping c.patch - guarded by '-a'
109 109 now at: b.patch
110 110
111 111 should display b.patch
112 112
113 113 $ hg qtop
114 114 b.patch
115 115
116 116 $ hg qguard -n c.patch
117 117
118 118 should push c.patch
119 119
120 120 $ hg qpush -a
121 121 applying c.patch
122 122 now at: c.patch
123 123
124 124 $ hg qpop -a
125 125 popping c.patch
126 126 popping b.patch
127 127 popping a.patch
128 128 patch queue now empty
129 129 $ hg qselect -n
130 130 guards deactivated
131 131 number of unguarded, unapplied patches has changed from 3 to 2
132 132
133 133 should push all
134 134
135 135 $ hg qpush -a
136 136 applying b.patch
137 137 applying c.patch
138 138 now at: c.patch
139 139
140 140 $ hg qpop -a
141 141 popping c.patch
142 142 popping b.patch
143 143 patch queue now empty
144 144 $ hg qguard a.patch +1
145 145 $ hg qguard b.patch +2
146 146 $ hg qselect 1
147 147 number of unguarded, unapplied patches has changed from 1 to 2
148 148
149 149 should push a.patch, not b.patch
150 150
151 151 $ hg qpush
152 152 applying a.patch
153 153 now at: a.patch
154 154 $ hg qpush
155 155 applying c.patch
156 156 now at: c.patch
157 157 $ hg qpop -a
158 158 popping c.patch
159 159 popping a.patch
160 160 patch queue now empty
161 161
162 162 $ hg qselect 2
163 163
164 164 should push b.patch
165 165
166 166 $ hg qpush
167 167 applying b.patch
168 168 now at: b.patch
169 169 $ hg qpush -a
170 170 applying c.patch
171 171 now at: c.patch
172 172
173 173 Used to be an issue with holes in the patch sequence
174 174 So, put one hole on the base and ask for topmost patch.
175 175
176 176 $ hg qtop
177 177 c.patch
178 178 $ hg qpop -a
179 179 popping c.patch
180 180 popping b.patch
181 181 patch queue now empty
182 182
183 183 $ hg qselect 1 2
184 184 number of unguarded, unapplied patches has changed from 2 to 3
185 185
186 186 should push a.patch, b.patch
187 187
188 188 $ hg qpush
189 189 applying a.patch
190 190 now at: a.patch
191 191 $ hg qpush
192 192 applying b.patch
193 193 now at: b.patch
194 194 $ hg qpop -a
195 195 popping b.patch
196 196 popping a.patch
197 197 patch queue now empty
198 198
199 199 $ hg qguard -- a.patch +1 +2 -3
200 200 $ hg qselect 1 2 3
201 201 number of unguarded, unapplied patches has changed from 3 to 2
202 202
203 203
204 204 list patches and guards
205 205
206 206 $ hg qguard -l
207 207 a.patch: +1 +2 -3
208 208 b.patch: +2
209 209 c.patch: unguarded
210 210
211 211 have at least one patch applied to test coloring
212 212
213 213 $ hg qpush
214 214 applying b.patch
215 215 now at: b.patch
216 216
217 217 list patches and guards with color
218 218
219 219 $ hg --config extensions.color= qguard --config color.mode=ansi \
220 220 > -l --color=always
221 a.patch: +1 +2 -3
222 b.patch: +2
223 c.patch: unguarded
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 \x1b[0;34;1;4mb.patch\x1b[0m: \x1b[0;33m+2\x1b[0m (esc)
223 \x1b[0;30;1mc.patch\x1b[0m: \x1b[0;32munguarded\x1b[0m (esc)
224 224
225 225 should pop b.patch
226 226
227 227 $ hg qpop
228 228 popping b.patch
229 229 patch queue now empty
230 230
231 231 list series
232 232
233 233 $ hg qseries -v
234 234 0 G a.patch
235 235 1 U b.patch
236 236 2 U c.patch
237 237
238 238 list guards
239 239
240 240 $ hg qselect
241 241 1
242 242 2
243 243 3
244 244
245 245 should push b.patch
246 246
247 247 $ hg qpush
248 248 applying b.patch
249 249 now at: b.patch
250 250
251 251 $ hg qpush -a
252 252 applying c.patch
253 253 now at: c.patch
254 254 $ hg qselect -n --reapply
255 255 guards deactivated
256 256 popping guarded patches
257 257 popping c.patch
258 258 popping b.patch
259 259 patch queue now empty
260 260 reapplying unguarded patches
261 261 applying c.patch
262 262 now at: c.patch
263 263
264 264 guards in series file: +1 +2 -3
265 265
266 266 $ hg qselect -s
267 267 +1
268 268 +2
269 269 -3
270 270
271 271 should show c.patch
272 272
273 273 $ hg qapplied
274 274 c.patch
275 275
276 276 $ hg qrename a.patch new.patch
277 277
278 278 should show :
279 279
280 280
281 281 new.patch: +1 +2 -3
282 282
283 283
284 284 b.patch: +2
285 285
286 286
287 287 c.patch: unguarded
288 288
289 289 $ hg qguard -l
290 290 new.patch: +1 +2 -3
291 291 b.patch: +2
292 292 c.patch: unguarded
293 293
294 294 $ hg qnew d.patch
295 295 $ hg qpop
296 296 popping d.patch
297 297 now at: c.patch
298 298
299 299 should show new.patch and b.patch as Guarded, c.patch as Applied
300 300
301 301
302 302 and d.patch as Unapplied
303 303
304 304 $ hg qseries -v
305 305 0 G new.patch
306 306 1 G b.patch
307 307 2 A c.patch
308 308 3 U d.patch
309 309
310 310 qseries again, but with color
311 311
312 312 $ hg --config extensions.color= qseries -v --color=always
313 0 G new.patch
314 1 G b.patch
315 2 A c.patch
316 3 U d.patch
313 0 G \x1b[0;30;1mnew.patch\x1b[0m (esc)
314 1 G \x1b[0;30;1mb.patch\x1b[0m (esc)
315 2 A \x1b[0;34;1;4mc.patch\x1b[0m (esc)
316 3 U \x1b[0;30;1md.patch\x1b[0m (esc)
317 317
318 318 $ hg qguard d.patch +2
319 319
320 320 new.patch, b.patch: Guarded. c.patch: Applied. d.patch: Guarded.
321 321
322 322 $ hg qseries -v
323 323 0 G new.patch
324 324 1 G b.patch
325 325 2 A c.patch
326 326 3 G d.patch
327 327
328 328 $ qappunappv()
329 329 > {
330 330 > for command in qapplied "qapplied -v" qunapplied "qunapplied -v"; do
331 331 > echo % hg $command
332 332 > hg $command
333 333 > done
334 334 > }
335 335
336 336 $ hg qpop -a
337 337 popping c.patch
338 338 patch queue now empty
339 339 $ hg qguard -l
340 340 new.patch: +1 +2 -3
341 341 b.patch: +2
342 342 c.patch: unguarded
343 343 d.patch: +2
344 344 $ qappunappv
345 345 % hg qapplied
346 346 % hg qapplied -v
347 347 % hg qunapplied
348 348 c.patch
349 349 % hg qunapplied -v
350 350 0 G new.patch
351 351 1 G b.patch
352 352 2 U c.patch
353 353 3 G d.patch
354 354 $ hg qselect 1
355 355 number of unguarded, unapplied patches has changed from 1 to 2
356 356 $ qappunappv
357 357 % hg qapplied
358 358 % hg qapplied -v
359 359 % hg qunapplied
360 360 new.patch
361 361 c.patch
362 362 % hg qunapplied -v
363 363 0 U new.patch
364 364 1 G b.patch
365 365 2 U c.patch
366 366 3 G d.patch
367 367 $ hg qpush -a
368 368 applying new.patch
369 369 skipping b.patch - guarded by ['+2']
370 370 applying c.patch
371 371 skipping d.patch - guarded by ['+2']
372 372 now at: c.patch
373 373 $ qappunappv
374 374 % hg qapplied
375 375 new.patch
376 376 c.patch
377 377 % hg qapplied -v
378 378 0 A new.patch
379 379 1 G b.patch
380 380 2 A c.patch
381 381 % hg qunapplied
382 382 % hg qunapplied -v
383 383 3 G d.patch
384 384 $ hg qselect 2
385 385 number of unguarded, unapplied patches has changed from 0 to 1
386 386 number of guarded, applied patches has changed from 1 to 0
387 387 $ qappunappv
388 388 % hg qapplied
389 389 new.patch
390 390 c.patch
391 391 % hg qapplied -v
392 392 0 A new.patch
393 393 1 U b.patch
394 394 2 A c.patch
395 395 % hg qunapplied
396 396 d.patch
397 397 % hg qunapplied -v
398 398 3 U d.patch
399 399
400 400 $ for patch in `hg qseries`; do
401 401 > echo % hg qapplied $patch
402 402 > hg qapplied $patch
403 403 > echo % hg qunapplied $patch
404 404 > hg qunapplied $patch
405 405 > done
406 406 % hg qapplied new.patch
407 407 new.patch
408 408 % hg qunapplied new.patch
409 409 b.patch
410 410 d.patch
411 411 % hg qapplied b.patch
412 412 new.patch
413 413 % hg qunapplied b.patch
414 414 d.patch
415 415 % hg qapplied c.patch
416 416 new.patch
417 417 c.patch
418 418 % hg qunapplied c.patch
419 419 d.patch
420 420 % hg qapplied d.patch
421 421 new.patch
422 422 c.patch
423 423 % hg qunapplied d.patch
424 424
425 425
426 426 hg qseries -m: only b.patch should be shown
427 427 the guards file was not ignored in the past
428 428
429 429 $ hg qdelete -k b.patch
430 430 $ hg qseries -m
431 431 b.patch
432 432
433 433 hg qseries -m with color
434 434
435 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 1 Test that qpush cleans things up if it doesn't complete
2 2
3 3 $ echo "[extensions]" >> $HGRCPATH
4 4 $ echo "mq=" >> $HGRCPATH
5 5 $ hg init repo
6 6 $ cd repo
7 7 $ echo foo > foo
8 8 $ hg ci -Am 'add foo'
9 9 adding foo
10 10 $ touch untracked-file
11 11 $ echo 'syntax: glob' > .hgignore
12 12 $ echo '.hgignore' >> .hgignore
13 13 $ hg qinit
14 14
15 15 test qpush on empty series
16 16
17 17 $ hg qpush
18 18 no patches in series
19 19 $ hg qnew patch1
20 20 $ echo >> foo
21 21 $ hg qrefresh -m 'patch 1'
22 22 $ hg qnew patch2
23 23 $ echo bar > bar
24 24 $ hg add bar
25 25 $ hg qrefresh -m 'patch 2'
26 26 $ hg qnew --config 'mq.plain=true' bad-patch
27 27 $ echo >> foo
28 28 $ hg qrefresh
29 29 $ hg qpop -a
30 30 popping bad-patch
31 31 popping patch2
32 32 popping patch1
33 33 patch queue now empty
34 34 $ python -c 'print "\xe9"' > message
35 35 $ cat .hg/patches/bad-patch >> message
36 36 $ mv message .hg/patches/bad-patch
37 37 $ hg qpush -a && echo 'qpush succeded?!'
38 38 applying patch1
39 39 applying patch2
40 40 applying bad-patch
41 41 transaction abort!
42 42 rollback completed
43 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 45 [255]
46 46 $ hg parents
47 47 changeset: 0:bbd179dfa0a7
48 48 tag: tip
49 49 user: test
50 50 date: Thu Jan 01 00:00:00 1970 +0000
51 51 summary: add foo
52 52
53 53
54 54 bar should be gone; other unknown/ignored files should still be around
55 55
56 56 $ hg status -A
57 57 ? untracked-file
58 58 I .hgignore
59 59 C foo
60 60
61 61 preparing qpush of a missing patch
62 62
63 63 $ hg qpop -a
64 64 no patches applied
65 65 $ hg qpush
66 66 applying patch1
67 67 now at: patch1
68 68 $ rm .hg/patches/patch2
69 69
70 70 now we expect the push to fail, but it should NOT complain about patch1
71 71
72 72 $ hg qpush
73 73 applying patch2
74 74 unable to read patch2
75 75 now at: patch1
76 76 [1]
77 77
78 78 preparing qpush of missing patch with no patch applied
79 79
80 80 $ hg qpop -a
81 81 popping patch1
82 82 patch queue now empty
83 83 $ rm .hg/patches/patch1
84 84
85 85 qpush should fail the same way as below
86 86
87 87 $ hg qpush
88 88 applying patch1
89 89 unable to read patch1
90 90 [1]
@@ -1,1368 +1,1368 b''
1 1 $ checkundo()
2 2 > {
3 3 > if [ -f .hg/store/undo ]; then
4 4 > echo ".hg/store/undo still exists after $1"
5 5 > fi
6 6 > }
7 7
8 8 $ echo "[extensions]" >> $HGRCPATH
9 9 $ echo "mq=" >> $HGRCPATH
10 10
11 11 $ echo "[mq]" >> $HGRCPATH
12 12 $ echo "plain=true" >> $HGRCPATH
13 13
14 14
15 15 help
16 16
17 17 $ hg help mq
18 18 mq extension - manage a stack of patches
19 19
20 20 This extension lets you work with a stack of patches in a Mercurial
21 21 repository. It manages two stacks of patches - all known patches, and applied
22 22 patches (subset of known patches).
23 23
24 24 Known patches are represented as patch files in the .hg/patches directory.
25 25 Applied patches are both patch files and changesets.
26 26
27 27 Common tasks (use "hg help command" for more details):
28 28
29 29 create new patch qnew
30 30 import existing patch qimport
31 31
32 32 print patch series qseries
33 33 print applied patches qapplied
34 34
35 35 add known patch to applied stack qpush
36 36 remove patch from applied stack qpop
37 37 refresh contents of top applied patch qrefresh
38 38
39 39 By default, mq will automatically use git patches when required to avoid
40 40 losing file mode changes, copy records, binary files or empty files creations
41 41 or deletions. This behaviour can be configured with:
42 42
43 43 [mq]
44 44 git = auto/keep/yes/no
45 45
46 46 If set to 'keep', mq will obey the [diff] section configuration while
47 47 preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq
48 48 will override the [diff] section and always generate git or regular patches,
49 49 possibly losing data in the second case.
50 50
51 51 You will by default be managing a patch queue named "patches". You can create
52 52 other, independent patch queues with the "hg qqueue" command.
53 53
54 54 list of commands:
55 55
56 56 qapplied print the patches already applied
57 57 qclone clone main and patch repository at same time
58 58 qdelete remove patches from queue
59 59 qdiff diff of the current patch and subsequent modifications
60 60 qfinish move applied patches into repository history
61 61 qfold fold the named patches into the current patch
62 62 qgoto push or pop patches until named patch is at top of stack
63 63 qguard set or print guards for a patch
64 64 qheader print the header of the topmost or specified patch
65 65 qimport import a patch
66 66 qnew create a new patch
67 67 qnext print the name of the next patch
68 68 qpop pop the current patch off the stack
69 69 qprev print the name of the previous patch
70 70 qpush push the next patch onto the stack
71 71 qqueue manage multiple patch queues
72 72 qrefresh update the current patch
73 73 qrename rename a patch
74 74 qselect set or print guarded patches to push
75 75 qseries print the entire series file
76 76 qtop print the name of the current patch
77 77 qunapplied print the patches not yet applied
78 78 strip strip changesets and all their descendants from the repository
79 79
80 80 use "hg -v help mq" to show aliases and global options
81 81
82 82 $ hg init a
83 83 $ cd a
84 84 $ echo a > a
85 85 $ hg ci -Ama
86 86 adding a
87 87
88 88 $ hg clone . ../k
89 89 updating to branch default
90 90 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
91 91
92 92 $ mkdir b
93 93 $ echo z > b/z
94 94 $ hg ci -Ama
95 95 adding b/z
96 96
97 97
98 98 qinit
99 99
100 100 $ hg qinit
101 101
102 102 $ cd ..
103 103 $ hg init b
104 104
105 105
106 106 -R qinit
107 107
108 108 $ hg -R b qinit
109 109
110 110 $ hg init c
111 111
112 112
113 113 qinit -c
114 114
115 115 $ hg --cwd c qinit -c
116 116 $ hg -R c/.hg/patches st
117 117 A .hgignore
118 118 A series
119 119
120 120
121 121 qinit; qinit -c
122 122
123 123 $ hg init d
124 124 $ cd d
125 125 $ hg qinit
126 126 $ hg qinit -c
127 127
128 128 qinit -c should create both files if they don't exist
129 129
130 130 $ cat .hg/patches/.hgignore
131 131 ^\.hg
132 132 ^\.mq
133 133 syntax: glob
134 134 status
135 135 guards
136 136 $ cat .hg/patches/series
137 137 $ hg qinit -c
138 138 abort: repository $TESTTMP/d/.hg/patches already exists!
139 139 [255]
140 140 $ cd ..
141 141
142 142 $ echo '% qinit; <stuff>; qinit -c'
143 143 % qinit; <stuff>; qinit -c
144 144 $ hg init e
145 145 $ cd e
146 146 $ hg qnew A
147 147 $ checkundo qnew
148 148 $ echo foo > foo
149 149 $ hg add foo
150 150 $ hg qrefresh
151 151 $ hg qnew B
152 152 $ echo >> foo
153 153 $ hg qrefresh
154 154 $ echo status >> .hg/patches/.hgignore
155 155 $ echo bleh >> .hg/patches/.hgignore
156 156 $ hg qinit -c
157 157 adding .hg/patches/A
158 158 adding .hg/patches/B
159 159 $ hg -R .hg/patches status
160 160 A .hgignore
161 161 A A
162 162 A B
163 163 A series
164 164
165 165 qinit -c shouldn't touch these files if they already exist
166 166
167 167 $ cat .hg/patches/.hgignore
168 168 status
169 169 bleh
170 170 $ cat .hg/patches/series
171 171 A
172 172 B
173 173
174 174 add an untracked file
175 175
176 176 $ echo >> .hg/patches/flaf
177 177
178 178 status --mq with color (issue2096)
179 179
180 180 $ hg status --mq --config extensions.color= --color=always
181 A .hgignore
182 A A
183 A B
184 A series
185 ? flaf
181 \x1b[0;32;1mA .hgignore\x1b[0m (esc)
182 \x1b[0;32;1mA A\x1b[0m (esc)
183 \x1b[0;32;1mA B\x1b[0m (esc)
184 \x1b[0;32;1mA series\x1b[0m (esc)
185 \x1b[0;35;1;4m? flaf\x1b[0m (esc)
186 186
187 187 try the --mq option on a command provided by an extension
188 188
189 189 $ hg purge --mq --verbose --config extensions.purge=
190 190 Removing file flaf
191 191
192 192 $ cd ..
193 193
194 194 init --mq without repo
195 195
196 196 $ mkdir f
197 197 $ cd f
198 198 $ hg init --mq
199 199 abort: there is no Mercurial repository here (.hg not found)
200 200 [255]
201 201 $ cd ..
202 202
203 203 init --mq with repo path
204 204
205 205 $ hg init g
206 206 $ hg init --mq g
207 207 $ test -d g/.hg/patches/.hg
208 208
209 209 init --mq with nonexistent directory
210 210
211 211 $ hg init --mq nonexistentdir
212 212 abort: repository nonexistentdir not found!
213 213 [255]
214 214
215 215
216 216 init --mq with bundle (non "local")
217 217
218 218 $ hg -R a bundle --all a.bundle >/dev/null
219 219 $ hg init --mq a.bundle
220 220 abort: only a local queue repository may be initialized
221 221 [255]
222 222
223 223 $ cd a
224 224
225 225 $ hg qnew -m 'foo bar' test.patch
226 226
227 227 $ echo '# comment' > .hg/patches/series.tmp
228 228 $ echo >> .hg/patches/series.tmp # empty line
229 229 $ cat .hg/patches/series >> .hg/patches/series.tmp
230 230 $ mv .hg/patches/series.tmp .hg/patches/series
231 231
232 232
233 233 qrefresh
234 234
235 235 $ echo a >> a
236 236 $ hg qrefresh
237 237 $ cat .hg/patches/test.patch
238 238 foo bar
239 239
240 240 diff -r [a-f0-9]* a (re)
241 241 --- a/a\t(?P<date>.*) (re)
242 242 \+\+\+ b/a\t(?P<date2>.*) (re)
243 243 @@ -1,1 +1,2 @@
244 244 a
245 245 +a
246 246
247 247 empty qrefresh
248 248
249 249 $ hg qrefresh -X a
250 250
251 251 revision:
252 252
253 253 $ hg diff -r -2 -r -1
254 254
255 255 patch:
256 256
257 257 $ cat .hg/patches/test.patch
258 258 foo bar
259 259
260 260
261 261 working dir diff:
262 262
263 263 $ hg diff --nodates -q
264 264 --- a/a
265 265 +++ b/a
266 266 @@ -1,1 +1,2 @@
267 267 a
268 268 +a
269 269
270 270 restore things
271 271
272 272 $ hg qrefresh
273 273 $ checkundo qrefresh
274 274
275 275
276 276 qpop
277 277
278 278 $ hg qpop
279 279 popping test.patch
280 280 patch queue now empty
281 281 $ checkundo qpop
282 282
283 283
284 284 qpush with dump of tag cache
285 285 Dump the tag cache to ensure that it has exactly one head after qpush.
286 286
287 287 $ rm -f .hg/tags.cache
288 288 $ hg tags > /dev/null
289 289
290 290 .hg/tags.cache (pre qpush):
291 291
292 292 $ cat .hg/tags.cache
293 293 1 [\da-f]{40} (re)
294 294
295 295 $ hg qpush
296 296 applying test.patch
297 297 now at: test.patch
298 298 $ hg tags > /dev/null
299 299
300 300 .hg/tags.cache (post qpush):
301 301
302 302 $ cat .hg/tags.cache
303 303 2 [\da-f]{40} (re)
304 304
305 305 $ checkundo qpush
306 306 $ cd ..
307 307
308 308
309 309 pop/push outside repo
310 310 $ hg -R a qpop
311 311 popping test.patch
312 312 patch queue now empty
313 313 $ hg -R a qpush
314 314 applying test.patch
315 315 now at: test.patch
316 316
317 317 $ cd a
318 318 $ hg qnew test2.patch
319 319
320 320 qrefresh in subdir
321 321
322 322 $ cd b
323 323 $ echo a > a
324 324 $ hg add a
325 325 $ hg qrefresh
326 326
327 327 pop/push -a in subdir
328 328
329 329 $ hg qpop -a
330 330 popping test2.patch
331 331 popping test.patch
332 332 patch queue now empty
333 333 $ hg --traceback qpush -a
334 334 applying test.patch
335 335 applying test2.patch
336 336 now at: test2.patch
337 337
338 338
339 339 setting columns & formatted tests truncating (issue1912)
340 340
341 341 $ COLUMNS=4 hg qseries --config ui.formatted=true
342 342 test.patch
343 343 test2.patch
344 344 $ COLUMNS=20 hg qseries --config ui.formatted=true -vs
345 345 0 A test.patch: f...
346 346 1 A test2.patch:
347 347 $ hg qpop
348 348 popping test2.patch
349 349 now at: test.patch
350 350 $ hg qseries -vs
351 351 0 A test.patch: foo bar
352 352 1 U test2.patch:
353 353 $ hg sum | grep mq
354 354 mq: 1 applied, 1 unapplied
355 355 $ hg qpush
356 356 applying test2.patch
357 357 now at: test2.patch
358 358 $ hg sum | grep mq
359 359 mq: 2 applied
360 360 $ hg qapplied
361 361 test.patch
362 362 test2.patch
363 363 $ hg qtop
364 364 test2.patch
365 365
366 366
367 367 prev
368 368
369 369 $ hg qapp -1
370 370 test.patch
371 371
372 372 next
373 373
374 374 $ hg qunapp -1
375 375 all patches applied
376 376 [1]
377 377
378 378 $ hg qpop
379 379 popping test2.patch
380 380 now at: test.patch
381 381
382 382 commit should fail
383 383
384 384 $ hg commit
385 385 abort: cannot commit over an applied mq patch
386 386 [255]
387 387
388 388 push should fail
389 389
390 390 $ hg push ../../k
391 391 pushing to ../../k
392 392 abort: source has mq patches applied
393 393 [255]
394 394
395 395
396 396 import should fail
397 397
398 398 $ hg st .
399 399 $ echo foo >> ../a
400 400 $ hg diff > ../../import.diff
401 401 $ hg revert --no-backup ../a
402 402 $ hg import ../../import.diff
403 403 abort: cannot import over an applied patch
404 404 [255]
405 405 $ hg st
406 406
407 407 import --no-commit should succeed
408 408
409 409 $ hg import --no-commit ../../import.diff
410 410 applying ../../import.diff
411 411 $ hg st
412 412 M a
413 413 $ hg revert --no-backup ../a
414 414
415 415
416 416 qunapplied
417 417
418 418 $ hg qunapplied
419 419 test2.patch
420 420
421 421
422 422 qpush/qpop with index
423 423
424 424 $ hg qnew test1b.patch
425 425 $ echo 1b > 1b
426 426 $ hg add 1b
427 427 $ hg qrefresh
428 428 $ hg qpush 2
429 429 applying test2.patch
430 430 now at: test2.patch
431 431 $ hg qpop 0
432 432 popping test2.patch
433 433 popping test1b.patch
434 434 now at: test.patch
435 435 $ hg qpush test.patch+1
436 436 applying test1b.patch
437 437 now at: test1b.patch
438 438 $ hg qpush test.patch+2
439 439 applying test2.patch
440 440 now at: test2.patch
441 441 $ hg qpop test2.patch-1
442 442 popping test2.patch
443 443 now at: test1b.patch
444 444 $ hg qpop test2.patch-2
445 445 popping test1b.patch
446 446 now at: test.patch
447 447 $ hg qpush test1b.patch+1
448 448 applying test1b.patch
449 449 applying test2.patch
450 450 now at: test2.patch
451 451
452 452
453 453 qpush --move
454 454
455 455 $ hg qpop -a
456 456 popping test2.patch
457 457 popping test1b.patch
458 458 popping test.patch
459 459 patch queue now empty
460 460 $ hg qguard test1b.patch -- -negguard
461 461 $ hg qguard test2.patch -- +posguard
462 462 $ hg qpush --move test2.patch # can't move guarded patch
463 463 cannot push 'test2.patch' - guarded by ['+posguard']
464 464 [1]
465 465 $ hg qselect posguard
466 466 number of unguarded, unapplied patches has changed from 2 to 3
467 467 $ hg qpush --move test2.patch # move to front
468 468 applying test2.patch
469 469 now at: test2.patch
470 470 $ hg qpush --move test1b.patch # negative guard unselected
471 471 applying test1b.patch
472 472 now at: test1b.patch
473 473 $ hg qpush --move test.patch # noop move
474 474 applying test.patch
475 475 now at: test.patch
476 476 $ hg qseries -v
477 477 0 A test2.patch
478 478 1 A test1b.patch
479 479 2 A test.patch
480 480 $ hg qpop -a
481 481 popping test.patch
482 482 popping test1b.patch
483 483 popping test2.patch
484 484 patch queue now empty
485 485
486 486 cleaning up
487 487
488 488 $ hg qselect --none
489 489 guards deactivated
490 490 number of unguarded, unapplied patches has changed from 3 to 2
491 491 $ hg qguard --none test1b.patch
492 492 $ hg qguard --none test2.patch
493 493 $ hg qpush --move test.patch
494 494 applying test.patch
495 495 now at: test.patch
496 496 $ hg qpush --move test1b.patch
497 497 applying test1b.patch
498 498 now at: test1b.patch
499 499 $ hg qpush --move bogus # nonexistent patch
500 500 abort: patch bogus not in series
501 501 [255]
502 502 $ hg qpush --move # no patch
503 503 abort: please specify the patch to move
504 504 [255]
505 505 $ hg qpush --move test.patch # already applied
506 506 abort: cannot push to a previous patch: test.patch
507 507 [255]
508 508 $ hg qpush
509 509 applying test2.patch
510 510 now at: test2.patch
511 511
512 512
513 513 series after move
514 514
515 515 $ cat `hg root`/.hg/patches/series
516 516 test.patch
517 517 test1b.patch
518 518 test2.patch
519 519 # comment
520 520
521 521
522 522
523 523 pop, qapplied, qunapplied
524 524
525 525 $ hg qseries -v
526 526 0 A test.patch
527 527 1 A test1b.patch
528 528 2 A test2.patch
529 529
530 530 qapplied -1 test.patch
531 531
532 532 $ hg qapplied -1 test.patch
533 533 only one patch applied
534 534 [1]
535 535
536 536 qapplied -1 test1b.patch
537 537
538 538 $ hg qapplied -1 test1b.patch
539 539 test.patch
540 540
541 541 qapplied -1 test2.patch
542 542
543 543 $ hg qapplied -1 test2.patch
544 544 test1b.patch
545 545
546 546 qapplied -1
547 547
548 548 $ hg qapplied -1
549 549 test1b.patch
550 550
551 551 qapplied
552 552
553 553 $ hg qapplied
554 554 test.patch
555 555 test1b.patch
556 556 test2.patch
557 557
558 558 qapplied test1b.patch
559 559
560 560 $ hg qapplied test1b.patch
561 561 test.patch
562 562 test1b.patch
563 563
564 564 qunapplied -1
565 565
566 566 $ hg qunapplied -1
567 567 all patches applied
568 568 [1]
569 569
570 570 qunapplied
571 571
572 572 $ hg qunapplied
573 573
574 574 popping
575 575
576 576 $ hg qpop
577 577 popping test2.patch
578 578 now at: test1b.patch
579 579
580 580 qunapplied -1
581 581
582 582 $ hg qunapplied -1
583 583 test2.patch
584 584
585 585 qunapplied
586 586
587 587 $ hg qunapplied
588 588 test2.patch
589 589
590 590 qunapplied test2.patch
591 591
592 592 $ hg qunapplied test2.patch
593 593
594 594 qunapplied -1 test2.patch
595 595
596 596 $ hg qunapplied -1 test2.patch
597 597 all patches applied
598 598 [1]
599 599
600 600 popping -a
601 601
602 602 $ hg qpop -a
603 603 popping test1b.patch
604 604 popping test.patch
605 605 patch queue now empty
606 606
607 607 qapplied
608 608
609 609 $ hg qapplied
610 610
611 611 qapplied -1
612 612
613 613 $ hg qapplied -1
614 614 no patches applied
615 615 [1]
616 616 $ hg qpush
617 617 applying test.patch
618 618 now at: test.patch
619 619
620 620
621 621 push should succeed
622 622
623 623 $ hg qpop -a
624 624 popping test.patch
625 625 patch queue now empty
626 626 $ hg push ../../k
627 627 pushing to ../../k
628 628 searching for changes
629 629 adding changesets
630 630 adding manifests
631 631 adding file changes
632 632 added 1 changesets with 1 changes to 1 files
633 633
634 634
635 635 we want to start with some patches applied
636 636
637 637 $ hg qpush -a
638 638 applying test.patch
639 639 applying test1b.patch
640 640 applying test2.patch
641 641 now at: test2.patch
642 642
643 643 % pops all patches and succeeds
644 644
645 645 $ hg qpop -a
646 646 popping test2.patch
647 647 popping test1b.patch
648 648 popping test.patch
649 649 patch queue now empty
650 650
651 651 % does nothing and succeeds
652 652
653 653 $ hg qpop -a
654 654 no patches applied
655 655
656 656 % fails - nothing else to pop
657 657
658 658 $ hg qpop
659 659 no patches applied
660 660 [1]
661 661
662 662 % pushes a patch and succeeds
663 663
664 664 $ hg qpush
665 665 applying test.patch
666 666 now at: test.patch
667 667
668 668 % pops a patch and succeeds
669 669
670 670 $ hg qpop
671 671 popping test.patch
672 672 patch queue now empty
673 673
674 674 % pushes up to test1b.patch and succeeds
675 675
676 676 $ hg qpush test1b.patch
677 677 applying test.patch
678 678 applying test1b.patch
679 679 now at: test1b.patch
680 680
681 681 % does nothing and succeeds
682 682
683 683 $ hg qpush test1b.patch
684 684 qpush: test1b.patch is already at the top
685 685
686 686 % does nothing and succeeds
687 687
688 688 $ hg qpop test1b.patch
689 689 qpop: test1b.patch is already at the top
690 690
691 691 % fails - can't push to this patch
692 692
693 693 $ hg qpush test.patch
694 694 abort: cannot push to a previous patch: test.patch
695 695 [255]
696 696
697 697 % fails - can't pop to this patch
698 698
699 699 $ hg qpop test2.patch
700 700 abort: patch test2.patch is not applied
701 701 [255]
702 702
703 703 % pops up to test.patch and succeeds
704 704
705 705 $ hg qpop test.patch
706 706 popping test1b.patch
707 707 now at: test.patch
708 708
709 709 % pushes all patches and succeeds
710 710
711 711 $ hg qpush -a
712 712 applying test1b.patch
713 713 applying test2.patch
714 714 now at: test2.patch
715 715
716 716 % does nothing and succeeds
717 717
718 718 $ hg qpush -a
719 719 all patches are currently applied
720 720
721 721 % fails - nothing else to push
722 722
723 723 $ hg qpush
724 724 patch series already fully applied
725 725 [1]
726 726
727 727 % does nothing and succeeds
728 728
729 729 $ hg qpush test2.patch
730 730 qpush: test2.patch is already at the top
731 731
732 732 strip
733 733
734 734 $ cd ../../b
735 735 $ echo x>x
736 736 $ hg ci -Ama
737 737 adding x
738 738 $ hg strip tip
739 739 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
740 740 saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob)
741 741 $ hg unbundle .hg/strip-backup/*
742 742 adding changesets
743 743 adding manifests
744 744 adding file changes
745 745 added 1 changesets with 1 changes to 1 files
746 746 (run 'hg update' to get a working copy)
747 747
748 748
749 749 strip with local changes, should complain
750 750
751 751 $ hg up
752 752 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
753 753 $ echo y>y
754 754 $ hg add y
755 755 $ hg strip tip
756 756 abort: local changes found
757 757 [255]
758 758
759 759 --force strip with local changes
760 760
761 761 $ hg strip -f tip
762 762 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
763 763 saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob)
764 764
765 765
766 766 cd b; hg qrefresh
767 767
768 768 $ hg init refresh
769 769 $ cd refresh
770 770 $ echo a > a
771 771 $ hg ci -Ama
772 772 adding a
773 773 $ hg qnew -mfoo foo
774 774 $ echo a >> a
775 775 $ hg qrefresh
776 776 $ mkdir b
777 777 $ cd b
778 778 $ echo f > f
779 779 $ hg add f
780 780 $ hg qrefresh
781 781 $ cat ../.hg/patches/foo
782 782 foo
783 783
784 784 diff -r cb9a9f314b8b a
785 785 --- a/a\t(?P<date>.*) (re)
786 786 \+\+\+ b/a\t(?P<date>.*) (re)
787 787 @@ -1,1 +1,2 @@
788 788 a
789 789 +a
790 790 diff -r cb9a9f314b8b b/f
791 791 --- /dev/null\t(?P<date>.*) (re)
792 792 \+\+\+ b/b/f\t(?P<date>.*) (re)
793 793 @@ -0,0 +1,1 @@
794 794 +f
795 795
796 796 hg qrefresh .
797 797
798 798 $ hg qrefresh .
799 799 $ cat ../.hg/patches/foo
800 800 foo
801 801
802 802 diff -r cb9a9f314b8b b/f
803 803 --- /dev/null\t(?P<date>.*) (re)
804 804 \+\+\+ b/b/f\t(?P<date>.*) (re)
805 805 @@ -0,0 +1,1 @@
806 806 +f
807 807 $ hg status
808 808 M a
809 809
810 810
811 811 qpush failure
812 812
813 813 $ cd ..
814 814 $ hg qrefresh
815 815 $ hg qnew -mbar bar
816 816 $ echo foo > foo
817 817 $ echo bar > bar
818 818 $ hg add foo bar
819 819 $ hg qrefresh
820 820 $ hg qpop -a
821 821 popping bar
822 822 popping foo
823 823 patch queue now empty
824 824 $ echo bar > foo
825 825 $ hg qpush -a
826 826 applying foo
827 827 applying bar
828 828 file foo already exists
829 829 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
830 830 patch failed, unable to continue (try -v)
831 831 patch failed, rejects left in working dir
832 832 errors during apply, please fix and refresh bar
833 833 [2]
834 834 $ hg st
835 835 ? foo
836 836 ? foo.rej
837 837
838 838
839 839 mq tags
840 840
841 841 $ hg log --template '{rev} {tags}\n' -r qparent:qtip
842 842 0 qparent
843 843 1 foo qbase
844 844 2 bar qtip tip
845 845
846 846
847 847 bad node in status
848 848
849 849 $ hg qpop
850 850 popping bar
851 851 now at: foo
852 852 $ hg strip -qn tip
853 853 $ hg tip
854 854 changeset: 0:cb9a9f314b8b
855 855 tag: tip
856 856 user: test
857 857 date: Thu Jan 01 00:00:00 1970 +0000
858 858 summary: a
859 859
860 860 $ hg branches
861 861 default 0:cb9a9f314b8b
862 862 $ hg qpop
863 863 no patches applied
864 864 [1]
865 865
866 866 $ cat >>$HGRCPATH <<EOF
867 867 > [diff]
868 868 > git = True
869 869 > EOF
870 870 $ cd ..
871 871 $ hg init git
872 872 $ cd git
873 873 $ hg qinit
874 874
875 875 $ hg qnew -m'new file' new
876 876 $ echo foo > new
877 877 $ chmod +x new
878 878 $ hg add new
879 879 $ hg qrefresh
880 880 $ cat .hg/patches/new
881 881 new file
882 882
883 883 diff --git a/new b/new
884 884 new file mode 100755
885 885 --- /dev/null
886 886 +++ b/new
887 887 @@ -0,0 +1,1 @@
888 888 +foo
889 889
890 890 $ hg qnew -m'copy file' copy
891 891 $ hg cp new copy
892 892 $ hg qrefresh
893 893 $ cat .hg/patches/copy
894 894 copy file
895 895
896 896 diff --git a/new b/copy
897 897 copy from new
898 898 copy to copy
899 899
900 900 $ hg qpop
901 901 popping copy
902 902 now at: new
903 903 $ hg qpush
904 904 applying copy
905 905 now at: copy
906 906 $ hg qdiff
907 907 diff --git a/new b/copy
908 908 copy from new
909 909 copy to copy
910 910 $ cat >>$HGRCPATH <<EOF
911 911 > [diff]
912 912 > git = False
913 913 > EOF
914 914 $ hg qdiff --git
915 915 diff --git a/new b/copy
916 916 copy from new
917 917 copy to copy
918 918 $ cd ..
919 919
920 920
921 921 test file addition in slow path
922 922
923 923 $ hg init slow
924 924 $ cd slow
925 925 $ hg qinit
926 926 $ echo foo > foo
927 927 $ hg add foo
928 928 $ hg ci -m 'add foo'
929 929 $ hg qnew bar
930 930 $ echo bar > bar
931 931 $ hg add bar
932 932 $ hg mv foo baz
933 933 $ hg qrefresh --git
934 934 $ hg up -C 0
935 935 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
936 936 $ echo >> foo
937 937 $ hg ci -m 'change foo'
938 938 created new head
939 939 $ hg up -C 1
940 940 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
941 941 $ hg qrefresh --git
942 942 $ cat .hg/patches/bar
943 943 diff --git a/bar b/bar
944 944 new file mode 100644
945 945 --- /dev/null
946 946 +++ b/bar
947 947 @@ -0,0 +1,1 @@
948 948 +bar
949 949 diff --git a/foo b/baz
950 950 rename from foo
951 951 rename to baz
952 952 $ hg log -v --template '{rev} {file_copies}\n' -r .
953 953 2 baz (foo)
954 954 $ hg qrefresh --git
955 955 $ cat .hg/patches/bar
956 956 diff --git a/bar b/bar
957 957 new file mode 100644
958 958 --- /dev/null
959 959 +++ b/bar
960 960 @@ -0,0 +1,1 @@
961 961 +bar
962 962 diff --git a/foo b/baz
963 963 rename from foo
964 964 rename to baz
965 965 $ hg log -v --template '{rev} {file_copies}\n' -r .
966 966 2 baz (foo)
967 967 $ hg qrefresh
968 968 $ grep 'diff --git' .hg/patches/bar
969 969 diff --git a/bar b/bar
970 970 diff --git a/foo b/baz
971 971
972 972
973 973 test file move chains in the slow path
974 974
975 975 $ hg up -C 1
976 976 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
977 977 $ echo >> foo
978 978 $ hg ci -m 'change foo again'
979 979 $ hg up -C 2
980 980 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
981 981 $ hg mv bar quux
982 982 $ hg mv baz bleh
983 983 $ hg qrefresh --git
984 984 $ cat .hg/patches/bar
985 985 diff --git a/foo b/bleh
986 986 rename from foo
987 987 rename to bleh
988 988 diff --git a/quux b/quux
989 989 new file mode 100644
990 990 --- /dev/null
991 991 +++ b/quux
992 992 @@ -0,0 +1,1 @@
993 993 +bar
994 994 $ hg log -v --template '{rev} {file_copies}\n' -r .
995 995 3 bleh (foo)
996 996 $ hg mv quux fred
997 997 $ hg mv bleh barney
998 998 $ hg qrefresh --git
999 999 $ cat .hg/patches/bar
1000 1000 diff --git a/foo b/barney
1001 1001 rename from foo
1002 1002 rename to barney
1003 1003 diff --git a/fred b/fred
1004 1004 new file mode 100644
1005 1005 --- /dev/null
1006 1006 +++ b/fred
1007 1007 @@ -0,0 +1,1 @@
1008 1008 +bar
1009 1009 $ hg log -v --template '{rev} {file_copies}\n' -r .
1010 1010 3 barney (foo)
1011 1011
1012 1012
1013 1013 refresh omitting an added file
1014 1014
1015 1015 $ hg qnew baz
1016 1016 $ echo newfile > newfile
1017 1017 $ hg add newfile
1018 1018 $ hg qrefresh
1019 1019 $ hg st -A newfile
1020 1020 C newfile
1021 1021 $ hg qrefresh -X newfile
1022 1022 $ hg st -A newfile
1023 1023 A newfile
1024 1024 $ hg revert newfile
1025 1025 $ rm newfile
1026 1026 $ hg qpop
1027 1027 popping baz
1028 1028 now at: bar
1029 1029 $ hg qdel baz
1030 1030
1031 1031
1032 1032 create a git patch
1033 1033
1034 1034 $ echo a > alexander
1035 1035 $ hg add alexander
1036 1036 $ hg qnew -f --git addalexander
1037 1037 $ grep diff .hg/patches/addalexander
1038 1038 diff --git a/alexander b/alexander
1039 1039
1040 1040
1041 1041 create a git binary patch
1042 1042
1043 1043 $ cat > writebin.py <<EOF
1044 1044 > import sys
1045 1045 > path = sys.argv[1]
1046 1046 > open(path, 'wb').write('BIN\x00ARY')
1047 1047 > EOF
1048 1048 $ python writebin.py bucephalus
1049 1049
1050 1050 $ python "$TESTDIR/md5sum.py" bucephalus
1051 1051 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
1052 1052 $ hg add bucephalus
1053 1053 $ hg qnew -f --git addbucephalus
1054 1054 $ grep diff .hg/patches/addbucephalus
1055 1055 diff --git a/bucephalus b/bucephalus
1056 1056
1057 1057
1058 1058 check binary patches can be popped and pushed
1059 1059
1060 1060 $ hg qpop
1061 1061 popping addbucephalus
1062 1062 now at: addalexander
1063 1063 $ test -f bucephalus && echo % bucephalus should not be there
1064 1064 [1]
1065 1065 $ hg qpush
1066 1066 applying addbucephalus
1067 1067 now at: addbucephalus
1068 1068 $ test -f bucephalus
1069 1069 $ python "$TESTDIR/md5sum.py" bucephalus
1070 1070 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
1071 1071
1072 1072
1073 1073
1074 1074 strip again
1075 1075
1076 1076 $ cd ..
1077 1077 $ hg init strip
1078 1078 $ cd strip
1079 1079 $ touch foo
1080 1080 $ hg add foo
1081 1081 $ hg ci -m 'add foo'
1082 1082 $ echo >> foo
1083 1083 $ hg ci -m 'change foo 1'
1084 1084 $ hg up -C 0
1085 1085 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1086 1086 $ echo 1 >> foo
1087 1087 $ hg ci -m 'change foo 2'
1088 1088 created new head
1089 1089 $ HGMERGE=true hg merge
1090 1090 merging foo
1091 1091 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1092 1092 (branch merge, don't forget to commit)
1093 1093 $ hg ci -m merge
1094 1094 $ hg log
1095 1095 changeset: 3:99615015637b
1096 1096 tag: tip
1097 1097 parent: 2:20cbbe65cff7
1098 1098 parent: 1:d2871fc282d4
1099 1099 user: test
1100 1100 date: Thu Jan 01 00:00:00 1970 +0000
1101 1101 summary: merge
1102 1102
1103 1103 changeset: 2:20cbbe65cff7
1104 1104 parent: 0:53245c60e682
1105 1105 user: test
1106 1106 date: Thu Jan 01 00:00:00 1970 +0000
1107 1107 summary: change foo 2
1108 1108
1109 1109 changeset: 1:d2871fc282d4
1110 1110 user: test
1111 1111 date: Thu Jan 01 00:00:00 1970 +0000
1112 1112 summary: change foo 1
1113 1113
1114 1114 changeset: 0:53245c60e682
1115 1115 user: test
1116 1116 date: Thu Jan 01 00:00:00 1970 +0000
1117 1117 summary: add foo
1118 1118
1119 1119 $ hg strip 1
1120 1120 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1121 1121 saved backup bundle to $TESTTMP/b/strip/.hg/strip-backup/*-backup.hg (glob)
1122 1122 $ checkundo strip
1123 1123 $ hg log
1124 1124 changeset: 1:20cbbe65cff7
1125 1125 tag: tip
1126 1126 user: test
1127 1127 date: Thu Jan 01 00:00:00 1970 +0000
1128 1128 summary: change foo 2
1129 1129
1130 1130 changeset: 0:53245c60e682
1131 1131 user: test
1132 1132 date: Thu Jan 01 00:00:00 1970 +0000
1133 1133 summary: add foo
1134 1134
1135 1135 $ cd ..
1136 1136
1137 1137
1138 1138 qclone
1139 1139
1140 1140 $ qlog()
1141 1141 > {
1142 1142 > echo 'main repo:'
1143 1143 > hg log --template ' rev {rev}: {desc}\n'
1144 1144 > echo 'patch repo:'
1145 1145 > hg -R .hg/patches log --template ' rev {rev}: {desc}\n'
1146 1146 > }
1147 1147 $ hg init qclonesource
1148 1148 $ cd qclonesource
1149 1149 $ echo foo > foo
1150 1150 $ hg add foo
1151 1151 $ hg ci -m 'add foo'
1152 1152 $ hg qinit
1153 1153 $ hg qnew patch1
1154 1154 $ echo bar >> foo
1155 1155 $ hg qrefresh -m 'change foo'
1156 1156 $ cd ..
1157 1157
1158 1158
1159 1159 repo with unversioned patch dir
1160 1160
1161 1161 $ hg qclone qclonesource failure
1162 1162 abort: versioned patch repository not found (see init --mq)
1163 1163 [255]
1164 1164
1165 1165 $ cd qclonesource
1166 1166 $ hg qinit -c
1167 1167 adding .hg/patches/patch1
1168 1168 $ hg qci -m checkpoint
1169 1169 $ qlog
1170 1170 main repo:
1171 1171 rev 1: change foo
1172 1172 rev 0: add foo
1173 1173 patch repo:
1174 1174 rev 0: checkpoint
1175 1175 $ cd ..
1176 1176
1177 1177
1178 1178 repo with patches applied
1179 1179
1180 1180 $ hg qclone qclonesource qclonedest
1181 1181 updating to branch default
1182 1182 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1183 1183 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1184 1184 $ cd qclonedest
1185 1185 $ qlog
1186 1186 main repo:
1187 1187 rev 0: add foo
1188 1188 patch repo:
1189 1189 rev 0: checkpoint
1190 1190 $ cd ..
1191 1191
1192 1192
1193 1193 repo with patches unapplied
1194 1194
1195 1195 $ cd qclonesource
1196 1196 $ hg qpop -a
1197 1197 popping patch1
1198 1198 patch queue now empty
1199 1199 $ qlog
1200 1200 main repo:
1201 1201 rev 0: add foo
1202 1202 patch repo:
1203 1203 rev 0: checkpoint
1204 1204 $ cd ..
1205 1205 $ hg qclone qclonesource qclonedest2
1206 1206 updating to branch default
1207 1207 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1208 1208 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1209 1209 $ cd qclonedest2
1210 1210 $ qlog
1211 1211 main repo:
1212 1212 rev 0: add foo
1213 1213 patch repo:
1214 1214 rev 0: checkpoint
1215 1215 $ cd ..
1216 1216
1217 1217
1218 1218 Issue1033: test applying on an empty file
1219 1219
1220 1220 $ hg init empty
1221 1221 $ cd empty
1222 1222 $ touch a
1223 1223 $ hg ci -Am addempty
1224 1224 adding a
1225 1225 $ echo a > a
1226 1226 $ hg qnew -f -e changea
1227 1227 $ hg qpop
1228 1228 popping changea
1229 1229 patch queue now empty
1230 1230 $ hg qpush
1231 1231 applying changea
1232 1232 now at: changea
1233 1233 $ cd ..
1234 1234
1235 1235
1236 1236 test qpush with --force, issue1087
1237 1237
1238 1238 $ hg init forcepush
1239 1239 $ cd forcepush
1240 1240 $ echo hello > hello.txt
1241 1241 $ echo bye > bye.txt
1242 1242 $ hg ci -Ama
1243 1243 adding bye.txt
1244 1244 adding hello.txt
1245 1245 $ hg qnew -d '0 0' empty
1246 1246 $ hg qpop
1247 1247 popping empty
1248 1248 patch queue now empty
1249 1249 $ echo world >> hello.txt
1250 1250
1251 1251
1252 1252 qpush should fail, local changes
1253 1253
1254 1254 $ hg qpush
1255 1255 abort: local changes found, refresh first
1256 1256 [255]
1257 1257
1258 1258
1259 1259 apply force, should not discard changes with empty patch
1260 1260
1261 1261 $ hg qpush -f
1262 1262 applying empty
1263 1263 patch empty is empty
1264 1264 now at: empty
1265 1265 $ hg diff --config diff.nodates=True
1266 1266 diff -r bf5fc3f07a0a hello.txt
1267 1267 --- a/hello.txt
1268 1268 +++ b/hello.txt
1269 1269 @@ -1,1 +1,2 @@
1270 1270 hello
1271 1271 +world
1272 1272 $ hg qdiff --config diff.nodates=True
1273 1273 diff -r 9ecee4f634e3 hello.txt
1274 1274 --- a/hello.txt
1275 1275 +++ b/hello.txt
1276 1276 @@ -1,1 +1,2 @@
1277 1277 hello
1278 1278 +world
1279 1279 $ hg log -l1 -p
1280 1280 changeset: 1:bf5fc3f07a0a
1281 1281 tag: empty
1282 1282 tag: qbase
1283 1283 tag: qtip
1284 1284 tag: tip
1285 1285 user: test
1286 1286 date: Thu Jan 01 00:00:00 1970 +0000
1287 1287 summary: imported patch empty
1288 1288
1289 1289
1290 1290 $ hg qref -d '0 0'
1291 1291 $ hg qpop
1292 1292 popping empty
1293 1293 patch queue now empty
1294 1294 $ echo universe >> hello.txt
1295 1295 $ echo universe >> bye.txt
1296 1296
1297 1297
1298 1298 qpush should fail, local changes
1299 1299
1300 1300 $ hg qpush
1301 1301 abort: local changes found, refresh first
1302 1302 [255]
1303 1303
1304 1304
1305 1305 apply force, should discard changes in hello, but not bye
1306 1306
1307 1307 $ hg qpush -f
1308 1308 applying empty
1309 1309 now at: empty
1310 1310 $ hg st
1311 1311 M bye.txt
1312 1312 $ hg diff --config diff.nodates=True
1313 1313 diff -r ba252371dbc1 bye.txt
1314 1314 --- a/bye.txt
1315 1315 +++ b/bye.txt
1316 1316 @@ -1,1 +1,2 @@
1317 1317 bye
1318 1318 +universe
1319 1319 $ hg qdiff --config diff.nodates=True
1320 1320 diff -r 9ecee4f634e3 bye.txt
1321 1321 --- a/bye.txt
1322 1322 +++ b/bye.txt
1323 1323 @@ -1,1 +1,2 @@
1324 1324 bye
1325 1325 +universe
1326 1326 diff -r 9ecee4f634e3 hello.txt
1327 1327 --- a/hello.txt
1328 1328 +++ b/hello.txt
1329 1329 @@ -1,1 +1,3 @@
1330 1330 hello
1331 1331 +world
1332 1332 +universe
1333 1333
1334 1334
1335 1335 test popping revisions not in working dir ancestry
1336 1336
1337 1337 $ hg qseries -v
1338 1338 0 A empty
1339 1339 $ hg up qparent
1340 1340 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1341 1341 $ hg qpop
1342 1342 popping empty
1343 1343 patch queue now empty
1344 1344
1345 1345 $ cd ..
1346 1346 $ hg init deletion-order
1347 1347 $ cd deletion-order
1348 1348
1349 1349 $ touch a
1350 1350 $ hg ci -Aqm0
1351 1351
1352 1352 $ hg qnew rename-dir
1353 1353 $ hg rm a
1354 1354 $ hg qrefresh
1355 1355
1356 1356 $ mkdir a b
1357 1357 $ touch a/a b/b
1358 1358 $ hg add -q a b
1359 1359 $ hg qrefresh
1360 1360
1361 1361
1362 1362 test popping must remove files added in subdirectories first
1363 1363
1364 1364 $ hg qpop
1365 1365 popping rename-dir
1366 1366 patch queue now empty
1367 1367 $ cd ..
1368 1368
@@ -1,2153 +1,2153 b''
1 1 $ fixheaders()
2 2 > {
3 3 > sed -e 's/\(Message-Id:.*@\).*/\1/' \
4 4 > -e 's/\(In-Reply-To:.*@\).*/\1/' \
5 5 > -e 's/\(References:.*@\).*/\1/' \
6 6 > -e 's/\(User-Agent:.*\)\/.*/\1/' \
7 7 > -e 's/===.*/===/'
8 8 > }
9 9 $ echo "[extensions]" >> $HGRCPATH
10 10 $ echo "patchbomb=" >> $HGRCPATH
11 11
12 12 $ hg init t
13 13 $ cd t
14 14 $ echo a > a
15 15 $ hg commit -Ama -d '1 0'
16 16 adding a
17 17
18 18 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip
19 19 This patch series consists of 1 patches.
20 20
21 21
22 22 Displaying [PATCH] a ...
23 23 Content-Type: text/plain; charset="us-ascii"
24 24 MIME-Version: 1.0
25 25 Content-Transfer-Encoding: 7bit
26 26 Subject: [PATCH] a
27 27 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
28 28 Message-Id: <8580ff50825a50c8f716.60@* (glob)
29 29 User-Agent: Mercurial-patchbomb/* (glob)
30 30 Date: Thu, 01 Jan 1970 00:01:00 +0000
31 31 From: quux
32 32 To: foo
33 33 Cc: bar
34 34
35 35 # HG changeset patch
36 36 # User test
37 37 # Date 1 0
38 38 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
39 39 # Parent 0000000000000000000000000000000000000000
40 40 a
41 41
42 42 diff -r 000000000000 -r 8580ff50825a a
43 43 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
44 44 +++ b/a Thu Jan 01 00:00:01 1970 +0000
45 45 @@ -0,0 +1,1 @@
46 46 +a
47 47
48 48
49 49 $ hg --config ui.interactive=1 email --confirm -n -f quux -t foo -c bar -r tip<<EOF
50 50 > n
51 51 > EOF
52 52 This patch series consists of 1 patches.
53 53
54 54
55 55 Final summary:
56 56
57 57 From: quux
58 58 To: foo
59 59 Cc: bar
60 60 Subject: [PATCH] a
61 61 a | 1 +
62 62 1 files changed, 1 insertions(+), 0 deletions(-)
63 63
64 64 are you sure you want to send (yn)? abort: patchbomb canceled
65 65 [255]
66 66
67 67 $ echo b > b
68 68 $ hg commit -Amb -d '2 0'
69 69 adding b
70 70
71 71 $ hg email --date '1970-1-1 0:2' -n -f quux -t foo -c bar -s test -r 0:tip
72 72 This patch series consists of 2 patches.
73 73
74 74
75 75 Write the introductory message for the patch series.
76 76
77 77
78 78 Displaying [PATCH 0 of 2] test ...
79 79 Content-Type: text/plain; charset="us-ascii"
80 80 MIME-Version: 1.0
81 81 Content-Transfer-Encoding: 7bit
82 82 Subject: [PATCH 0 of 2] test
83 83 Message-Id: <patchbomb\.120@[^>]*> (re)
84 84 User-Agent: Mercurial-patchbomb/* (glob)
85 85 Date: Thu, 01 Jan 1970 00:02:00 +0000
86 86 From: quux
87 87 To: foo
88 88 Cc: bar
89 89
90 90
91 91 Displaying [PATCH 1 of 2] a ...
92 92 Content-Type: text/plain; charset="us-ascii"
93 93 MIME-Version: 1.0
94 94 Content-Transfer-Encoding: 7bit
95 95 Subject: [PATCH 1 of 2] a
96 96 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
97 97 Message-Id: <8580ff50825a50c8f716\.121@[^>]*> (re)
98 98 In-Reply-To: <patchbomb\.120@[^>]*> (re)
99 99 References: <patchbomb\.120@[^>]*> (re)
100 100 User-Agent: Mercurial-patchbomb/* (glob)
101 101 Date: Thu, 01 Jan 1970 00:02:01 +0000
102 102 From: quux
103 103 To: foo
104 104 Cc: bar
105 105
106 106 # HG changeset patch
107 107 # User test
108 108 # Date 1 0
109 109 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
110 110 # Parent 0000000000000000000000000000000000000000
111 111 a
112 112
113 113 diff -r 000000000000 -r 8580ff50825a a
114 114 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
115 115 +++ b/a Thu Jan 01 00:00:01 1970 +0000
116 116 @@ -0,0 +1,1 @@
117 117 +a
118 118
119 119 Displaying [PATCH 2 of 2] b ...
120 120 Content-Type: text/plain; charset="us-ascii"
121 121 MIME-Version: 1.0
122 122 Content-Transfer-Encoding: 7bit
123 123 Subject: [PATCH 2 of 2] b
124 124 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
125 125 Message-Id: <97d72e5f12c7e84f8506\.122@[^>]*> (re)
126 126 In-Reply-To: <patchbomb\.120@[^>]*> (re)
127 127 References: <patchbomb\.120@[^>]*> (re)
128 128 User-Agent: Mercurial-patchbomb/* (glob)
129 129 Date: Thu, 01 Jan 1970 00:02:02 +0000
130 130 From: quux
131 131 To: foo
132 132 Cc: bar
133 133
134 134 # HG changeset patch
135 135 # User test
136 136 # Date 2 0
137 137 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
138 138 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
139 139 b
140 140
141 141 diff -r 8580ff50825a -r 97d72e5f12c7 b
142 142 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
143 143 +++ b/b Thu Jan 01 00:00:02 1970 +0000
144 144 @@ -0,0 +1,1 @@
145 145 +b
146 146
147 147
148 148 $ hg email -m test.mbox -f quux -t foo -c bar -s test 0:tip \
149 149 > --config extensions.progress= --config progress.assume-tty=1 \
150 150 > --config progress.delay=0 --config progress.refresh=0
151 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 154 Write the introductory message for the patch series.
155 155
156 156
157 157 Writing [PATCH 0 of 2] test ...
158 158 Writing [PATCH 1 of 2] a ...
159 159 Writing [PATCH 2 of 2] b ...
160 160
161 161 $ cd ..
162 162
163 163 $ hg clone -q t t2
164 164 $ cd t2
165 165 $ echo c > c
166 166 $ hg commit -Amc -d '3 0'
167 167 adding c
168 168
169 169 $ cat > description <<EOF
170 170 > a multiline
171 171 >
172 172 > description
173 173 > EOF
174 174
175 175
176 176 test bundle and description:
177 177 $ hg email --date '1970-1-1 0:3' -n -f quux -t foo \
178 178 > -c bar -s test -r tip -b --desc description | fixheaders
179 179 searching for changes
180 180 1 changesets found
181 181
182 182 Displaying test ...
183 183 Content-Type: multipart/mixed; boundary="===
184 184 MIME-Version: 1.0
185 185 Subject: test
186 186 Message-Id: <patchbomb.180@
187 187 User-Agent: Mercurial-patchbomb
188 188 Date: Thu, 01 Jan 1970 00:03:00 +0000
189 189 From: quux
190 190 To: foo
191 191 Cc: bar
192 192
193 193 --===
194 194 Content-Type: text/plain; charset="us-ascii"
195 195 MIME-Version: 1.0
196 196 Content-Transfer-Encoding: 7bit
197 197
198 198 a multiline
199 199
200 200 description
201 201
202 202 --===
203 203 Content-Type: application/x-mercurial-bundle
204 204 MIME-Version: 1.0
205 205 Content-Disposition: attachment; filename="bundle.hg"
206 206 Content-Transfer-Encoding: base64
207 207
208 208 SEcxMEJaaDkxQVkmU1nvR7I3AAAN////lFYQWj1/4HwRkdC/AywIAk0E4pfoSIIIgQCgGEQOcLAA
209 209 2tA1VPyp4mkeoG0EaaPU0GTT1GjRiNPIg9CZGBqZ6UbU9J+KFU09DNUaGgAAAAAANAGgAAAAA1U8
210 210 oGgAADQGgAANNANAAAAAAZipFLz3XoakCEQB3PVPyHJVi1iYkAAKQAZQGpQGZESInRnCFMqLDla2
211 211 Bx3qfRQeA2N4lnzKkAmP8kR2asievLLXXebVU8Vg4iEBqcJNJAxIapSU6SM4888ZAciRG6MYAIEE
212 212 SlIBpFisgGkyRjX//TMtfcUAEsGu56+YnE1OlTZmzKm8BSu2rvo4rHAYYaadIFFuTy0LYgIkgLVD
213 213 sgVa2F19D1tx9+hgbAygLgQwaIqcDdgA4BjQgIiz/AEP72++llgDKhKducqodGE4B0ETqF3JFOFC
214 214 Q70eyNw=
215 215 --===
216 216
217 217 utf-8 patch:
218 218 $ python -c 'fp = open("utf", "wb"); fp.write("h\xC3\xB6mma!\n"); fp.close();'
219 219 $ hg commit -A -d '4 0' -m 'charset=utf-8; content-transfer-encoding: base64'
220 220 adding description
221 221 adding utf
222 222
223 223 no mime encoding for email --test:
224 224 $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n | fixheaders > mailtest
225 225
226 226 md5sum of 8-bit output:
227 227 $ $TESTDIR/md5sum.py mailtest
228 228 e726c29b3008e77994c7572563e57c34 mailtest
229 229
230 230 $ rm mailtest
231 231
232 232 mime encoded mbox (base64):
233 233 $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox
234 234 This patch series consists of 1 patches.
235 235
236 236
237 237 Writing [PATCH] charset=utf-8; content-transfer-encoding: base64 ...
238 238
239 239 $ cat mbox
240 240 From quux Thu Jan 01 00:04:01 1970
241 241 Content-Type: text/plain; charset="utf-8"
242 242 MIME-Version: 1.0
243 243 Content-Transfer-Encoding: base64
244 244 Subject: [PATCH] charset=utf-8; content-transfer-encoding: base64
245 245 X-Mercurial-Node: c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
246 246 Message-Id: <c3c9e37db9f4fe4882cd.240@* (glob)
247 247 User-Agent: Mercurial-patchbomb/* (glob)
248 248 Date: Thu, 01 Jan 1970 00:04:00 +0000
249 249 From: quux
250 250 To: foo
251 251 Cc: bar
252 252
253 253 IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIHRlc3QKIyBEYXRlIDQgMAojIE5vZGUgSUQgYzNj
254 254 OWUzN2RiOWY0ZmU0ODgyY2RhMzliYWY0MmZlZDZiYWQ4YjE1YQojIFBhcmVudCAgZmYyYzlmYTIw
255 255 MThiMTVmYTc0YjMzMzYzYmRhOTUyNzMyM2UyYTk5ZgpjaGFyc2V0PXV0Zi04OyBjb250ZW50LXRy
256 256 YW5zZmVyLWVuY29kaW5nOiBiYXNlNjQKCmRpZmYgLXIgZmYyYzlmYTIwMThiIC1yIGMzYzllMzdk
257 257 YjlmNCBkZXNjcmlwdGlvbgotLS0gL2Rldi9udWxsCVRodSBKYW4gMDEgMDA6MDA6MDAgMTk3MCAr
258 258 MDAwMAorKysgYi9kZXNjcmlwdGlvbglUaHUgSmFuIDAxIDAwOjAwOjA0IDE5NzAgKzAwMDAKQEAg
259 259 LTAsMCArMSwzIEBACithIG11bHRpbGluZQorCitkZXNjcmlwdGlvbgpkaWZmIC1yIGZmMmM5ZmEy
260 260 MDE4YiAtciBjM2M5ZTM3ZGI5ZjQgdXRmCi0tLSAvZGV2L251bGwJVGh1IEphbiAwMSAwMDowMDow
261 261 MCAxOTcwICswMDAwCisrKyBiL3V0ZglUaHUgSmFuIDAxIDAwOjAwOjA0IDE5NzAgKzAwMDAKQEAg
262 262 LTAsMCArMSwxIEBACitow7ZtbWEhCg==
263 263
264 264
265 265 $ rm mbox
266 266
267 267 mime encoded mbox (quoted-printable):
268 268 $ python -c 'fp = open("qp", "wb"); fp.write("%s\nfoo\n\nbar\n" % ("x" * 1024)); fp.close();'
269 269 $ hg commit -A -d '4 0' -m 'charset=utf-8; content-transfer-encoding: quoted-printable'
270 270 adding qp
271 271
272 272 no mime encoding for email --test:
273 273 $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n | \
274 274 > fixheaders > mailtest
275 275 md5sum of qp output:
276 276 $ $TESTDIR/md5sum.py mailtest
277 277 0402c7d033e04044e423bb04816f9dae mailtest
278 278 $ rm mailtest
279 279
280 280 mime encoded mbox (quoted-printable):
281 281 $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox
282 282 This patch series consists of 1 patches.
283 283
284 284
285 285 Writing [PATCH] charset=utf-8; content-transfer-encoding: quoted-printable ...
286 286 $ cat mbox | fixheaders
287 287 From quux Thu Jan 01 00:04:01 1970
288 288 Content-Type: text/plain; charset="us-ascii"
289 289 MIME-Version: 1.0
290 290 Content-Transfer-Encoding: quoted-printable
291 291 Subject: [PATCH] charset=utf-8; content-transfer-encoding: quoted-printable
292 292 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
293 293 Message-Id: <c655633f8c87700bb38c.240@
294 294 User-Agent: Mercurial-patchbomb
295 295 Date: Thu, 01 Jan 1970 00:04:00 +0000
296 296 From: quux
297 297 To: foo
298 298 Cc: bar
299 299
300 300 # HG changeset patch
301 301 # User test
302 302 # Date 4 0
303 303 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
304 304 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
305 305 charset=3Dutf-8; content-transfer-encoding: quoted-printable
306 306
307 307 diff -r c3c9e37db9f4 -r c655633f8c87 qp
308 308 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
309 309 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
310 310 @@ -0,0 +1,4 @@
311 311 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
312 312 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
313 313 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
314 314 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
315 315 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
316 316 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
317 317 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
318 318 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
319 319 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
320 320 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
321 321 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
322 322 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
323 323 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
324 324 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
325 325 +foo
326 326 +
327 327 +bar
328 328
329 329
330 330
331 331 $ rm mbox
332 332
333 333 iso-8859-1 patch:
334 334 $ python -c 'fp = open("isolatin", "wb"); fp.write("h\xF6mma!\n"); fp.close();'
335 335 $ hg commit -A -d '5 0' -m 'charset=us-ascii; content-transfer-encoding: 8bit'
336 336 adding isolatin
337 337
338 338 fake ascii mbox:
339 339 $ hg email --date '1970-1-1 0:5' -f quux -t foo -c bar -r tip -m mbox
340 340 This patch series consists of 1 patches.
341 341
342 342
343 343 Writing [PATCH] charset=us-ascii; content-transfer-encoding: 8bit ...
344 344 $ fixheaders < mbox > mboxfix
345 345
346 346 md5sum of 8-bit output:
347 347 $ $TESTDIR/md5sum.py mboxfix
348 348 9ea043d8fc43a71045114508baed144b mboxfix
349 349
350 350 test diffstat for single patch:
351 351 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y -r 2 | \
352 352 > fixheaders
353 353 This patch series consists of 1 patches.
354 354
355 355
356 356 Final summary:
357 357
358 358 From: quux
359 359 To: foo
360 360 Cc: bar
361 361 Subject: [PATCH] test
362 362 c | 1 +
363 363 1 files changed, 1 insertions(+), 0 deletions(-)
364 364
365 365 are you sure you want to send (yn)? y
366 366
367 367 Displaying [PATCH] test ...
368 368 Content-Type: text/plain; charset="us-ascii"
369 369 MIME-Version: 1.0
370 370 Content-Transfer-Encoding: 7bit
371 371 Subject: [PATCH] test
372 372 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
373 373 Message-Id: <ff2c9fa2018b15fa74b3.60@
374 374 User-Agent: Mercurial-patchbomb
375 375 Date: Thu, 01 Jan 1970 00:01:00 +0000
376 376 From: quux
377 377 To: foo
378 378 Cc: bar
379 379
380 380 c | 1 +
381 381 1 files changed, 1 insertions(+), 0 deletions(-)
382 382
383 383
384 384 # HG changeset patch
385 385 # User test
386 386 # Date 3 0
387 387 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
388 388 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
389 389 c
390 390
391 391 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
392 392 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
393 393 +++ b/c Thu Jan 01 00:00:03 1970 +0000
394 394 @@ -0,0 +1,1 @@
395 395 +c
396 396
397 397
398 398 test diffstat for multiple patches:
399 399 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y \
400 400 > -r 0:1 | fixheaders
401 401 This patch series consists of 2 patches.
402 402
403 403
404 404 Write the introductory message for the patch series.
405 405
406 406
407 407 Final summary:
408 408
409 409 From: quux
410 410 To: foo
411 411 Cc: bar
412 412 Subject: [PATCH 0 of 2] test
413 413 a | 1 +
414 414 b | 1 +
415 415 2 files changed, 2 insertions(+), 0 deletions(-)
416 416 Subject: [PATCH 1 of 2] a
417 417 a | 1 +
418 418 1 files changed, 1 insertions(+), 0 deletions(-)
419 419 Subject: [PATCH 2 of 2] b
420 420 b | 1 +
421 421 1 files changed, 1 insertions(+), 0 deletions(-)
422 422
423 423 are you sure you want to send (yn)? y
424 424
425 425 Displaying [PATCH 0 of 2] test ...
426 426 Content-Type: text/plain; charset="us-ascii"
427 427 MIME-Version: 1.0
428 428 Content-Transfer-Encoding: 7bit
429 429 Subject: [PATCH 0 of 2] test
430 430 Message-Id: <patchbomb.60@
431 431 User-Agent: Mercurial-patchbomb
432 432 Date: Thu, 01 Jan 1970 00:01:00 +0000
433 433 From: quux
434 434 To: foo
435 435 Cc: bar
436 436
437 437
438 438 a | 1 +
439 439 b | 1 +
440 440 2 files changed, 2 insertions(+), 0 deletions(-)
441 441
442 442 Displaying [PATCH 1 of 2] a ...
443 443 Content-Type: text/plain; charset="us-ascii"
444 444 MIME-Version: 1.0
445 445 Content-Transfer-Encoding: 7bit
446 446 Subject: [PATCH 1 of 2] a
447 447 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
448 448 Message-Id: <8580ff50825a50c8f716.61@
449 449 In-Reply-To: <patchbomb.60@
450 450 References: <patchbomb.60@
451 451 User-Agent: Mercurial-patchbomb
452 452 Date: Thu, 01 Jan 1970 00:01:01 +0000
453 453 From: quux
454 454 To: foo
455 455 Cc: bar
456 456
457 457 a | 1 +
458 458 1 files changed, 1 insertions(+), 0 deletions(-)
459 459
460 460
461 461 # HG changeset patch
462 462 # User test
463 463 # Date 1 0
464 464 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
465 465 # Parent 0000000000000000000000000000000000000000
466 466 a
467 467
468 468 diff -r 000000000000 -r 8580ff50825a a
469 469 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
470 470 +++ b/a Thu Jan 01 00:00:01 1970 +0000
471 471 @@ -0,0 +1,1 @@
472 472 +a
473 473
474 474 Displaying [PATCH 2 of 2] b ...
475 475 Content-Type: text/plain; charset="us-ascii"
476 476 MIME-Version: 1.0
477 477 Content-Transfer-Encoding: 7bit
478 478 Subject: [PATCH 2 of 2] b
479 479 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
480 480 Message-Id: <97d72e5f12c7e84f8506.62@
481 481 In-Reply-To: <patchbomb.60@
482 482 References: <patchbomb.60@
483 483 User-Agent: Mercurial-patchbomb
484 484 Date: Thu, 01 Jan 1970 00:01:02 +0000
485 485 From: quux
486 486 To: foo
487 487 Cc: bar
488 488
489 489 b | 1 +
490 490 1 files changed, 1 insertions(+), 0 deletions(-)
491 491
492 492
493 493 # HG changeset patch
494 494 # User test
495 495 # Date 2 0
496 496 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
497 497 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
498 498 b
499 499
500 500 diff -r 8580ff50825a -r 97d72e5f12c7 b
501 501 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
502 502 +++ b/b Thu Jan 01 00:00:02 1970 +0000
503 503 @@ -0,0 +1,1 @@
504 504 +b
505 505
506 506
507 507 test inline for single patch:
508 508 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 2 | \
509 509 > fixheaders
510 510 This patch series consists of 1 patches.
511 511
512 512
513 513 Displaying [PATCH] test ...
514 514 Content-Type: multipart/mixed; boundary="===
515 515 MIME-Version: 1.0
516 516 Subject: [PATCH] test
517 517 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
518 518 Message-Id: <ff2c9fa2018b15fa74b3.60@
519 519 User-Agent: Mercurial-patchbomb
520 520 Date: Thu, 01 Jan 1970 00:01:00 +0000
521 521 From: quux
522 522 To: foo
523 523 Cc: bar
524 524
525 525 --===
526 526 Content-Type: text/x-patch; charset="us-ascii"
527 527 MIME-Version: 1.0
528 528 Content-Transfer-Encoding: 7bit
529 529 Content-Disposition: inline; filename=t2.patch
530 530
531 531 # HG changeset patch
532 532 # User test
533 533 # Date 3 0
534 534 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
535 535 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
536 536 c
537 537
538 538 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
539 539 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
540 540 +++ b/c Thu Jan 01 00:00:03 1970 +0000
541 541 @@ -0,0 +1,1 @@
542 542 +c
543 543
544 544 --===
545 545
546 546
547 547 test inline for single patch (quoted-printable):
548 548 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 4 | \
549 549 > fixheaders
550 550 This patch series consists of 1 patches.
551 551
552 552
553 553 Displaying [PATCH] test ...
554 554 Content-Type: multipart/mixed; boundary="===
555 555 MIME-Version: 1.0
556 556 Subject: [PATCH] test
557 557 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
558 558 Message-Id: <c655633f8c87700bb38c.60@
559 559 User-Agent: Mercurial-patchbomb
560 560 Date: Thu, 01 Jan 1970 00:01:00 +0000
561 561 From: quux
562 562 To: foo
563 563 Cc: bar
564 564
565 565 --===
566 566 Content-Type: text/x-patch; charset="us-ascii"
567 567 MIME-Version: 1.0
568 568 Content-Transfer-Encoding: quoted-printable
569 569 Content-Disposition: inline; filename=t2.patch
570 570
571 571 # HG changeset patch
572 572 # User test
573 573 # Date 4 0
574 574 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
575 575 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
576 576 charset=3Dutf-8; content-transfer-encoding: quoted-printable
577 577
578 578 diff -r c3c9e37db9f4 -r c655633f8c87 qp
579 579 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
580 580 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
581 581 @@ -0,0 +1,4 @@
582 582 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
583 583 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
584 584 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
585 585 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
586 586 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
587 587 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
588 588 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
589 589 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
590 590 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
591 591 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
592 592 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
593 593 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
594 594 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
595 595 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
596 596 +foo
597 597 +
598 598 +bar
599 599
600 600 --===
601 601
602 602 test inline for multiple patches:
603 603 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \
604 604 > -r 0:1 -r 4 | fixheaders
605 605 This patch series consists of 3 patches.
606 606
607 607
608 608 Write the introductory message for the patch series.
609 609
610 610
611 611 Displaying [PATCH 0 of 3] test ...
612 612 Content-Type: text/plain; charset="us-ascii"
613 613 MIME-Version: 1.0
614 614 Content-Transfer-Encoding: 7bit
615 615 Subject: [PATCH 0 of 3] test
616 616 Message-Id: <patchbomb.60@
617 617 User-Agent: Mercurial-patchbomb
618 618 Date: Thu, 01 Jan 1970 00:01:00 +0000
619 619 From: quux
620 620 To: foo
621 621 Cc: bar
622 622
623 623
624 624 Displaying [PATCH 1 of 3] a ...
625 625 Content-Type: multipart/mixed; boundary="===
626 626 MIME-Version: 1.0
627 627 Subject: [PATCH 1 of 3] a
628 628 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
629 629 Message-Id: <8580ff50825a50c8f716.61@
630 630 In-Reply-To: <patchbomb.60@
631 631 References: <patchbomb.60@
632 632 User-Agent: Mercurial-patchbomb
633 633 Date: Thu, 01 Jan 1970 00:01:01 +0000
634 634 From: quux
635 635 To: foo
636 636 Cc: bar
637 637
638 638 --===
639 639 Content-Type: text/x-patch; charset="us-ascii"
640 640 MIME-Version: 1.0
641 641 Content-Transfer-Encoding: 7bit
642 642 Content-Disposition: inline; filename=t2-1.patch
643 643
644 644 # HG changeset patch
645 645 # User test
646 646 # Date 1 0
647 647 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
648 648 # Parent 0000000000000000000000000000000000000000
649 649 a
650 650
651 651 diff -r 000000000000 -r 8580ff50825a a
652 652 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
653 653 +++ b/a Thu Jan 01 00:00:01 1970 +0000
654 654 @@ -0,0 +1,1 @@
655 655 +a
656 656
657 657 --===
658 658 Displaying [PATCH 2 of 3] b ...
659 659 Content-Type: multipart/mixed; boundary="===
660 660 MIME-Version: 1.0
661 661 Subject: [PATCH 2 of 3] b
662 662 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
663 663 Message-Id: <97d72e5f12c7e84f8506.62@
664 664 In-Reply-To: <patchbomb.60@
665 665 References: <patchbomb.60@
666 666 User-Agent: Mercurial-patchbomb
667 667 Date: Thu, 01 Jan 1970 00:01:02 +0000
668 668 From: quux
669 669 To: foo
670 670 Cc: bar
671 671
672 672 --===
673 673 Content-Type: text/x-patch; charset="us-ascii"
674 674 MIME-Version: 1.0
675 675 Content-Transfer-Encoding: 7bit
676 676 Content-Disposition: inline; filename=t2-2.patch
677 677
678 678 # HG changeset patch
679 679 # User test
680 680 # Date 2 0
681 681 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
682 682 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
683 683 b
684 684
685 685 diff -r 8580ff50825a -r 97d72e5f12c7 b
686 686 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
687 687 +++ b/b Thu Jan 01 00:00:02 1970 +0000
688 688 @@ -0,0 +1,1 @@
689 689 +b
690 690
691 691 --===
692 692 Displaying [PATCH 3 of 3] charset=utf-8; content-transfer-encoding: quoted-printable ...
693 693 Content-Type: multipart/mixed; boundary="===
694 694 MIME-Version: 1.0
695 695 Subject: [PATCH 3 of 3] charset=utf-8;
696 696 content-transfer-encoding: quoted-printable
697 697 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
698 698 Message-Id: <c655633f8c87700bb38c.63@
699 699 In-Reply-To: <patchbomb.60@
700 700 References: <patchbomb.60@
701 701 User-Agent: Mercurial-patchbomb
702 702 Date: Thu, 01 Jan 1970 00:01:03 +0000
703 703 From: quux
704 704 To: foo
705 705 Cc: bar
706 706
707 707 --===
708 708 Content-Type: text/x-patch; charset="us-ascii"
709 709 MIME-Version: 1.0
710 710 Content-Transfer-Encoding: quoted-printable
711 711 Content-Disposition: inline; filename=t2-3.patch
712 712
713 713 # HG changeset patch
714 714 # User test
715 715 # Date 4 0
716 716 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
717 717 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
718 718 charset=3Dutf-8; content-transfer-encoding: quoted-printable
719 719
720 720 diff -r c3c9e37db9f4 -r c655633f8c87 qp
721 721 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
722 722 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
723 723 @@ -0,0 +1,4 @@
724 724 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
725 725 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
726 726 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
727 727 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
728 728 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
729 729 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
730 730 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
731 731 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
732 732 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
733 733 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
734 734 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
735 735 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
736 736 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
737 737 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
738 738 +foo
739 739 +
740 740 +bar
741 741
742 742 --===
743 743
744 744 test attach for single patch:
745 745 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 2 | \
746 746 > fixheaders
747 747 This patch series consists of 1 patches.
748 748
749 749
750 750 Displaying [PATCH] test ...
751 751 Content-Type: multipart/mixed; boundary="===
752 752 MIME-Version: 1.0
753 753 Subject: [PATCH] test
754 754 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
755 755 Message-Id: <ff2c9fa2018b15fa74b3.60@
756 756 User-Agent: Mercurial-patchbomb
757 757 Date: Thu, 01 Jan 1970 00:01:00 +0000
758 758 From: quux
759 759 To: foo
760 760 Cc: bar
761 761
762 762 --===
763 763 Content-Type: text/plain; charset="us-ascii"
764 764 MIME-Version: 1.0
765 765 Content-Transfer-Encoding: 7bit
766 766
767 767 Patch subject is complete summary.
768 768
769 769
770 770
771 771 --===
772 772 Content-Type: text/x-patch; charset="us-ascii"
773 773 MIME-Version: 1.0
774 774 Content-Transfer-Encoding: 7bit
775 775 Content-Disposition: attachment; filename=t2.patch
776 776
777 777 # HG changeset patch
778 778 # User test
779 779 # Date 3 0
780 780 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
781 781 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
782 782 c
783 783
784 784 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
785 785 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
786 786 +++ b/c Thu Jan 01 00:00:03 1970 +0000
787 787 @@ -0,0 +1,1 @@
788 788 +c
789 789
790 790 --===
791 791
792 792 test attach for single patch (quoted-printable):
793 793 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 4 | \
794 794 > fixheaders
795 795 This patch series consists of 1 patches.
796 796
797 797
798 798 Displaying [PATCH] test ...
799 799 Content-Type: multipart/mixed; boundary="===
800 800 MIME-Version: 1.0
801 801 Subject: [PATCH] test
802 802 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
803 803 Message-Id: <c655633f8c87700bb38c.60@
804 804 User-Agent: Mercurial-patchbomb
805 805 Date: Thu, 01 Jan 1970 00:01:00 +0000
806 806 From: quux
807 807 To: foo
808 808 Cc: bar
809 809
810 810 --===
811 811 Content-Type: text/plain; charset="us-ascii"
812 812 MIME-Version: 1.0
813 813 Content-Transfer-Encoding: 7bit
814 814
815 815 Patch subject is complete summary.
816 816
817 817
818 818
819 819 --===
820 820 Content-Type: text/x-patch; charset="us-ascii"
821 821 MIME-Version: 1.0
822 822 Content-Transfer-Encoding: quoted-printable
823 823 Content-Disposition: attachment; filename=t2.patch
824 824
825 825 # HG changeset patch
826 826 # User test
827 827 # Date 4 0
828 828 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
829 829 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
830 830 charset=3Dutf-8; content-transfer-encoding: quoted-printable
831 831
832 832 diff -r c3c9e37db9f4 -r c655633f8c87 qp
833 833 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
834 834 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
835 835 @@ -0,0 +1,4 @@
836 836 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
837 837 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
838 838 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
839 839 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
840 840 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
841 841 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
842 842 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
843 843 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
844 844 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
845 845 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
846 846 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
847 847 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
848 848 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
849 849 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
850 850 +foo
851 851 +
852 852 +bar
853 853
854 854 --===
855 855
856 856 test attach for multiple patches:
857 857 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a \
858 858 > -r 0:1 -r 4 | fixheaders
859 859 This patch series consists of 3 patches.
860 860
861 861
862 862 Write the introductory message for the patch series.
863 863
864 864
865 865 Displaying [PATCH 0 of 3] test ...
866 866 Content-Type: text/plain; charset="us-ascii"
867 867 MIME-Version: 1.0
868 868 Content-Transfer-Encoding: 7bit
869 869 Subject: [PATCH 0 of 3] test
870 870 Message-Id: <patchbomb.60@
871 871 User-Agent: Mercurial-patchbomb
872 872 Date: Thu, 01 Jan 1970 00:01:00 +0000
873 873 From: quux
874 874 To: foo
875 875 Cc: bar
876 876
877 877
878 878 Displaying [PATCH 1 of 3] a ...
879 879 Content-Type: multipart/mixed; boundary="===
880 880 MIME-Version: 1.0
881 881 Subject: [PATCH 1 of 3] a
882 882 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
883 883 Message-Id: <8580ff50825a50c8f716.61@
884 884 In-Reply-To: <patchbomb.60@
885 885 References: <patchbomb.60@
886 886 User-Agent: Mercurial-patchbomb
887 887 Date: Thu, 01 Jan 1970 00:01:01 +0000
888 888 From: quux
889 889 To: foo
890 890 Cc: bar
891 891
892 892 --===
893 893 Content-Type: text/plain; charset="us-ascii"
894 894 MIME-Version: 1.0
895 895 Content-Transfer-Encoding: 7bit
896 896
897 897 Patch subject is complete summary.
898 898
899 899
900 900
901 901 --===
902 902 Content-Type: text/x-patch; charset="us-ascii"
903 903 MIME-Version: 1.0
904 904 Content-Transfer-Encoding: 7bit
905 905 Content-Disposition: attachment; filename=t2-1.patch
906 906
907 907 # HG changeset patch
908 908 # User test
909 909 # Date 1 0
910 910 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
911 911 # Parent 0000000000000000000000000000000000000000
912 912 a
913 913
914 914 diff -r 000000000000 -r 8580ff50825a a
915 915 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
916 916 +++ b/a Thu Jan 01 00:00:01 1970 +0000
917 917 @@ -0,0 +1,1 @@
918 918 +a
919 919
920 920 --===
921 921 Displaying [PATCH 2 of 3] b ...
922 922 Content-Type: multipart/mixed; boundary="===
923 923 MIME-Version: 1.0
924 924 Subject: [PATCH 2 of 3] b
925 925 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
926 926 Message-Id: <97d72e5f12c7e84f8506.62@
927 927 In-Reply-To: <patchbomb.60@
928 928 References: <patchbomb.60@
929 929 User-Agent: Mercurial-patchbomb
930 930 Date: Thu, 01 Jan 1970 00:01:02 +0000
931 931 From: quux
932 932 To: foo
933 933 Cc: bar
934 934
935 935 --===
936 936 Content-Type: text/plain; charset="us-ascii"
937 937 MIME-Version: 1.0
938 938 Content-Transfer-Encoding: 7bit
939 939
940 940 Patch subject is complete summary.
941 941
942 942
943 943
944 944 --===
945 945 Content-Type: text/x-patch; charset="us-ascii"
946 946 MIME-Version: 1.0
947 947 Content-Transfer-Encoding: 7bit
948 948 Content-Disposition: attachment; filename=t2-2.patch
949 949
950 950 # HG changeset patch
951 951 # User test
952 952 # Date 2 0
953 953 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
954 954 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
955 955 b
956 956
957 957 diff -r 8580ff50825a -r 97d72e5f12c7 b
958 958 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
959 959 +++ b/b Thu Jan 01 00:00:02 1970 +0000
960 960 @@ -0,0 +1,1 @@
961 961 +b
962 962
963 963 --===
964 964 Displaying [PATCH 3 of 3] charset=utf-8; content-transfer-encoding: quoted-printable ...
965 965 Content-Type: multipart/mixed; boundary="===
966 966 MIME-Version: 1.0
967 967 Subject: [PATCH 3 of 3] charset=utf-8;
968 968 content-transfer-encoding: quoted-printable
969 969 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
970 970 Message-Id: <c655633f8c87700bb38c.63@
971 971 In-Reply-To: <patchbomb.60@
972 972 References: <patchbomb.60@
973 973 User-Agent: Mercurial-patchbomb
974 974 Date: Thu, 01 Jan 1970 00:01:03 +0000
975 975 From: quux
976 976 To: foo
977 977 Cc: bar
978 978
979 979 --===
980 980 Content-Type: text/plain; charset="us-ascii"
981 981 MIME-Version: 1.0
982 982 Content-Transfer-Encoding: 7bit
983 983
984 984 Patch subject is complete summary.
985 985
986 986
987 987
988 988 --===
989 989 Content-Type: text/x-patch; charset="us-ascii"
990 990 MIME-Version: 1.0
991 991 Content-Transfer-Encoding: quoted-printable
992 992 Content-Disposition: attachment; filename=t2-3.patch
993 993
994 994 # HG changeset patch
995 995 # User test
996 996 # Date 4 0
997 997 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
998 998 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
999 999 charset=3Dutf-8; content-transfer-encoding: quoted-printable
1000 1000
1001 1001 diff -r c3c9e37db9f4 -r c655633f8c87 qp
1002 1002 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1003 1003 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
1004 1004 @@ -0,0 +1,4 @@
1005 1005 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1006 1006 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1007 1007 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1008 1008 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1009 1009 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1010 1010 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1011 1011 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1012 1012 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1013 1013 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1014 1014 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1015 1015 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1016 1016 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1017 1017 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1018 1018 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1019 1019 +foo
1020 1020 +
1021 1021 +bar
1022 1022
1023 1023 --===
1024 1024
1025 1025 test intro for single patch:
1026 1026 $ hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \
1027 1027 > -r 2 | fixheaders
1028 1028 This patch series consists of 1 patches.
1029 1029
1030 1030
1031 1031 Write the introductory message for the patch series.
1032 1032
1033 1033
1034 1034 Displaying [PATCH 0 of 1] test ...
1035 1035 Content-Type: text/plain; charset="us-ascii"
1036 1036 MIME-Version: 1.0
1037 1037 Content-Transfer-Encoding: 7bit
1038 1038 Subject: [PATCH 0 of 1] test
1039 1039 Message-Id: <patchbomb.60@
1040 1040 User-Agent: Mercurial-patchbomb
1041 1041 Date: Thu, 01 Jan 1970 00:01:00 +0000
1042 1042 From: quux
1043 1043 To: foo
1044 1044 Cc: bar
1045 1045
1046 1046
1047 1047 Displaying [PATCH 1 of 1] c ...
1048 1048 Content-Type: text/plain; charset="us-ascii"
1049 1049 MIME-Version: 1.0
1050 1050 Content-Transfer-Encoding: 7bit
1051 1051 Subject: [PATCH 1 of 1] c
1052 1052 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1053 1053 Message-Id: <ff2c9fa2018b15fa74b3.61@
1054 1054 In-Reply-To: <patchbomb.60@
1055 1055 References: <patchbomb.60@
1056 1056 User-Agent: Mercurial-patchbomb
1057 1057 Date: Thu, 01 Jan 1970 00:01:01 +0000
1058 1058 From: quux
1059 1059 To: foo
1060 1060 Cc: bar
1061 1061
1062 1062 # HG changeset patch
1063 1063 # User test
1064 1064 # Date 3 0
1065 1065 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1066 1066 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1067 1067 c
1068 1068
1069 1069 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1070 1070 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1071 1071 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1072 1072 @@ -0,0 +1,1 @@
1073 1073 +c
1074 1074
1075 1075
1076 1076 test --desc without --intro for a single patch:
1077 1077 $ echo foo > intro.text
1078 1078 $ hg email --date '1970-1-1 0:1' -n --desc intro.text -f quux -t foo -c bar \
1079 1079 > -s test -r 2 | fixheaders
1080 1080 This patch series consists of 1 patches.
1081 1081
1082 1082
1083 1083 Displaying [PATCH 0 of 1] test ...
1084 1084 Content-Type: text/plain; charset="us-ascii"
1085 1085 MIME-Version: 1.0
1086 1086 Content-Transfer-Encoding: 7bit
1087 1087 Subject: [PATCH 0 of 1] test
1088 1088 Message-Id: <patchbomb.60@
1089 1089 User-Agent: Mercurial-patchbomb
1090 1090 Date: Thu, 01 Jan 1970 00:01:00 +0000
1091 1091 From: quux
1092 1092 To: foo
1093 1093 Cc: bar
1094 1094
1095 1095 foo
1096 1096
1097 1097 Displaying [PATCH 1 of 1] c ...
1098 1098 Content-Type: text/plain; charset="us-ascii"
1099 1099 MIME-Version: 1.0
1100 1100 Content-Transfer-Encoding: 7bit
1101 1101 Subject: [PATCH 1 of 1] c
1102 1102 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1103 1103 Message-Id: <ff2c9fa2018b15fa74b3.61@
1104 1104 In-Reply-To: <patchbomb.60@
1105 1105 References: <patchbomb.60@
1106 1106 User-Agent: Mercurial-patchbomb
1107 1107 Date: Thu, 01 Jan 1970 00:01:01 +0000
1108 1108 From: quux
1109 1109 To: foo
1110 1110 Cc: bar
1111 1111
1112 1112 # HG changeset patch
1113 1113 # User test
1114 1114 # Date 3 0
1115 1115 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1116 1116 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1117 1117 c
1118 1118
1119 1119 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1120 1120 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1121 1121 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1122 1122 @@ -0,0 +1,1 @@
1123 1123 +c
1124 1124
1125 1125
1126 1126 test intro for multiple patches:
1127 1127 $ hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \
1128 1128 > -r 0:1 | fixheaders
1129 1129 This patch series consists of 2 patches.
1130 1130
1131 1131
1132 1132 Write the introductory message for the patch series.
1133 1133
1134 1134
1135 1135 Displaying [PATCH 0 of 2] test ...
1136 1136 Content-Type: text/plain; charset="us-ascii"
1137 1137 MIME-Version: 1.0
1138 1138 Content-Transfer-Encoding: 7bit
1139 1139 Subject: [PATCH 0 of 2] test
1140 1140 Message-Id: <patchbomb.60@
1141 1141 User-Agent: Mercurial-patchbomb
1142 1142 Date: Thu, 01 Jan 1970 00:01:00 +0000
1143 1143 From: quux
1144 1144 To: foo
1145 1145 Cc: bar
1146 1146
1147 1147
1148 1148 Displaying [PATCH 1 of 2] a ...
1149 1149 Content-Type: text/plain; charset="us-ascii"
1150 1150 MIME-Version: 1.0
1151 1151 Content-Transfer-Encoding: 7bit
1152 1152 Subject: [PATCH 1 of 2] a
1153 1153 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1154 1154 Message-Id: <8580ff50825a50c8f716.61@
1155 1155 In-Reply-To: <patchbomb.60@
1156 1156 References: <patchbomb.60@
1157 1157 User-Agent: Mercurial-patchbomb
1158 1158 Date: Thu, 01 Jan 1970 00:01:01 +0000
1159 1159 From: quux
1160 1160 To: foo
1161 1161 Cc: bar
1162 1162
1163 1163 # HG changeset patch
1164 1164 # User test
1165 1165 # Date 1 0
1166 1166 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1167 1167 # Parent 0000000000000000000000000000000000000000
1168 1168 a
1169 1169
1170 1170 diff -r 000000000000 -r 8580ff50825a a
1171 1171 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1172 1172 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1173 1173 @@ -0,0 +1,1 @@
1174 1174 +a
1175 1175
1176 1176 Displaying [PATCH 2 of 2] b ...
1177 1177 Content-Type: text/plain; charset="us-ascii"
1178 1178 MIME-Version: 1.0
1179 1179 Content-Transfer-Encoding: 7bit
1180 1180 Subject: [PATCH 2 of 2] b
1181 1181 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1182 1182 Message-Id: <97d72e5f12c7e84f8506.62@
1183 1183 In-Reply-To: <patchbomb.60@
1184 1184 References: <patchbomb.60@
1185 1185 User-Agent: Mercurial-patchbomb
1186 1186 Date: Thu, 01 Jan 1970 00:01:02 +0000
1187 1187 From: quux
1188 1188 To: foo
1189 1189 Cc: bar
1190 1190
1191 1191 # HG changeset patch
1192 1192 # User test
1193 1193 # Date 2 0
1194 1194 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1195 1195 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1196 1196 b
1197 1197
1198 1198 diff -r 8580ff50825a -r 97d72e5f12c7 b
1199 1199 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1200 1200 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1201 1201 @@ -0,0 +1,1 @@
1202 1202 +b
1203 1203
1204 1204
1205 1205 test reply-to via config:
1206 1206 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \
1207 1207 > --config patchbomb.reply-to='baz@example.com' | fixheaders
1208 1208 This patch series consists of 1 patches.
1209 1209
1210 1210
1211 1211 Displaying [PATCH] test ...
1212 1212 Content-Type: text/plain; charset="us-ascii"
1213 1213 MIME-Version: 1.0
1214 1214 Content-Transfer-Encoding: 7bit
1215 1215 Subject: [PATCH] test
1216 1216 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1217 1217 Message-Id: <ff2c9fa2018b15fa74b3.60@
1218 1218 User-Agent: Mercurial-patchbomb
1219 1219 Date: Thu, 01 Jan 1970 00:01:00 +0000
1220 1220 From: quux
1221 1221 To: foo
1222 1222 Cc: bar
1223 1223 Reply-To: baz@example.com
1224 1224
1225 1225 # HG changeset patch
1226 1226 # User test
1227 1227 # Date 3 0
1228 1228 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1229 1229 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1230 1230 c
1231 1231
1232 1232 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1233 1233 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1234 1234 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1235 1235 @@ -0,0 +1,1 @@
1236 1236 +c
1237 1237
1238 1238
1239 1239 test reply-to via command line:
1240 1240 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \
1241 1241 > --reply-to baz --reply-to fred | fixheaders
1242 1242 This patch series consists of 1 patches.
1243 1243
1244 1244
1245 1245 Displaying [PATCH] test ...
1246 1246 Content-Type: text/plain; charset="us-ascii"
1247 1247 MIME-Version: 1.0
1248 1248 Content-Transfer-Encoding: 7bit
1249 1249 Subject: [PATCH] test
1250 1250 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1251 1251 Message-Id: <ff2c9fa2018b15fa74b3.60@
1252 1252 User-Agent: Mercurial-patchbomb
1253 1253 Date: Thu, 01 Jan 1970 00:01:00 +0000
1254 1254 From: quux
1255 1255 To: foo
1256 1256 Cc: bar
1257 1257 Reply-To: baz, fred
1258 1258
1259 1259 # HG changeset patch
1260 1260 # User test
1261 1261 # Date 3 0
1262 1262 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1263 1263 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1264 1264 c
1265 1265
1266 1266 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1267 1267 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1268 1268 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1269 1269 @@ -0,0 +1,1 @@
1270 1270 +c
1271 1271
1272 1272
1273 1273 tagging csets:
1274 1274 $ hg tag -r0 zero zero.foo
1275 1275 $ hg tag -r1 one one.patch
1276 1276 $ hg tag -r2 two two.diff
1277 1277
1278 1278 test inline for single named patch:
1279 1279 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 2 | \
1280 1280 > fixheaders
1281 1281 This patch series consists of 1 patches.
1282 1282
1283 1283
1284 1284 Displaying [PATCH] test ...
1285 1285 Content-Type: multipart/mixed; boundary="===
1286 1286 MIME-Version: 1.0
1287 1287 Subject: [PATCH] test
1288 1288 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1289 1289 Message-Id: <ff2c9fa2018b15fa74b3.60@
1290 1290 User-Agent: Mercurial-patchbomb
1291 1291 Date: Thu, 01 Jan 1970 00:01:00 +0000
1292 1292 From: quux
1293 1293 To: foo
1294 1294 Cc: bar
1295 1295
1296 1296 --===
1297 1297 Content-Type: text/x-patch; charset="us-ascii"
1298 1298 MIME-Version: 1.0
1299 1299 Content-Transfer-Encoding: 7bit
1300 1300 Content-Disposition: inline; filename=two.diff
1301 1301
1302 1302 # HG changeset patch
1303 1303 # User test
1304 1304 # Date 3 0
1305 1305 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1306 1306 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1307 1307 c
1308 1308
1309 1309 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1310 1310 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1311 1311 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1312 1312 @@ -0,0 +1,1 @@
1313 1313 +c
1314 1314
1315 1315 --===
1316 1316
1317 1317 test inline for multiple named/unnamed patches:
1318 1318 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 0:1 | \
1319 1319 > fixheaders
1320 1320 This patch series consists of 2 patches.
1321 1321
1322 1322
1323 1323 Write the introductory message for the patch series.
1324 1324
1325 1325
1326 1326 Displaying [PATCH 0 of 2] test ...
1327 1327 Content-Type: text/plain; charset="us-ascii"
1328 1328 MIME-Version: 1.0
1329 1329 Content-Transfer-Encoding: 7bit
1330 1330 Subject: [PATCH 0 of 2] test
1331 1331 Message-Id: <patchbomb.60@
1332 1332 User-Agent: Mercurial-patchbomb
1333 1333 Date: Thu, 01 Jan 1970 00:01:00 +0000
1334 1334 From: quux
1335 1335 To: foo
1336 1336 Cc: bar
1337 1337
1338 1338
1339 1339 Displaying [PATCH 1 of 2] a ...
1340 1340 Content-Type: multipart/mixed; boundary="===
1341 1341 MIME-Version: 1.0
1342 1342 Subject: [PATCH 1 of 2] a
1343 1343 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1344 1344 Message-Id: <8580ff50825a50c8f716.61@
1345 1345 In-Reply-To: <patchbomb.60@
1346 1346 References: <patchbomb.60@
1347 1347 User-Agent: Mercurial-patchbomb
1348 1348 Date: Thu, 01 Jan 1970 00:01:01 +0000
1349 1349 From: quux
1350 1350 To: foo
1351 1351 Cc: bar
1352 1352
1353 1353 --===
1354 1354 Content-Type: text/x-patch; charset="us-ascii"
1355 1355 MIME-Version: 1.0
1356 1356 Content-Transfer-Encoding: 7bit
1357 1357 Content-Disposition: inline; filename=t2-1.patch
1358 1358
1359 1359 # HG changeset patch
1360 1360 # User test
1361 1361 # Date 1 0
1362 1362 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1363 1363 # Parent 0000000000000000000000000000000000000000
1364 1364 a
1365 1365
1366 1366 diff -r 000000000000 -r 8580ff50825a a
1367 1367 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1368 1368 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1369 1369 @@ -0,0 +1,1 @@
1370 1370 +a
1371 1371
1372 1372 --===
1373 1373 Displaying [PATCH 2 of 2] b ...
1374 1374 Content-Type: multipart/mixed; boundary="===
1375 1375 MIME-Version: 1.0
1376 1376 Subject: [PATCH 2 of 2] b
1377 1377 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1378 1378 Message-Id: <97d72e5f12c7e84f8506.62@
1379 1379 In-Reply-To: <patchbomb.60@
1380 1380 References: <patchbomb.60@
1381 1381 User-Agent: Mercurial-patchbomb
1382 1382 Date: Thu, 01 Jan 1970 00:01:02 +0000
1383 1383 From: quux
1384 1384 To: foo
1385 1385 Cc: bar
1386 1386
1387 1387 --===
1388 1388 Content-Type: text/x-patch; charset="us-ascii"
1389 1389 MIME-Version: 1.0
1390 1390 Content-Transfer-Encoding: 7bit
1391 1391 Content-Disposition: inline; filename=one.patch
1392 1392
1393 1393 # HG changeset patch
1394 1394 # User test
1395 1395 # Date 2 0
1396 1396 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1397 1397 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1398 1398 b
1399 1399
1400 1400 diff -r 8580ff50825a -r 97d72e5f12c7 b
1401 1401 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1402 1402 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1403 1403 @@ -0,0 +1,1 @@
1404 1404 +b
1405 1405
1406 1406 --===
1407 1407
1408 1408
1409 1409 test inreplyto:
1410 1410 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
1411 1411 > -r tip | fixheaders
1412 1412 This patch series consists of 1 patches.
1413 1413
1414 1414
1415 1415 Displaying [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b ...
1416 1416 Content-Type: text/plain; charset="us-ascii"
1417 1417 MIME-Version: 1.0
1418 1418 Content-Transfer-Encoding: 7bit
1419 1419 Subject: [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b
1420 1420 X-Mercurial-Node: e317db6a6f288748d1f6cb064f3810fcba66b1b6
1421 1421 Message-Id: <e317db6a6f288748d1f6.60@
1422 1422 In-Reply-To: <baz>
1423 1423 References: <baz>
1424 1424 User-Agent: Mercurial-patchbomb
1425 1425 Date: Thu, 01 Jan 1970 00:01:00 +0000
1426 1426 From: quux
1427 1427 To: foo
1428 1428 Cc: bar
1429 1429
1430 1430 # HG changeset patch
1431 1431 # User test
1432 1432 # Date 0 0
1433 1433 # Node ID e317db6a6f288748d1f6cb064f3810fcba66b1b6
1434 1434 # Parent eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
1435 1435 Added tag two, two.diff for changeset ff2c9fa2018b
1436 1436
1437 1437 diff -r eae5fcf795ee -r e317db6a6f28 .hgtags
1438 1438 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
1439 1439 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
1440 1440 @@ -2,3 +2,5 @@
1441 1441 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
1442 1442 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
1443 1443 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
1444 1444 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two
1445 1445 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff
1446 1446
1447 1447
1448 1448 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
1449 1449 > -r 0:1
1450 1450 This patch series consists of 2 patches.
1451 1451
1452 1452 abort: Subject: [PATCH 0 of 2] Please enter a valid value
1453 1453 [255]
1454 1454
1455 1455 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
1456 1456 > -s test -r 0:1 | fixheaders
1457 1457 This patch series consists of 2 patches.
1458 1458
1459 1459
1460 1460 Write the introductory message for the patch series.
1461 1461
1462 1462
1463 1463 Displaying [PATCH 0 of 2] test ...
1464 1464 Content-Type: text/plain; charset="us-ascii"
1465 1465 MIME-Version: 1.0
1466 1466 Content-Transfer-Encoding: 7bit
1467 1467 Subject: [PATCH 0 of 2] test
1468 1468 Message-Id: <patchbomb.60@
1469 1469 In-Reply-To: <baz>
1470 1470 References: <baz>
1471 1471 User-Agent: Mercurial-patchbomb
1472 1472 Date: Thu, 01 Jan 1970 00:01:00 +0000
1473 1473 From: quux
1474 1474 To: foo
1475 1475 Cc: bar
1476 1476
1477 1477
1478 1478 Displaying [PATCH 1 of 2] a ...
1479 1479 Content-Type: text/plain; charset="us-ascii"
1480 1480 MIME-Version: 1.0
1481 1481 Content-Transfer-Encoding: 7bit
1482 1482 Subject: [PATCH 1 of 2] a
1483 1483 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1484 1484 Message-Id: <8580ff50825a50c8f716.61@
1485 1485 In-Reply-To: <patchbomb.60@
1486 1486 References: <patchbomb.60@
1487 1487 User-Agent: Mercurial-patchbomb
1488 1488 Date: Thu, 01 Jan 1970 00:01:01 +0000
1489 1489 From: quux
1490 1490 To: foo
1491 1491 Cc: bar
1492 1492
1493 1493 # HG changeset patch
1494 1494 # User test
1495 1495 # Date 1 0
1496 1496 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1497 1497 # Parent 0000000000000000000000000000000000000000
1498 1498 a
1499 1499
1500 1500 diff -r 000000000000 -r 8580ff50825a a
1501 1501 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1502 1502 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1503 1503 @@ -0,0 +1,1 @@
1504 1504 +a
1505 1505
1506 1506 Displaying [PATCH 2 of 2] b ...
1507 1507 Content-Type: text/plain; charset="us-ascii"
1508 1508 MIME-Version: 1.0
1509 1509 Content-Transfer-Encoding: 7bit
1510 1510 Subject: [PATCH 2 of 2] b
1511 1511 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1512 1512 Message-Id: <97d72e5f12c7e84f8506.62@
1513 1513 In-Reply-To: <patchbomb.60@
1514 1514 References: <patchbomb.60@
1515 1515 User-Agent: Mercurial-patchbomb
1516 1516 Date: Thu, 01 Jan 1970 00:01:02 +0000
1517 1517 From: quux
1518 1518 To: foo
1519 1519 Cc: bar
1520 1520
1521 1521 # HG changeset patch
1522 1522 # User test
1523 1523 # Date 2 0
1524 1524 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1525 1525 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1526 1526 b
1527 1527
1528 1528 diff -r 8580ff50825a -r 97d72e5f12c7 b
1529 1529 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1530 1530 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1531 1531 @@ -0,0 +1,1 @@
1532 1532 +b
1533 1533
1534 1534
1535 1535 test single flag for single patch:
1536 1536 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \
1537 1537 > -r 2 | fixheaders
1538 1538 This patch series consists of 1 patches.
1539 1539
1540 1540
1541 1541 Displaying [PATCH fooFlag] test ...
1542 1542 Content-Type: text/plain; charset="us-ascii"
1543 1543 MIME-Version: 1.0
1544 1544 Content-Transfer-Encoding: 7bit
1545 1545 Subject: [PATCH fooFlag] test
1546 1546 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1547 1547 Message-Id: <ff2c9fa2018b15fa74b3.60@
1548 1548 User-Agent: Mercurial-patchbomb
1549 1549 Date: Thu, 01 Jan 1970 00:01:00 +0000
1550 1550 From: quux
1551 1551 To: foo
1552 1552 Cc: bar
1553 1553
1554 1554 # HG changeset patch
1555 1555 # User test
1556 1556 # Date 3 0
1557 1557 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1558 1558 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1559 1559 c
1560 1560
1561 1561 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1562 1562 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1563 1563 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1564 1564 @@ -0,0 +1,1 @@
1565 1565 +c
1566 1566
1567 1567
1568 1568 test single flag for multiple patches:
1569 1569 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \
1570 1570 > -r 0:1 | fixheaders
1571 1571 This patch series consists of 2 patches.
1572 1572
1573 1573
1574 1574 Write the introductory message for the patch series.
1575 1575
1576 1576
1577 1577 Displaying [PATCH 0 of 2 fooFlag] test ...
1578 1578 Content-Type: text/plain; charset="us-ascii"
1579 1579 MIME-Version: 1.0
1580 1580 Content-Transfer-Encoding: 7bit
1581 1581 Subject: [PATCH 0 of 2 fooFlag] test
1582 1582 Message-Id: <patchbomb.60@
1583 1583 User-Agent: Mercurial-patchbomb
1584 1584 Date: Thu, 01 Jan 1970 00:01:00 +0000
1585 1585 From: quux
1586 1586 To: foo
1587 1587 Cc: bar
1588 1588
1589 1589
1590 1590 Displaying [PATCH 1 of 2 fooFlag] a ...
1591 1591 Content-Type: text/plain; charset="us-ascii"
1592 1592 MIME-Version: 1.0
1593 1593 Content-Transfer-Encoding: 7bit
1594 1594 Subject: [PATCH 1 of 2 fooFlag] a
1595 1595 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1596 1596 Message-Id: <8580ff50825a50c8f716.61@
1597 1597 In-Reply-To: <patchbomb.60@
1598 1598 References: <patchbomb.60@
1599 1599 User-Agent: Mercurial-patchbomb
1600 1600 Date: Thu, 01 Jan 1970 00:01:01 +0000
1601 1601 From: quux
1602 1602 To: foo
1603 1603 Cc: bar
1604 1604
1605 1605 # HG changeset patch
1606 1606 # User test
1607 1607 # Date 1 0
1608 1608 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1609 1609 # Parent 0000000000000000000000000000000000000000
1610 1610 a
1611 1611
1612 1612 diff -r 000000000000 -r 8580ff50825a a
1613 1613 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1614 1614 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1615 1615 @@ -0,0 +1,1 @@
1616 1616 +a
1617 1617
1618 1618 Displaying [PATCH 2 of 2 fooFlag] b ...
1619 1619 Content-Type: text/plain; charset="us-ascii"
1620 1620 MIME-Version: 1.0
1621 1621 Content-Transfer-Encoding: 7bit
1622 1622 Subject: [PATCH 2 of 2 fooFlag] b
1623 1623 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1624 1624 Message-Id: <97d72e5f12c7e84f8506.62@
1625 1625 In-Reply-To: <patchbomb.60@
1626 1626 References: <patchbomb.60@
1627 1627 User-Agent: Mercurial-patchbomb
1628 1628 Date: Thu, 01 Jan 1970 00:01:02 +0000
1629 1629 From: quux
1630 1630 To: foo
1631 1631 Cc: bar
1632 1632
1633 1633 # HG changeset patch
1634 1634 # User test
1635 1635 # Date 2 0
1636 1636 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1637 1637 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1638 1638 b
1639 1639
1640 1640 diff -r 8580ff50825a -r 97d72e5f12c7 b
1641 1641 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1642 1642 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1643 1643 @@ -0,0 +1,1 @@
1644 1644 +b
1645 1645
1646 1646
1647 1647 test mutiple flags for single patch:
1648 1648 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \
1649 1649 > -c bar -s test -r 2 | fixheaders
1650 1650 This patch series consists of 1 patches.
1651 1651
1652 1652
1653 1653 Displaying [PATCH fooFlag barFlag] test ...
1654 1654 Content-Type: text/plain; charset="us-ascii"
1655 1655 MIME-Version: 1.0
1656 1656 Content-Transfer-Encoding: 7bit
1657 1657 Subject: [PATCH fooFlag barFlag] test
1658 1658 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1659 1659 Message-Id: <ff2c9fa2018b15fa74b3.60@
1660 1660 User-Agent: Mercurial-patchbomb
1661 1661 Date: Thu, 01 Jan 1970 00:01:00 +0000
1662 1662 From: quux
1663 1663 To: foo
1664 1664 Cc: bar
1665 1665
1666 1666 # HG changeset patch
1667 1667 # User test
1668 1668 # Date 3 0
1669 1669 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1670 1670 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1671 1671 c
1672 1672
1673 1673 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1674 1674 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1675 1675 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1676 1676 @@ -0,0 +1,1 @@
1677 1677 +c
1678 1678
1679 1679
1680 1680 test multiple flags for multiple patches:
1681 1681 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \
1682 1682 > -c bar -s test -r 0:1 | fixheaders
1683 1683 This patch series consists of 2 patches.
1684 1684
1685 1685
1686 1686 Write the introductory message for the patch series.
1687 1687
1688 1688
1689 1689 Displaying [PATCH 0 of 2 fooFlag barFlag] test ...
1690 1690 Content-Type: text/plain; charset="us-ascii"
1691 1691 MIME-Version: 1.0
1692 1692 Content-Transfer-Encoding: 7bit
1693 1693 Subject: [PATCH 0 of 2 fooFlag barFlag] test
1694 1694 Message-Id: <patchbomb.60@
1695 1695 User-Agent: Mercurial-patchbomb
1696 1696 Date: Thu, 01 Jan 1970 00:01:00 +0000
1697 1697 From: quux
1698 1698 To: foo
1699 1699 Cc: bar
1700 1700
1701 1701
1702 1702 Displaying [PATCH 1 of 2 fooFlag barFlag] a ...
1703 1703 Content-Type: text/plain; charset="us-ascii"
1704 1704 MIME-Version: 1.0
1705 1705 Content-Transfer-Encoding: 7bit
1706 1706 Subject: [PATCH 1 of 2 fooFlag barFlag] a
1707 1707 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1708 1708 Message-Id: <8580ff50825a50c8f716.61@
1709 1709 In-Reply-To: <patchbomb.60@
1710 1710 References: <patchbomb.60@
1711 1711 User-Agent: Mercurial-patchbomb
1712 1712 Date: Thu, 01 Jan 1970 00:01:01 +0000
1713 1713 From: quux
1714 1714 To: foo
1715 1715 Cc: bar
1716 1716
1717 1717 # HG changeset patch
1718 1718 # User test
1719 1719 # Date 1 0
1720 1720 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1721 1721 # Parent 0000000000000000000000000000000000000000
1722 1722 a
1723 1723
1724 1724 diff -r 000000000000 -r 8580ff50825a a
1725 1725 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1726 1726 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1727 1727 @@ -0,0 +1,1 @@
1728 1728 +a
1729 1729
1730 1730 Displaying [PATCH 2 of 2 fooFlag barFlag] b ...
1731 1731 Content-Type: text/plain; charset="us-ascii"
1732 1732 MIME-Version: 1.0
1733 1733 Content-Transfer-Encoding: 7bit
1734 1734 Subject: [PATCH 2 of 2 fooFlag barFlag] b
1735 1735 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1736 1736 Message-Id: <97d72e5f12c7e84f8506.62@
1737 1737 In-Reply-To: <patchbomb.60@
1738 1738 References: <patchbomb.60@
1739 1739 User-Agent: Mercurial-patchbomb
1740 1740 Date: Thu, 01 Jan 1970 00:01:02 +0000
1741 1741 From: quux
1742 1742 To: foo
1743 1743 Cc: bar
1744 1744
1745 1745 # HG changeset patch
1746 1746 # User test
1747 1747 # Date 2 0
1748 1748 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1749 1749 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1750 1750 b
1751 1751
1752 1752 diff -r 8580ff50825a -r 97d72e5f12c7 b
1753 1753 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1754 1754 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1755 1755 @@ -0,0 +1,1 @@
1756 1756 +b
1757 1757
1758 1758
1759 1759 test multi-address parsing:
1760 1760 $ hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t 'spam<spam><eggs>' \
1761 1761 > -t toast -c 'foo,bar@example.com' -c '"A, B <>" <a@example.com>' -s test -r 0 \
1762 1762 > --config email.bcc='"Quux, A." <quux>'
1763 1763 This patch series consists of 1 patches.
1764 1764
1765 1765
1766 1766 Writing [PATCH] test ...
1767 1767 $ fixheaders < tmp.mbox
1768 1768 From quux Tue Jan 01 00:01:01 1980
1769 1769 Content-Type: text/plain; charset="us-ascii"
1770 1770 MIME-Version: 1.0
1771 1771 Content-Transfer-Encoding: 7bit
1772 1772 Subject: [PATCH] test
1773 1773 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1774 1774 Message-Id: <8580ff50825a50c8f716.315532860@
1775 1775 User-Agent: Mercurial-patchbomb
1776 1776 Date: Tue, 01 Jan 1980 00:01:00 +0000
1777 1777 From: quux
1778 1778 To: spam <spam>, eggs, toast
1779 1779 Cc: foo, bar@example.com, "A, B <>" <a@example.com>
1780 1780 Bcc: "Quux, A." <quux>
1781 1781
1782 1782 # HG changeset patch
1783 1783 # User test
1784 1784 # Date 1 0
1785 1785 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1786 1786 # Parent 0000000000000000000000000000000000000000
1787 1787 a
1788 1788
1789 1789 diff -r 000000000000 -r 8580ff50825a a
1790 1790 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1791 1791 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1792 1792 @@ -0,0 +1,1 @@
1793 1793 +a
1794 1794
1795 1795
1796 1796
1797 1797 test multi-byte domain parsing:
1798 1798 $ UUML=`python -c 'import sys; sys.stdout.write("\374")'`
1799 1799 $ HGENCODING=iso-8859-1
1800 1800 $ export HGENCODING
1801 1801 $ hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t "bar@${UUML}nicode.com" -s test -r 0
1802 1802 This patch series consists of 1 patches.
1803 1803
1804 1804 Cc:
1805 1805
1806 1806 Writing [PATCH] test ...
1807 1807
1808 1808 $ cat tmp.mbox
1809 1809 From quux Tue Jan 01 00:01:01 1980
1810 1810 Content-Type: text/plain; charset="us-ascii"
1811 1811 MIME-Version: 1.0
1812 1812 Content-Transfer-Encoding: 7bit
1813 1813 Subject: [PATCH] test
1814 1814 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1815 1815 Message-Id: <8580ff50825a50c8f716.315532860@* (glob)
1816 1816 User-Agent: Mercurial-patchbomb/* (glob)
1817 1817 Date: Tue, 01 Jan 1980 00:01:00 +0000
1818 1818 From: quux
1819 1819 To: bar@xn--nicode-2ya.com
1820 1820
1821 1821 # HG changeset patch
1822 1822 # User test
1823 1823 # Date 1 0
1824 1824 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1825 1825 # Parent 0000000000000000000000000000000000000000
1826 1826 a
1827 1827
1828 1828 diff -r 000000000000 -r 8580ff50825a a
1829 1829 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1830 1830 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1831 1831 @@ -0,0 +1,1 @@
1832 1832 +a
1833 1833
1834 1834
1835 1835
1836 1836 test outgoing:
1837 1837 $ hg up 1
1838 1838 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
1839 1839
1840 1840 $ hg branch test
1841 1841 marked working directory as branch test
1842 1842
1843 1843 $ echo d > d
1844 1844 $ hg add d
1845 1845 $ hg ci -md -d '4 0'
1846 1846 $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t
1847 1847 comparing with ../t
1848 1848 searching for changes
1849 1849 From [test]: test
1850 1850 This patch series consists of 8 patches.
1851 1851
1852 1852
1853 1853 Write the introductory message for the patch series.
1854 1854
1855 1855 Cc:
1856 1856
1857 1857 Displaying [PATCH 0 of 8] test ...
1858 1858 Content-Type: text/plain; charset="us-ascii"
1859 1859 MIME-Version: 1.0
1860 1860 Content-Transfer-Encoding: 7bit
1861 1861 Subject: [PATCH 0 of 8] test
1862 1862 Message-Id: <patchbomb.315532860@* (glob)
1863 1863 User-Agent: Mercurial-patchbomb/* (glob)
1864 1864 Date: Tue, 01 Jan 1980 00:01:00 +0000
1865 1865 From: test
1866 1866 To: foo
1867 1867
1868 1868
1869 1869 Displaying [PATCH 1 of 8] c ...
1870 1870 Content-Type: text/plain; charset="us-ascii"
1871 1871 MIME-Version: 1.0
1872 1872 Content-Transfer-Encoding: 7bit
1873 1873 Subject: [PATCH 1 of 8] c
1874 1874 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1875 1875 Message-Id: <ff2c9fa2018b15fa74b3.315532861@* (glob)
1876 1876 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
1877 1877 References: <patchbomb\.315532860@[^>]*> (re)
1878 1878 User-Agent: Mercurial-patchbomb/* (glob)
1879 1879 Date: Tue, 01 Jan 1980 00:01:01 +0000
1880 1880 From: test
1881 1881 To: foo
1882 1882
1883 1883 # HG changeset patch
1884 1884 # User test
1885 1885 # Date 3 0
1886 1886 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1887 1887 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1888 1888 c
1889 1889
1890 1890 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1891 1891 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1892 1892 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1893 1893 @@ -0,0 +1,1 @@
1894 1894 +c
1895 1895
1896 1896 Displaying [PATCH 2 of 8] charset=utf-8; content-transfer-encoding: base64 ...
1897 1897 Content-Type: text/plain; charset="us-ascii"
1898 1898 MIME-Version: 1.0
1899 1899 Content-Transfer-Encoding: 8bit
1900 1900 Subject: [PATCH 2 of 8] charset=utf-8; content-transfer-encoding: base64
1901 1901 X-Mercurial-Node: c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
1902 1902 Message-Id: <c3c9e37db9f4fe4882cd.315532862@* (glob)
1903 1903 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
1904 1904 References: <patchbomb\.315532860@[^>]*> (re)
1905 1905 User-Agent: Mercurial-patchbomb/* (glob)
1906 1906 Date: Tue, 01 Jan 1980 00:01:02 +0000
1907 1907 From: test
1908 1908 To: foo
1909 1909
1910 1910 # HG changeset patch
1911 1911 # User test
1912 1912 # Date 4 0
1913 1913 # Node ID c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
1914 1914 # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f
1915 1915 charset=utf-8; content-transfer-encoding: base64
1916 1916
1917 1917 diff -r ff2c9fa2018b -r c3c9e37db9f4 description
1918 1918 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1919 1919 +++ b/description Thu Jan 01 00:00:04 1970 +0000
1920 1920 @@ -0,0 +1,3 @@
1921 1921 +a multiline
1922 1922 +
1923 1923 +description
1924 1924 diff -r ff2c9fa2018b -r c3c9e37db9f4 utf
1925 1925 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1926 1926 +++ b/utf Thu Jan 01 00:00:04 1970 +0000
1927 1927 @@ -0,0 +1,1 @@
1928 +hΓΆmma!
1928 +h\xc3\xb6mma! (esc)
1929 1929
1930 1930 Displaying [PATCH 3 of 8] charset=utf-8; content-transfer-encoding: quoted-printable ...
1931 1931 Content-Type: text/plain; charset="us-ascii"
1932 1932 MIME-Version: 1.0
1933 1933 Content-Transfer-Encoding: quoted-printable
1934 1934 Subject: [PATCH 3 of 8] charset=utf-8;
1935 1935 content-transfer-encoding: quoted-printable
1936 1936 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
1937 1937 Message-Id: <c655633f8c87700bb38c.315532863@* (glob)
1938 1938 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
1939 1939 References: <patchbomb\.315532860@[^>]*> (re)
1940 1940 User-Agent: Mercurial-patchbomb/* (glob)
1941 1941 Date: Tue, 01 Jan 1980 00:01:03 +0000
1942 1942 From: test
1943 1943 To: foo
1944 1944
1945 1945 # HG changeset patch
1946 1946 # User test
1947 1947 # Date 4 0
1948 1948 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
1949 1949 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
1950 1950 charset=3Dutf-8; content-transfer-encoding: quoted-printable
1951 1951
1952 1952 diff -r c3c9e37db9f4 -r c655633f8c87 qp
1953 1953 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1954 1954 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
1955 1955 @@ -0,0 +1,4 @@
1956 1956 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1957 1957 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1958 1958 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1959 1959 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1960 1960 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1961 1961 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1962 1962 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1963 1963 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1964 1964 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1965 1965 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1966 1966 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1967 1967 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1968 1968 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1969 1969 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1970 1970 +foo
1971 1971 +
1972 1972 +bar
1973 1973
1974 1974 Displaying [PATCH 4 of 8] charset=us-ascii; content-transfer-encoding: 8bit ...
1975 1975 Content-Type: text/plain; charset="us-ascii"
1976 1976 MIME-Version: 1.0
1977 1977 Content-Transfer-Encoding: 8bit
1978 1978 Subject: [PATCH 4 of 8] charset=us-ascii; content-transfer-encoding: 8bit
1979 1979 X-Mercurial-Node: 22d0f96be12f5945fd67d101af58f7bc8263c835
1980 1980 Message-Id: <22d0f96be12f5945fd67.315532864@* (glob)
1981 1981 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
1982 1982 References: <patchbomb\.315532860@[^>]*> (re)
1983 1983 User-Agent: Mercurial-patchbomb/* (glob)
1984 1984 Date: Tue, 01 Jan 1980 00:01:04 +0000
1985 1985 From: test
1986 1986 To: foo
1987 1987
1988 1988 # HG changeset patch
1989 1989 # User test
1990 1990 # Date 5 0
1991 1991 # Node ID 22d0f96be12f5945fd67d101af58f7bc8263c835
1992 1992 # Parent c655633f8c87700bb38cc6a59a2753bdc5a6c376
1993 1993 charset=us-ascii; content-transfer-encoding: 8bit
1994 1994
1995 1995 diff -r c655633f8c87 -r 22d0f96be12f isolatin
1996 1996 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1997 1997 +++ b/isolatin Thu Jan 01 00:00:05 1970 +0000
1998 1998 @@ -0,0 +1,1 @@
1999 +hοΏ½mma!
1999 +h\xf6mma! (esc)
2000 2000
2001 2001 Displaying [PATCH 5 of 8] Added tag zero, zero.foo for changeset 8580ff50825a ...
2002 2002 Content-Type: text/plain; charset="us-ascii"
2003 2003 MIME-Version: 1.0
2004 2004 Content-Transfer-Encoding: 7bit
2005 2005 Subject: [PATCH 5 of 8] Added tag zero, zero.foo for changeset 8580ff50825a
2006 2006 X-Mercurial-Node: dd9c2b4b8a8a0934d5523c15f2c119b362360903
2007 2007 Message-Id: <dd9c2b4b8a8a0934d552.315532865@* (glob)
2008 2008 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
2009 2009 References: <patchbomb\.315532860@[^>]*> (re)
2010 2010 User-Agent: Mercurial-patchbomb/* (glob)
2011 2011 Date: Tue, 01 Jan 1980 00:01:05 +0000
2012 2012 From: test
2013 2013 To: foo
2014 2014
2015 2015 # HG changeset patch
2016 2016 # User test
2017 2017 # Date 0 0
2018 2018 # Node ID dd9c2b4b8a8a0934d5523c15f2c119b362360903
2019 2019 # Parent 22d0f96be12f5945fd67d101af58f7bc8263c835
2020 2020 Added tag zero, zero.foo for changeset 8580ff50825a
2021 2021
2022 2022 diff -r 22d0f96be12f -r dd9c2b4b8a8a .hgtags
2023 2023 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2024 2024 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
2025 2025 @@ -0,0 +1,2 @@
2026 2026 +8580ff50825a50c8f716709acdf8de0deddcd6ab zero
2027 2027 +8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
2028 2028
2029 2029 Displaying [PATCH 6 of 8] Added tag one, one.patch for changeset 97d72e5f12c7 ...
2030 2030 Content-Type: text/plain; charset="us-ascii"
2031 2031 MIME-Version: 1.0
2032 2032 Content-Transfer-Encoding: 7bit
2033 2033 Subject: [PATCH 6 of 8] Added tag one, one.patch for changeset 97d72e5f12c7
2034 2034 X-Mercurial-Node: eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
2035 2035 Message-Id: <eae5fcf795eee29d0e45.315532866@* (glob)
2036 2036 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
2037 2037 References: <patchbomb\.315532860@[^>]*> (re)
2038 2038 User-Agent: Mercurial-patchbomb/* (glob)
2039 2039 Date: Tue, 01 Jan 1980 00:01:06 +0000
2040 2040 From: test
2041 2041 To: foo
2042 2042
2043 2043 # HG changeset patch
2044 2044 # User test
2045 2045 # Date 0 0
2046 2046 # Node ID eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
2047 2047 # Parent dd9c2b4b8a8a0934d5523c15f2c119b362360903
2048 2048 Added tag one, one.patch for changeset 97d72e5f12c7
2049 2049
2050 2050 diff -r dd9c2b4b8a8a -r eae5fcf795ee .hgtags
2051 2051 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
2052 2052 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
2053 2053 @@ -1,2 +1,4 @@
2054 2054 8580ff50825a50c8f716709acdf8de0deddcd6ab zero
2055 2055 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
2056 2056 +97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
2057 2057 +97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
2058 2058
2059 2059 Displaying [PATCH 7 of 8] Added tag two, two.diff for changeset ff2c9fa2018b ...
2060 2060 Content-Type: text/plain; charset="us-ascii"
2061 2061 MIME-Version: 1.0
2062 2062 Content-Transfer-Encoding: 7bit
2063 2063 Subject: [PATCH 7 of 8] Added tag two, two.diff for changeset ff2c9fa2018b
2064 2064 X-Mercurial-Node: e317db6a6f288748d1f6cb064f3810fcba66b1b6
2065 2065 Message-Id: <e317db6a6f288748d1f6.315532867@* (glob)
2066 2066 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
2067 2067 References: <patchbomb\.315532860@[^>]*> (re)
2068 2068 User-Agent: Mercurial-patchbomb/* (glob)
2069 2069 Date: Tue, 01 Jan 1980 00:01:07 +0000
2070 2070 From: test
2071 2071 To: foo
2072 2072
2073 2073 # HG changeset patch
2074 2074 # User test
2075 2075 # Date 0 0
2076 2076 # Node ID e317db6a6f288748d1f6cb064f3810fcba66b1b6
2077 2077 # Parent eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
2078 2078 Added tag two, two.diff for changeset ff2c9fa2018b
2079 2079
2080 2080 diff -r eae5fcf795ee -r e317db6a6f28 .hgtags
2081 2081 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
2082 2082 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
2083 2083 @@ -2,3 +2,5 @@
2084 2084 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
2085 2085 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
2086 2086 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
2087 2087 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two
2088 2088 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff
2089 2089
2090 2090 Displaying [PATCH 8 of 8] d ...
2091 2091 Content-Type: text/plain; charset="us-ascii"
2092 2092 MIME-Version: 1.0
2093 2093 Content-Transfer-Encoding: 7bit
2094 2094 Subject: [PATCH 8 of 8] d
2095 2095 X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2096 2096 Message-Id: <2f9fa9b998c5fe3ac2bd\.315532868[^>]*> (re)
2097 2097 In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
2098 2098 References: <patchbomb\.315532860@[^>]*> (re)
2099 2099 User-Agent: Mercurial-patchbomb/* (glob)
2100 2100 Date: Tue, 01 Jan 1980 00:01:08 +0000
2101 2101 From: test
2102 2102 To: foo
2103 2103
2104 2104 # HG changeset patch
2105 2105 # User test
2106 2106 # Date 4 0
2107 2107 # Branch test
2108 2108 # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2109 2109 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2110 2110 d
2111 2111
2112 2112 diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d
2113 2113 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2114 2114 +++ b/d Thu Jan 01 00:00:04 1970 +0000
2115 2115 @@ -0,0 +1,1 @@
2116 2116 +d
2117 2117
2118 2118
2119 2119 dest#branch URIs:
2120 2120 $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t#test
2121 2121 comparing with ../t
2122 2122 searching for changes
2123 2123 From [test]: test
2124 2124 This patch series consists of 1 patches.
2125 2125
2126 2126 Cc:
2127 2127
2128 2128 Displaying [PATCH] test ...
2129 2129 Content-Type: text/plain; charset="us-ascii"
2130 2130 MIME-Version: 1.0
2131 2131 Content-Transfer-Encoding: 7bit
2132 2132 Subject: [PATCH] test
2133 2133 X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2134 2134 Message-Id: <2f9fa9b998c5fe3ac2bd.315532860@* (glob)
2135 2135 User-Agent: Mercurial-patchbomb/* (glob)
2136 2136 Date: Tue, 01 Jan 1980 00:01:00 +0000
2137 2137 From: test
2138 2138 To: foo
2139 2139
2140 2140 # HG changeset patch
2141 2141 # User test
2142 2142 # Date 4 0
2143 2143 # Branch test
2144 2144 # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2145 2145 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2146 2146 d
2147 2147
2148 2148 diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d
2149 2149 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2150 2150 +++ b/d Thu Jan 01 00:00:04 1970 +0000
2151 2151 @@ -0,0 +1,1 @@
2152 2152 +d
2153 2153
@@ -1,100 +1,100 b''
1 1
2 2 $ cat > loop.py <<EOF
3 3 > from mercurial import commands
4 4 >
5 5 > def loop(ui, loops, **opts):
6 6 > loops = int(loops)
7 7 > total = None
8 8 > if loops >= 0:
9 9 > total = loops
10 10 > if opts.get('total', None):
11 11 > total = int(opts.get('total'))
12 12 > loops = abs(loops)
13 13 >
14 14 > for i in range(loops):
15 15 > ui.progress('loop', i, 'loop.%d' % i, 'loopnum', total)
16 16 > ui.progress('loop', None, 'loop.done', 'loopnum', total)
17 17 >
18 18 > commands.norepo += " loop"
19 19 >
20 20 > cmdtable = {
21 21 > "loop": (loop, [('', 'total', '', 'override for total')],
22 22 > 'hg loop LOOPS'),
23 23 > }
24 24 > EOF
25 25
26 26 $ cat > filtercr.py <<EOF
27 27 > import sys, re
28 28 > for line in sys.stdin:
29 29 > line = re.sub(r'\r+[^\n]', lambda m: '\n' + m.group()[-1:], line)
30 30 > sys.stdout.write(line)
31 31 > print
32 32 > EOF
33 33
34 34 $ echo "[extensions]" >> $HGRCPATH
35 35 $ echo "progress=" >> $HGRCPATH
36 36 $ echo "loop=`pwd`/loop.py" >> $HGRCPATH
37 37 $ echo "[progress]" >> $HGRCPATH
38 38 $ echo "assume-tty=1" >> $HGRCPATH
39 39
40 40 test default params, display nothing because of delay
41 41
42 42 $ hg -y loop 3 2>&1 | python filtercr.py
43 43
44 44 $ echo "delay=0" >> $HGRCPATH
45 45 $ echo "refresh=0" >> $HGRCPATH
46 46
47 47 test with delay=0, refresh=0
48 48
49 49 $ hg -y loop 3 2>&1 | python filtercr.py
50 50
51 51 loop [ ] 0/3
52 52 loop [=====================> ] 1/3
53 53 loop [============================================> ] 2/3
54
54 \r (esc)
55 55
56 56 test refresh is taken in account
57 57
58 58 $ hg -y --config progress.refresh=100 loop 3 2>&1 | python filtercr.py
59 59
60 60
61 61 test format options 1
62 62
63 63 $ hg -y --config 'progress.format=number topic item+2' loop 2 2>&1 | python filtercr.py
64 64
65 65 0/2 loop lo
66 66 1/2 loop lo
67
67 \r (esc)
68 68
69 69 test format options 2
70 70
71 71 $ hg -y --config 'progress.format=number item-3 bar' loop 2 2>&1 | python filtercr.py
72 72
73 73 0/2 p.0 [ ]
74 74 1/2 p.1 [=================================> ]
75
75 \r (esc)
76 76
77 77 test format options and indeterminate progress
78 78
79 79 $ hg -y --config 'progress.format=number item bar' loop -- -2 2>&1 | python filtercr.py
80 80
81 81 0 loop.0 [ <=> ]
82 82 1 loop.1 [ <=> ]
83
83 \r (esc)
84 84
85 85 make sure things don't fall over if count > total
86 86
87 87 $ hg -y loop --total 4 6 2>&1 | python filtercr.py
88 88
89 89 loop [ ] 0/4
90 90 loop [================> ] 1/4
91 91 loop [=================================> ] 2/4
92 92 loop [==================================================> ] 3/4
93 93 loop [===================================================================>] 4/4
94 94 loop [ <=> ] 5/4
95
95 \r (esc)
96 96
97 97 test immediate progress completion
98 98
99 99 $ hg -y loop 0 2>&1 | python filtercr.py
100 100
@@ -1,358 +1,358 b''
1 1 $ HGENCODING=utf-8
2 2 $ export HGENCODING
3 3
4 4 $ try() {
5 5 > hg debugrevspec --debug $@
6 6 > }
7 7
8 8 $ log() {
9 9 > hg log --template '{rev}\n' -r "$1"
10 10 > }
11 11
12 12 $ hg init repo
13 13 $ cd repo
14 14
15 15 $ echo a > a
16 16 $ hg branch a
17 17 marked working directory as branch a
18 18 $ hg ci -Aqm0
19 19
20 20 $ echo b > b
21 21 $ hg branch b
22 22 marked working directory as branch b
23 23 $ hg ci -Aqm1
24 24
25 25 $ rm a
26 26 $ hg branch a-b-c-
27 27 marked working directory as branch a-b-c-
28 28 $ hg ci -Aqm2 -u Bob
29 29
30 30 $ hg co 1
31 31 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32 32 $ hg branch +a+b+c+
33 33 marked working directory as branch +a+b+c+
34 34 $ hg ci -Aqm3
35 35
36 36 $ hg co 2 # interleave
37 37 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
38 38 $ echo bb > b
39 39 $ hg branch -- -a-b-c-
40 40 marked working directory as branch -a-b-c-
41 41 $ hg ci -Aqm4 -d "May 12 2005"
42 42
43 43 $ hg co 3
44 44 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 45 $ hg branch /a/b/c/
46 46 marked working directory as branch /a/b/c/
47 47 $ hg ci -Aqm"5 bug"
48 48
49 49 $ hg merge 4
50 50 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
51 51 (branch merge, don't forget to commit)
52 52 $ hg branch _a_b_c_
53 53 marked working directory as branch _a_b_c_
54 54 $ hg ci -Aqm"6 issue619"
55 55
56 56 $ hg branch .a.b.c.
57 57 marked working directory as branch .a.b.c.
58 58 $ hg ci -Aqm7
59 59
60 60 $ hg branch all
61 61 marked working directory as branch all
62 62 $ hg ci --close-branch -Aqm8
63 63 abort: can only close branch heads
64 64 [255]
65 65
66 66 $ hg co 4
67 67 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
68 68 $ hg branch Γ©
69 marked working directory as branch Γ©
69 marked working directory as branch \xc3\xa9 (esc)
70 70 $ hg ci -Aqm9
71 71
72 72 $ hg tag -r6 1.0
73 73
74 74 $ hg clone --quiet -U -r 7 . ../remote1
75 75 $ hg clone --quiet -U -r 8 . ../remote2
76 76 $ echo "[paths]" >> .hg/hgrc
77 77 $ echo "default = ../remote1" >> .hg/hgrc
78 78
79 79 names that should work without quoting
80 80
81 81 $ try a
82 82 ('symbol', 'a')
83 83 0
84 84 $ try b-a
85 85 ('minus', ('symbol', 'b'), ('symbol', 'a'))
86 86 1
87 87 $ try _a_b_c_
88 88 ('symbol', '_a_b_c_')
89 89 6
90 90 $ try _a_b_c_-a
91 91 ('minus', ('symbol', '_a_b_c_'), ('symbol', 'a'))
92 92 6
93 93 $ try .a.b.c.
94 94 ('symbol', '.a.b.c.')
95 95 7
96 96 $ try .a.b.c.-a
97 97 ('minus', ('symbol', '.a.b.c.'), ('symbol', 'a'))
98 98 7
99 99 $ try -- '-a-b-c-' # complains
100 100 hg: parse error at 7: not a prefix: end
101 101 [255]
102 102 $ log -a-b-c- # succeeds with fallback
103 103 4
104 104 $ try -- -a-b-c--a # complains
105 105 ('minus', ('minus', ('minus', ('negate', ('symbol', 'a')), ('symbol', 'b')), ('symbol', 'c')), ('negate', ('symbol', 'a')))
106 106 abort: unknown revision '-a'!
107 107 [255]
108 108 $ try Γ©
109 109 ('symbol', '\xc3\xa9')
110 110 9
111 111
112 112 quoting needed
113 113
114 114 $ try '"-a-b-c-"-a'
115 115 ('minus', ('string', '-a-b-c-'), ('symbol', 'a'))
116 116 4
117 117
118 118 $ log '1 or 2'
119 119 1
120 120 2
121 121 $ log '1|2'
122 122 1
123 123 2
124 124 $ log '1 and 2'
125 125 $ log '1&2'
126 126 $ try '1&2|3' # precedence - and is higher
127 127 ('or', ('and', ('symbol', '1'), ('symbol', '2')), ('symbol', '3'))
128 128 3
129 129 $ try '1|2&3'
130 130 ('or', ('symbol', '1'), ('and', ('symbol', '2'), ('symbol', '3')))
131 131 1
132 132 $ try '1&2&3' # associativity
133 133 ('and', ('and', ('symbol', '1'), ('symbol', '2')), ('symbol', '3'))
134 134 $ try '1|(2|3)'
135 135 ('or', ('symbol', '1'), ('group', ('or', ('symbol', '2'), ('symbol', '3'))))
136 136 1
137 137 2
138 138 3
139 139 $ log '1.0' # tag
140 140 6
141 141 $ log 'a' # branch
142 142 0
143 143 $ log '2785f51ee'
144 144 0
145 145 $ log 'date(2005)'
146 146 4
147 147 $ log 'date(this is a test)'
148 148 hg: parse error at 10: unexpected token: symbol
149 149 [255]
150 150 $ log 'date()'
151 151 hg: parse error: date requires a string
152 152 [255]
153 153 $ log 'date'
154 154 hg: parse error: can't use date here
155 155 [255]
156 156 $ log 'date('
157 157 hg: parse error at 5: not a prefix: end
158 158 [255]
159 159 $ log 'date(tip)'
160 160 abort: invalid date: 'tip'
161 161 [255]
162 162 $ log '"date"'
163 163 abort: unknown revision 'date'!
164 164 [255]
165 165 $ log 'date(2005) and 1::'
166 166 4
167 167
168 168 $ log 'ancestor(1)'
169 169 hg: parse error: ancestor requires two arguments
170 170 [255]
171 171 $ log 'ancestor(4,5)'
172 172 1
173 173 $ log 'ancestor(4,5) and 4'
174 174 $ log 'ancestors(5)'
175 175 0
176 176 1
177 177 3
178 178 5
179 179 $ log 'author(bob)'
180 180 2
181 181 $ log 'branch(Γ©)'
182 182 8
183 183 9
184 184 $ log 'children(ancestor(4,5))'
185 185 2
186 186 3
187 187 $ log 'closed()'
188 188 $ log 'contains(a)'
189 189 0
190 190 1
191 191 3
192 192 5
193 193 $ log 'descendants(2 or 3)'
194 194 2
195 195 3
196 196 4
197 197 5
198 198 6
199 199 7
200 200 8
201 201 9
202 202 $ log 'file(b)'
203 203 1
204 204 4
205 205 $ log 'follow()'
206 206 0
207 207 1
208 208 2
209 209 4
210 210 8
211 211 9
212 212 $ log 'grep("issue\d+")'
213 213 6
214 214 $ try 'grep("(")' # invalid regular expression
215 215 ('func', ('symbol', 'grep'), ('string', '('))
216 216 hg: parse error: invalid match pattern: unbalanced parenthesis
217 217 [255]
218 218 $ try 'grep("\bissue\d+")'
219 219 ('func', ('symbol', 'grep'), ('string', '\x08issue\\d+'))
220 220 $ try 'grep(r"\bissue\d+")'
221 221 ('func', ('symbol', 'grep'), ('string', '\\bissue\\d+'))
222 222 6
223 223 $ try 'grep(r"\")'
224 224 hg: parse error at 7: unterminated string
225 225 [255]
226 226 $ log 'head()'
227 227 0
228 228 1
229 229 2
230 230 3
231 231 4
232 232 5
233 233 6
234 234 7
235 235 9
236 236 $ log 'heads(6::)'
237 237 7
238 238 $ log 'keyword(issue)'
239 239 6
240 240 $ log 'limit(head(), 1)'
241 241 0
242 242 $ log 'max(contains(a))'
243 243 5
244 244 $ log 'min(contains(a))'
245 245 0
246 246 $ log 'merge()'
247 247 6
248 248 $ log 'modifies(b)'
249 249 4
250 250 $ log 'id(5)'
251 251 2
252 252 $ log 'outgoing()'
253 253 8
254 254 9
255 255 $ log 'outgoing("../remote1")'
256 256 8
257 257 9
258 258 $ log 'outgoing("../remote2")'
259 259 3
260 260 5
261 261 6
262 262 7
263 263 9
264 264 $ log 'p1(merge())'
265 265 5
266 266 $ log 'p2(merge())'
267 267 4
268 268 $ log 'parents(merge())'
269 269 4
270 270 5
271 271 $ log 'removes(a)'
272 272 2
273 273 6
274 274 $ log 'roots(all())'
275 275 0
276 276 $ log 'reverse(2 or 3 or 4 or 5)'
277 277 5
278 278 4
279 279 3
280 280 2
281 281 $ log 'rev(5)'
282 282 5
283 283 $ log 'sort(limit(reverse(all()), 3))'
284 284 7
285 285 8
286 286 9
287 287 $ log 'sort(2 or 3 or 4 or 5, date)'
288 288 2
289 289 3
290 290 5
291 291 4
292 292 $ log 'tagged()'
293 293 6
294 294 $ log 'tag()'
295 295 6
296 296 $ log 'tag(1.0)'
297 297 6
298 298 $ log 'tag(tip)'
299 299 9
300 300 $ log 'user(bob)'
301 301 2
302 302
303 303 $ log '4::8'
304 304 4
305 305 8
306 306 $ log '4:8'
307 307 4
308 308 5
309 309 6
310 310 7
311 311 8
312 312
313 313 $ log 'sort(!merge() & (modifies(b) | user(bob) | keyword(bug) | keyword(issue) & 1::9), "-date")'
314 314 4
315 315 2
316 316 5
317 317
318 318 $ log 'not 0 and 0:2'
319 319 1
320 320 2
321 321 $ log 'not 1 and 0:2'
322 322 0
323 323 2
324 324 $ log 'not 2 and 0:2'
325 325 0
326 326 1
327 327 $ log '(1 and 2)::'
328 328 $ log '(1 and 2):'
329 329 $ log '(1 and 2):3'
330 330 $ log 'sort(head(), -rev)'
331 331 9
332 332 7
333 333 6
334 334 5
335 335 4
336 336 3
337 337 2
338 338 1
339 339 0
340 340 $ log '4::8 - 8'
341 341 4
342 342
343 343 issue2437
344 344
345 345 $ log '3 and p1(5)'
346 346 3
347 347 $ log '4 and p2(6)'
348 348 4
349 349 $ log '1 and parents(:2)'
350 350 1
351 351 $ log '2 and children(1:)'
352 352 2
353 353 $ log 'roots(all()) or roots(all())'
354 354 0
355 355 $ log 'heads(branch(Γ©)) or heads(branch(Γ©))'
356 356 9
357 357 $ log 'ancestors(8) and (heads(branch("-a-b-c-")) or heads(branch(Γ©)))'
358 358 4
@@ -1,279 +1,279 b''
1 1 $ echo "[extensions]" >> $HGRCPATH
2 2 $ echo "color=" >> $HGRCPATH
3 3 $ echo "[color]" >> $HGRCPATH
4 4 $ echo "mode=ansi" >> $HGRCPATH
5 5
6 6 $ hg init repo1
7 7 $ cd repo1
8 8 $ mkdir a b a/1 b/1 b/2
9 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 11 hg status in repo root:
12 12
13 13 $ hg status --color=always
14 ? a/1/in_a_1
15 ? a/in_a
16 ? b/1/in_b_1
17 ? b/2/in_b_2
18 ? b/in_b
19 ? in_root
14 \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
15 \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
16 \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
17 \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
18 \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
19 \x1b[0;35;1;4m? in_root\x1b[0m (esc)
20 20
21 21 hg status . in repo root:
22 22
23 23 $ hg status --color=always .
24 ? a/1/in_a_1
25 ? a/in_a
26 ? b/1/in_b_1
27 ? b/2/in_b_2
28 ? b/in_b
29 ? in_root
24 \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
25 \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
26 \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
27 \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
28 \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
29 \x1b[0;35;1;4m? in_root\x1b[0m (esc)
30 30
31 31 $ hg status --color=always --cwd a
32 ? a/1/in_a_1
33 ? a/in_a
34 ? b/1/in_b_1
35 ? b/2/in_b_2
36 ? b/in_b
37 ? in_root
32 \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
33 \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
34 \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
35 \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
36 \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
37 \x1b[0;35;1;4m? in_root\x1b[0m (esc)
38 38 $ hg status --color=always --cwd a .
39 ? 1/in_a_1
40 ? in_a
39 \x1b[0;35;1;4m? 1/in_a_1\x1b[0m (esc)
40 \x1b[0;35;1;4m? in_a\x1b[0m (esc)
41 41 $ hg status --color=always --cwd a ..
42 ? 1/in_a_1
43 ? in_a
44 ? ../b/1/in_b_1
45 ? ../b/2/in_b_2
46 ? ../b/in_b
47 ? ../in_root
42 \x1b[0;35;1;4m? 1/in_a_1\x1b[0m (esc)
43 \x1b[0;35;1;4m? in_a\x1b[0m (esc)
44 \x1b[0;35;1;4m? ../b/1/in_b_1\x1b[0m (esc)
45 \x1b[0;35;1;4m? ../b/2/in_b_2\x1b[0m (esc)
46 \x1b[0;35;1;4m? ../b/in_b\x1b[0m (esc)
47 \x1b[0;35;1;4m? ../in_root\x1b[0m (esc)
48 48
49 49 $ hg status --color=always --cwd b
50 ? a/1/in_a_1
51 ? a/in_a
52 ? b/1/in_b_1
53 ? b/2/in_b_2
54 ? b/in_b
55 ? in_root
50 \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
51 \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
52 \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
53 \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
54 \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
55 \x1b[0;35;1;4m? in_root\x1b[0m (esc)
56 56 $ hg status --color=always --cwd b .
57 ? 1/in_b_1
58 ? 2/in_b_2
59 ? in_b
57 \x1b[0;35;1;4m? 1/in_b_1\x1b[0m (esc)
58 \x1b[0;35;1;4m? 2/in_b_2\x1b[0m (esc)
59 \x1b[0;35;1;4m? in_b\x1b[0m (esc)
60 60 $ hg status --color=always --cwd b ..
61 ? ../a/1/in_a_1
62 ? ../a/in_a
63 ? 1/in_b_1
64 ? 2/in_b_2
65 ? in_b
66 ? ../in_root
61 \x1b[0;35;1;4m? ../a/1/in_a_1\x1b[0m (esc)
62 \x1b[0;35;1;4m? ../a/in_a\x1b[0m (esc)
63 \x1b[0;35;1;4m? 1/in_b_1\x1b[0m (esc)
64 \x1b[0;35;1;4m? 2/in_b_2\x1b[0m (esc)
65 \x1b[0;35;1;4m? in_b\x1b[0m (esc)
66 \x1b[0;35;1;4m? ../in_root\x1b[0m (esc)
67 67
68 68 $ hg status --color=always --cwd a/1
69 ? a/1/in_a_1
70 ? a/in_a
71 ? b/1/in_b_1
72 ? b/2/in_b_2
73 ? b/in_b
74 ? in_root
69 \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
70 \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
71 \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
72 \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
73 \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
74 \x1b[0;35;1;4m? in_root\x1b[0m (esc)
75 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 77 $ hg status --color=always --cwd a/1 ..
78 ? in_a_1
79 ? ../in_a
78 \x1b[0;35;1;4m? in_a_1\x1b[0m (esc)
79 \x1b[0;35;1;4m? ../in_a\x1b[0m (esc)
80 80
81 81 $ hg status --color=always --cwd b/1
82 ? a/1/in_a_1
83 ? a/in_a
84 ? b/1/in_b_1
85 ? b/2/in_b_2
86 ? b/in_b
87 ? in_root
82 \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
83 \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
84 \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
85 \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
86 \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
87 \x1b[0;35;1;4m? in_root\x1b[0m (esc)
88 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 90 $ hg status --color=always --cwd b/1 ..
91 ? in_b_1
92 ? ../2/in_b_2
93 ? ../in_b
91 \x1b[0;35;1;4m? in_b_1\x1b[0m (esc)
92 \x1b[0;35;1;4m? ../2/in_b_2\x1b[0m (esc)
93 \x1b[0;35;1;4m? ../in_b\x1b[0m (esc)
94 94
95 95 $ hg status --color=always --cwd b/2
96 ? a/1/in_a_1
97 ? a/in_a
98 ? b/1/in_b_1
99 ? b/2/in_b_2
100 ? b/in_b
101 ? in_root
96 \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
97 \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
98 \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
99 \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
100 \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
101 \x1b[0;35;1;4m? in_root\x1b[0m (esc)
102 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 104 $ hg status --color=always --cwd b/2 ..
105 ? ../1/in_b_1
106 ? in_b_2
107 ? ../in_b
105 \x1b[0;35;1;4m? ../1/in_b_1\x1b[0m (esc)
106 \x1b[0;35;1;4m? in_b_2\x1b[0m (esc)
107 \x1b[0;35;1;4m? ../in_b\x1b[0m (esc)
108 108 $ cd ..
109 109
110 110 $ hg init repo2
111 111 $ cd repo2
112 112 $ touch modified removed deleted ignored
113 113 $ echo "^ignored$" > .hgignore
114 114 $ hg ci -A -m 'initial checkin'
115 115 adding .hgignore
116 116 adding deleted
117 117 adding modified
118 118 adding removed
119 119 $ touch modified added unknown ignored
120 120 $ hg add added
121 121 $ hg remove removed
122 122 $ rm deleted
123 123
124 124 hg status:
125 125
126 126 $ hg status --color=always
127 A added
128 R removed
129 ! deleted
130 ? unknown
127 \x1b[0;32;1mA added\x1b[0m (esc)
128 \x1b[0;31;1mR removed\x1b[0m (esc)
129 \x1b[0;36;1;4m! deleted\x1b[0m (esc)
130 \x1b[0;35;1;4m? unknown\x1b[0m (esc)
131 131
132 132 hg status modified added removed deleted unknown never-existed ignored:
133 133
134 134 $ hg status --color=always modified added removed deleted unknown never-existed ignored
135 135 never-existed: No such file or directory
136 A added
137 R removed
138 ! deleted
139 ? unknown
136 \x1b[0;32;1mA added\x1b[0m (esc)
137 \x1b[0;31;1mR removed\x1b[0m (esc)
138 \x1b[0;36;1;4m! deleted\x1b[0m (esc)
139 \x1b[0;35;1;4m? unknown\x1b[0m (esc)
140 140
141 141 $ hg copy modified copied
142 142
143 143 hg status -C:
144 144
145 145 $ hg status --color=always -C
146 A added
147 A copied
148  modified
149 R removed
150 ! deleted
151 ? unknown
146 \x1b[0;32;1mA added\x1b[0m (esc)
147 \x1b[0;32;1mA copied\x1b[0m (esc)
148 \x1b[0;0m modified\x1b[0m (esc)
149 \x1b[0;31;1mR removed\x1b[0m (esc)
150 \x1b[0;36;1;4m! deleted\x1b[0m (esc)
151 \x1b[0;35;1;4m? unknown\x1b[0m (esc)
152 152
153 153 hg status -A:
154 154
155 155 $ hg status --color=always -A
156 A added
157 A copied
158  modified
159 R removed
160 ! deleted
161 ? unknown
162 I ignored
163 C .hgignore
164 C modified
156 \x1b[0;32;1mA added\x1b[0m (esc)
157 \x1b[0;32;1mA copied\x1b[0m (esc)
158 \x1b[0;0m modified\x1b[0m (esc)
159 \x1b[0;31;1mR removed\x1b[0m (esc)
160 \x1b[0;36;1;4m! deleted\x1b[0m (esc)
161 \x1b[0;35;1;4m? unknown\x1b[0m (esc)
162 \x1b[0;30;1mI ignored\x1b[0m (esc)
163 \x1b[0;0mC .hgignore\x1b[0m (esc)
164 \x1b[0;0mC modified\x1b[0m (esc)
165 165
166 166
167 167 $ echo "^ignoreddir$" > .hgignore
168 168 $ mkdir ignoreddir
169 169 $ touch ignoreddir/file
170 170
171 171 hg status ignoreddir/file:
172 172
173 173 $ hg status --color=always ignoreddir/file
174 174
175 175 hg status -i ignoreddir/file:
176 176
177 177 $ hg status --color=always -i ignoreddir/file
178 I ignoreddir/file
178 \x1b[0;30;1mI ignoreddir/file\x1b[0m (esc)
179 179 $ cd ..
180 180
181 181 check 'status -q' and some combinations
182 182
183 183 $ hg init repo3
184 184 $ cd repo3
185 185 $ touch modified removed deleted ignored
186 186 $ echo "^ignored$" > .hgignore
187 187 $ hg commit -A -m 'initial checkin'
188 188 adding .hgignore
189 189 adding deleted
190 190 adding modified
191 191 adding removed
192 192 $ touch added unknown ignored
193 193 $ hg add added
194 194 $ echo "test" >> modified
195 195 $ hg remove removed
196 196 $ rm deleted
197 197 $ hg copy modified copied
198 198
199 199 test unknown color
200 200
201 201 $ hg --config color.status.modified=periwinkle status --color=always
202 202 ignoring unknown color/effect 'periwinkle' (configured in color.status.modified)
203 203 M modified
204 A added
205 A copied
206 R removed
207 ! deleted
208 ? unknown
204 \x1b[0;32;1mA added\x1b[0m (esc)
205 \x1b[0;32;1mA copied\x1b[0m (esc)
206 \x1b[0;31;1mR removed\x1b[0m (esc)
207 \x1b[0;36;1;4m! deleted\x1b[0m (esc)
208 \x1b[0;35;1;4m? unknown\x1b[0m (esc)
209 209
210 210 Run status with 2 different flags.
211 211 Check if result is the same or different.
212 212 If result is not as expected, raise error
213 213
214 214 $ assert() {
215 215 > hg status --color=always $1 > ../a
216 216 > hg status --color=always $2 > ../b
217 217 > if diff ../a ../b > /dev/null; then
218 218 > out=0
219 219 > else
220 220 > out=1
221 221 > fi
222 222 > if [ $3 -eq 0 ]; then
223 223 > df="same"
224 224 > else
225 225 > df="different"
226 226 > fi
227 227 > if [ $out -ne $3 ]; then
228 228 > echo "Error on $1 and $2, should be $df."
229 229 > fi
230 230 > }
231 231
232 232 assert flag1 flag2 [0-same | 1-different]
233 233
234 234 $ assert "-q" "-mard" 0
235 235 $ assert "-A" "-marduicC" 0
236 236 $ assert "-qA" "-mardcC" 0
237 237 $ assert "-qAui" "-A" 0
238 238 $ assert "-qAu" "-marducC" 0
239 239 $ assert "-qAi" "-mardicC" 0
240 240 $ assert "-qu" "-u" 0
241 241 $ assert "-q" "-u" 1
242 242 $ assert "-m" "-a" 1
243 243 $ assert "-r" "-d" 1
244 244 $ cd ..
245 245
246 246 test 'resolve -l'
247 247
248 248 $ hg init repo4
249 249 $ cd repo4
250 250 $ echo "file a" > a
251 251 $ echo "file b" > b
252 252 $ hg add a b
253 253 $ hg commit -m "initial"
254 254 $ echo "file a change 1" > a
255 255 $ echo "file b change 1" > b
256 256 $ hg commit -m "head 1"
257 257 $ hg update 0
258 258 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
259 259 $ echo "file a change 2" > a
260 260 $ echo "file b change 2" > b
261 261 $ hg commit -m "head 2"
262 262 created new head
263 263 $ hg merge
264 264 merging a
265 265 warning: conflicts during merge.
266 266 merging a failed!
267 267 merging b
268 268 warning: conflicts during merge.
269 269 merging b failed!
270 270 0 files updated, 0 files merged, 0 files removed, 2 files unresolved
271 271 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
272 272 [1]
273 273 $ hg resolve -m b
274 274
275 275 hg resolve with one unresolved, one resolved:
276 276
277 277 $ hg resolve --color=always -l
278 U a
279 R b
278 \x1b[0;31;1mU a\x1b[0m (esc)
279 \x1b[0;32;1mR b\x1b[0m (esc)
General Comments 0
You need to be logged in to leave comments. Login now