Mercurial > evolve
comparison tests/test-evolve-content-divergence.t @ 4419:1fdecdfd0df9 stable
evolve: add test which shows unrecoverable evolve state (issue6053)
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Mon, 04 Mar 2019 02:55:38 +0530 |
parents | ab3581bc0637 |
children | 6a20e0e9b957 |
comparison
equal
deleted
inserted
replaced
4410:8087e9a0f902 | 4419:1fdecdfd0df9 |
---|---|
925 | () [default] draft | 925 | () [default] draft |
926 o 13:f66f262fff6c watbar to a | 926 o 13:f66f262fff6c watbar to a |
927 | () [default] draft | 927 | () [default] draft |
928 o 0:8fa14d15e168 added hgignore | 928 o 0:8fa14d15e168 added hgignore |
929 () [default] draft | 929 () [default] draft |
930 | |
931 | |
932 Test which demonstrate that evolve can fall into unrecoverable state (issue6053): | |
933 --------------------------------------------------------------------------------- | |
934 $ cd .. | |
935 $ hg init localside | |
936 $ cd localside | |
937 $ for ch in a b c d e; do | |
938 > echo $ch > $ch; | |
939 > hg add $ch; | |
940 > hg ci -m "added "$ch; | |
941 > done; | |
942 | |
943 $ hg glog | |
944 @ 4:8d71eadcc9df added e | |
945 | () [default] draft | |
946 o 3:9150fe93bec6 added d | |
947 | () [default] draft | |
948 o 2:155349b645be added c | |
949 | () [default] draft | |
950 o 1:5f6d8a4bf34a added b | |
951 | () [default] draft | |
952 o 0:9092f1db7931 added a | |
953 () [default] draft | |
954 | |
955 $ echo ee > e | |
956 $ hg amend -m "updated e" | |
957 | |
958 $ hg up 1 -q | |
959 $ echo dd > d | |
960 $ echo ee > e | |
961 $ hg add d e | |
962 $ hg ci -m "updated e" | |
963 created new head | |
964 | |
965 $ hg prune 4 -s . --hidden | |
966 1 changesets pruned | |
967 2 new content-divergent changesets | |
968 | |
969 $ hg prune 3 | |
970 1 changesets pruned | |
971 1 new orphan changesets | |
972 | |
973 $ hg glog | |
974 @ 6:de4ea3103326 updated e | |
975 | () [default] draft | |
976 | * 5:ff6f7cd76a7c updated e | |
977 | | () [default] draft | |
978 | x 3:9150fe93bec6 added d | |
979 | | () [default] draft | |
980 | o 2:155349b645be added c | |
981 |/ () [default] draft | |
982 o 1:5f6d8a4bf34a added b | |
983 | () [default] draft | |
984 o 0:9092f1db7931 added a | |
985 () [default] draft | |
986 | |
987 $ hg evolve --content-divergent --any | |
988 merge:[5] updated e | |
989 with: [6] updated e | |
990 base: [4] added e | |
991 rebasing "other" content-divergent changeset de4ea3103326 on 9150fe93bec6 | |
992 merging d | |
993 warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
994 fix conflicts and see `hg help evolve.interrupted` | |
995 [1] | |
996 | |
997 $ hg diff | |
998 diff -r 9150fe93bec6 d | |
999 --- a/d Thu Jan 01 00:00:00 1970 +0000 | |
1000 +++ b/d Thu Jan 01 00:00:00 1970 +0000 | |
1001 @@ -1,1 +1,5 @@ | |
1002 +<<<<<<< destination: 9150fe93bec6 - test: added d | |
1003 d | |
1004 +======= | |
1005 +dd | |
1006 +>>>>>>> evolving: de4ea3103326 - test: updated e | |
1007 diff -r 9150fe93bec6 e | |
1008 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1009 +++ b/e Thu Jan 01 00:00:00 1970 +0000 | |
1010 @@ -0,0 +1,1 @@ | |
1011 +ee | |
1012 | |
1013 $ echo dresolved > d | |
1014 $ hg res -m | |
1015 (no more unresolved files) | |
1016 continue: hg evolve --continue | |
1017 | |
1018 $ hg evolve --continue | |
1019 update:[2] added c | |
1020 abort: outstanding uncommitted merge | |
1021 [255] | |
1022 | |
1023 $ hg evolve --abort | |
1024 update:[2] added c | |
1025 abort: outstanding uncommitted merge | |
1026 [255] | |
1027 | |
1028 $ hg ci -m "merge commit" | |
1029 abort: evolve in progress | |
1030 (use 'hg evolve --continue' or 'hg evolve --abort' to abort) | |
1031 [255] | |
1032 |