##// END OF EJS Templates
mq: qpop now tells which patches are popped...
Mads Kiilerich -
r9110:561ff8d9 default
parent child Browse files
Show More
@@ -1080,6 +1080,8 b' class queue(object):'
1080 1080 except: pass
1081 1081 repo.dirstate.forget(f)
1082 1082 repo.dirstate.setparents(qp, nullid)
1083 for patch in reversed(self.applied[start:end]):
1084 self.ui.warn(_("popping %s\n") % patch.name)
1083 1085 del self.applied[start:end]
1084 1086 self.strip(repo, rev, update=False, backup='strip')
1085 1087 if len(self.applied):
@@ -210,6 +210,7 b' diff -r ef63ca68695b -r 40a904bbbe4c c'
210 210 +$Id$
211 211 +tests for different changenodes
212 212 % qpop
213 popping mqtest.diff
213 214 patch queue now empty
214 215 % qgoto - should imply qpush
215 216 applying mqtest.diff
@@ -218,6 +219,7 b' now at: mqtest.diff'
218 219 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
219 220 tests for different changenodes
220 221 % qpop and move on
222 popping mqtest.diff
221 223 patch queue now empty
222 224 % copy
223 225 % kwfiles added
@@ -5,6 +5,7 b' tip: 0'
5 5 No branch cache
6 6
7 7 # some regular revisions
8 popping p1
8 9 patch queue now empty
9 10 tip: 1
10 11 3f910abad313ff802d3a23a7529433872df9b3ae 1
@@ -43,6 +44,9 b' branch bar: 2'
43 44 qbase: 1
44 45
45 46 # detect an invalid cache
47 popping p2
48 popping p1
49 popping p0
46 50 patch queue now empty
47 51 applying p0
48 52 applying p1
@@ -9,12 +9,14 b' 1 out of 1 hunks FAILED -- saving reject'
9 9 patch failed, unable to continue (try -v)
10 10 patch failed, rejects left in working dir
11 11 errors during apply, please fix and refresh eol.diff
12 popping eol.diff
12 13 patch queue now empty
13 14 % invalid eol
14 15 applying eol.diff
15 16 patch failed, unable to continue (try -v)
16 17 patch failed, rejects left in working dir
17 18 errors during apply, please fix and refresh eol.diff
19 popping eol.diff
18 20 patch queue now empty
19 21 % force LF
20 22 applying eol.diff
@@ -42,6 +44,7 b' y<CR><LF>'
42 44 c<CR><LF>
43 45 d<CR><LF>
44 46 z
47 popping eol.diff
45 48 patch queue now empty
46 49 % push again forcing LF and compare revisions
47 50 applying eol.diff
@@ -51,6 +54,7 b' y<CR><LF>'
51 54 c<CR><LF>
52 55 d<CR><LF>
53 56 z
57 popping eol.diff
54 58 patch queue now empty
55 59 % push again without LF and compare revisions
56 60 applying eol.diff
@@ -60,4 +64,5 b' y<CR><LF>'
60 64 c<CR><LF>
61 65 d<CR><LF>
62 66 z
67 popping eol.diff
63 68 patch queue now empty
@@ -1,4 +1,7 b''
1 1 adding x
2 popping c.patch
3 popping b.patch
4 popping a.patch
2 5 patch queue now empty
3 6 % should fail
4 7 abort: no patch named does-not-exist.patch
@@ -9,6 +12,7 b' now at: a.patch'
9 12 % should guard a.patch
10 13 % should print +a
11 14 a.patch: +a
15 popping a.patch
12 16 patch queue now empty
13 17 % should fail
14 18 cannot push 'a.patch' - guarded by ['+a']
@@ -16,6 +20,7 b' a.patch: +a'
16 20 % should push b.patch
17 21 applying b.patch
18 22 now at: b.patch
23 popping b.patch
19 24 patch queue now empty
20 25 % test selection of an empty guard
21 26 abort: guard cannot be an empty string
@@ -34,6 +39,9 b' b.patch'
34 39 % should push c.patch
35 40 applying c.patch
36 41 now at: c.patch
42 popping c.patch
43 popping b.patch
44 popping a.patch
37 45 patch queue now empty
38 46 guards deactivated
39 47 number of unguarded, unapplied patches has changed from 3 to 2
@@ -41,6 +49,8 b' number of unguarded, unapplied patches h'
41 49 applying b.patch
42 50 applying c.patch
43 51 now at: c.patch
52 popping c.patch
53 popping b.patch
44 54 patch queue now empty
45 55 number of unguarded, unapplied patches has changed from 1 to 2
46 56 % should push a.patch, not b.patch
@@ -48,6 +58,8 b' applying a.patch'
48 58 now at: a.patch
49 59 applying c.patch
50 60 now at: c.patch
61 popping c.patch
62 popping a.patch
51 63 patch queue now empty
52 64 % should push b.patch
53 65 applying b.patch
@@ -55,6 +67,8 b' now at: b.patch'
55 67 applying c.patch
56 68 now at: c.patch
57 69 c.patch
70 popping c.patch
71 popping b.patch
58 72 patch queue now empty
59 73 number of unguarded, unapplied patches has changed from 2 to 3
60 74 % should push a.patch, b.patch
@@ -62,6 +76,8 b' applying a.patch'
62 76 now at: a.patch
63 77 applying b.patch
64 78 now at: b.patch
79 popping b.patch
80 popping a.patch
65 81 patch queue now empty
66 82 number of unguarded, unapplied patches has changed from 3 to 2
67 83 % list patches and guards
@@ -83,6 +99,8 b' applying c.patch'
83 99 now at: c.patch
84 100 guards deactivated
85 101 popping guarded patches
102 popping c.patch
103 popping b.patch
86 104 patch queue now empty
87 105 reapplying unguarded patches
88 106 applying c.patch
@@ -100,6 +118,7 b' c.patch'
100 118 new.patch: +1 +2 -3
101 119 b.patch: +2
102 120 c.patch: unguarded
121 popping d.patch
103 122 now at: c.patch
104 123 % should show new.patch and b.patch as Guarded, c.patch as Applied
105 124 % and d.patch as Unapplied
@@ -112,6 +131,7 b' 0 G new.patch'
112 131 1 G b.patch
113 132 2 A c.patch
114 133 3 G d.patch
134 popping c.patch
115 135 patch queue now empty
116 136 new.patch: +1 +2 -3
117 137 b.patch: +2
@@ -42,6 +42,7 b' diff -r ... 2'
42 42 +2
43 43 1: [mq]: 2.patch - test
44 44 0: [mq]: 1.patch - test
45 popping 2.patch
45 46 now at: 1.patch
46 47 ==== qnew -d -m
47 48 # HG changeset patch
@@ -127,8 +128,10 b' diff -r ... 4'
127 128 2: Four - test
128 129 1: Three (again) - test
129 130 0: [mq]: 1.patch - test
131 popping 4.patch
130 132 now at: 3.patch
131 133 ==== qnew with HG header
134 popping 5.patch
132 135 now at: 3.patch
133 136 # HG changeset patch
134 137 # Date 10 0
@@ -185,6 +188,7 b' 3: [mq]: 6.patch - jane'
185 188 2: [mq]: 5.patch - test
186 189 1: Three (again) - test
187 190 0: [mq]: 1.patch - test
191 popping 6.patch
188 192 now at: 5.patch
189 193 ==== qnew -d
190 194 adding 7
@@ -240,6 +244,7 b' 3: [mq]: 7.patch - john'
240 244 2: [mq]: 5.patch - test
241 245 1: Three (again) - test
242 246 0: [mq]: 1.patch - test
247 popping 8.patch
243 248 now at: 7.patch
244 249 ==== qnew -m
245 250 adding 9
@@ -270,8 +275,13 b' 3: [mq]: 7.patch - john'
270 275 2: [mq]: 5.patch - test
271 276 1: Three (again) - test
272 277 0: [mq]: 1.patch - test
278 popping 9.patch
273 279 now at: 7.patch
274 280 ==== qpop -a / qpush -a
281 popping 7.patch
282 popping 5.patch
283 popping 3.patch
284 popping 1.patch
275 285 patch queue now empty
276 286 applying 1.patch
277 287 applying 3.patch
@@ -131,6 +131,7 b' 2: Three (again) - maria'
131 131 1: [mq]: 2.patch - jane
132 132 0: [mq]: 1.patch - mary
133 133 ==== qnew with HG header
134 popping 5.patch
134 135 now at: 4.patch
135 136 now at: 5.patch
136 137 # HG changeset patch
@@ -184,6 +185,11 b' 2: Three (again) - maria'
184 185 1: [mq]: 2.patch - jane
185 186 0: [mq]: 1.patch - mary
186 187 ==== qpop -a / qpush -a
188 popping 5.patch
189 popping 4.patch
190 popping 3.patch
191 popping 2.patch
192 popping 1.patch
187 193 patch queue now empty
188 194 applying 1.patch
189 195 applying 2.patch
@@ -10,6 +10,8 b' merging with queue at: .hg/patches.1'
10 10 applying rm_a
11 11 now at: rm_a
12 12 b
13 popping rm_a
14 popping .hg.patches.merge.marker
13 15 patch queue now empty
14 16
15 17 % init t2
@@ -1,4 +1,5 b''
1 1 adding b
2 popping changeb
2 3 patch queue now empty
3 4 % push patch with missing target
4 5 applying changeb
@@ -26,6 +27,7 b' c'
26 27 +c
27 28 +c
28 29 adding b
30 popping changeb
29 31 patch queue now empty
30 32 % push git patch with missing target
31 33 applying changeb
@@ -48,6 +50,7 b' Jc${No0000400IC2'
48 50
49 51 % test push creating directory during git copy or rename
50 52 adding a
53 popping patch
51 54 patch queue now empty
52 55 applying patch
53 56 now at: patch
@@ -13,6 +13,7 b' 0: main: one added.'
13 13 1: main: one updated.
14 14 ====== Setup queue
15 15 adding two
16 popping two.patch
16 17 patch queue now empty
17 18 ====== Bundle queue
18 19 1 changesets found
@@ -1,6 +1,7 b''
1 1 adding base
2 2 abort: qdelete requires at least one revision or patch name
3 3 abort: cannot delete applied patch c
4 popping c
4 5 now at: b
5 6 a
6 7 b
@@ -8,6 +9,7 b' a'
8 9 b
9 10 series
10 11 status
12 popping b
11 13 now at: a
12 14 a
13 15 b
@@ -30,6 +32,7 b' abort: no revisions specified'
30 32 no patches applied
31 33 abort: revision 0 is not managed
32 34 abort: cannot delete revision 2 above applied patches
35 popping c
33 36 now at: b
34 37 abort: unknown revision 'c'!
35 38 applying c
@@ -26,6 +26,7 b' diff -r 67e992f2c4f3 base'
26 26 +patched
27 27 % revert
28 28 % qpop
29 popping mqbase
29 30 patch queue now empty
30 31 % qdelete mqbase
31 32 % commit 2
@@ -1,6 +1,8 b''
1 1 % init
2 2 adding a
3 3 % fold in the middle of the queue
4 popping p3
5 popping p2
4 6 now at: p1
5 7 --- a/a
6 8 +++ b/a
@@ -1,17 +1,24 b''
1 1 adding a
2 popping c.patch
3 popping b.patch
2 4 now at: a.patch
3 5 applying b.patch
4 6 applying c.patch
5 7 now at: c.patch
8 popping c.patch
6 9 now at: b.patch
7 10
8 11 % Using index
12 popping b.patch
9 13 now at: a.patch
10 14 applying b.patch
11 15 applying c.patch
12 16 now at: c.patch
13 17
14 18 % No warnings when using index
19 popping bug141421
20 popping bug314159
21 popping c.patch
15 22 now at: b.patch
16 23 applying c.patch
17 24 applying bug314159
@@ -8,12 +8,14 b' abort: patch "url.diff" already exists'
8 8 applying url.diff
9 9 now at: url.diff
10 10 foo
11 popping url.diff
11 12 patch queue now empty
12 13 % qimport -f
13 14 adding url.diff to series file
14 15 applying url.diff
15 16 now at: url.diff
16 17 foo2
18 popping url.diff
17 19 patch queue now empty
18 20 % build diff with CRLF
19 21 adding b
@@ -20,6 +20,9 b' foo bar'
20 20 abort: patch "first.patch" already exists
21 21 abort: patch "first.patch" already exists
22 22 % qnew -f from a subdirectory
23 popping first.patch
24 popping mtest.patch
25 popping test.patch
23 26 patch queue now empty
24 27 adding d/b
25 28 M d/b
@@ -1,6 +1,9 b''
1 1 adding foo
2 2 % test qpush on empty series
3 3 no patches in series
4 popping bad-patch
5 popping patch2
6 popping patch1
4 7 patch queue now empty
5 8 applying patch1
6 9 applying patch2
@@ -1,9 +1,11 b''
1 1 a -> a not a symlink
2 2 a -> b
3 popping symlink.patch
3 4 now at: base.patch
4 5 applying symlink.patch
5 6 now at: symlink.patch
6 7 a -> b
8 popping removesl.patch
7 9 now at: symlink.patch
8 10 applying removesl.patch
9 11 now at: removesl.patch
@@ -108,16 +108,20 b' working dir diff:'
108 108 a
109 109 +a
110 110 % qpop
111 popping test.patch
111 112 patch queue now empty
112 113 % qpush
113 114 applying test.patch
114 115 now at: test.patch
115 116 % pop/push outside repo
117 popping test.patch
116 118 patch queue now empty
117 119 applying test.patch
118 120 now at: test.patch
119 121 % qrefresh in subdir
120 122 % pop/push -a in subdir
123 popping test2.patch
124 popping test.patch
121 125 patch queue now empty
122 126 applying test.patch
123 127 applying test2.patch
@@ -125,6 +129,7 b' now at: test2.patch'
125 129 % qseries
126 130 test.patch
127 131 test2.patch
132 popping test2.patch
128 133 now at: test.patch
129 134 0 A test.patch: foo bar
130 135 1 U test2.patch:
@@ -140,6 +145,7 b' test.patch'
140 145 % qnext
141 146 all patches applied
142 147 % pop, qnext, qprev, qapplied
148 popping test2.patch
143 149 now at: test.patch
144 150 test2.patch
145 151 only one patch applied
@@ -156,17 +162,24 b' test2.patch'
156 162 % qpush/qpop with index
157 163 applying test2.patch
158 164 now at: test2.patch
165 popping test2.patch
166 popping test1b.patch
159 167 now at: test.patch
160 168 applying test1b.patch
161 169 now at: test1b.patch
162 170 applying test2.patch
163 171 now at: test2.patch
172 popping test2.patch
164 173 now at: test1b.patch
174 popping test1b.patch
165 175 now at: test.patch
166 176 applying test1b.patch
167 177 applying test2.patch
168 178 now at: test2.patch
169 179 % push should succeed
180 popping test2.patch
181 popping test1b.patch
182 popping test.patch
170 183 patch queue now empty
171 184 pushing to ../../k
172 185 searching for changes
@@ -180,6 +193,9 b' applying test1b.patch'
180 193 applying test2.patch
181 194 now at: test2.patch
182 195 % pops all patches and succeeds
196 popping test2.patch
197 popping test1b.patch
198 popping test.patch
183 199 patch queue now empty
184 200 qpop -a succeeds
185 201 % does nothing and succeeds
@@ -193,6 +209,7 b' applying test.patch'
193 209 now at: test.patch
194 210 qpush succeeds
195 211 % pops a patch and succeeds
212 popping test.patch
196 213 patch queue now empty
197 214 qpop succeeds
198 215 % pushes up to test1b.patch and succeeds
@@ -213,6 +230,7 b' abort: cannot push to a previous patch: '
213 230 abort: patch test2.patch is not applied
214 231 qpop test2.patch fails
215 232 % pops up to test.patch and succeeds
233 popping test1b.patch
216 234 now at: test.patch
217 235 qpop test.patch succeeds
218 236 % pushes all patches and succeeds
@@ -269,6 +287,8 b' diff -r cb9a9f314b8b b/f'
269 287 +f
270 288 M a
271 289 % qpush failure
290 popping bar
291 popping foo
272 292 patch queue now empty
273 293 applying foo
274 294 applying bar
@@ -284,6 +304,7 b' 0 qparent'
284 304 1 qbase foo
285 305 2 qtip bar tip
286 306 % bad node in status
307 popping bar
287 308 now at: foo
288 309 changeset: 0:cb9a9f314b8b
289 310 mq status file refers to unknown node
@@ -308,6 +329,7 b' copy file'
308 329 diff --git a/new b/copy
309 330 copy from new
310 331 copy to copy
332 popping copy
311 333 now at: new
312 334 applying copy
313 335 now at: copy
@@ -320,6 +342,7 b' copy to copy'
320 342 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
321 343 created new head
322 344 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
345 popping bar
323 346 adding branch
324 347 adding changesets
325 348 adding manifests
@@ -354,6 +377,7 b' diff --git a/foo b/baz'
354 377
355 378 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
356 379 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
380 popping bar
357 381 adding branch
358 382 adding changesets
359 383 adding manifests
@@ -386,6 +410,7 b' 3 barney (foo)'
386 410 % refresh omitting an added file
387 411 C newfile
388 412 A newfile
413 popping baz
389 414 now at: bar
390 415 % create a git patch
391 416 diff --git a/alexander b/alexander
@@ -393,6 +418,7 b' diff --git a/alexander b/alexander'
393 418 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
394 419 diff --git a/bucephalus b/bucephalus
395 420 % check binary patches can be popped and pushed
421 popping addbucephalus
396 422 now at: addalexander
397 423 applying addbucephalus
398 424 now at: addbucephalus
@@ -461,6 +487,7 b' main repo:'
461 487 rev 0: add foo
462 488 patch repo:
463 489 rev 0: checkpoint
490 popping patch1
464 491 patch queue now empty
465 492 main repo:
466 493 rev 0: add foo
@@ -475,12 +502,14 b' patch repo:'
475 502 rev 0: checkpoint
476 503 % test applying on an empty file (issue 1033)
477 504 adding a
505 popping changea
478 506 patch queue now empty
479 507 applying changea
480 508 now at: changea
481 509 % test qpush with --force, issue1087
482 510 adding bye.txt
483 511 adding hello.txt
512 popping empty
484 513 patch queue now empty
485 514 % qpush should fail, local changes
486 515 abort: local changes found, refresh first
@@ -510,6 +539,7 b' date: Thu Jan 01 00:00:00 1970 +0'
510 539 summary: imported patch empty
511 540
512 541
542 popping empty
513 543 patch queue now empty
514 544 % qpush should fail, local changes
515 545 abort: local changes found, refresh first
@@ -539,4 +569,5 b' diff -r 9ecee4f634e3 hello.txt'
539 569 % test popping revisions not in working dir ancestry
540 570 0 A empty
541 571 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
572 popping empty
542 573 patch queue now empty
@@ -79,6 +79,8 b' diff -r x -r y f'
79 79 +mq1r1mq2
80 80
81 81 % Adding one git-style patch and one normal
82 popping f2.patch
83 popping f.patch
82 84 patch queue now empty
83 85 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
84 86 % Git patch
General Comments 0
You need to be logged in to leave comments. Login now