Mercurial > hg
comparison tests/test-split.t @ 46923:8ee1ac083ee7
split: fix issue with empty splits adjusting phases
Differential Revision: https://phab.mercurial-scm.org/D10388
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Mon, 12 Apr 2021 17:52:46 -0700 |
parents | 17368844f786 |
children | ca0049946e9a |
comparison
equal
deleted
inserted
replaced
46922:17368844f786 | 46923:8ee1ac083ee7 |
---|---|
1061 $ hg log -G -T'{phase} {rev}:{node|short} {desc}' | 1061 $ hg log -G -T'{phase} {rev}:{node|short} {desc}' |
1062 @ draft 1:ae694b2901bb foo | 1062 @ draft 1:ae694b2901bb foo |
1063 | | 1063 | |
1064 o public 0:222799e2f90b r0 | 1064 o public 0:222799e2f90b r0 |
1065 | 1065 |
1066 FIXME: This should not show "So far it has been split into" | |
1067 $ printf 'd\na\n' | HGEDITOR=cat hg split || true | 1066 $ printf 'd\na\n' | HGEDITOR=cat hg split || true |
1068 diff --git a/foo b/foo | 1067 diff --git a/foo b/foo |
1069 new file mode 100644 | 1068 new file mode 100644 |
1070 examine changes to 'foo'? | 1069 examine changes to 'foo'? |
1071 (enter ? for help) [Ynesfdaq?] d | 1070 (enter ? for help) [Ynesfdaq?] d |
1074 diff --git a/foo b/foo | 1073 diff --git a/foo b/foo |
1075 new file mode 100644 | 1074 new file mode 100644 |
1076 examine changes to 'foo'? | 1075 examine changes to 'foo'? |
1077 (enter ? for help) [Ynesfdaq?] a | 1076 (enter ? for help) [Ynesfdaq?] a |
1078 | 1077 |
1079 HG: Splitting ae694b2901bb. So far it has been split into: | 1078 HG: Splitting ae694b2901bb. Write commit message for the first split changeset. |
1080 HG: - 0:222799e2f90b "r0" | |
1081 HG: Write commit message for the next split changeset. | |
1082 foo | 1079 foo |
1083 | 1080 |
1084 | 1081 |
1085 HG: Enter commit message. Lines beginning with 'HG:' are removed. | 1082 HG: Enter commit message. Lines beginning with 'HG:' are removed. |
1086 HG: Leave message empty to abort commit. | 1083 HG: Leave message empty to abort commit. |
1092 saved backup bundle to $TESTTMP/noop/.hg/strip-backup/ae694b2901bb-28e0b457-split.hg (obsstore-off !) | 1089 saved backup bundle to $TESTTMP/noop/.hg/strip-backup/ae694b2901bb-28e0b457-split.hg (obsstore-off !) |
1093 transaction abort! (obsstore-on !) | 1090 transaction abort! (obsstore-on !) |
1094 rollback completed (obsstore-on !) | 1091 rollback completed (obsstore-on !) |
1095 abort: changeset ae694b2901bb cannot obsolete itself (obsstore-on !) | 1092 abort: changeset ae694b2901bb cannot obsolete itself (obsstore-on !) |
1096 FIXME: this should not have stripped the commit we just no-op split | 1093 FIXME: this should not have stripped the commit we just no-op split |
1097 (obsstore-off only), or made r0 draft. | 1094 (obsstore-off only) |
1098 $ hg log -G -T'{phase} {rev}:{node|short} {desc}' | 1095 $ hg log -G -T'{phase} {rev}:{node|short} {desc}' |
1099 warning: ignoring unknown working parent ae694b2901bb! (obsstore-off !) | 1096 warning: ignoring unknown working parent ae694b2901bb! (obsstore-off !) |
1100 @ draft 1:ae694b2901bb foo (obsstore-on !) | 1097 @ draft 1:ae694b2901bb foo (obsstore-on !) |
1101 | (obsstore-on !) | 1098 | (obsstore-on !) |
1102 o public 0:222799e2f90b r0 (obsstore-on !) | 1099 o public 0:222799e2f90b r0 |
1103 o draft 0:222799e2f90b r0 (obsstore-off !) | |
1104 | 1100 |
1105 | 1101 |
1106 Now try the same thing but modifying the message so we don't trigger the | 1102 Now try the same thing but modifying the message so we don't trigger the |
1107 identical changeset failures | 1103 identical changeset failures |
1108 | 1104 |
1119 o public 0:222799e2f90b r0 | 1115 o public 0:222799e2f90b r0 |
1120 | 1116 |
1121 $ cat > $TESTTMP/messages <<EOF | 1117 $ cat > $TESTTMP/messages <<EOF |
1122 > message1 | 1118 > message1 |
1123 > EOF | 1119 > 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 | 1120 $ printf 'd\na\n' | HGEDITOR="\"$PYTHON\" $TESTTMP/editor.py" hg split |
1126 diff --git a/foo b/foo | 1121 diff --git a/foo b/foo |
1127 new file mode 100644 | 1122 new file mode 100644 |
1128 examine changes to 'foo'? | 1123 examine changes to 'foo'? |
1129 (enter ? for help) [Ynesfdaq?] d | 1124 (enter ? for help) [Ynesfdaq?] d |
1132 diff --git a/foo b/foo | 1127 diff --git a/foo b/foo |
1133 new file mode 100644 | 1128 new file mode 100644 |
1134 examine changes to 'foo'? | 1129 examine changes to 'foo'? |
1135 (enter ? for help) [Ynesfdaq?] a | 1130 (enter ? for help) [Ynesfdaq?] a |
1136 | 1131 |
1137 EDITOR: HG: Splitting ae694b2901bb. So far it has been split into: | 1132 EDITOR: HG: Splitting ae694b2901bb. Write commit message for the first split changeset. |
1138 EDITOR: HG: - 0:222799e2f90b "r0" | |
1139 EDITOR: HG: Write commit message for the next split changeset. | |
1140 EDITOR: foo | 1133 EDITOR: foo |
1141 EDITOR: | 1134 EDITOR: |
1142 EDITOR: | 1135 EDITOR: |
1143 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. | 1136 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
1144 EDITOR: HG: Leave message empty to abort commit. | 1137 EDITOR: HG: Leave message empty to abort commit. |
1146 EDITOR: HG: user: test | 1139 EDITOR: HG: user: test |
1147 EDITOR: HG: branch 'default' | 1140 EDITOR: HG: branch 'default' |
1148 EDITOR: HG: added foo | 1141 EDITOR: HG: added foo |
1149 created new head | 1142 created new head |
1150 saved backup bundle to $TESTTMP/noop2/.hg/strip-backup/ae694b2901bb-28e0b457-split.hg (obsstore-off !) | 1143 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}' | 1144 $ hg log -G -T'{phase} {rev}:{node|short} {desc}' |
1153 @ draft 1:de675559d3f9 message1 (obsstore-off !) | 1145 @ draft 1:de675559d3f9 message1 (obsstore-off !) |
1154 @ draft 2:de675559d3f9 message1 (obsstore-on !) | 1146 @ draft 2:de675559d3f9 message1 (obsstore-on !) |
1155 | | 1147 | |
1156 o draft 0:222799e2f90b r0 | 1148 o public 0:222799e2f90b r0 |
1157 | 1149 |
1158 #if obsstore-on | 1150 #if obsstore-on |
1159 FIXME: this should not have marked 222799e (r0) as a precursor of anything. | |
1160 $ hg debugobsolete | 1151 $ hg debugobsolete |
1161 ae694b2901bb8b0f8c4b5e075ddec0d63468d57a 222799e2f90be09ccbe49f519c4615d8375a9242 de675559d3f93ffc822c6eb7490e5c73033f17c7 0 * (glob) | 1152 ae694b2901bb8b0f8c4b5e075ddec0d63468d57a de675559d3f93ffc822c6eb7490e5c73033f17c7 0 * (glob) |
1162 #endif | 1153 #endif |