##// END OF EJS Templates
copies: add test that makes both the merging csets dirty and fails...
Sushil khanchi -
r42097:fc4b7a46 default
parent child Browse files
Show More
@@ -1,6 +1,8 b''
1 #testcases filelog compatibility
1 #testcases filelog compatibility
2
2
3 $ cat >> $HGRCPATH << EOF
3 $ cat >> $HGRCPATH << EOF
4 > [extensions]
5 > rebase=
4 > [alias]
6 > [alias]
5 > l = log -G -T '{rev} {desc}\n{files}\n'
7 > l = log -G -T '{rev} {desc}\n{files}\n'
6 > EOF
8 > EOF
@@ -552,3 +554,80 b' Grafting revision 4 on top of revision 2'
552 b
554 b
553 +baba
555 +baba
554
556
557 Test which demonstrate that fullcopytracing algorithm can fail to handle a case when both the csets are dirty
558 ----------------------------------------------------------------------------------------------------------
559
560 $ newrepo
561 $ echo a > a
562 $ hg add a
563 $ hg ci -m "added a"
564 $ echo b > b
565 $ hg add b
566 $ hg ci -m "added b"
567
568 $ echo foobar > willconflict
569 $ hg add willconflict
570 $ hg ci -m "added willconflict"
571 $ echo c > c
572 $ hg add c
573 $ hg ci -m "added c"
574
575 $ hg l
576 @ 3 added c
577 | c
578 o 2 added willconflict
579 | willconflict
580 o 1 added b
581 | b
582 o 0 added a
583 a
584
585 $ hg up ".^^"
586 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
587 $ echo d > d
588 $ hg add d
589 $ hg ci -m "added d"
590 created new head
591
592 $ echo barfoo > willconflict
593 $ hg add willconflict
594 $ hg ci --amend -m "added willconflict and d"
595
596 $ hg l
597 @ 5 added willconflict and d
598 | d willconflict
599 | o 3 added c
600 | | c
601 | o 2 added willconflict
602 |/ willconflict
603 o 1 added b
604 | b
605 o 0 added a
606 a
607
608 $ hg rebase -r . -d 2 -t :other
609 rebasing 5:5018b1509e94 "added willconflict and d" (tip)
610
611 $ hg up 3 -q
612 $ hg l --hidden
613 o 6 added willconflict and d
614 | d willconflict
615 | x 5 added willconflict and d
616 | | d willconflict
617 | | x 4 added d
618 | |/ d
619 +---@ 3 added c
620 | | c
621 o | 2 added willconflict
622 |/ willconflict
623 o 1 added b
624 | b
625 o 0 added a
626 a
627
628 Now if we trigger a merge between cset revision 3 and 6 using base revision 4, in this case
629 both the merging csets will be dirty as no one is descendent of base revision:
630
631 $ hg graft -r 6 --base 4 --hidden 2>&1 | grep "AssertionError"
632 AssertionError
633
General Comments 0
You need to be logged in to leave comments. Login now