Mercurial > evolve
comparison tests/test-topic-stack.t @ 2913:6b2ae9f2b9c4
tests: add tests for `hg stack` showing surprising behavior with gaps
The test will help us to analyse in next commit if the things are fixed or not.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 07 Sep 2017 16:45:57 +0200 |
parents | 8874e65343a4 |
children | 044686b25cf7 |
comparison
equal
deleted
inserted
replaced
2912:1341ff3ba4a9 | 2913:6b2ae9f2b9c4 |
---|---|
428 [255] | 428 [255] |
429 $ hg topic --list thisdoesnotexist | 429 $ hg topic --list thisdoesnotexist |
430 abort: cannot resolve "thisdoesnotexist": no such topic found | 430 abort: cannot resolve "thisdoesnotexist": no such topic found |
431 [255] | 431 [255] |
432 | 432 |
433 Complex cases where commits with same topic are not consecutive but are linear | |
434 ============================================================================== | |
435 | |
436 $ hg log --graph | |
437 o 15 default {foo} draft c_h | |
438 | | |
439 o 14 default {foo} draft c_g | |
440 | | |
441 @ 13 default {foo} draft c_D | |
442 | | |
443 | o 9 default {foo} draft c_f | |
444 | | | |
445 | o 8 default {foo} draft c_e | |
446 | | | |
447 | x 7 default {foo} draft c_d | |
448 |/ | |
449 o 2 default {foo} draft c_c | |
450 | | |
451 o 1 default {} public c_b | |
452 | | |
453 o 0 default {} public c_a | |
454 | |
455 Converting into a linear chain | |
456 $ hg rebase -s 8 -d 15 | |
457 rebasing 8:215bc359096a "c_e" | |
458 rebasing 9:ec9267b3f33f "c_f" | |
459 | |
460 $ hg log -G | |
461 o 17 default {foo} draft c_f | |
462 | | |
463 o 16 default {foo} draft c_e | |
464 | | |
465 o 15 default {foo} draft c_h | |
466 | | |
467 o 14 default {foo} draft c_g | |
468 | | |
469 @ 13 default {foo} draft c_D | |
470 | | |
471 o 2 default {foo} draft c_c | |
472 | | |
473 o 1 default {} public c_b | |
474 | | |
475 o 0 default {} public c_a | |
476 | |
477 Changing topics on some commits in between | |
478 $ hg topic foobar -r 'desc(c_e) + desc(c_D)' | |
479 switching to topic foobar | |
480 changed topic on 2 changes | |
481 $ hg log -G | |
482 @ 19 default {foobar} draft c_D | |
483 | | |
484 | o 18 default {foobar} draft c_e | |
485 | | | |
486 | | o 17 default {foo} draft c_f | |
487 | | | | |
488 | | x 16 default {foo} draft c_e | |
489 | |/ | |
490 | o 15 default {foo} draft c_h | |
491 | | | |
492 | o 14 default {foo} draft c_g | |
493 | | | |
494 | x 13 default {foo} draft c_D | |
495 |/ | |
496 o 2 default {foo} draft c_c | |
497 | | |
498 o 1 default {} public c_b | |
499 | | |
500 o 0 default {} public c_a | |
501 | |
502 $ hg rebase -s 17 -d 18 | |
503 rebasing 17:77082e55de88 "c_f" | |
504 switching to topic foo | |
505 switching to topic foobar | |
506 $ hg rebase -s 14 -d 19 | |
507 rebasing 14:0c3e8aed985d "c_g" | |
508 switching to topic foo | |
509 rebasing 15:b9e4f3709bc5 "c_h" | |
510 rebasing 18:4bc813530301 "c_e" | |
511 switching to topic foobar | |
512 rebasing 20:4406ea4be852 "c_f" (tip) | |
513 switching to topic foo | |
514 switching to topic foobar | |
515 $ hg up | |
516 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
517 $ hg log --graph | |
518 o 24 default {foo} draft c_f | |
519 | | |
520 @ 23 default {foobar} draft c_e | |
521 | | |
522 o 22 default {foo} draft c_h | |
523 | | |
524 o 21 default {foo} draft c_g | |
525 | | |
526 o 19 default {foobar} draft c_D | |
527 | | |
528 o 2 default {foo} draft c_c | |
529 | | |
530 o 1 default {} public c_b | |
531 | | |
532 o 0 default {} public c_a | |
533 | |
534 XXX: The following should show single heads | |
535 $ hg stack | |
536 ### topic: foobar (2 heads) | |
537 ### branch: default, 3 behind | |
538 t2: c_D | |
539 ^ c_c | |
540 t1@ c_e (current) | |
541 t0^ c_h (base) | |
542 | |
543 $ hg stack foo | |
544 ### topic: foo (3 heads) | |
545 ### branch: default, ambigious rebase destination | |
546 t4: c_c | |
547 ^ c_b | |
548 t3: c_h | |
549 t2: c_g | |
550 ^ c_D | |
551 t1: c_f | |
552 t0^ c_e (base) |