comparison tests/test-mq.out @ 9325:74e717a21779

Merge with mpm
author Bryan O'Sullivan <bos@serpentine.com>
date Thu, 06 Aug 2009 18:48:00 -0700
parents 4017291c4c48
children cd5b6a11b607
comparison
equal deleted inserted replaced
9315:fb66a7d3f28f 9325:74e717a21779
1 % help 1 % help
2 mq extension - manage a stack of patches 2 mq extension - manage a stack of patches
3 3
4 This extension lets you work with a stack of patches in a Mercurial 4 This extension lets you work with a stack of patches in a Mercurial
5 repository. It manages two stacks of patches - all known patches, and 5 repository. It manages two stacks of patches - all known patches, and applied
6 applied patches (subset of known patches). 6 patches (subset of known patches).
7 7
8 Known patches are represented as patch files in the .hg/patches 8 Known patches are represented as patch files in the .hg/patches directory.
9 directory. Applied patches are both patch files and changesets. 9 Applied patches are both patch files and changesets.
10 10
11 Common tasks (use "hg help command" for more details): 11 Common tasks (use "hg help command" for more details):
12 12
13 prepare repository to work with patches qinit 13 prepare repository to work with patches qinit
14 create new patch qnew 14 create new patch qnew
106 +++ b/a 106 +++ b/a
107 @@ -1,1 +1,2 @@ 107 @@ -1,1 +1,2 @@
108 a 108 a
109 +a 109 +a
110 % qpop 110 % qpop
111 patch queue now empty 111 popping test.patch
112 % qpush 112 patch queue now empty
113 % qpush with dump of tag cache
114 .hg/tags.cache (pre qpush):
115 1
116
113 applying test.patch 117 applying test.patch
114 now at: test.patch 118 now at: test.patch
119 .hg/tags.cache (post qpush):
120 2
121
115 % pop/push outside repo 122 % pop/push outside repo
123 popping test.patch
116 patch queue now empty 124 patch queue now empty
117 applying test.patch 125 applying test.patch
118 now at: test.patch 126 now at: test.patch
119 % qrefresh in subdir 127 % qrefresh in subdir
120 % pop/push -a in subdir 128 % pop/push -a in subdir
129 popping test2.patch
130 popping test.patch
121 patch queue now empty 131 patch queue now empty
122 applying test.patch 132 applying test.patch
123 applying test2.patch 133 applying test2.patch
124 now at: test2.patch 134 now at: test2.patch
125 % qseries 135 % qseries
126 test.patch 136 test.patch
127 test2.patch 137 test2.patch
138 popping test2.patch
128 now at: test.patch 139 now at: test.patch
129 0 A test.patch: foo bar 140 0 A test.patch: foo bar
130 1 U test2.patch: 141 1 U test2.patch:
131 applying test2.patch 142 applying test2.patch
132 now at: test2.patch 143 now at: test2.patch
138 % qprev 149 % qprev
139 test.patch 150 test.patch
140 % qnext 151 % qnext
141 all patches applied 152 all patches applied
142 % pop, qnext, qprev, qapplied 153 % pop, qnext, qprev, qapplied
154 popping test2.patch
143 now at: test.patch 155 now at: test.patch
144 test2.patch 156 test2.patch
145 only one patch applied 157 only one patch applied
146 test.patch 158 test.patch
147 % commit should fail 159 % commit should fail
154 % qunapplied 166 % qunapplied
155 test2.patch 167 test2.patch
156 % qpush/qpop with index 168 % qpush/qpop with index
157 applying test2.patch 169 applying test2.patch
158 now at: test2.patch 170 now at: test2.patch
171 popping test2.patch
172 popping test1b.patch
159 now at: test.patch 173 now at: test.patch
160 applying test1b.patch 174 applying test1b.patch
161 now at: test1b.patch 175 now at: test1b.patch
162 applying test2.patch 176 applying test2.patch
163 now at: test2.patch 177 now at: test2.patch
178 popping test2.patch
164 now at: test1b.patch 179 now at: test1b.patch
180 popping test1b.patch
165 now at: test.patch 181 now at: test.patch
166 applying test1b.patch 182 applying test1b.patch
167 applying test2.patch 183 applying test2.patch
168 now at: test2.patch 184 now at: test2.patch
169 % push should succeed 185 % push should succeed
186 popping test2.patch
187 popping test1b.patch
188 popping test.patch
170 patch queue now empty 189 patch queue now empty
171 pushing to ../../k 190 pushing to ../../k
172 searching for changes 191 searching for changes
173 adding changesets 192 adding changesets
174 adding manifests 193 adding manifests
178 applying test.patch 197 applying test.patch
179 applying test1b.patch 198 applying test1b.patch
180 applying test2.patch 199 applying test2.patch
181 now at: test2.patch 200 now at: test2.patch
182 % pops all patches and succeeds 201 % pops all patches and succeeds
202 popping test2.patch
203 popping test1b.patch
204 popping test.patch
183 patch queue now empty 205 patch queue now empty
184 qpop -a succeeds 206 qpop -a succeeds
185 % does nothing and succeeds 207 % does nothing and succeeds
186 no patches applied 208 no patches applied
187 qpop -a succeeds 209 qpop -a succeeds
191 % pushes a patch and succeeds 213 % pushes a patch and succeeds
192 applying test.patch 214 applying test.patch
193 now at: test.patch 215 now at: test.patch
194 qpush succeeds 216 qpush succeeds
195 % pops a patch and succeeds 217 % pops a patch and succeeds
218 popping test.patch
196 patch queue now empty 219 patch queue now empty
197 qpop succeeds 220 qpop succeeds
198 % pushes up to test1b.patch and succeeds 221 % pushes up to test1b.patch and succeeds
199 applying test.patch 222 applying test.patch
200 applying test1b.patch 223 applying test1b.patch
211 qpush test.patch fails 234 qpush test.patch fails
212 % fails - can't pop to this patch 235 % fails - can't pop to this patch
213 abort: patch test2.patch is not applied 236 abort: patch test2.patch is not applied
214 qpop test2.patch fails 237 qpop test2.patch fails
215 % pops up to test.patch and succeeds 238 % pops up to test.patch and succeeds
239 popping test1b.patch
216 now at: test.patch 240 now at: test.patch
217 qpop test.patch succeeds 241 qpop test.patch succeeds
218 % pushes all patches and succeeds 242 % pushes all patches and succeeds
219 applying test1b.patch 243 applying test1b.patch
220 applying test2.patch 244 applying test2.patch
267 +++ b/b/f 291 +++ b/b/f
268 @@ -0,0 +1,1 @@ 292 @@ -0,0 +1,1 @@
269 +f 293 +f
270 M a 294 M a
271 % qpush failure 295 % qpush failure
296 popping bar
297 popping foo
272 patch queue now empty 298 patch queue now empty
273 applying foo 299 applying foo
274 applying bar 300 applying bar
275 file foo already exists 301 file foo already exists
276 1 out of 1 hunks FAILED -- saving rejects to file foo.rej 302 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
282 % mq tags 308 % mq tags
283 0 qparent 309 0 qparent
284 1 qbase foo 310 1 qbase foo
285 2 qtip bar tip 311 2 qtip bar tip
286 % bad node in status 312 % bad node in status
313 popping bar
287 now at: foo 314 now at: foo
288 changeset: 0:cb9a9f314b8b 315 changeset: 0:cb9a9f314b8b
289 mq status file refers to unknown node 316 mq status file refers to unknown node
290 tag: tip 317 tag: tip
291 user: test 318 user: test
306 copy file 333 copy file
307 334
308 diff --git a/new b/copy 335 diff --git a/new b/copy
309 copy from new 336 copy from new
310 copy to copy 337 copy to copy
338 popping copy
311 now at: new 339 now at: new
312 applying copy 340 applying copy
313 now at: copy 341 now at: copy
314 diff --git a/new b/copy 342 diff --git a/new b/copy
315 copy from new 343 copy from new
318 copy from new 346 copy from new
319 copy to copy 347 copy to copy
320 1 files updated, 0 files merged, 2 files removed, 0 files unresolved 348 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
321 created new head 349 created new head
322 2 files updated, 0 files merged, 1 files removed, 0 files unresolved 350 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
351 popping bar
323 adding branch 352 adding branch
324 adding changesets 353 adding changesets
325 adding manifests 354 adding manifests
326 adding file changes 355 adding file changes
327 added 1 changesets with 1 changes to 1 files 356 added 1 changesets with 1 changes to 1 files
352 diff --git a/bar b/bar 381 diff --git a/bar b/bar
353 diff --git a/foo b/baz 382 diff --git a/foo b/baz
354 383
355 1 files updated, 0 files merged, 2 files removed, 0 files unresolved 384 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
356 2 files updated, 0 files merged, 1 files removed, 0 files unresolved 385 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
386 popping bar
357 adding branch 387 adding branch
358 adding changesets 388 adding changesets
359 adding manifests 389 adding manifests
360 adding file changes 390 adding file changes
361 added 1 changesets with 1 changes to 1 files 391 added 1 changesets with 1 changes to 1 files
384 +bar 414 +bar
385 3 barney (foo) 415 3 barney (foo)
386 % refresh omitting an added file 416 % refresh omitting an added file
387 C newfile 417 C newfile
388 A newfile 418 A newfile
419 popping baz
389 now at: bar 420 now at: bar
390 % create a git patch 421 % create a git patch
391 diff --git a/alexander b/alexander 422 diff --git a/alexander b/alexander
392 % create a git binary patch 423 % create a git binary patch
393 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus 424 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
394 diff --git a/bucephalus b/bucephalus 425 diff --git a/bucephalus b/bucephalus
395 % check binary patches can be popped and pushed 426 % check binary patches can be popped and pushed
427 popping addbucephalus
396 now at: addalexander 428 now at: addalexander
397 applying addbucephalus 429 applying addbucephalus
398 now at: addbucephalus 430 now at: addbucephalus
399 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus 431 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
400 % strip again 432 % strip again
459 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 491 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
460 main repo: 492 main repo:
461 rev 0: add foo 493 rev 0: add foo
462 patch repo: 494 patch repo:
463 rev 0: checkpoint 495 rev 0: checkpoint
496 popping patch1
464 patch queue now empty 497 patch queue now empty
465 main repo: 498 main repo:
466 rev 0: add foo 499 rev 0: add foo
467 patch repo: 500 patch repo:
468 rev 0: checkpoint 501 rev 0: checkpoint
473 rev 0: add foo 506 rev 0: add foo
474 patch repo: 507 patch repo:
475 rev 0: checkpoint 508 rev 0: checkpoint
476 % test applying on an empty file (issue 1033) 509 % test applying on an empty file (issue 1033)
477 adding a 510 adding a
511 popping changea
478 patch queue now empty 512 patch queue now empty
479 applying changea 513 applying changea
480 now at: changea 514 now at: changea
481 % test qpush with --force, issue1087 515 % test qpush with --force, issue1087
482 adding bye.txt 516 adding bye.txt
483 adding hello.txt 517 adding hello.txt
518 popping empty
484 patch queue now empty 519 patch queue now empty
485 % qpush should fail, local changes 520 % qpush should fail, local changes
486 abort: local changes found, refresh first 521 abort: local changes found, refresh first
487 % apply force, should not discard changes with empty patch 522 % apply force, should not discard changes with empty patch
488 applying empty 523 applying empty
508 user: test 543 user: test
509 date: Thu Jan 01 00:00:00 1970 +0000 544 date: Thu Jan 01 00:00:00 1970 +0000
510 summary: imported patch empty 545 summary: imported patch empty
511 546
512 547
548 popping empty
513 patch queue now empty 549 patch queue now empty
514 % qpush should fail, local changes 550 % qpush should fail, local changes
515 abort: local changes found, refresh first 551 abort: local changes found, refresh first
516 % apply force, should discard changes in hello, but not bye 552 % apply force, should discard changes in hello, but not bye
517 applying empty 553 applying empty
537 +world 573 +world
538 +universe 574 +universe
539 % test popping revisions not in working dir ancestry 575 % test popping revisions not in working dir ancestry
540 0 A empty 576 0 A empty
541 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 577 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
542 patch queue now empty 578 popping empty
579 patch queue now empty