|
1 #testcases filelog compatibility sidedata |
|
2 |
1 ===================================================== |
3 ===================================================== |
2 Test Copy tracing for chain of copies involving merge |
4 Test Copy tracing for chain of copies involving merge |
3 ===================================================== |
5 ===================================================== |
4 |
6 |
5 This test files covers copies/rename case for a chains of commit where merges |
7 This test files covers copies/rename case for a chains of commit where merges |
6 are involved. It cheks we do not have unwanted update of behavior and that the |
8 are involved. It cheks we do not have unwanted update of behavior and that the |
7 different options to retrieve copies behave correctly. |
9 different options to retrieve copies behave correctly. |
|
10 |
8 |
11 |
9 Setup |
12 Setup |
10 ===== |
13 ===== |
11 |
14 |
12 use git diff to see rename |
15 use git diff to see rename |
451 $ hg debugindex f |
470 $ hg debugindex f |
452 rev linkrev nodeid p1 p2 |
471 rev linkrev nodeid p1 p2 |
453 0 4 0dd616bc7ab1 000000000000 000000000000 |
472 0 4 0dd616bc7ab1 000000000000 000000000000 |
454 1 10 6da5a2eecb9c 000000000000 000000000000 |
473 1 10 6da5a2eecb9c 000000000000 000000000000 |
455 2 19 eb806e34ef6b 0dd616bc7ab1 6da5a2eecb9c |
474 2 19 eb806e34ef6b 0dd616bc7ab1 6da5a2eecb9c |
|
475 |
|
476 # Here the filelog based implementation is not looking at the rename |
|
477 # information (because the file exist on both side). However the changelog |
|
478 # based on works fine. We have different output. |
|
479 |
456 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAEm-0")' |
480 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAEm-0")' |
457 M f |
481 M f |
|
482 b (no-filelog !) |
458 R b |
483 R b |
459 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEAm-0")' |
484 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEAm-0")' |
460 M f |
485 M f |
|
486 b (no-filelog !) |
461 R b |
487 R b |
462 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAEm-0")' |
488 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAEm-0")' |
463 M f |
489 M f |
|
490 d (no-filelog !) |
464 R d |
491 R d |
465 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEAm-0")' |
492 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEAm-0")' |
466 M f |
493 M f |
|
494 d (no-filelog !) |
467 R d |
495 R d |
468 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")' |
496 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")' |
469 A f |
497 A f |
470 d |
498 d |
471 R d |
499 R d |
472 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")' |
500 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")' |
473 A f |
501 A f |
474 b |
502 b |
475 R b |
503 R b |
|
504 |
|
505 # From here, we run status against revision where both source file exists. |
|
506 # |
|
507 # The filelog based implementation picks an arbitrary side based on revision |
|
508 # numbers. So the same side "wins" whatever the parents order is. This is |
|
509 # sub-optimal because depending on revision numbers means the result can be |
|
510 # different from one repository to the next. |
|
511 # |
|
512 # The changeset based algorithm use the parent order to break tie on conflicting |
|
513 # information and will have a different order depending on who is p1 and p2. |
|
514 # That order is stable accross repositories. (data from p1 prevails) |
|
515 |
476 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAEm-0")' |
516 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAEm-0")' |
477 A f |
517 A f |
478 d |
518 d |
479 R b |
519 R b |
480 R d |
520 R d |
481 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEAm-0")' |
521 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEAm-0")' |
482 A f |
522 A f |
483 d |
523 d (filelog !) |
|
524 b (no-filelog !) |
484 R b |
525 R b |
485 R d |
526 R d |
486 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")' |
527 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")' |
487 A f |
528 A f |
488 a |
529 a |
489 R a |
530 R a |
490 R b |
531 R b |
491 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")' |
532 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")' |
492 A f |
533 A f |
493 a |
534 a (filelog !) |
|
535 b (no-filelog !) |
494 R a |
536 R a |
495 R b |
537 R b |
496 |
538 |
497 |
539 |
498 Note: |
540 Note: |
561 h |
603 h |
562 R a |
604 R a |
563 R h |
605 R h |
564 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")' |
606 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")' |
565 M d |
607 M d |
|
608 h (no-filelog !) |
566 R h |
609 R h |
567 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")' |
610 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")' |
568 M b |
611 M b |
569 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBFm-0")' |
612 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBFm-0")' |
570 M b |
613 M b |
571 M d |
614 M d |
|
615 i (no-filelog !) |
572 R i |
616 R i |
573 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFBm-0")' |
617 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFBm-0")' |
574 M d |
618 M d |
|
619 h (no-filelog !) |
575 R h |
620 R h |
576 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFBm-0")' |
621 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFBm-0")' |
577 M b |
622 M b |
578 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFBm-0")' |
623 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFBm-0")' |
579 M b |
624 M b |
580 M d |
625 M d |
|
626 i (no-filelog !) |
581 R i |
627 R i |
582 |
628 |
583 The following graphlog is wrong, the "a -> c -> d" chain was overwritten and should not appear. |
629 The following graphlog is wrong, the "a -> c -> d" chain was overwritten and should not appear. |
584 |
630 |
585 $ hg log -Gfr 'desc("mBFm-0")' d |
631 $ hg log -Gfr 'desc("mBFm-0")' d |
643 | |
689 | |
644 o 1 i-1: a -move-> c |
690 o 1 i-1: a -move-> c |
645 | |
691 | |
646 o 0 i-0 initial commit: a b h |
692 o 0 i-0 initial commit: a b h |
647 |
693 |
|
694 One side of the merge have a long history with rename. The other side of the |
|
695 merge point to a new file with a smaller history. Each side is "valid". |
|
696 |
|
697 (and again the filelog based algorithm only explore one, with a pick based on |
|
698 revision numbers) |
|
699 |
648 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")' |
700 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")' |
649 A d |
701 A d |
650 a |
702 a (filelog !) |
651 R a |
703 R a |
652 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")' |
704 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")' |
653 A d |
705 A d |
654 a |
706 a |
655 R a |
707 R a |
752 M d |
805 M d |
753 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mGFm-0")' |
806 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mGFm-0")' |
754 M d |
807 M d |
755 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFGm-0")' |
808 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFGm-0")' |
756 M d |
809 M d |
|
810 i (no-filelog !) |
757 R i |
811 R i |
758 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mGFm-0")' |
812 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mGFm-0")' |
759 M d |
813 M d |
|
814 i (no-filelog !) |
760 R i |
815 R i |
761 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mFGm-0")' |
816 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mFGm-0")' |
762 M d |
817 M d |
|
818 h (no-filelog !) |
763 R h |
819 R h |
764 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGFm-0")' |
820 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGFm-0")' |
765 M d |
821 M d |
|
822 h (no-filelog !) |
766 R h |
823 R h |
767 |
824 |
768 $ hg log -Gfr 'desc("mFGm-0")' d |
825 $ hg log -Gfr 'desc("mFGm-0")' d |
769 o 28 mFGm-0 simple merge - one way |
826 o 28 mFGm-0 simple merge - one way |
770 |\ |
827 |\ |