461 > sshserver.support-v2 = true |
461 > sshserver.support-v2 = true |
462 > EOF |
462 > EOF |
463 |
463 |
464 Send an upgrade request to a server that supports upgrade |
464 Send an upgrade request to a server that supports upgrade |
465 |
465 |
466 $ hg -R server serve --stdio << EOF |
466 >>> with open('payload', 'wb') as fh: |
467 > upgrade this-is-some-token proto=exp-ssh-v2-0001 |
467 ... fh.write(b'upgrade this-is-some-token proto=exp-ssh-v2-0001\n') |
468 > hello |
468 ... fh.write(b'hello\n') |
469 > between |
469 ... fh.write(b'between\n') |
470 > pairs 81 |
470 ... fh.write(b'pairs 81\n') |
471 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
471 ... fh.write(b'0000000000000000000000000000000000000000-0000000000000000000000000000000000000000') |
472 > EOF |
472 |
|
473 $ hg -R server serve --stdio < payload |
473 upgraded this-is-some-token exp-ssh-v2-0001 |
474 upgraded this-is-some-token exp-ssh-v2-0001 |
474 383 |
475 383 |
475 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
476 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
476 |
477 |
477 $ hg --config experimental.sshpeer.advertise-v2=true --debug debugpeer ssh://user@dummy/server |
478 $ hg --config experimental.sshpeer.advertise-v2=true --debug debugpeer ssh://user@dummy/server |
538 http |
539 http |
539 https |
540 https |
540 |
541 |
541 Command after upgrade to version 2 is processed |
542 Command after upgrade to version 2 is processed |
542 |
543 |
543 $ hg -R server serve --stdio << EOF |
544 >>> with open('payload', 'wb') as fh: |
544 > upgrade this-is-some-token proto=exp-ssh-v2-0001 |
545 ... fh.write(b'upgrade this-is-some-token proto=exp-ssh-v2-0001\n') |
545 > hello |
546 ... fh.write(b'hello\n') |
546 > between |
547 ... fh.write(b'between\n') |
547 > pairs 81 |
548 ... fh.write(b'pairs 81\n') |
548 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000hello |
549 ... fh.write(b'0000000000000000000000000000000000000000-0000000000000000000000000000000000000000') |
549 > EOF |
550 ... fh.write(b'hello\n') |
|
551 $ hg -R server serve --stdio < payload |
550 upgraded this-is-some-token exp-ssh-v2-0001 |
552 upgraded this-is-some-token exp-ssh-v2-0001 |
551 383 |
553 383 |
552 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
554 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
553 384 |
555 384 |
554 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
556 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
555 |
557 |
556 Multiple upgrades is not allowed |
558 Multiple upgrades is not allowed |
557 |
559 |
558 $ hg -R server serve --stdio << EOF |
560 >>> with open('payload', 'wb') as fh: |
559 > upgrade this-is-some-token proto=exp-ssh-v2-0001 |
561 ... fh.write(b'upgrade this-is-some-token proto=exp-ssh-v2-0001\n') |
560 > hello |
562 ... fh.write(b'hello\n') |
561 > between |
563 ... fh.write(b'between\n') |
562 > pairs 81 |
564 ... fh.write(b'pairs 81\n') |
563 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000upgrade another-token proto=irrelevant |
565 ... fh.write(b'0000000000000000000000000000000000000000-0000000000000000000000000000000000000000') |
564 > hello |
566 ... fh.write(b'upgrade another-token proto=irrelevant\n') |
565 > EOF |
567 ... fh.write(b'hello\n') |
|
568 $ hg -R server serve --stdio < payload |
566 upgraded this-is-some-token exp-ssh-v2-0001 |
569 upgraded this-is-some-token exp-ssh-v2-0001 |
567 383 |
570 383 |
568 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
571 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
569 cannot upgrade protocols multiple times |
572 cannot upgrade protocols multiple times |
570 - |
573 - |