comparison tests/test-split.t @ 5524:c706b96c71d8 mercurial-5.0

test-compat: merge mercurial-5.1 into mercurial-5.0
author Anton Shestakov <av6@dwimlabs.net>
date Sun, 06 Sep 2020 05:45:28 +0800
parents ff452675566c 77c0ddd6f172
children e77c86e83fb4 c2c85576ddfb
comparison
equal deleted inserted replaced
5464:868e7bc03b5f 5524:c706b96c71d8
1237 --- /dev/null 1237 --- /dev/null
1238 +++ b/a 1238 +++ b/a
1239 @@ -0,0 +1,1 @@ 1239 @@ -0,0 +1,1 @@
1240 +a 1240 +a
1241 1241
1242 $ cd ..
1243
1244 Discard after splitting into more than one changeset
1245
1246 $ hg init discard-after-many
1247 $ cd discard-after-many
1248
1249 $ echo 0 > num
1250 $ cat > editor.sh << '__EOF__'
1251 > NUM=$(cat num)
1252 > NUM=`expr "$NUM" + 1`
1253 > echo "$NUM" > num
1254 > echo "split$NUM" > "$1"
1255 > __EOF__
1256 $ export HGEDITOR="\"sh\" \"editor.sh\""
1257
1258 $ echo a > a
1259 $ echo b > b
1260 $ echo c > c
1261 $ hg add a b c
1262 $ hg ci -m 'a b c'
1263
1264 XXX: this shouldn't ask to re-examine changes in b and definitely shouldn't revert b
1265
1266 $ hg split << EOF
1267 > f
1268 > d
1269 > y
1270 > f
1271 > d
1272 > d
1273 > EOF
1274 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
1275 adding a
1276 adding b
1277 adding c
1278 diff --git a/a b/a
1279 new file mode 100644
1280 examine changes to 'a'? [Ynesfdaq?] f
1281
1282 diff --git a/b b/b
1283 new file mode 100644
1284 examine changes to 'b'? [Ynesfdaq?] d
1285
1286 created new head
1287 (consider using topic for lightweight branches. See 'hg help topic')
1288 continue splitting? [Ycdq?] y
1289 diff --git a/b b/b
1290 new file mode 100644
1291 examine changes to 'b'? [Ynesfdaq?] f
1292
1293 diff --git a/c b/c
1294 new file mode 100644
1295 examine changes to 'c'? [Ynesfdaq?] d
1296
1297 continue splitting? [Ycdq?] d
1298 discarding remaining changes
1299 forgetting c
1300
1301 $ hg glog -p
1302 @ 2:c2c6f4d8c766 split2 (draft)
1303 | diff --git a/b b/b
1304 | new file mode 100644
1305 | --- /dev/null
1306 | +++ b/b
1307 | @@ -0,0 +1,1 @@
1308 | +b
1309 |
1310 o 1:fb91c6249a20 split1 (draft)
1311 diff --git a/a b/a
1312 new file mode 100644
1313 --- /dev/null
1314 +++ b/a
1315 @@ -0,0 +1,1 @@
1316 +a
1317
1318
1319 $ cd ..