Show More
This diff has been collapsed as it changes many lines, (555 lines changed) Show them Hide them | |||||
@@ -1248,6 +1248,561 b' print() to stdout and stderr both get ca' | |||||
1248 | e> rollback completed\n |
|
1248 | e> rollback completed\n | |
1249 | e> abort: pretxnchangegroup.fail hook failed\n |
|
1249 | e> abort: pretxnchangegroup.fail hook failed\n | |
1250 |
|
1250 | |||
|
1251 | Shell hook writing to stdout has output captured | |||
|
1252 | ||||
|
1253 | $ cat > $TESTTMP/hook.sh << EOF | |||
|
1254 | > echo 'stdout 1' | |||
|
1255 | > echo 'stdout 2' | |||
|
1256 | > exit 1 | |||
|
1257 | > EOF | |||
|
1258 | ||||
|
1259 | $ cat > .hg/hgrc << EOF | |||
|
1260 | > [hooks] | |||
|
1261 | > pretxnchangegroup.fail = sh $TESTTMP/hook.sh | |||
|
1262 | > EOF | |||
|
1263 | ||||
|
1264 | $ debugwireproto << EOF | |||
|
1265 | > command unbundle | |||
|
1266 | > # This is "force" in hex. | |||
|
1267 | > heads 666f726365 | |||
|
1268 | > PUSHFILE ../initial.v1.hg | |||
|
1269 | > readavailable | |||
|
1270 | > EOF | |||
|
1271 | testing ssh1 | |||
|
1272 | creating ssh peer from handshake results | |||
|
1273 | i> write(104) -> None: | |||
|
1274 | i> hello\n | |||
|
1275 | i> between\n | |||
|
1276 | i> pairs 81\n | |||
|
1277 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |||
|
1278 | i> flush() -> None | |||
|
1279 | o> readline() -> 4: | |||
|
1280 | o> 384\n | |||
|
1281 | o> readline() -> 384: | |||
|
1282 | o> capabilities: lookup branchmap pushkey known getbundle unbundlehash batch changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN\n | |||
|
1283 | o> readline() -> 2: | |||
|
1284 | o> 1\n | |||
|
1285 | o> readline() -> 1: | |||
|
1286 | o> \n | |||
|
1287 | sending unbundle command | |||
|
1288 | i> write(9) -> None: | |||
|
1289 | i> unbundle\n | |||
|
1290 | i> write(9) -> None: | |||
|
1291 | i> heads 10\n | |||
|
1292 | i> write(10) -> None: 666f726365 | |||
|
1293 | i> flush() -> None | |||
|
1294 | o> readline() -> 2: | |||
|
1295 | o> 0\n | |||
|
1296 | i> write(4) -> None: | |||
|
1297 | i> 426\n | |||
|
1298 | i> write(426) -> None: | |||
|
1299 | i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n | |||
|
1300 | i> test\n | |||
|
1301 | i> 0 0\n | |||
|
1302 | i> foo\n | |||
|
1303 | i> \n | |||
|
1304 | i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n | |||
|
1305 | i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n | |||
|
1306 | i> \x00\x00\x00\x00\x00\x00\x00\x00 | |||
|
1307 | i> write(2) -> None: | |||
|
1308 | i> 0\n | |||
|
1309 | i> flush() -> None | |||
|
1310 | o> readline() -> 2: | |||
|
1311 | o> 0\n | |||
|
1312 | o> read(0) -> 0: | |||
|
1313 | o> readline() -> 2: | |||
|
1314 | o> 1\n | |||
|
1315 | o> read(1) -> 1: 0 | |||
|
1316 | result: 0 | |||
|
1317 | remote output: | |||
|
1318 | e> read(-1) -> 212: | |||
|
1319 | e> adding changesets\n | |||
|
1320 | e> adding manifests\n | |||
|
1321 | e> adding file changes\n | |||
|
1322 | e> added 1 changesets with 1 changes to 1 files\n | |||
|
1323 | e> stdout 1\n | |||
|
1324 | e> stdout 2\n | |||
|
1325 | e> transaction abort!\n | |||
|
1326 | e> rollback completed\n | |||
|
1327 | e> abort: pretxnchangegroup.fail hook exited with status 1\n | |||
|
1328 | ||||
|
1329 | testing ssh2 | |||
|
1330 | creating ssh peer from handshake results | |||
|
1331 | i> write(171) -> None: | |||
|
1332 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) | |||
|
1333 | i> hello\n | |||
|
1334 | i> between\n | |||
|
1335 | i> pairs 81\n | |||
|
1336 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |||
|
1337 | i> flush() -> None | |||
|
1338 | o> readline() -> 62: | |||
|
1339 | o> upgraded * exp-ssh-v2-0001\n (glob) | |||
|
1340 | o> readline() -> 4: | |||
|
1341 | o> 383\n | |||
|
1342 | o> read(383) -> 383: capabilities: lookup branchmap pushkey known getbundle unbundlehash batch changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN | |||
|
1343 | o> read(1) -> 1: | |||
|
1344 | o> \n | |||
|
1345 | sending unbundle command | |||
|
1346 | i> write(9) -> None: | |||
|
1347 | i> unbundle\n | |||
|
1348 | i> write(9) -> None: | |||
|
1349 | i> heads 10\n | |||
|
1350 | i> write(10) -> None: 666f726365 | |||
|
1351 | i> flush() -> None | |||
|
1352 | o> readline() -> 2: | |||
|
1353 | o> 0\n | |||
|
1354 | i> write(4) -> None: | |||
|
1355 | i> 426\n | |||
|
1356 | i> write(426) -> None: | |||
|
1357 | i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n | |||
|
1358 | i> test\n | |||
|
1359 | i> 0 0\n | |||
|
1360 | i> foo\n | |||
|
1361 | i> \n | |||
|
1362 | i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n | |||
|
1363 | i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n | |||
|
1364 | i> \x00\x00\x00\x00\x00\x00\x00\x00 | |||
|
1365 | i> write(2) -> None: | |||
|
1366 | i> 0\n | |||
|
1367 | i> flush() -> None | |||
|
1368 | o> readline() -> 2: | |||
|
1369 | o> 0\n | |||
|
1370 | o> read(0) -> 0: | |||
|
1371 | o> readline() -> 2: | |||
|
1372 | o> 1\n | |||
|
1373 | o> read(1) -> 1: 0 | |||
|
1374 | result: 0 | |||
|
1375 | remote output: | |||
|
1376 | e> read(-1) -> 212: | |||
|
1377 | e> adding changesets\n | |||
|
1378 | e> adding manifests\n | |||
|
1379 | e> adding file changes\n | |||
|
1380 | e> added 1 changesets with 1 changes to 1 files\n | |||
|
1381 | e> stdout 1\n | |||
|
1382 | e> stdout 2\n | |||
|
1383 | e> transaction abort!\n | |||
|
1384 | e> rollback completed\n | |||
|
1385 | e> abort: pretxnchangegroup.fail hook exited with status 1\n | |||
|
1386 | ||||
|
1387 | Shell hook writing to stderr has output captured | |||
|
1388 | ||||
|
1389 | $ cat > $TESTTMP/hook.sh << EOF | |||
|
1390 | > echo 'stderr 1' 1>&2 | |||
|
1391 | > echo 'stderr 2' 1>&2 | |||
|
1392 | > exit 1 | |||
|
1393 | > EOF | |||
|
1394 | ||||
|
1395 | $ debugwireproto << EOF | |||
|
1396 | > command unbundle | |||
|
1397 | > # This is "force" in hex. | |||
|
1398 | > heads 666f726365 | |||
|
1399 | > PUSHFILE ../initial.v1.hg | |||
|
1400 | > readavailable | |||
|
1401 | > EOF | |||
|
1402 | testing ssh1 | |||
|
1403 | creating ssh peer from handshake results | |||
|
1404 | i> write(104) -> None: | |||
|
1405 | i> hello\n | |||
|
1406 | i> between\n | |||
|
1407 | i> pairs 81\n | |||
|
1408 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |||
|
1409 | i> flush() -> None | |||
|
1410 | o> readline() -> 4: | |||
|
1411 | o> 384\n | |||
|
1412 | o> readline() -> 384: | |||
|
1413 | o> capabilities: lookup branchmap pushkey known getbundle unbundlehash batch changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN\n | |||
|
1414 | o> readline() -> 2: | |||
|
1415 | o> 1\n | |||
|
1416 | o> readline() -> 1: | |||
|
1417 | o> \n | |||
|
1418 | sending unbundle command | |||
|
1419 | i> write(9) -> None: | |||
|
1420 | i> unbundle\n | |||
|
1421 | i> write(9) -> None: | |||
|
1422 | i> heads 10\n | |||
|
1423 | i> write(10) -> None: 666f726365 | |||
|
1424 | i> flush() -> None | |||
|
1425 | o> readline() -> 2: | |||
|
1426 | o> 0\n | |||
|
1427 | i> write(4) -> None: | |||
|
1428 | i> 426\n | |||
|
1429 | i> write(426) -> None: | |||
|
1430 | i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n | |||
|
1431 | i> test\n | |||
|
1432 | i> 0 0\n | |||
|
1433 | i> foo\n | |||
|
1434 | i> \n | |||
|
1435 | i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n | |||
|
1436 | i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n | |||
|
1437 | i> \x00\x00\x00\x00\x00\x00\x00\x00 | |||
|
1438 | i> write(2) -> None: | |||
|
1439 | i> 0\n | |||
|
1440 | i> flush() -> None | |||
|
1441 | o> readline() -> 2: | |||
|
1442 | o> 0\n | |||
|
1443 | o> read(0) -> 0: | |||
|
1444 | o> readline() -> 2: | |||
|
1445 | o> 1\n | |||
|
1446 | o> read(1) -> 1: 0 | |||
|
1447 | result: 0 | |||
|
1448 | remote output: | |||
|
1449 | e> read(-1) -> 212: | |||
|
1450 | e> adding changesets\n | |||
|
1451 | e> adding manifests\n | |||
|
1452 | e> adding file changes\n | |||
|
1453 | e> added 1 changesets with 1 changes to 1 files\n | |||
|
1454 | e> stderr 1\n | |||
|
1455 | e> stderr 2\n | |||
|
1456 | e> transaction abort!\n | |||
|
1457 | e> rollback completed\n | |||
|
1458 | e> abort: pretxnchangegroup.fail hook exited with status 1\n | |||
|
1459 | ||||
|
1460 | testing ssh2 | |||
|
1461 | creating ssh peer from handshake results | |||
|
1462 | i> write(171) -> None: | |||
|
1463 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) | |||
|
1464 | i> hello\n | |||
|
1465 | i> between\n | |||
|
1466 | i> pairs 81\n | |||
|
1467 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |||
|
1468 | i> flush() -> None | |||
|
1469 | o> readline() -> 62: | |||
|
1470 | o> upgraded * exp-ssh-v2-0001\n (glob) | |||
|
1471 | o> readline() -> 4: | |||
|
1472 | o> 383\n | |||
|
1473 | o> read(383) -> 383: capabilities: lookup branchmap pushkey known getbundle unbundlehash batch changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN | |||
|
1474 | o> read(1) -> 1: | |||
|
1475 | o> \n | |||
|
1476 | sending unbundle command | |||
|
1477 | i> write(9) -> None: | |||
|
1478 | i> unbundle\n | |||
|
1479 | i> write(9) -> None: | |||
|
1480 | i> heads 10\n | |||
|
1481 | i> write(10) -> None: 666f726365 | |||
|
1482 | i> flush() -> None | |||
|
1483 | o> readline() -> 2: | |||
|
1484 | o> 0\n | |||
|
1485 | i> write(4) -> None: | |||
|
1486 | i> 426\n | |||
|
1487 | i> write(426) -> None: | |||
|
1488 | i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n | |||
|
1489 | i> test\n | |||
|
1490 | i> 0 0\n | |||
|
1491 | i> foo\n | |||
|
1492 | i> \n | |||
|
1493 | i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n | |||
|
1494 | i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n | |||
|
1495 | i> \x00\x00\x00\x00\x00\x00\x00\x00 | |||
|
1496 | i> write(2) -> None: | |||
|
1497 | i> 0\n | |||
|
1498 | i> flush() -> None | |||
|
1499 | o> readline() -> 2: | |||
|
1500 | o> 0\n | |||
|
1501 | o> read(0) -> 0: | |||
|
1502 | o> readline() -> 2: | |||
|
1503 | o> 1\n | |||
|
1504 | o> read(1) -> 1: 0 | |||
|
1505 | result: 0 | |||
|
1506 | remote output: | |||
|
1507 | e> read(-1) -> 212: | |||
|
1508 | e> adding changesets\n | |||
|
1509 | e> adding manifests\n | |||
|
1510 | e> adding file changes\n | |||
|
1511 | e> added 1 changesets with 1 changes to 1 files\n | |||
|
1512 | e> stderr 1\n | |||
|
1513 | e> stderr 2\n | |||
|
1514 | e> transaction abort!\n | |||
|
1515 | e> rollback completed\n | |||
|
1516 | e> abort: pretxnchangegroup.fail hook exited with status 1\n | |||
|
1517 | ||||
|
1518 | Shell hook writing to stdout and stderr has output captured | |||
|
1519 | ||||
|
1520 | $ cat > $TESTTMP/hook.sh << EOF | |||
|
1521 | > echo 'stdout 1' | |||
|
1522 | > echo 'stderr 1' 1>&2 | |||
|
1523 | > echo 'stdout 2' | |||
|
1524 | > echo 'stderr 2' 1>&2 | |||
|
1525 | > exit 1 | |||
|
1526 | > EOF | |||
|
1527 | ||||
|
1528 | $ debugwireproto << EOF | |||
|
1529 | > command unbundle | |||
|
1530 | > # This is "force" in hex. | |||
|
1531 | > heads 666f726365 | |||
|
1532 | > PUSHFILE ../initial.v1.hg | |||
|
1533 | > readavailable | |||
|
1534 | > EOF | |||
|
1535 | testing ssh1 | |||
|
1536 | creating ssh peer from handshake results | |||
|
1537 | i> write(104) -> None: | |||
|
1538 | i> hello\n | |||
|
1539 | i> between\n | |||
|
1540 | i> pairs 81\n | |||
|
1541 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |||
|
1542 | i> flush() -> None | |||
|
1543 | o> readline() -> 4: | |||
|
1544 | o> 384\n | |||
|
1545 | o> readline() -> 384: | |||
|
1546 | o> capabilities: lookup branchmap pushkey known getbundle unbundlehash batch changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN\n | |||
|
1547 | o> readline() -> 2: | |||
|
1548 | o> 1\n | |||
|
1549 | o> readline() -> 1: | |||
|
1550 | o> \n | |||
|
1551 | sending unbundle command | |||
|
1552 | i> write(9) -> None: | |||
|
1553 | i> unbundle\n | |||
|
1554 | i> write(9) -> None: | |||
|
1555 | i> heads 10\n | |||
|
1556 | i> write(10) -> None: 666f726365 | |||
|
1557 | i> flush() -> None | |||
|
1558 | o> readline() -> 2: | |||
|
1559 | o> 0\n | |||
|
1560 | i> write(4) -> None: | |||
|
1561 | i> 426\n | |||
|
1562 | i> write(426) -> None: | |||
|
1563 | i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n | |||
|
1564 | i> test\n | |||
|
1565 | i> 0 0\n | |||
|
1566 | i> foo\n | |||
|
1567 | i> \n | |||
|
1568 | i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n | |||
|
1569 | i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n | |||
|
1570 | i> \x00\x00\x00\x00\x00\x00\x00\x00 | |||
|
1571 | i> write(2) -> None: | |||
|
1572 | i> 0\n | |||
|
1573 | i> flush() -> None | |||
|
1574 | o> readline() -> 2: | |||
|
1575 | o> 0\n | |||
|
1576 | o> read(0) -> 0: | |||
|
1577 | o> readline() -> 2: | |||
|
1578 | o> 1\n | |||
|
1579 | o> read(1) -> 1: 0 | |||
|
1580 | result: 0 | |||
|
1581 | remote output: | |||
|
1582 | e> read(-1) -> 230: | |||
|
1583 | e> adding changesets\n | |||
|
1584 | e> adding manifests\n | |||
|
1585 | e> adding file changes\n | |||
|
1586 | e> added 1 changesets with 1 changes to 1 files\n | |||
|
1587 | e> stdout 1\n | |||
|
1588 | e> stderr 1\n | |||
|
1589 | e> stdout 2\n | |||
|
1590 | e> stderr 2\n | |||
|
1591 | e> transaction abort!\n | |||
|
1592 | e> rollback completed\n | |||
|
1593 | e> abort: pretxnchangegroup.fail hook exited with status 1\n | |||
|
1594 | ||||
|
1595 | testing ssh2 | |||
|
1596 | creating ssh peer from handshake results | |||
|
1597 | i> write(171) -> None: | |||
|
1598 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) | |||
|
1599 | i> hello\n | |||
|
1600 | i> between\n | |||
|
1601 | i> pairs 81\n | |||
|
1602 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |||
|
1603 | i> flush() -> None | |||
|
1604 | o> readline() -> 62: | |||
|
1605 | o> upgraded * exp-ssh-v2-0001\n (glob) | |||
|
1606 | o> readline() -> 4: | |||
|
1607 | o> 383\n | |||
|
1608 | o> read(383) -> 383: capabilities: lookup branchmap pushkey known getbundle unbundlehash batch changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN | |||
|
1609 | o> read(1) -> 1: | |||
|
1610 | o> \n | |||
|
1611 | sending unbundle command | |||
|
1612 | i> write(9) -> None: | |||
|
1613 | i> unbundle\n | |||
|
1614 | i> write(9) -> None: | |||
|
1615 | i> heads 10\n | |||
|
1616 | i> write(10) -> None: 666f726365 | |||
|
1617 | i> flush() -> None | |||
|
1618 | o> readline() -> 2: | |||
|
1619 | o> 0\n | |||
|
1620 | i> write(4) -> None: | |||
|
1621 | i> 426\n | |||
|
1622 | i> write(426) -> None: | |||
|
1623 | i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n | |||
|
1624 | i> test\n | |||
|
1625 | i> 0 0\n | |||
|
1626 | i> foo\n | |||
|
1627 | i> \n | |||
|
1628 | i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n | |||
|
1629 | i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n | |||
|
1630 | i> \x00\x00\x00\x00\x00\x00\x00\x00 | |||
|
1631 | i> write(2) -> None: | |||
|
1632 | i> 0\n | |||
|
1633 | i> flush() -> None | |||
|
1634 | o> readline() -> 2: | |||
|
1635 | o> 0\n | |||
|
1636 | o> read(0) -> 0: | |||
|
1637 | o> readline() -> 2: | |||
|
1638 | o> 1\n | |||
|
1639 | o> read(1) -> 1: 0 | |||
|
1640 | result: 0 | |||
|
1641 | remote output: | |||
|
1642 | e> read(-1) -> 230: | |||
|
1643 | e> adding changesets\n | |||
|
1644 | e> adding manifests\n | |||
|
1645 | e> adding file changes\n | |||
|
1646 | e> added 1 changesets with 1 changes to 1 files\n | |||
|
1647 | e> stdout 1\n | |||
|
1648 | e> stderr 1\n | |||
|
1649 | e> stdout 2\n | |||
|
1650 | e> stderr 2\n | |||
|
1651 | e> transaction abort!\n | |||
|
1652 | e> rollback completed\n | |||
|
1653 | e> abort: pretxnchangegroup.fail hook exited with status 1\n | |||
|
1654 | ||||
|
1655 | Shell and Python hooks writing to stdout and stderr have output captured | |||
|
1656 | ||||
|
1657 | $ cat > $TESTTMP/hook.sh << EOF | |||
|
1658 | > echo 'shell stdout 1' | |||
|
1659 | > echo 'shell stderr 1' 1>&2 | |||
|
1660 | > echo 'shell stdout 2' | |||
|
1661 | > echo 'shell stderr 2' 1>&2 | |||
|
1662 | > exit 0 | |||
|
1663 | > EOF | |||
|
1664 | ||||
|
1665 | $ cat > .hg/hgrc << EOF | |||
|
1666 | > [hooks] | |||
|
1667 | > pretxnchangegroup.a = sh $TESTTMP/hook.sh | |||
|
1668 | > pretxnchangegroup.b = python:$TESTTMP/failhook:hookprintstderrandstdout | |||
|
1669 | > EOF | |||
|
1670 | ||||
|
1671 | $ debugwireproto << EOF | |||
|
1672 | > command unbundle | |||
|
1673 | > # This is "force" in hex. | |||
|
1674 | > heads 666f726365 | |||
|
1675 | > PUSHFILE ../initial.v1.hg | |||
|
1676 | > readavailable | |||
|
1677 | > EOF | |||
|
1678 | testing ssh1 | |||
|
1679 | creating ssh peer from handshake results | |||
|
1680 | i> write(104) -> None: | |||
|
1681 | i> hello\n | |||
|
1682 | i> between\n | |||
|
1683 | i> pairs 81\n | |||
|
1684 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |||
|
1685 | i> flush() -> None | |||
|
1686 | o> readline() -> 4: | |||
|
1687 | o> 384\n | |||
|
1688 | o> readline() -> 384: | |||
|
1689 | o> capabilities: lookup branchmap pushkey known getbundle unbundlehash batch changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN\n | |||
|
1690 | o> readline() -> 2: | |||
|
1691 | o> 1\n | |||
|
1692 | o> readline() -> 1: | |||
|
1693 | o> \n | |||
|
1694 | sending unbundle command | |||
|
1695 | i> write(9) -> None: | |||
|
1696 | i> unbundle\n | |||
|
1697 | i> write(9) -> None: | |||
|
1698 | i> heads 10\n | |||
|
1699 | i> write(10) -> None: 666f726365 | |||
|
1700 | i> flush() -> None | |||
|
1701 | o> readline() -> 2: | |||
|
1702 | o> 0\n | |||
|
1703 | i> write(4) -> None: | |||
|
1704 | i> 426\n | |||
|
1705 | i> write(426) -> None: | |||
|
1706 | i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n | |||
|
1707 | i> test\n | |||
|
1708 | i> 0 0\n | |||
|
1709 | i> foo\n | |||
|
1710 | i> \n | |||
|
1711 | i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n | |||
|
1712 | i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n | |||
|
1713 | i> \x00\x00\x00\x00\x00\x00\x00\x00 | |||
|
1714 | i> write(2) -> None: | |||
|
1715 | i> 0\n | |||
|
1716 | i> flush() -> None | |||
|
1717 | o> readline() -> 2: | |||
|
1718 | o> 0\n | |||
|
1719 | o> read(0) -> 0: | |||
|
1720 | o> readline() -> 2: | |||
|
1721 | o> 1\n | |||
|
1722 | o> read(1) -> 1: 0 | |||
|
1723 | result: 0 | |||
|
1724 | remote output: | |||
|
1725 | e> read(-1) -> 273: | |||
|
1726 | e> adding changesets\n | |||
|
1727 | e> adding manifests\n | |||
|
1728 | e> adding file changes\n | |||
|
1729 | e> added 1 changesets with 1 changes to 1 files\n | |||
|
1730 | e> shell stdout 1\n | |||
|
1731 | e> shell stderr 1\n | |||
|
1732 | e> shell stdout 2\n | |||
|
1733 | e> shell stderr 2\n | |||
|
1734 | e> stderr 1\n | |||
|
1735 | e> stderr 2\n | |||
|
1736 | e> stdout 1\n | |||
|
1737 | e> stdout 2\n | |||
|
1738 | e> transaction abort!\n | |||
|
1739 | e> rollback completed\n | |||
|
1740 | e> abort: pretxnchangegroup.b hook failed\n | |||
|
1741 | ||||
|
1742 | testing ssh2 | |||
|
1743 | creating ssh peer from handshake results | |||
|
1744 | i> write(171) -> None: | |||
|
1745 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) | |||
|
1746 | i> hello\n | |||
|
1747 | i> between\n | |||
|
1748 | i> pairs 81\n | |||
|
1749 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |||
|
1750 | i> flush() -> None | |||
|
1751 | o> readline() -> 62: | |||
|
1752 | o> upgraded * exp-ssh-v2-0001\n (glob) | |||
|
1753 | o> readline() -> 4: | |||
|
1754 | o> 383\n | |||
|
1755 | o> read(383) -> 383: capabilities: lookup branchmap pushkey known getbundle unbundlehash batch changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN | |||
|
1756 | o> read(1) -> 1: | |||
|
1757 | o> \n | |||
|
1758 | sending unbundle command | |||
|
1759 | i> write(9) -> None: | |||
|
1760 | i> unbundle\n | |||
|
1761 | i> write(9) -> None: | |||
|
1762 | i> heads 10\n | |||
|
1763 | i> write(10) -> None: 666f726365 | |||
|
1764 | i> flush() -> None | |||
|
1765 | o> readline() -> 2: | |||
|
1766 | o> 0\n | |||
|
1767 | i> write(4) -> None: | |||
|
1768 | i> 426\n | |||
|
1769 | i> write(426) -> None: | |||
|
1770 | i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n | |||
|
1771 | i> test\n | |||
|
1772 | i> 0 0\n | |||
|
1773 | i> foo\n | |||
|
1774 | i> \n | |||
|
1775 | i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n | |||
|
1776 | i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n | |||
|
1777 | i> \x00\x00\x00\x00\x00\x00\x00\x00 | |||
|
1778 | i> write(2) -> None: | |||
|
1779 | i> 0\n | |||
|
1780 | i> flush() -> None | |||
|
1781 | o> readline() -> 2: | |||
|
1782 | o> 0\n | |||
|
1783 | o> read(0) -> 0: | |||
|
1784 | o> readline() -> 2: | |||
|
1785 | o> 1\n | |||
|
1786 | o> read(1) -> 1: 0 | |||
|
1787 | result: 0 | |||
|
1788 | remote output: | |||
|
1789 | e> read(-1) -> 273: | |||
|
1790 | e> adding changesets\n | |||
|
1791 | e> adding manifests\n | |||
|
1792 | e> adding file changes\n | |||
|
1793 | e> added 1 changesets with 1 changes to 1 files\n | |||
|
1794 | e> shell stdout 1\n | |||
|
1795 | e> shell stderr 1\n | |||
|
1796 | e> shell stdout 2\n | |||
|
1797 | e> shell stderr 2\n | |||
|
1798 | e> stderr 1\n | |||
|
1799 | e> stderr 2\n | |||
|
1800 | e> stdout 1\n | |||
|
1801 | e> stdout 2\n | |||
|
1802 | e> transaction abort!\n | |||
|
1803 | e> rollback completed\n | |||
|
1804 | e> abort: pretxnchangegroup.b hook failed\n | |||
|
1805 | ||||
1251 | $ cd .. |
|
1806 | $ cd .. | |
1252 |
|
1807 | |||
1253 | Pushing a bundle1 with no output |
|
1808 | Pushing a bundle1 with no output |
General Comments 0
You need to be logged in to leave comments.
Login now