Mercurial > evolve
comparison tests/test-evolve-phase-divergence.t @ 4456:b0d755a95f6c
tests: add tests for divergence resolution with split+amend
As suggested by Boris Feld.
G: changed tests/test-evolve-phase-divergence.t
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 28 Mar 2019 14:54:46 -0700 |
parents | b58e45aa9be2 |
children | 218fa7c1fe4b |
comparison
equal
deleted
inserted
replaced
4455:b58e45aa9be2 | 4456:b0d755a95f6c |
---|---|
47 | 47 |
48 $ cp -a private alice | 48 $ cp -a private alice |
49 $ cp -a private bob | 49 $ cp -a private bob |
50 $ cp -a private split | 50 $ cp -a private split |
51 $ cp -a private split-across-branches | 51 $ cp -a private split-across-branches |
52 $ cp -a private split-and-amend | |
52 $ cp -a private merge-no-conflict | 53 $ cp -a private merge-no-conflict |
53 | 54 |
54 Creating a phase-divergence changeset | 55 Creating a phase-divergence changeset |
55 ------------------------------------- | 56 ------------------------------------- |
56 | 57 |
1150 --- a/q Thu Jan 01 00:00:00 1970 +0000 | 1151 --- a/q Thu Jan 01 00:00:00 1970 +0000 |
1151 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | 1152 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
1152 @@ -1,1 +0,0 @@ | 1153 @@ -1,1 +0,0 @@ |
1153 -q | 1154 -q |
1154 | 1155 |
1156 When the public changeset is split and amended | |
1157 -------------------------------------------------------------- | |
1158 | |
1159 $ cd ../split-and-amend | |
1160 | |
1161 $ echo m > m | |
1162 $ echo n > n | |
1163 $ hg ci -Aqm "added m and n" | |
1164 $ hg prev | |
1165 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1166 [0] init | |
1167 $ echo m > m | |
1168 $ hg ci -Aqm "added m" | |
1169 $ echo n > n | |
1170 $ hg ci -Aqm "added n" | |
1171 | |
1172 $ hg glog | |
1173 @ 3:e1154ec0206a added n | |
1174 | () draft | |
1175 o 2:4f25cd9cd2bf added m | |
1176 | () draft | |
1177 | o 1:a51bce62c219 added m and n | |
1178 |/ () draft | |
1179 o 0:d3873e73d99e init | |
1180 () public | |
1181 | |
1182 $ hg prune -r a51bce62c219 --succ 4f25cd9cd2bf --succ e1154ec0206a --split | |
1183 1 changesets pruned | |
1184 | |
1185 $ echo n2 > n | |
1186 $ hg amend | |
1187 | |
1188 $ hg phase -r a51bce62c219 --public --hidden | |
1189 2 new phase-divergent changesets | |
1190 | |
1191 $ hg glog | |
1192 @ 4:52ca78bb98c7 added n | |
1193 | () draft | |
1194 * 2:4f25cd9cd2bf added m | |
1195 | () draft | |
1196 | o 1:a51bce62c219 added m and n | |
1197 |/ () public | |
1198 o 0:d3873e73d99e init | |
1199 () public | |
1200 | |
1201 $ hg evolve --list | |
1202 4f25cd9cd2bf: added m | |
1203 phase-divergent: a51bce62c219 (immutable precursor) | |
1204 | |
1205 52ca78bb98c7: added n | |
1206 phase-divergent: a51bce62c219 (immutable precursor) | |
1207 | |
1208 $ hg evolve --all --phase-divergent | |
1209 recreate:[2] added m | |
1210 atop:[1] added m and n | |
1211 committed as 86419909e017 | |
1212 1 new orphan changesets | |
1213 recreate:[4] added n | |
1214 atop:[1] added m and n | |
1215 rebasing to destination parent: d3873e73d99e | |
1216 committed as 88b0dae5369a | |
1217 working directory is now at 88b0dae5369a | |
1218 | |
1219 $ hg glog --hidden | |
1220 @ 7:88b0dae5369a phase-divergent update to a51bce62c219: | |
1221 | () draft | |
1222 | x 6:98dad8812511 added n | |
1223 | | () draft | |
1224 +---o 5:86419909e017 phase-divergent update to a51bce62c219: | |
1225 | | () draft | |
1226 | | x 4:52ca78bb98c7 added n | |
1227 | | | () draft | |
1228 | | | x 3:e1154ec0206a added n | |
1229 | | |/ () draft | |
1230 | | x 2:4f25cd9cd2bf added m | |
1231 | |/ () draft | |
1232 o | 1:a51bce62c219 added m and n | |
1233 |/ () public | |
1234 o 0:d3873e73d99e init | |
1235 () public | |
1236 | |
1237 XXX: not sure this is correct | |
1238 $ hg exp 86419909e017 | |
1239 # HG changeset patch | |
1240 # User test | |
1241 # Date 0 0 | |
1242 # Thu Jan 01 00:00:00 1970 +0000 | |
1243 # Node ID 86419909e01787959aa6471aee605c6d604a3e0d | |
1244 # Parent a51bce62c219f024bc0ae0cc0e3957ee77d7cb46 | |
1245 phase-divergent update to a51bce62c219: | |
1246 | |
1247 added m | |
1248 | |
1249 diff -r a51bce62c219 -r 86419909e017 n | |
1250 --- a/n Thu Jan 01 00:00:00 1970 +0000 | |
1251 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1252 @@ -1,1 +0,0 @@ | |
1253 -n | |
1254 | |
1255 XXX: not sure this is correct | |
1256 $ hg exp 88b0dae5369a | |
1257 # HG changeset patch | |
1258 # User test | |
1259 # Date 0 0 | |
1260 # Thu Jan 01 00:00:00 1970 +0000 | |
1261 # Node ID 88b0dae5369aaa3bceb6c0b647542594e2c72fb7 | |
1262 # Parent a51bce62c219f024bc0ae0cc0e3957ee77d7cb46 | |
1263 phase-divergent update to a51bce62c219: | |
1264 | |
1265 added n | |
1266 | |
1267 diff -r a51bce62c219 -r 88b0dae5369a m | |
1268 --- a/m Thu Jan 01 00:00:00 1970 +0000 | |
1269 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1270 @@ -1,1 +0,0 @@ | |
1271 -m | |
1272 diff -r a51bce62c219 -r 88b0dae5369a n | |
1273 --- a/n Thu Jan 01 00:00:00 1970 +0000 | |
1274 +++ b/n Thu Jan 01 00:00:00 1970 +0000 | |
1275 @@ -1,1 +1,1 @@ | |
1276 -n | |
1277 +n2 | |
1278 | |
1155 Testing the evolution of a phase-divergent merge with no conflicts | 1279 Testing the evolution of a phase-divergent merge with no conflicts |
1156 ------------------------------------------------------------------ | 1280 ------------------------------------------------------------------ |
1157 | 1281 |
1158 $ cd ../merge-no-conflict | 1282 $ cd ../merge-no-conflict |
1159 | 1283 |