Mercurial > hg-stable
comparison tests/test-commit-amend.t @ 30469:ce3a133f71b3
conflicts: make spacing consistent in conflict markers
The way default marker template was defined before this patch,
the spacing before dash in conflict markes was dependent on
whether changeset is a tip one or not. This is a relevant part
of template:
'{ifeq(tags, "tip", "", "{tags} "}'
If revision is a tip revision with no other tags, this would
resolve to an empty string, but for revisions which are not tip
and don't have any other tags, this would resolve to a single
space string. In the end this causes weirdnesses like the ones
you can see in the affected tests.
This is a not a big deal, but double spacing may be visually
less pleasant.
Please note that test changes where commit hashes change are
the result of marking files as resolved without removing markers.
author | Kostia Balytskyi <ikostia@fb.com> |
---|---|
date | Sat, 19 Nov 2016 15:41:37 -0800 |
parents | 3633403888ae |
children | f05ede08dcf7 |
comparison
equal
deleted
inserted
replaced
30468:bccd89b46cbf | 30469:ce3a133f71b3 |
---|---|
636 [1] | 636 [1] |
637 $ hg resolve -m cc | 637 $ hg resolve -m cc |
638 (no more unresolved files) | 638 (no more unresolved files) |
639 $ hg ci -m 'merge bar' | 639 $ hg ci -m 'merge bar' |
640 $ hg log --config diff.git=1 -pr . | 640 $ hg log --config diff.git=1 -pr . |
641 changeset: 23:69c24fe01e35 | 641 changeset: 23:163cfd7219f7 |
642 tag: tip | 642 tag: tip |
643 parent: 22:30d96aeaf27b | 643 parent: 22:30d96aeaf27b |
644 parent: 21:1aa437659d19 | 644 parent: 21:1aa437659d19 |
645 user: test | 645 user: test |
646 date: Thu Jan 01 00:00:00 1970 +0000 | 646 date: Thu Jan 01 00:00:00 1970 +0000 |
655 @@ -1,1 +1,5 @@ | 655 @@ -1,1 +1,5 @@ |
656 +<<<<<<< working copy: 30d96aeaf27b - test: aa | 656 +<<<<<<< working copy: 30d96aeaf27b - test: aa |
657 dd | 657 dd |
658 +======= | 658 +======= |
659 +cc | 659 +cc |
660 +>>>>>>> merge rev: 1aa437659d19 bar - test: aazzcc | 660 +>>>>>>> merge rev: 1aa437659d19 bar - test: aazzcc |
661 diff --git a/z b/zz | 661 diff --git a/z b/zz |
662 rename from z | 662 rename from z |
663 rename to zz | 663 rename to zz |
664 | 664 |
665 $ hg debugrename aa | 665 $ hg debugrename aa |
669 $ hg debugrename cc | 669 $ hg debugrename cc |
670 cc not renamed | 670 cc not renamed |
671 $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -m 'merge bar (amend message)' --edit | 671 $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -m 'merge bar (amend message)' --edit |
672 HGEDITFORM=commit.amend.merge | 672 HGEDITFORM=commit.amend.merge |
673 $ hg log --config diff.git=1 -pr . | 673 $ hg log --config diff.git=1 -pr . |
674 changeset: 24:cfa2fbef3169 | 674 changeset: 24:bca52d4ed186 |
675 tag: tip | 675 tag: tip |
676 parent: 22:30d96aeaf27b | 676 parent: 22:30d96aeaf27b |
677 parent: 21:1aa437659d19 | 677 parent: 21:1aa437659d19 |
678 user: test | 678 user: test |
679 date: Thu Jan 01 00:00:00 1970 +0000 | 679 date: Thu Jan 01 00:00:00 1970 +0000 |
688 @@ -1,1 +1,5 @@ | 688 @@ -1,1 +1,5 @@ |
689 +<<<<<<< working copy: 30d96aeaf27b - test: aa | 689 +<<<<<<< working copy: 30d96aeaf27b - test: aa |
690 dd | 690 dd |
691 +======= | 691 +======= |
692 +cc | 692 +cc |
693 +>>>>>>> merge rev: 1aa437659d19 bar - test: aazzcc | 693 +>>>>>>> merge rev: 1aa437659d19 bar - test: aazzcc |
694 diff --git a/z b/zz | 694 diff --git a/z b/zz |
695 rename from z | 695 rename from z |
696 rename to zz | 696 rename to zz |
697 | 697 |
698 $ hg debugrename aa | 698 $ hg debugrename aa |
702 $ hg debugrename cc | 702 $ hg debugrename cc |
703 cc not renamed | 703 cc not renamed |
704 $ hg mv zz z | 704 $ hg mv zz z |
705 $ hg ci --amend -m 'merge bar (undo rename)' | 705 $ hg ci --amend -m 'merge bar (undo rename)' |
706 $ hg log --config diff.git=1 -pr . | 706 $ hg log --config diff.git=1 -pr . |
707 changeset: 26:c34de68b014c | 707 changeset: 26:12594a98ca3f |
708 tag: tip | 708 tag: tip |
709 parent: 22:30d96aeaf27b | 709 parent: 22:30d96aeaf27b |
710 parent: 21:1aa437659d19 | 710 parent: 21:1aa437659d19 |
711 user: test | 711 user: test |
712 date: Thu Jan 01 00:00:00 1970 +0000 | 712 date: Thu Jan 01 00:00:00 1970 +0000 |
721 @@ -1,1 +1,5 @@ | 721 @@ -1,1 +1,5 @@ |
722 +<<<<<<< working copy: 30d96aeaf27b - test: aa | 722 +<<<<<<< working copy: 30d96aeaf27b - test: aa |
723 dd | 723 dd |
724 +======= | 724 +======= |
725 +cc | 725 +cc |
726 +>>>>>>> merge rev: 1aa437659d19 bar - test: aazzcc | 726 +>>>>>>> merge rev: 1aa437659d19 bar - test: aazzcc |
727 | 727 |
728 $ hg debugrename z | 728 $ hg debugrename z |
729 z not renamed | 729 z not renamed |
730 | 730 |
731 Amend a merge changeset (with renames during the merge): | 731 Amend a merge changeset (with renames during the merge): |
738 $ hg merge -q bar | 738 $ hg merge -q bar |
739 $ hg mv aa aaa | 739 $ hg mv aa aaa |
740 $ echo aa >> aaa | 740 $ echo aa >> aaa |
741 $ hg ci -m 'merge bar again' | 741 $ hg ci -m 'merge bar again' |
742 $ hg log --config diff.git=1 -pr . | 742 $ hg log --config diff.git=1 -pr . |
743 changeset: 28:37d40dcef03b | 743 changeset: 28:dffde028b388 |
744 tag: tip | 744 tag: tip |
745 parent: 26:c34de68b014c | 745 parent: 26:12594a98ca3f |
746 parent: 27:4c94d5bc65f5 | 746 parent: 27:4c94d5bc65f5 |
747 user: test | 747 user: test |
748 date: Thu Jan 01 00:00:00 1970 +0000 | 748 date: Thu Jan 01 00:00:00 1970 +0000 |
749 summary: merge bar again | 749 summary: merge bar again |
750 | 750 |
773 $ hg debugrename aaa | 773 $ hg debugrename aaa |
774 aaa renamed from aa:37d9b5d994eab34eda9c16b195ace52c7b129980 | 774 aaa renamed from aa:37d9b5d994eab34eda9c16b195ace52c7b129980 |
775 $ hg mv aaa aa | 775 $ hg mv aaa aa |
776 $ hg ci --amend -m 'merge bar again (undo rename)' | 776 $ hg ci --amend -m 'merge bar again (undo rename)' |
777 $ hg log --config diff.git=1 -pr . | 777 $ hg log --config diff.git=1 -pr . |
778 changeset: 30:537c6d1b3633 | 778 changeset: 30:18e3ba160489 |
779 tag: tip | 779 tag: tip |
780 parent: 26:c34de68b014c | 780 parent: 26:12594a98ca3f |
781 parent: 27:4c94d5bc65f5 | 781 parent: 27:4c94d5bc65f5 |
782 user: test | 782 user: test |
783 date: Thu Jan 01 00:00:00 1970 +0000 | 783 date: Thu Jan 01 00:00:00 1970 +0000 |
784 summary: merge bar again (undo rename) | 784 summary: merge bar again (undo rename) |
785 | 785 |
815 > EOF | 815 > EOF |
816 local [working copy] changed aa which other [merge rev] deleted | 816 local [working copy] changed aa which other [merge rev] deleted |
817 use (c)hanged version, (d)elete, or leave (u)nresolved? c | 817 use (c)hanged version, (d)elete, or leave (u)nresolved? c |
818 $ hg ci -m 'merge bar (with conflicts)' | 818 $ hg ci -m 'merge bar (with conflicts)' |
819 $ hg log --config diff.git=1 -pr . | 819 $ hg log --config diff.git=1 -pr . |
820 changeset: 33:7afcba911942 | 820 changeset: 33:b4c3035e2544 |
821 tag: tip | 821 tag: tip |
822 parent: 32:6075d69d215d | 822 parent: 32:4b216ca5ba97 |
823 parent: 31:67db8847a540 | 823 parent: 31:67db8847a540 |
824 user: test | 824 user: test |
825 date: Thu Jan 01 00:00:00 1970 +0000 | 825 date: Thu Jan 01 00:00:00 1970 +0000 |
826 summary: merge bar (with conflicts) | 826 summary: merge bar (with conflicts) |
827 | 827 |
828 | 828 |
829 $ hg rm aa | 829 $ hg rm aa |
830 $ hg ci --amend -m 'merge bar (with conflicts, amended)' | 830 $ hg ci --amend -m 'merge bar (with conflicts, amended)' |
831 $ hg log --config diff.git=1 -pr . | 831 $ hg log --config diff.git=1 -pr . |
832 changeset: 35:376965e47ddd | 832 changeset: 35:1205ed810051 |
833 tag: tip | 833 tag: tip |
834 parent: 32:6075d69d215d | 834 parent: 32:4b216ca5ba97 |
835 parent: 31:67db8847a540 | 835 parent: 31:67db8847a540 |
836 user: test | 836 user: test |
837 date: Thu Jan 01 00:00:00 1970 +0000 | 837 date: Thu Jan 01 00:00:00 1970 +0000 |
838 summary: merge bar (with conflicts, amended) | 838 summary: merge bar (with conflicts, amended) |
839 | 839 |
925 expecting diff of foo | 925 expecting diff of foo |
926 | 926 |
927 HG: M: | 927 HG: M: |
928 HG: A: foo | 928 HG: A: foo |
929 HG: R: | 929 HG: R: |
930 HG: diff -r 376965e47ddd foo | 930 HG: diff -r 1205ed810051 foo |
931 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | 931 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
932 HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | 932 HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
933 HG: @@ -0,0 +1,1 @@ | 933 HG: @@ -0,0 +1,1 @@ |
934 HG: +foo | 934 HG: +foo |
935 | 935 |
939 expecting diff of foo and y | 939 expecting diff of foo and y |
940 | 940 |
941 HG: M: | 941 HG: M: |
942 HG: A: foo y | 942 HG: A: foo y |
943 HG: R: | 943 HG: R: |
944 HG: diff -r 376965e47ddd foo | 944 HG: diff -r 1205ed810051 foo |
945 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | 945 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
946 HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | 946 HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
947 HG: @@ -0,0 +1,1 @@ | 947 HG: @@ -0,0 +1,1 @@ |
948 HG: +foo | 948 HG: +foo |
949 HG: diff -r 376965e47ddd y | 949 HG: diff -r 1205ed810051 y |
950 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | 950 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
951 HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 | 951 HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 |
952 HG: @@ -0,0 +1,1 @@ | 952 HG: @@ -0,0 +1,1 @@ |
953 HG: +y | 953 HG: +y |
954 | 954 |
957 expecting diff of a, foo and y | 957 expecting diff of a, foo and y |
958 | 958 |
959 HG: M: | 959 HG: M: |
960 HG: A: foo y | 960 HG: A: foo y |
961 HG: R: a | 961 HG: R: a |
962 HG: diff -r 376965e47ddd a | 962 HG: diff -r 1205ed810051 a |
963 HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 | 963 HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 |
964 HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | 964 HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
965 HG: @@ -1,2 +0,0 @@ | 965 HG: @@ -1,2 +0,0 @@ |
966 HG: -a | 966 HG: -a |
967 HG: -a | 967 HG: -a |
968 HG: diff -r 376965e47ddd foo | 968 HG: diff -r 1205ed810051 foo |
969 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | 969 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
970 HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | 970 HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
971 HG: @@ -0,0 +1,1 @@ | 971 HG: @@ -0,0 +1,1 @@ |
972 HG: +foo | 972 HG: +foo |
973 HG: diff -r 376965e47ddd y | 973 HG: diff -r 1205ed810051 y |
974 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | 974 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
975 HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 | 975 HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 |
976 HG: @@ -0,0 +1,1 @@ | 976 HG: @@ -0,0 +1,1 @@ |
977 HG: +y | 977 HG: +y |
978 | 978 |
981 expecting diff of a, foo, x and y | 981 expecting diff of a, foo, x and y |
982 | 982 |
983 HG: M: | 983 HG: M: |
984 HG: A: foo y | 984 HG: A: foo y |
985 HG: R: a x | 985 HG: R: a x |
986 HG: diff -r 376965e47ddd a | 986 HG: diff -r 1205ed810051 a |
987 HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 | 987 HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 |
988 HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | 988 HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
989 HG: @@ -1,2 +0,0 @@ | 989 HG: @@ -1,2 +0,0 @@ |
990 HG: -a | 990 HG: -a |
991 HG: -a | 991 HG: -a |
992 HG: diff -r 376965e47ddd foo | 992 HG: diff -r 1205ed810051 foo |
993 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | 993 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
994 HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | 994 HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
995 HG: @@ -0,0 +1,1 @@ | 995 HG: @@ -0,0 +1,1 @@ |
996 HG: +foo | 996 HG: +foo |
997 HG: diff -r 376965e47ddd x | 997 HG: diff -r 1205ed810051 x |
998 HG: --- a/x Thu Jan 01 00:00:00 1970 +0000 | 998 HG: --- a/x Thu Jan 01 00:00:00 1970 +0000 |
999 HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | 999 HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
1000 HG: @@ -1,1 +0,0 @@ | 1000 HG: @@ -1,1 +0,0 @@ |
1001 HG: -x | 1001 HG: -x |
1002 HG: diff -r 376965e47ddd y | 1002 HG: diff -r 1205ed810051 y |
1003 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | 1003 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
1004 HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 | 1004 HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 |
1005 HG: @@ -0,0 +1,1 @@ | 1005 HG: @@ -0,0 +1,1 @@ |
1006 HG: +y | 1006 HG: +y |
1007 | 1007 |
1012 cc should be excluded | 1012 cc should be excluded |
1013 | 1013 |
1014 HG: M: | 1014 HG: M: |
1015 HG: A: foo y | 1015 HG: A: foo y |
1016 HG: R: a x | 1016 HG: R: a x |
1017 HG: diff -r 376965e47ddd a | 1017 HG: diff -r 1205ed810051 a |
1018 HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 | 1018 HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 |
1019 HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | 1019 HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
1020 HG: @@ -1,2 +0,0 @@ | 1020 HG: @@ -1,2 +0,0 @@ |
1021 HG: -a | 1021 HG: -a |
1022 HG: -a | 1022 HG: -a |
1023 HG: diff -r 376965e47ddd foo | 1023 HG: diff -r 1205ed810051 foo |
1024 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | 1024 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
1025 HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | 1025 HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
1026 HG: @@ -0,0 +1,1 @@ | 1026 HG: @@ -0,0 +1,1 @@ |
1027 HG: +foo | 1027 HG: +foo |
1028 HG: diff -r 376965e47ddd x | 1028 HG: diff -r 1205ed810051 x |
1029 HG: --- a/x Thu Jan 01 00:00:00 1970 +0000 | 1029 HG: --- a/x Thu Jan 01 00:00:00 1970 +0000 |
1030 HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | 1030 HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
1031 HG: @@ -1,1 +0,0 @@ | 1031 HG: @@ -1,1 +0,0 @@ |
1032 HG: -x | 1032 HG: -x |
1033 HG: diff -r 376965e47ddd y | 1033 HG: diff -r 1205ed810051 y |
1034 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | 1034 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
1035 HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 | 1035 HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 |
1036 HG: @@ -0,0 +1,1 @@ | 1036 HG: @@ -0,0 +1,1 @@ |
1037 HG: +y | 1037 HG: +y |
1038 | 1038 |