Show More
This diff has been collapsed as it changes many lines, (1037 lines changed) Show them Hide them | |||
@@ -1,217 +1,902 b'' | |||
|
1 | #!/bin/sh | |
|
2 | ||
|
3 | echo "[extensions]" >> $HGRCPATH | |
|
4 | echo "mq=" >> $HGRCPATH | |
|
5 | echo "[diff]" >> $HGRCPATH | |
|
6 | echo "nodates=true" >> $HGRCPATH | |
|
7 | ||
|
8 | ||
|
9 | catpatch() { | |
|
10 | cat .hg/patches/$1.patch | sed -e "s/^diff \-r [0-9a-f]* /diff -r ... /" \ | |
|
11 | -e "s/^\(# Parent \).*/\1/" | |
|
12 | } | |
|
13 | ||
|
14 | catlog() { | |
|
15 | catpatch $1 | |
|
16 | hg log --template "{rev}: {desc} - {author}\n" | |
|
17 | } | |
|
18 | ||
|
19 | catlogd() { | |
|
20 | catpatch $1 | |
|
21 | hg log --template "{rev}: {desc} - {author} - {date}\n" | |
|
22 | } | |
|
23 | 1 | |
|
24 | drop() { | |
|
25 | hg qpop | |
|
26 | hg qdel $1.patch | |
|
27 | } | |
|
28 | ||
|
29 | runtest() { | |
|
30 | echo ==== init | |
|
31 | hg init a | |
|
32 | cd a | |
|
33 | hg qinit | |
|
34 | ||
|
2 | $ echo "[extensions]" >> $HGRCPATH | |
|
3 | $ echo "mq=" >> $HGRCPATH | |
|
4 | $ echo "[diff]" >> $HGRCPATH | |
|
5 | $ echo "nodates=true" >> $HGRCPATH | |
|
6 | $ catpatch() { | |
|
7 | > cat .hg/patches/$1.patch | sed -e "s/^diff \-r [0-9a-f]* /diff -r ... /" \ | |
|
8 | > -e "s/^\(# Parent \).*/\1/" | |
|
9 | > } | |
|
10 | $ catlog() { | |
|
11 | > catpatch $1 | |
|
12 | > hg log --template "{rev}: {desc} - {author}\n" | |
|
13 | > } | |
|
14 | $ catlogd() { | |
|
15 | > catpatch $1 | |
|
16 | > hg log --template "{rev}: {desc} - {author} - {date}\n" | |
|
17 | > } | |
|
18 | $ drop() { | |
|
19 | > hg qpop | |
|
20 | > hg qdel $1.patch | |
|
21 | > } | |
|
22 | $ runtest() { | |
|
23 | > echo ==== init | |
|
24 | > hg init a | |
|
25 | > cd a | |
|
26 | > hg qinit | |
|
27 | > | |
|
28 | > | |
|
29 | > echo ==== qnew -d | |
|
30 | > hg qnew -d '3 0' 1.patch | |
|
31 | > catlogd 1 | |
|
32 | > | |
|
33 | > echo ==== qref | |
|
34 | > echo "1" >1 | |
|
35 | > hg add | |
|
36 | > hg qref | |
|
37 | > catlogd 1 | |
|
38 | > | |
|
39 | > echo ==== qref -d | |
|
40 | > hg qref -d '4 0' | |
|
41 | > catlogd 1 | |
|
42 | > | |
|
43 | > | |
|
44 | > echo ==== qnew | |
|
45 | > hg qnew 2.patch | |
|
46 | > echo "2" >2 | |
|
47 | > hg add | |
|
48 | > hg qref | |
|
49 | > catlog 2 | |
|
50 | > | |
|
51 | > echo ==== qref -d | |
|
52 | > hg qref -d '5 0' | |
|
53 | > catlog 2 | |
|
54 | > | |
|
55 | > drop 2 | |
|
56 | > | |
|
57 | > | |
|
58 | > echo ==== qnew -d -m | |
|
59 | > hg qnew -d '6 0' -m "Three" 3.patch | |
|
60 | > catlogd 3 | |
|
61 | > | |
|
62 | > echo ==== qref | |
|
63 | > echo "3" >3 | |
|
64 | > hg add | |
|
65 | > hg qref | |
|
66 | > catlogd 3 | |
|
67 | > | |
|
68 | > echo ==== qref -m | |
|
69 | > hg qref -m "Drei" | |
|
70 | > catlogd 3 | |
|
71 | > | |
|
72 | > echo ==== qref -d | |
|
73 | > hg qref -d '7 0' | |
|
74 | > catlogd 3 | |
|
75 | > | |
|
76 | > echo ==== qref -d -m | |
|
77 | > hg qref -d '8 0' -m "Three (again)" | |
|
78 | > catlogd 3 | |
|
79 | > | |
|
80 | > | |
|
81 | > echo ==== qnew -m | |
|
82 | > hg qnew -m "Four" 4.patch | |
|
83 | > echo "4" >4 | |
|
84 | > hg add | |
|
85 | > hg qref | |
|
86 | > catlog 4 | |
|
87 | > | |
|
88 | > echo ==== qref -d | |
|
89 | > hg qref -d '9 0' | |
|
90 | > catlog 4 | |
|
91 | > | |
|
92 | > drop 4 | |
|
93 | > | |
|
94 | > | |
|
95 | > echo ==== qnew with HG header | |
|
96 | > hg qnew --config 'mq.plain=true' 5.patch | |
|
97 | > hg qpop | |
|
98 | > echo "# HG changeset patch" >>.hg/patches/5.patch | |
|
99 | > echo "# Date 10 0" >>.hg/patches/5.patch | |
|
100 | > hg qpush 2>&1 | grep 'Now at' | |
|
101 | > catlogd 5 | |
|
102 | > | |
|
103 | > echo ==== hg qref | |
|
104 | > echo "5" >5 | |
|
105 | > hg add | |
|
106 | > hg qref | |
|
107 | > catlogd 5 | |
|
108 | > | |
|
109 | > echo ==== hg qref -d | |
|
110 | > hg qref -d '11 0' | |
|
111 | > catlogd 5 | |
|
112 | > | |
|
113 | > | |
|
114 | > echo ==== qnew with plain header | |
|
115 | > hg qnew --config 'mq.plain=true' -d '12 0' 6.patch | |
|
116 | > hg qpop | |
|
117 | > hg qpush 2>&1 | grep 'now at' | |
|
118 | > catlog 6 | |
|
119 | > | |
|
120 | > echo ==== hg qref | |
|
121 | > echo "6" >6 | |
|
122 | > hg add | |
|
123 | > hg qref | |
|
124 | > catlogd 6 | |
|
125 | > | |
|
126 | > echo ==== hg qref -d | |
|
127 | > hg qref -d '13 0' | |
|
128 | > catlogd 6 | |
|
129 | > | |
|
130 | > drop 6 | |
|
131 | > | |
|
132 | > | |
|
133 | > echo ==== qnew -u | |
|
134 | > hg qnew -u jane 6.patch | |
|
135 | > echo "6" >6 | |
|
136 | > hg add | |
|
137 | > hg qref | |
|
138 | > catlog 6 | |
|
139 | > | |
|
140 | > echo ==== qref -d | |
|
141 | > hg qref -d '12 0' | |
|
142 | > catlog 6 | |
|
143 | > | |
|
144 | > drop 6 | |
|
145 | > | |
|
146 | > | |
|
147 | > echo ==== qnew -d | |
|
148 | > hg qnew -d '13 0' 7.patch | |
|
149 | > echo "7" >7 | |
|
150 | > hg add | |
|
151 | > hg qref | |
|
152 | > catlog 7 | |
|
153 | > | |
|
154 | > echo ==== qref -u | |
|
155 | > hg qref -u john | |
|
156 | > catlogd 7 | |
|
157 | > | |
|
158 | > | |
|
159 | > echo ==== qnew | |
|
160 | > hg qnew 8.patch | |
|
161 | > echo "8" >8 | |
|
162 | > hg add | |
|
163 | > hg qref | |
|
164 | > catlog 8 | |
|
165 | > | |
|
166 | > echo ==== qref -u -d | |
|
167 | > hg qref -u john -d '14 0' | |
|
168 | > catlog 8 | |
|
169 | > | |
|
170 | > drop 8 | |
|
171 | > | |
|
172 | > | |
|
173 | > echo ==== qnew -m | |
|
174 | > hg qnew -m "Nine" 9.patch | |
|
175 | > echo "9" >9 | |
|
176 | > hg add | |
|
177 | > hg qref | |
|
178 | > catlog 9 | |
|
179 | > | |
|
180 | > echo ==== qref -u -d | |
|
181 | > hg qref -u john -d '15 0' | |
|
182 | > catlog 9 | |
|
183 | > | |
|
184 | > drop 9 | |
|
185 | > | |
|
186 | > | |
|
187 | > echo ==== "qpop -a / qpush -a" | |
|
188 | > hg qpop -a | |
|
189 | > hg qpush -a | |
|
190 | > hg log --template "{rev}: {desc} - {author} - {date}\n" | |
|
191 | > } | |
|
35 | 192 | |
|
36 | echo ==== qnew -d | |
|
37 | hg qnew -d '3 0' 1.patch | |
|
38 | catlogd 1 | |
|
193 | ======= plain headers | |
|
194 | ||
|
195 | $ echo "[mq]" >> $HGRCPATH | |
|
196 | $ echo "plain=true" >> $HGRCPATH | |
|
197 | $ mkdir sandbox | |
|
198 | $ (cd sandbox ; runtest) | |
|
199 | ==== init | |
|
200 | ==== qnew -d | |
|
201 | Date: 3 0 | |
|
39 | 202 | |
|
40 | echo ==== qref | |
|
41 | echo "1" >1 | |
|
42 | hg add | |
|
43 | hg qref | |
|
44 | catlogd 1 | |
|
203 | 0: [mq]: 1.patch - test - 3.00 | |
|
204 | ==== qref | |
|
205 | adding 1 | |
|
206 | Date: 3 0 | |
|
45 | 207 | |
|
46 | echo ==== qref -d | |
|
47 | hg qref -d '4 0' | |
|
48 | catlogd 1 | |
|
49 | ||
|
208 | diff -r ... 1 | |
|
209 | --- /dev/null | |
|
210 | +++ b/1 | |
|
211 | @@ -0,0 +1,1 @@ | |
|
212 | +1 | |
|
213 | 0: [mq]: 1.patch - test - 3.00 | |
|
214 | ==== qref -d | |
|
215 | Date: 4 0 | |
|
50 | 216 | |
|
51 | echo ==== qnew | |
|
52 | hg qnew 2.patch | |
|
53 | echo "2" >2 | |
|
54 | hg add | |
|
55 | hg qref | |
|
56 | catlog 2 | |
|
217 | diff -r ... 1 | |
|
218 | --- /dev/null | |
|
219 | +++ b/1 | |
|
220 | @@ -0,0 +1,1 @@ | |
|
221 | +1 | |
|
222 | 0: [mq]: 1.patch - test - 4.00 | |
|
223 | ==== qnew | |
|
224 | adding 2 | |
|
225 | diff -r ... 2 | |
|
226 | --- /dev/null | |
|
227 | +++ b/2 | |
|
228 | @@ -0,0 +1,1 @@ | |
|
229 | +2 | |
|
230 | 1: [mq]: 2.patch - test | |
|
231 | 0: [mq]: 1.patch - test | |
|
232 | ==== qref -d | |
|
233 | Date: 5 0 | |
|
57 | 234 | |
|
58 | echo ==== qref -d | |
|
59 | hg qref -d '5 0' | |
|
60 | catlog 2 | |
|
235 | diff -r ... 2 | |
|
236 | --- /dev/null | |
|
237 | +++ b/2 | |
|
238 | @@ -0,0 +1,1 @@ | |
|
239 | +2 | |
|
240 | 1: [mq]: 2.patch - test | |
|
241 | 0: [mq]: 1.patch - test | |
|
242 | popping 2.patch | |
|
243 | now at: 1.patch | |
|
244 | ==== qnew -d -m | |
|
245 | Date: 6 0 | |
|
61 | 246 | |
|
62 | drop 2 | |
|
247 | Three | |
|
63 | 248 | |
|
249 | 1: Three - test - 6.00 | |
|
250 | 0: [mq]: 1.patch - test - 4.00 | |
|
251 | ==== qref | |
|
252 | adding 3 | |
|
253 | Date: 6 0 | |
|
254 | ||
|
255 | Three | |
|
64 | 256 | |
|
65 | echo ==== qnew -d -m | |
|
66 | hg qnew -d '6 0' -m "Three" 3.patch | |
|
67 | catlogd 3 | |
|
257 | diff -r ... 3 | |
|
258 | --- /dev/null | |
|
259 | +++ b/3 | |
|
260 | @@ -0,0 +1,1 @@ | |
|
261 | +3 | |
|
262 | 1: Three - test - 6.00 | |
|
263 | 0: [mq]: 1.patch - test - 4.00 | |
|
264 | ==== qref -m | |
|
265 | Date: 6 0 | |
|
266 | ||
|
267 | Drei | |
|
268 | ||
|
269 | diff -r ... 3 | |
|
270 | --- /dev/null | |
|
271 | +++ b/3 | |
|
272 | @@ -0,0 +1,1 @@ | |
|
273 | +3 | |
|
274 | 1: Drei - test - 6.00 | |
|
275 | 0: [mq]: 1.patch - test - 4.00 | |
|
276 | ==== qref -d | |
|
277 | Date: 7 0 | |
|
278 | ||
|
279 | Drei | |
|
68 | 280 | |
|
69 | echo ==== qref | |
|
70 | echo "3" >3 | |
|
71 | hg add | |
|
72 | hg qref | |
|
73 | catlogd 3 | |
|
281 | diff -r ... 3 | |
|
282 | --- /dev/null | |
|
283 | +++ b/3 | |
|
284 | @@ -0,0 +1,1 @@ | |
|
285 | +3 | |
|
286 | 1: Drei - test - 7.00 | |
|
287 | 0: [mq]: 1.patch - test - 4.00 | |
|
288 | ==== qref -d -m | |
|
289 | Date: 8 0 | |
|
290 | ||
|
291 | Three (again) | |
|
74 | 292 | |
|
75 | echo ==== qref -m | |
|
76 | hg qref -m "Drei" | |
|
77 | catlogd 3 | |
|
293 | diff -r ... 3 | |
|
294 | --- /dev/null | |
|
295 | +++ b/3 | |
|
296 | @@ -0,0 +1,1 @@ | |
|
297 | +3 | |
|
298 | 1: Three (again) - test - 8.00 | |
|
299 | 0: [mq]: 1.patch - test - 4.00 | |
|
300 | ==== qnew -m | |
|
301 | adding 4 | |
|
302 | Four | |
|
303 | ||
|
304 | diff -r ... 4 | |
|
305 | --- /dev/null | |
|
306 | +++ b/4 | |
|
307 | @@ -0,0 +1,1 @@ | |
|
308 | +4 | |
|
309 | 2: Four - test | |
|
310 | 1: Three (again) - test | |
|
311 | 0: [mq]: 1.patch - test | |
|
312 | ==== qref -d | |
|
313 | Date: 9 0 | |
|
314 | Four | |
|
78 | 315 | |
|
79 | echo ==== qref -d | |
|
80 | hg qref -d '7 0' | |
|
81 | catlogd 3 | |
|
316 | diff -r ... 4 | |
|
317 | --- /dev/null | |
|
318 | +++ b/4 | |
|
319 | @@ -0,0 +1,1 @@ | |
|
320 | +4 | |
|
321 | 2: Four - test | |
|
322 | 1: Three (again) - test | |
|
323 | 0: [mq]: 1.patch - test | |
|
324 | popping 4.patch | |
|
325 | now at: 3.patch | |
|
326 | ==== qnew with HG header | |
|
327 | popping 5.patch | |
|
328 | now at: 3.patch | |
|
329 | # HG changeset patch | |
|
330 | # Date 10 0 | |
|
331 | 2: imported patch 5.patch - test - 10.00 | |
|
332 | 1: Three (again) - test - 8.00 | |
|
333 | 0: [mq]: 1.patch - test - 4.00 | |
|
334 | ==== hg qref | |
|
335 | adding 5 | |
|
336 | # HG changeset patch | |
|
337 | # Parent | |
|
338 | # Date 10 0 | |
|
82 | 339 | |
|
83 | echo ==== qref -d -m | |
|
84 | hg qref -d '8 0' -m "Three (again)" | |
|
85 | catlogd 3 | |
|
340 | diff -r ... 5 | |
|
341 | --- /dev/null | |
|
342 | +++ b/5 | |
|
343 | @@ -0,0 +1,1 @@ | |
|
344 | +5 | |
|
345 | 2: [mq]: 5.patch - test - 10.00 | |
|
346 | 1: Three (again) - test - 8.00 | |
|
347 | 0: [mq]: 1.patch - test - 4.00 | |
|
348 | ==== hg qref -d | |
|
349 | # HG changeset patch | |
|
350 | # Parent | |
|
351 | # Date 11 0 | |
|
86 | 352 | |
|
353 | diff -r ... 5 | |
|
354 | --- /dev/null | |
|
355 | +++ b/5 | |
|
356 | @@ -0,0 +1,1 @@ | |
|
357 | +5 | |
|
358 | 2: [mq]: 5.patch - test - 11.00 | |
|
359 | 1: Three (again) - test - 8.00 | |
|
360 | 0: [mq]: 1.patch - test - 4.00 | |
|
361 | ==== qnew with plain header | |
|
362 | popping 6.patch | |
|
363 | now at: 5.patch | |
|
364 | now at: 6.patch | |
|
365 | Date: 12 0 | |
|
366 | ||
|
367 | 3: imported patch 6.patch - test | |
|
368 | 2: [mq]: 5.patch - test | |
|
369 | 1: Three (again) - test | |
|
370 | 0: [mq]: 1.patch - test | |
|
371 | ==== hg qref | |
|
372 | adding 6 | |
|
373 | Date: 12 0 | |
|
87 | 374 | |
|
88 | echo ==== qnew -m | |
|
89 | hg qnew -m "Four" 4.patch | |
|
90 | echo "4" >4 | |
|
91 | hg add | |
|
92 | hg qref | |
|
93 | catlog 4 | |
|
375 | diff -r ... 6 | |
|
376 | --- /dev/null | |
|
377 | +++ b/6 | |
|
378 | @@ -0,0 +1,1 @@ | |
|
379 | +6 | |
|
380 | 3: [mq]: 6.patch - test - 12.00 | |
|
381 | 2: [mq]: 5.patch - test - 11.00 | |
|
382 | 1: Three (again) - test - 8.00 | |
|
383 | 0: [mq]: 1.patch - test - 4.00 | |
|
384 | ==== hg qref -d | |
|
385 | Date: 13 0 | |
|
94 | 386 | |
|
95 | echo ==== qref -d | |
|
96 | hg qref -d '9 0' | |
|
97 | catlog 4 | |
|
387 | diff -r ... 6 | |
|
388 | --- /dev/null | |
|
389 | +++ b/6 | |
|
390 | @@ -0,0 +1,1 @@ | |
|
391 | +6 | |
|
392 | 3: [mq]: 6.patch - test - 13.00 | |
|
393 | 2: [mq]: 5.patch - test - 11.00 | |
|
394 | 1: Three (again) - test - 8.00 | |
|
395 | 0: [mq]: 1.patch - test - 4.00 | |
|
396 | popping 6.patch | |
|
397 | now at: 5.patch | |
|
398 | ==== qnew -u | |
|
399 | adding 6 | |
|
400 | From: jane | |
|
98 | 401 | |
|
99 | drop 4 | |
|
100 | ||
|
402 | diff -r ... 6 | |
|
403 | --- /dev/null | |
|
404 | +++ b/6 | |
|
405 | @@ -0,0 +1,1 @@ | |
|
406 | +6 | |
|
407 | 3: [mq]: 6.patch - jane | |
|
408 | 2: [mq]: 5.patch - test | |
|
409 | 1: Three (again) - test | |
|
410 | 0: [mq]: 1.patch - test | |
|
411 | ==== qref -d | |
|
412 | Date: 12 0 | |
|
413 | From: jane | |
|
101 | 414 | |
|
102 | echo ==== qnew with HG header | |
|
103 | hg qnew --config 'mq.plain=true' 5.patch | |
|
104 | hg qpop | |
|
105 | echo "# HG changeset patch" >>.hg/patches/5.patch | |
|
106 | echo "# Date 10 0" >>.hg/patches/5.patch | |
|
107 | hg qpush 2>&1 | grep 'Now at' | |
|
108 | catlogd 5 | |
|
415 | diff -r ... 6 | |
|
416 | --- /dev/null | |
|
417 | +++ b/6 | |
|
418 | @@ -0,0 +1,1 @@ | |
|
419 | +6 | |
|
420 | 3: [mq]: 6.patch - jane | |
|
421 | 2: [mq]: 5.patch - test | |
|
422 | 1: Three (again) - test | |
|
423 | 0: [mq]: 1.patch - test | |
|
424 | popping 6.patch | |
|
425 | now at: 5.patch | |
|
426 | ==== qnew -d | |
|
427 | adding 7 | |
|
428 | Date: 13 0 | |
|
429 | ||
|
430 | diff -r ... 7 | |
|
431 | --- /dev/null | |
|
432 | +++ b/7 | |
|
433 | @@ -0,0 +1,1 @@ | |
|
434 | +7 | |
|
435 | 3: [mq]: 7.patch - test | |
|
436 | 2: [mq]: 5.patch - test | |
|
437 | 1: Three (again) - test | |
|
438 | 0: [mq]: 1.patch - test | |
|
439 | ==== qref -u | |
|
440 | From: john | |
|
441 | Date: 13 0 | |
|
109 | 442 | |
|
110 | echo ==== hg qref | |
|
111 | echo "5" >5 | |
|
112 | hg add | |
|
113 | hg qref | |
|
114 | catlogd 5 | |
|
443 | diff -r ... 7 | |
|
444 | --- /dev/null | |
|
445 | +++ b/7 | |
|
446 | @@ -0,0 +1,1 @@ | |
|
447 | +7 | |
|
448 | 3: [mq]: 7.patch - john - 13.00 | |
|
449 | 2: [mq]: 5.patch - test - 11.00 | |
|
450 | 1: Three (again) - test - 8.00 | |
|
451 | 0: [mq]: 1.patch - test - 4.00 | |
|
452 | ==== qnew | |
|
453 | adding 8 | |
|
454 | diff -r ... 8 | |
|
455 | --- /dev/null | |
|
456 | +++ b/8 | |
|
457 | @@ -0,0 +1,1 @@ | |
|
458 | +8 | |
|
459 | 4: [mq]: 8.patch - test | |
|
460 | 3: [mq]: 7.patch - john | |
|
461 | 2: [mq]: 5.patch - test | |
|
462 | 1: Three (again) - test | |
|
463 | 0: [mq]: 1.patch - test | |
|
464 | ==== qref -u -d | |
|
465 | Date: 14 0 | |
|
466 | From: john | |
|
115 | 467 | |
|
116 | echo ==== hg qref -d | |
|
117 | hg qref -d '11 0' | |
|
118 | catlogd 5 | |
|
119 | ||
|
468 | diff -r ... 8 | |
|
469 | --- /dev/null | |
|
470 | +++ b/8 | |
|
471 | @@ -0,0 +1,1 @@ | |
|
472 | +8 | |
|
473 | 4: [mq]: 8.patch - john | |
|
474 | 3: [mq]: 7.patch - john | |
|
475 | 2: [mq]: 5.patch - test | |
|
476 | 1: Three (again) - test | |
|
477 | 0: [mq]: 1.patch - test | |
|
478 | popping 8.patch | |
|
479 | now at: 7.patch | |
|
480 | ==== qnew -m | |
|
481 | adding 9 | |
|
482 | Nine | |
|
120 | 483 | |
|
121 | echo ==== qnew with plain header | |
|
122 | hg qnew --config 'mq.plain=true' -d '12 0' 6.patch | |
|
123 | hg qpop | |
|
124 | hg qpush 2>&1 | grep 'now at' | |
|
125 | catlog 6 | |
|
484 | diff -r ... 9 | |
|
485 | --- /dev/null | |
|
486 | +++ b/9 | |
|
487 | @@ -0,0 +1,1 @@ | |
|
488 | +9 | |
|
489 | 4: Nine - test | |
|
490 | 3: [mq]: 7.patch - john | |
|
491 | 2: [mq]: 5.patch - test | |
|
492 | 1: Three (again) - test | |
|
493 | 0: [mq]: 1.patch - test | |
|
494 | ==== qref -u -d | |
|
495 | Date: 15 0 | |
|
496 | From: john | |
|
497 | Nine | |
|
126 | 498 | |
|
127 | echo ==== hg qref | |
|
128 | echo "6" >6 | |
|
129 | hg add | |
|
130 | hg qref | |
|
131 | catlogd 6 | |
|
499 | diff -r ... 9 | |
|
500 | --- /dev/null | |
|
501 | +++ b/9 | |
|
502 | @@ -0,0 +1,1 @@ | |
|
503 | +9 | |
|
504 | 4: Nine - john | |
|
505 | 3: [mq]: 7.patch - john | |
|
506 | 2: [mq]: 5.patch - test | |
|
507 | 1: Three (again) - test | |
|
508 | 0: [mq]: 1.patch - test | |
|
509 | popping 9.patch | |
|
510 | now at: 7.patch | |
|
511 | ==== qpop -a / qpush -a | |
|
512 | popping 7.patch | |
|
513 | popping 5.patch | |
|
514 | popping 3.patch | |
|
515 | popping 1.patch | |
|
516 | patch queue now empty | |
|
517 | applying 1.patch | |
|
518 | applying 3.patch | |
|
519 | applying 5.patch | |
|
520 | applying 7.patch | |
|
521 | now at: 7.patch | |
|
522 | 3: imported patch 7.patch - john - 13.00 | |
|
523 | 2: imported patch 5.patch - test - 11.00 | |
|
524 | 1: Three (again) - test - 8.00 | |
|
525 | 0: imported patch 1.patch - test - 4.00 | |
|
526 | $ rm -r sandbox | |
|
527 | ||
|
528 | ======= hg headers | |
|
529 | ||
|
530 | $ echo "plain=false" >> $HGRCPATH | |
|
531 | $ mkdir sandbox | |
|
532 | $ (cd sandbox ; runtest) | |
|
533 | ==== init | |
|
534 | ==== qnew -d | |
|
535 | # HG changeset patch | |
|
536 | # Parent | |
|
537 | # Date 3 0 | |
|
538 | ||
|
539 | 0: [mq]: 1.patch - test - 3.00 | |
|
540 | ==== qref | |
|
541 | adding 1 | |
|
542 | # HG changeset patch | |
|
543 | # Parent | |
|
544 | # Date 3 0 | |
|
132 | 545 | |
|
133 | echo ==== hg qref -d | |
|
134 | hg qref -d '13 0' | |
|
135 | catlogd 6 | |
|
546 | diff -r ... 1 | |
|
547 | --- /dev/null | |
|
548 | +++ b/1 | |
|
549 | @@ -0,0 +1,1 @@ | |
|
550 | +1 | |
|
551 | 0: [mq]: 1.patch - test - 3.00 | |
|
552 | ==== qref -d | |
|
553 | # HG changeset patch | |
|
554 | # Parent | |
|
555 | # Date 4 0 | |
|
136 | 556 | |
|
137 | drop 6 | |
|
138 | ||
|
557 | diff -r ... 1 | |
|
558 | --- /dev/null | |
|
559 | +++ b/1 | |
|
560 | @@ -0,0 +1,1 @@ | |
|
561 | +1 | |
|
562 | 0: [mq]: 1.patch - test - 4.00 | |
|
563 | ==== qnew | |
|
564 | adding 2 | |
|
565 | # HG changeset patch | |
|
566 | # Parent | |
|
139 | 567 | |
|
140 | echo ==== qnew -u | |
|
141 | hg qnew -u jane 6.patch | |
|
142 | echo "6" >6 | |
|
143 | hg add | |
|
144 | hg qref | |
|
145 | catlog 6 | |
|
568 | diff -r ... 2 | |
|
569 | --- /dev/null | |
|
570 | +++ b/2 | |
|
571 | @@ -0,0 +1,1 @@ | |
|
572 | +2 | |
|
573 | 1: [mq]: 2.patch - test | |
|
574 | 0: [mq]: 1.patch - test | |
|
575 | ==== qref -d | |
|
576 | # HG changeset patch | |
|
577 | # Date 5 0 | |
|
578 | # Parent | |
|
579 | ||
|
580 | diff -r ... 2 | |
|
581 | --- /dev/null | |
|
582 | +++ b/2 | |
|
583 | @@ -0,0 +1,1 @@ | |
|
584 | +2 | |
|
585 | 1: [mq]: 2.patch - test | |
|
586 | 0: [mq]: 1.patch - test | |
|
587 | popping 2.patch | |
|
588 | now at: 1.patch | |
|
589 | ==== qnew -d -m | |
|
590 | # HG changeset patch | |
|
591 | # Parent | |
|
592 | # Date 6 0 | |
|
593 | ||
|
594 | Three | |
|
146 | 595 | |
|
147 | echo ==== qref -d | |
|
148 | hg qref -d '12 0' | |
|
149 | catlog 6 | |
|
596 | 1: Three - test - 6.00 | |
|
597 | 0: [mq]: 1.patch - test - 4.00 | |
|
598 | ==== qref | |
|
599 | adding 3 | |
|
600 | # HG changeset patch | |
|
601 | # Parent | |
|
602 | # Date 6 0 | |
|
603 | ||
|
604 | Three | |
|
150 | 605 | |
|
151 | drop 6 | |
|
606 | diff -r ... 3 | |
|
607 | --- /dev/null | |
|
608 | +++ b/3 | |
|
609 | @@ -0,0 +1,1 @@ | |
|
610 | +3 | |
|
611 | 1: Three - test - 6.00 | |
|
612 | 0: [mq]: 1.patch - test - 4.00 | |
|
613 | ==== qref -m | |
|
614 | # HG changeset patch | |
|
615 | # Parent | |
|
616 | # Date 6 0 | |
|
152 | 617 | |
|
618 | Drei | |
|
153 | 619 | |
|
154 | echo ==== qnew -d | |
|
155 | hg qnew -d '13 0' 7.patch | |
|
156 | echo "7" >7 | |
|
157 | hg add | |
|
158 | hg qref | |
|
159 | catlog 7 | |
|
620 | diff -r ... 3 | |
|
621 | --- /dev/null | |
|
622 | +++ b/3 | |
|
623 | @@ -0,0 +1,1 @@ | |
|
624 | +3 | |
|
625 | 1: Drei - test - 6.00 | |
|
626 | 0: [mq]: 1.patch - test - 4.00 | |
|
627 | ==== qref -d | |
|
628 | # HG changeset patch | |
|
629 | # Parent | |
|
630 | # Date 7 0 | |
|
631 | ||
|
632 | Drei | |
|
633 | ||
|
634 | diff -r ... 3 | |
|
635 | --- /dev/null | |
|
636 | +++ b/3 | |
|
637 | @@ -0,0 +1,1 @@ | |
|
638 | +3 | |
|
639 | 1: Drei - test - 7.00 | |
|
640 | 0: [mq]: 1.patch - test - 4.00 | |
|
641 | ==== qref -d -m | |
|
642 | # HG changeset patch | |
|
643 | # Parent | |
|
644 | # Date 8 0 | |
|
645 | ||
|
646 | Three (again) | |
|
647 | ||
|
648 | diff -r ... 3 | |
|
649 | --- /dev/null | |
|
650 | +++ b/3 | |
|
651 | @@ -0,0 +1,1 @@ | |
|
652 | +3 | |
|
653 | 1: Three (again) - test - 8.00 | |
|
654 | 0: [mq]: 1.patch - test - 4.00 | |
|
655 | ==== qnew -m | |
|
656 | adding 4 | |
|
657 | # HG changeset patch | |
|
658 | # Parent | |
|
659 | Four | |
|
160 | 660 | |
|
161 | echo ==== qref -u | |
|
162 | hg qref -u john | |
|
163 | catlogd 7 | |
|
164 | ||
|
661 | diff -r ... 4 | |
|
662 | --- /dev/null | |
|
663 | +++ b/4 | |
|
664 | @@ -0,0 +1,1 @@ | |
|
665 | +4 | |
|
666 | 2: Four - test | |
|
667 | 1: Three (again) - test | |
|
668 | 0: [mq]: 1.patch - test | |
|
669 | ==== qref -d | |
|
670 | # HG changeset patch | |
|
671 | # Date 9 0 | |
|
672 | # Parent | |
|
673 | Four | |
|
165 | 674 | |
|
166 | echo ==== qnew | |
|
167 | hg qnew 8.patch | |
|
168 | echo "8" >8 | |
|
169 | hg add | |
|
170 | hg qref | |
|
171 | catlog 8 | |
|
675 | diff -r ... 4 | |
|
676 | --- /dev/null | |
|
677 | +++ b/4 | |
|
678 | @@ -0,0 +1,1 @@ | |
|
679 | +4 | |
|
680 | 2: Four - test | |
|
681 | 1: Three (again) - test | |
|
682 | 0: [mq]: 1.patch - test | |
|
683 | popping 4.patch | |
|
684 | now at: 3.patch | |
|
685 | ==== qnew with HG header | |
|
686 | popping 5.patch | |
|
687 | now at: 3.patch | |
|
688 | # HG changeset patch | |
|
689 | # Date 10 0 | |
|
690 | 2: imported patch 5.patch - test - 10.00 | |
|
691 | 1: Three (again) - test - 8.00 | |
|
692 | 0: [mq]: 1.patch - test - 4.00 | |
|
693 | ==== hg qref | |
|
694 | adding 5 | |
|
695 | # HG changeset patch | |
|
696 | # Parent | |
|
697 | # Date 10 0 | |
|
698 | ||
|
699 | diff -r ... 5 | |
|
700 | --- /dev/null | |
|
701 | +++ b/5 | |
|
702 | @@ -0,0 +1,1 @@ | |
|
703 | +5 | |
|
704 | 2: [mq]: 5.patch - test - 10.00 | |
|
705 | 1: Three (again) - test - 8.00 | |
|
706 | 0: [mq]: 1.patch - test - 4.00 | |
|
707 | ==== hg qref -d | |
|
708 | # HG changeset patch | |
|
709 | # Parent | |
|
710 | # Date 11 0 | |
|
172 | 711 | |
|
173 | echo ==== qref -u -d | |
|
174 | hg qref -u john -d '14 0' | |
|
175 | catlog 8 | |
|
712 | diff -r ... 5 | |
|
713 | --- /dev/null | |
|
714 | +++ b/5 | |
|
715 | @@ -0,0 +1,1 @@ | |
|
716 | +5 | |
|
717 | 2: [mq]: 5.patch - test - 11.00 | |
|
718 | 1: Three (again) - test - 8.00 | |
|
719 | 0: [mq]: 1.patch - test - 4.00 | |
|
720 | ==== qnew with plain header | |
|
721 | popping 6.patch | |
|
722 | now at: 5.patch | |
|
723 | now at: 6.patch | |
|
724 | Date: 12 0 | |
|
176 | 725 | |
|
177 | drop 8 | |
|
178 | ||
|
726 | 3: imported patch 6.patch - test | |
|
727 | 2: [mq]: 5.patch - test | |
|
728 | 1: Three (again) - test | |
|
729 | 0: [mq]: 1.patch - test | |
|
730 | ==== hg qref | |
|
731 | adding 6 | |
|
732 | Date: 12 0 | |
|
179 | 733 | |
|
180 | echo ==== qnew -m | |
|
181 | hg qnew -m "Nine" 9.patch | |
|
182 | echo "9" >9 | |
|
183 | hg add | |
|
184 | hg qref | |
|
185 | catlog 9 | |
|
734 | diff -r ... 6 | |
|
735 | --- /dev/null | |
|
736 | +++ b/6 | |
|
737 | @@ -0,0 +1,1 @@ | |
|
738 | +6 | |
|
739 | 3: [mq]: 6.patch - test - 12.00 | |
|
740 | 2: [mq]: 5.patch - test - 11.00 | |
|
741 | 1: Three (again) - test - 8.00 | |
|
742 | 0: [mq]: 1.patch - test - 4.00 | |
|
743 | ==== hg qref -d | |
|
744 | Date: 13 0 | |
|
745 | ||
|
746 | diff -r ... 6 | |
|
747 | --- /dev/null | |
|
748 | +++ b/6 | |
|
749 | @@ -0,0 +1,1 @@ | |
|
750 | +6 | |
|
751 | 3: [mq]: 6.patch - test - 13.00 | |
|
752 | 2: [mq]: 5.patch - test - 11.00 | |
|
753 | 1: Three (again) - test - 8.00 | |
|
754 | 0: [mq]: 1.patch - test - 4.00 | |
|
755 | popping 6.patch | |
|
756 | now at: 5.patch | |
|
757 | ==== qnew -u | |
|
758 | adding 6 | |
|
759 | # HG changeset patch | |
|
760 | # Parent | |
|
761 | # User jane | |
|
762 | ||
|
763 | diff -r ... 6 | |
|
764 | --- /dev/null | |
|
765 | +++ b/6 | |
|
766 | @@ -0,0 +1,1 @@ | |
|
767 | +6 | |
|
768 | 3: [mq]: 6.patch - jane | |
|
769 | 2: [mq]: 5.patch - test | |
|
770 | 1: Three (again) - test | |
|
771 | 0: [mq]: 1.patch - test | |
|
772 | ==== qref -d | |
|
773 | # HG changeset patch | |
|
774 | # Date 12 0 | |
|
775 | # Parent | |
|
776 | # User jane | |
|
186 | 777 | |
|
187 | echo ==== qref -u -d | |
|
188 | hg qref -u john -d '15 0' | |
|
189 | catlog 9 | |
|
190 | ||
|
191 | drop 9 | |
|
192 | ||
|
778 | diff -r ... 6 | |
|
779 | --- /dev/null | |
|
780 | +++ b/6 | |
|
781 | @@ -0,0 +1,1 @@ | |
|
782 | +6 | |
|
783 | 3: [mq]: 6.patch - jane | |
|
784 | 2: [mq]: 5.patch - test | |
|
785 | 1: Three (again) - test | |
|
786 | 0: [mq]: 1.patch - test | |
|
787 | popping 6.patch | |
|
788 | now at: 5.patch | |
|
789 | ==== qnew -d | |
|
790 | adding 7 | |
|
791 | # HG changeset patch | |
|
792 | # Parent | |
|
793 | # Date 13 0 | |
|
193 | 794 | |
|
194 | echo ==== "qpop -a / qpush -a" | |
|
195 | hg qpop -a | |
|
196 | hg qpush -a | |
|
197 | hg log --template "{rev}: {desc} - {author} - {date}\n" | |
|
198 | } | |
|
795 | diff -r ... 7 | |
|
796 | --- /dev/null | |
|
797 | +++ b/7 | |
|
798 | @@ -0,0 +1,1 @@ | |
|
799 | +7 | |
|
800 | 3: [mq]: 7.patch - test | |
|
801 | 2: [mq]: 5.patch - test | |
|
802 | 1: Three (again) - test | |
|
803 | 0: [mq]: 1.patch - test | |
|
804 | ==== qref -u | |
|
805 | # HG changeset patch | |
|
806 | # User john | |
|
807 | # Parent | |
|
808 | # Date 13 0 | |
|
199 | 809 | |
|
810 | diff -r ... 7 | |
|
811 | --- /dev/null | |
|
812 | +++ b/7 | |
|
813 | @@ -0,0 +1,1 @@ | |
|
814 | +7 | |
|
815 | 3: [mq]: 7.patch - john - 13.00 | |
|
816 | 2: [mq]: 5.patch - test - 11.00 | |
|
817 | 1: Three (again) - test - 8.00 | |
|
818 | 0: [mq]: 1.patch - test - 4.00 | |
|
819 | ==== qnew | |
|
820 | adding 8 | |
|
821 | # HG changeset patch | |
|
822 | # Parent | |
|
200 | 823 | |
|
201 | echo ======= plain headers | |
|
824 | diff -r ... 8 | |
|
825 | --- /dev/null | |
|
826 | +++ b/8 | |
|
827 | @@ -0,0 +1,1 @@ | |
|
828 | +8 | |
|
829 | 4: [mq]: 8.patch - test | |
|
830 | 3: [mq]: 7.patch - john | |
|
831 | 2: [mq]: 5.patch - test | |
|
832 | 1: Three (again) - test | |
|
833 | 0: [mq]: 1.patch - test | |
|
834 | ==== qref -u -d | |
|
835 | # HG changeset patch | |
|
836 | # Date 14 0 | |
|
837 | # User john | |
|
838 | # Parent | |
|
202 | 839 | |
|
203 | echo "[mq]" >> $HGRCPATH | |
|
204 | echo "plain=true" >> $HGRCPATH | |
|
205 | ||
|
206 | mkdir sandbox | |
|
207 | (cd sandbox ; runtest) | |
|
208 | rm -r sandbox | |
|
209 | ||
|
840 | diff -r ... 8 | |
|
841 | --- /dev/null | |
|
842 | +++ b/8 | |
|
843 | @@ -0,0 +1,1 @@ | |
|
844 | +8 | |
|
845 | 4: [mq]: 8.patch - john | |
|
846 | 3: [mq]: 7.patch - john | |
|
847 | 2: [mq]: 5.patch - test | |
|
848 | 1: Three (again) - test | |
|
849 | 0: [mq]: 1.patch - test | |
|
850 | popping 8.patch | |
|
851 | now at: 7.patch | |
|
852 | ==== qnew -m | |
|
853 | adding 9 | |
|
854 | # HG changeset patch | |
|
855 | # Parent | |
|
856 | Nine | |
|
210 | 857 | |
|
211 | echo ======= hg headers | |
|
212 | ||
|
213 | echo "plain=false" >> $HGRCPATH | |
|
858 | diff -r ... 9 | |
|
859 | --- /dev/null | |
|
860 | +++ b/9 | |
|
861 | @@ -0,0 +1,1 @@ | |
|
862 | +9 | |
|
863 | 4: Nine - test | |
|
864 | 3: [mq]: 7.patch - john | |
|
865 | 2: [mq]: 5.patch - test | |
|
866 | 1: Three (again) - test | |
|
867 | 0: [mq]: 1.patch - test | |
|
868 | ==== qref -u -d | |
|
869 | # HG changeset patch | |
|
870 | # Date 15 0 | |
|
871 | # User john | |
|
872 | # Parent | |
|
873 | Nine | |
|
214 | 874 | |
|
215 | mkdir sandbox | |
|
216 | (cd sandbox ; runtest) | |
|
217 | rm -r sandbox | |
|
875 | diff -r ... 9 | |
|
876 | --- /dev/null | |
|
877 | +++ b/9 | |
|
878 | @@ -0,0 +1,1 @@ | |
|
879 | +9 | |
|
880 | 4: Nine - john | |
|
881 | 3: [mq]: 7.patch - john | |
|
882 | 2: [mq]: 5.patch - test | |
|
883 | 1: Three (again) - test | |
|
884 | 0: [mq]: 1.patch - test | |
|
885 | popping 9.patch | |
|
886 | now at: 7.patch | |
|
887 | ==== qpop -a / qpush -a | |
|
888 | popping 7.patch | |
|
889 | popping 5.patch | |
|
890 | popping 3.patch | |
|
891 | popping 1.patch | |
|
892 | patch queue now empty | |
|
893 | applying 1.patch | |
|
894 | applying 3.patch | |
|
895 | applying 5.patch | |
|
896 | applying 7.patch | |
|
897 | now at: 7.patch | |
|
898 | 3: imported patch 7.patch - john - 13.00 | |
|
899 | 2: imported patch 5.patch - test - 11.00 | |
|
900 | 1: Three (again) - test - 8.00 | |
|
901 | 0: imported patch 1.patch - test - 4.00 | |
|
902 | $ rm -r sandbox |
General Comments 0
You need to be logged in to leave comments.
Login now