1044 EDITOR: HG: changed file2 |
1044 EDITOR: HG: changed file2 |
1045 [ ui.warning|transaction abort!] |
1045 [ ui.warning|transaction abort!] |
1046 [ ui.warning|rollback completed] |
1046 [ ui.warning|rollback completed] |
1047 [ ui.error|abort: empty commit message] |
1047 [ ui.error|abort: empty commit message] |
1048 [10] |
1048 [10] |
|
1049 |
|
1050 Test that creating an empty split or "no-op" |
|
1051 (identical to original) commit doesn't cause chaos |
|
1052 -------------------------------------------------- |
|
1053 |
|
1054 $ hg init $TESTTMP/noop |
|
1055 $ cd $TESTTMP/noop |
|
1056 $ echo r0 > r0 |
|
1057 $ hg ci -qAm r0 |
|
1058 $ hg phase -p |
|
1059 $ echo foo > foo |
|
1060 $ hg ci -qAm foo |
|
1061 $ hg log -G -T'{phase} {rev}:{node|short} {desc}' |
|
1062 @ draft 1:ae694b2901bb foo |
|
1063 | |
|
1064 o public 0:222799e2f90b r0 |
|
1065 |
|
1066 FIXME: This should not show "So far it has been split into" |
|
1067 $ printf 'd\na\n' | HGEDITOR=cat hg split || true |
|
1068 diff --git a/foo b/foo |
|
1069 new file mode 100644 |
|
1070 examine changes to 'foo'? |
|
1071 (enter ? for help) [Ynesfdaq?] d |
|
1072 |
|
1073 no changes to record |
|
1074 diff --git a/foo b/foo |
|
1075 new file mode 100644 |
|
1076 examine changes to 'foo'? |
|
1077 (enter ? for help) [Ynesfdaq?] a |
|
1078 |
|
1079 HG: Splitting ae694b2901bb. So far it has been split into: |
|
1080 HG: - 0:222799e2f90b "r0" |
|
1081 HG: Write commit message for the next split changeset. |
|
1082 foo |
|
1083 |
|
1084 |
|
1085 HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
1086 HG: Leave message empty to abort commit. |
|
1087 HG: -- |
|
1088 HG: user: test |
|
1089 HG: branch 'default' |
|
1090 HG: added foo |
|
1091 warning: commit already existed in the repository! |
|
1092 saved backup bundle to $TESTTMP/noop/.hg/strip-backup/ae694b2901bb-28e0b457-split.hg (obsstore-off !) |
|
1093 transaction abort! (obsstore-on !) |
|
1094 rollback completed (obsstore-on !) |
|
1095 abort: changeset ae694b2901bb cannot obsolete itself (obsstore-on !) |
|
1096 FIXME: this should not have stripped the commit we just no-op split |
|
1097 (obsstore-off only), or made r0 draft. |
|
1098 $ hg log -G -T'{phase} {rev}:{node|short} {desc}' |
|
1099 warning: ignoring unknown working parent ae694b2901bb! (obsstore-off !) |
|
1100 @ draft 1:ae694b2901bb foo (obsstore-on !) |
|
1101 | (obsstore-on !) |
|
1102 o public 0:222799e2f90b r0 (obsstore-on !) |
|
1103 o draft 0:222799e2f90b r0 (obsstore-off !) |
|
1104 |
|
1105 |
|
1106 Now try the same thing but modifying the message so we don't trigger the |
|
1107 identical changeset failures |
|
1108 |
|
1109 $ hg init $TESTTMP/noop2 |
|
1110 $ cd $TESTTMP/noop2 |
|
1111 $ echo r0 > r0 |
|
1112 $ hg ci -qAm r0 |
|
1113 $ hg phase -p |
|
1114 $ echo foo > foo |
|
1115 $ hg ci -qAm foo |
|
1116 $ hg log -G -T'{phase} {rev}:{node|short} {desc}' |
|
1117 @ draft 1:ae694b2901bb foo |
|
1118 | |
|
1119 o public 0:222799e2f90b r0 |
|
1120 |
|
1121 $ cat > $TESTTMP/messages <<EOF |
|
1122 > message1 |
|
1123 > EOF |
|
1124 FIXME: This should not show "So far it has been split into" |
|
1125 $ printf 'd\na\n' | HGEDITOR="\"$PYTHON\" $TESTTMP/editor.py" hg split |
|
1126 diff --git a/foo b/foo |
|
1127 new file mode 100644 |
|
1128 examine changes to 'foo'? |
|
1129 (enter ? for help) [Ynesfdaq?] d |
|
1130 |
|
1131 no changes to record |
|
1132 diff --git a/foo b/foo |
|
1133 new file mode 100644 |
|
1134 examine changes to 'foo'? |
|
1135 (enter ? for help) [Ynesfdaq?] a |
|
1136 |
|
1137 EDITOR: HG: Splitting ae694b2901bb. So far it has been split into: |
|
1138 EDITOR: HG: - 0:222799e2f90b "r0" |
|
1139 EDITOR: HG: Write commit message for the next split changeset. |
|
1140 EDITOR: foo |
|
1141 EDITOR: |
|
1142 EDITOR: |
|
1143 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
1144 EDITOR: HG: Leave message empty to abort commit. |
|
1145 EDITOR: HG: -- |
|
1146 EDITOR: HG: user: test |
|
1147 EDITOR: HG: branch 'default' |
|
1148 EDITOR: HG: added foo |
|
1149 created new head |
|
1150 saved backup bundle to $TESTTMP/noop2/.hg/strip-backup/ae694b2901bb-28e0b457-split.hg (obsstore-off !) |
|
1151 FIXME: this should not have made r0 draft |
|
1152 $ hg log -G -T'{phase} {rev}:{node|short} {desc}' |
|
1153 @ draft 1:de675559d3f9 message1 (obsstore-off !) |
|
1154 @ draft 2:de675559d3f9 message1 (obsstore-on !) |
|
1155 | |
|
1156 o draft 0:222799e2f90b r0 |
|
1157 |
|
1158 #if obsstore-on |
|
1159 FIXME: this should not have marked 222799e (r0) as a precursor of anything. |
|
1160 $ hg debugobsolete |
|
1161 ae694b2901bb8b0f8c4b5e075ddec0d63468d57a 222799e2f90be09ccbe49f519c4615d8375a9242 de675559d3f93ffc822c6eb7490e5c73033f17c7 0 * (glob) |
|
1162 #endif |