##// END OF EJS Templates
test: add a push race case where obsoleted head is updated...
marmoute -
r32669:6ac367b6 default
parent child Browse files
Show More
@@ -94,6 +94,10 b' A set of extension and shell functions e'
94 > ssh = python "$TESTDIR/dummyssh"
94 > ssh = python "$TESTDIR/dummyssh"
95 > # simplify output
95 > # simplify output
96 > logtemplate = {node|short} {desc} ({branch})
96 > logtemplate = {node|short} {desc} ({branch})
97 > [phases]
98 > publish = no
99 > [experimental]
100 > evolution = all
97 > [alias]
101 > [alias]
98 > graph = log -G --rev 'sort(all(), "topo")'
102 > graph = log -G --rev 'sort(all(), "topo")'
99 > EOF
103 > EOF
@@ -1246,3 +1250,182 b' Check the result of the push'
1246 |/
1250 |/
1247 o 842e2fac6304 C-ROOT (default)
1251 o 842e2fac6304 C-ROOT (default)
1248
1252
1253
1254 raced commit push a new head obsoleting the one touched by the racing push
1255 --------------------------------------------------------------------------
1256
1257 # b (racing)
1258 # |
1259 # ΓΈβ‡ β—” a (raced)
1260 # |/
1261 # *
1262
1263 (resync-all)
1264
1265 $ hg -R ./server pull ./client-racy
1266 pulling from ./client-racy
1267 searching for changes
1268 adding changesets
1269 adding manifests
1270 adding file changes
1271 added 2 changesets with 2 changes to 1 files (+1 heads)
1272 (run 'hg heads .' to see heads, 'hg merge' to merge)
1273 $ hg -R ./client-other pull
1274 pulling from ssh://user@dummy/server
1275 searching for changes
1276 adding changesets
1277 adding manifests
1278 adding file changes
1279 added 2 changesets with 2 changes to 1 files (+1 heads)
1280 (run 'hg heads' to see heads, 'hg merge' to merge)
1281 $ hg -R ./client-racy pull
1282 pulling from ssh://user@dummy/server
1283 searching for changes
1284 adding changesets
1285 adding manifests
1286 adding file changes
1287 added 1 changesets with 1 changes to 1 files (+1 heads)
1288 (run 'hg heads' to see heads, 'hg merge' to merge)
1289
1290 $ hg -R server graph
1291 o 3d57ed3c1091 C-T (other)
1292 |
1293 o 2efd43f7b5ba C-S (default)
1294 |
1295 | o de7b9e2ba3f6 C-R (other)
1296 |/
1297 o 1b58ee3f79e5 C-P (default)
1298 |
1299 o d0a85b2252a9 C-O (other)
1300 |
1301 | o b0ee3d6f51bc C-Q (default)
1302 |/
1303 o 55a6f1c01b48 C-Z (other)
1304 |
1305 o 866a66e18630 C-N (default)
1306 |\
1307 +---o 6fd3090135df C-M (default)
1308 | |
1309 | o cac2cead0ff0 C-L (default)
1310 | |
1311 o | be705100c623 C-K (default)
1312 |\|
1313 o | d603e2c0cdd7 C-E (default)
1314 | |
1315 | o 59e76faf78bd C-D (default)
1316 | |
1317 | | o 89420bf00fae C-J (default)
1318 | | |
1319 | | | o b35ed749f288 C-I (my-second-test-branch)
1320 | | |/
1321 | | o 75d69cba5402 C-G (default)
1322 | | |
1323 | | | o 833be552cfe6 C-H (my-first-test-branch)
1324 | | |/
1325 | | o d9e379a8c432 C-F (default)
1326 | | |
1327 +---o 51c544a58128 C-C (default)
1328 | |
1329 | o a9149a1428e2 C-B (default)
1330 | |
1331 o | 98217d5a1659 C-A (default)
1332 |/
1333 o 842e2fac6304 C-ROOT (default)
1334
1335
1336 Creating changesets and markers
1337
1338 (continue existing head)
1339
1340 $ hg -R client-other/ up 'desc("C-Q")'
1341 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1342 $ echo aaa >> client-other/a
1343 $ hg -R client-other/ commit -m "C-U"
1344
1345 (new topo branch obsoleting that same head)
1346
1347 $ hg -R client-racy/ up 'desc("C-Z")'
1348 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1349 $ echo bbb >> client-racy/a
1350 $ hg -R client-racy/ branch --force default
1351 marked working directory as branch default
1352 $ hg -R client-racy/ commit -m "C-V"
1353 created new head
1354 $ ID_Q=`hg -R client-racy log -T '{node}\n' -r 'desc("C-Q")'`
1355 $ ID_V=`hg -R client-racy log -T '{node}\n' -r 'desc("C-V")'`
1356 $ hg -R client-racy debugobsolete $ID_Q $ID_V
1357
1358 Pushing
1359
1360 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
1361
1362 $ waiton $TESTTMP/readyfile
1363
1364 $ hg -R client-other push -fr 'tip' --new-branch
1365 pushing to ssh://user@dummy/server
1366 searching for changes
1367 remote: adding changesets
1368 remote: adding manifests
1369 remote: adding file changes
1370 remote: added 1 changesets with 0 changes to 0 files
1371
1372 $ release $TESTTMP/watchfile
1373
1374 Check the result of the push
1375
1376 $ cat ./push-log
1377 pushing to ssh://user@dummy/server
1378 searching for changes
1379 wrote ready: $TESTTMP/readyfile
1380 waiting on: $TESTTMP/watchfile
1381 abort: push failed:
1382 'repository changed while pushing - please try again'
1383
1384 $ hg -R server debugobsolete
1385 $ hg -R server graph
1386 o a98a47d8b85b C-U (default)
1387 |
1388 o b0ee3d6f51bc C-Q (default)
1389 |
1390 | o 3d57ed3c1091 C-T (other)
1391 | |
1392 | o 2efd43f7b5ba C-S (default)
1393 | |
1394 | | o de7b9e2ba3f6 C-R (other)
1395 | |/
1396 | o 1b58ee3f79e5 C-P (default)
1397 | |
1398 | o d0a85b2252a9 C-O (other)
1399 |/
1400 o 55a6f1c01b48 C-Z (other)
1401 |
1402 o 866a66e18630 C-N (default)
1403 |\
1404 +---o 6fd3090135df C-M (default)
1405 | |
1406 | o cac2cead0ff0 C-L (default)
1407 | |
1408 o | be705100c623 C-K (default)
1409 |\|
1410 o | d603e2c0cdd7 C-E (default)
1411 | |
1412 | o 59e76faf78bd C-D (default)
1413 | |
1414 | | o 89420bf00fae C-J (default)
1415 | | |
1416 | | | o b35ed749f288 C-I (my-second-test-branch)
1417 | | |/
1418 | | o 75d69cba5402 C-G (default)
1419 | | |
1420 | | | o 833be552cfe6 C-H (my-first-test-branch)
1421 | | |/
1422 | | o d9e379a8c432 C-F (default)
1423 | | |
1424 +---o 51c544a58128 C-C (default)
1425 | |
1426 | o a9149a1428e2 C-B (default)
1427 | |
1428 o | 98217d5a1659 C-A (default)
1429 |/
1430 o 842e2fac6304 C-ROOT (default)
1431
General Comments 0
You need to be logged in to leave comments. Login now