Mercurial > hg
annotate tests/test-ssh-proto.t @ 38222:507bdc40bb17
run-tests: add support for running specific test cases
Differential Revision: https://phab.mercurial-scm.org/D3555
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 26 Apr 2018 23:57:20 +0200 |
parents | 538e850ae737 |
children | 565074cc9ac6 |
rev | line source |
---|---|
38021
538e850ae737
tests: mark tests that fail when using chg as #require no-chg
Kyle Lippincott <spectral@google.com>
parents:
37813
diff
changeset
|
1 #require no-chg |
538e850ae737
tests: mark tests that fail when using chg as #require no-chg
Kyle Lippincott <spectral@google.com>
parents:
37813
diff
changeset
|
2 |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
3 $ cat > hgrc-sshv2 << EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
4 > %include $HGRCPATH |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
5 > [experimental] |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
6 > sshpeer.advertise-v2 = true |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
7 > sshserver.support-v2 = true |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
8 > EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
9 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
10 Helper function to run protocol tests against multiple protocol versions. |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
11 This is easier than using #testcases because managing differences between |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
12 protocols with inline conditional output is hard to read. |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
13 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
14 $ debugwireproto() { |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
15 > commands=`cat -` |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
16 > echo 'testing ssh1' |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
17 > echo "${commands}" | hg --verbose debugwireproto --localssh |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
18 > echo "" |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
19 > echo 'testing ssh2' |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
20 > echo "${commands}" | HGRCPATH=$TESTTMP/hgrc-sshv2 hg --verbose debugwireproto --localssh |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
21 > } |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
22 |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
23 $ cat >> $HGRCPATH << EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
24 > [ui] |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
25 > ssh = $PYTHON "$TESTDIR/dummyssh" |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
26 > [devel] |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
27 > debug.peer-request = true |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
28 > [extensions] |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
29 > sshprotoext = $TESTDIR/sshprotoext.py |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
30 > EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
31 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
32 $ hg init server |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
33 $ cd server |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
34 $ echo 0 > foo |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
35 $ hg -q add foo |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
36 $ hg commit -m initial |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
37 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
38 A no-op connection performs a handshake |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
39 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
40 $ hg debugwireproto --localssh << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
41 > EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
42 creating ssh peer from handshake results |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
43 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
44 Raw peers don't perform any activity |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
45 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
46 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
47 > EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
48 using raw connection to peer |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
49 $ hg debugwireproto --localssh --peer ssh1 << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
50 > EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
51 creating ssh peer for wire protocol version 1 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
52 $ hg debugwireproto --localssh --peer ssh2 << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
53 > EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
54 creating ssh peer for wire protocol version 2 |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
55 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
56 Test a normal behaving server, for sanity |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
57 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
58 $ cd .. |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
59 |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
60 $ hg --debug debugpeer ssh://user@dummy/server |
35989
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35976
diff
changeset
|
61 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35976
diff
changeset
|
62 running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
37813
58bbd14b0c62
sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents:
37652
diff
changeset
|
63 devel-peer-request: hello+between |
58bbd14b0c62
sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents:
37652
diff
changeset
|
64 devel-peer-request: pairs: 81 bytes |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
65 sending hello command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
66 sending between command |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
67 remote: 413 |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
68 remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
69 remote: 1 |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
70 devel-peer-request: protocaps |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
71 devel-peer-request: caps: * bytes (glob) |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
72 sending protocaps command |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
73 url: ssh://user@dummy/server |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
74 local: no |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
75 pushable: yes |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
76 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
77 Server should answer the "hello" command in isolation |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
78 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
79 $ hg -R server debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
80 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
81 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
82 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
83 > readline |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
84 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
85 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
86 i> write(6) -> 6: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
87 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
88 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
89 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
90 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
91 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
92 |
36527
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
93 `hg debugserve --sshstdio` works |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
94 |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
95 $ cd server |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
96 $ hg debugserve --sshstdio << EOF |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
97 > hello |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
98 > EOF |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
99 413 |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
100 capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
36527
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
101 |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
102 I/O logging works |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
103 |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
104 $ hg debugserve --sshstdio --logiofd 1 << EOF |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
105 > hello |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
106 > EOF |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
107 o> write(4) -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
108 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
109 o> write(413) -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
110 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
111 413 |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
112 capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
36527
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
113 o> flush() -> None |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
114 |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
115 $ hg debugserve --sshstdio --logiofile $TESTTMP/io << EOF |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
116 > hello |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
117 > EOF |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
118 413 |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
119 capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
36527
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
120 |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
121 $ cat $TESTTMP/io |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
122 o> write(4) -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
123 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
124 o> write(413) -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
125 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36527
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
126 o> flush() -> None |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
127 |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
128 $ cd .. |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36368
diff
changeset
|
129 |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
130 >=0.9.1 clients send a "hello" + "between" for the null range as part of handshake. |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
131 Server should reply with capabilities and should send "1\n\n" as a successful |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
132 reply with empty response to the "between". |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
133 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
134 $ hg -R server debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
135 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
136 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
137 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
138 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
139 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
140 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
141 > pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
142 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
143 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
144 > readline |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
145 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
146 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
147 i> write(6) -> 6: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
148 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
149 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
150 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
151 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
152 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
153 i> write(98) -> 98: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
154 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
155 i> pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
156 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
157 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
158 o> 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
159 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
160 o> \n |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
161 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
162 SSH banner is not printed by default, ignored by clients |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
163 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
164 $ SSHSERVERMODE=banner hg debugpeer ssh://user@dummy/server |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
165 url: ssh://user@dummy/server |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
166 local: no |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
167 pushable: yes |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
168 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
169 --debug will print the banner |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
170 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
171 $ SSHSERVERMODE=banner hg --debug debugpeer ssh://user@dummy/server |
35989
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35976
diff
changeset
|
172 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35976
diff
changeset
|
173 running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
37813
58bbd14b0c62
sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents:
37652
diff
changeset
|
174 devel-peer-request: hello+between |
58bbd14b0c62
sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents:
37652
diff
changeset
|
175 devel-peer-request: pairs: 81 bytes |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
176 sending hello command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
177 sending between command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
178 remote: banner: line 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
179 remote: banner: line 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
180 remote: banner: line 2 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
181 remote: banner: line 3 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
182 remote: banner: line 4 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
183 remote: banner: line 5 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
184 remote: banner: line 6 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
185 remote: banner: line 7 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
186 remote: banner: line 8 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
187 remote: banner: line 9 |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
188 remote: 413 |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
189 remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
190 remote: 1 |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
191 devel-peer-request: protocaps |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
192 devel-peer-request: caps: * bytes (glob) |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
193 sending protocaps command |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
194 url: ssh://user@dummy/server |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
195 local: no |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
196 pushable: yes |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
197 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
198 And test the banner with the raw protocol |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
199 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
200 $ SSHSERVERMODE=banner hg -R server debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
201 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
202 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
203 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
204 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
205 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
206 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
207 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
208 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
209 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
210 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
211 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
212 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
213 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
214 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
215 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
216 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
217 > pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
218 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
219 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
220 > readline |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
221 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
222 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
223 i> write(6) -> 6: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
224 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
225 o> readline() -> 15: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
226 o> banner: line 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
227 o> readline() -> 15: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
228 o> banner: line 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
229 o> readline() -> 15: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
230 o> banner: line 2\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
231 o> readline() -> 15: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
232 o> banner: line 3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
233 o> readline() -> 15: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
234 o> banner: line 4\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
235 o> readline() -> 15: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
236 o> banner: line 5\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
237 o> readline() -> 15: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
238 o> banner: line 6\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
239 o> readline() -> 15: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
240 o> banner: line 7\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
241 o> readline() -> 15: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
242 o> banner: line 8\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
243 o> readline() -> 15: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
244 o> banner: line 9\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
245 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
246 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
247 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
248 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
249 i> write(98) -> 98: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
250 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
251 i> pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
252 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
253 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
254 o> 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
255 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
256 o> \n |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
257 |
35940
556218e08e25
sshpeer: remove support for connecting to <0.9.1 servers (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35938
diff
changeset
|
258 Connecting to a <0.9.1 server that doesn't support the hello command. |
556218e08e25
sshpeer: remove support for connecting to <0.9.1 servers (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35938
diff
changeset
|
259 The client should refuse, as we dropped support for connecting to such |
556218e08e25
sshpeer: remove support for connecting to <0.9.1 servers (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35938
diff
changeset
|
260 servers. |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
261 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
262 $ SSHSERVERMODE=no-hello hg --debug debugpeer ssh://user@dummy/server |
35989
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35976
diff
changeset
|
263 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35976
diff
changeset
|
264 running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
37813
58bbd14b0c62
sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents:
37652
diff
changeset
|
265 devel-peer-request: hello+between |
58bbd14b0c62
sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents:
37652
diff
changeset
|
266 devel-peer-request: pairs: 81 bytes |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
267 sending hello command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
268 sending between command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
269 remote: 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
270 remote: 1 |
35940
556218e08e25
sshpeer: remove support for connecting to <0.9.1 servers (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35938
diff
changeset
|
271 abort: no suitable response from remote hg! |
556218e08e25
sshpeer: remove support for connecting to <0.9.1 servers (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35938
diff
changeset
|
272 [255] |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
273 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
274 Sending an unknown command to the server results in an empty response to that command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
275 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
276 $ hg -R server debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
277 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
278 > pre-hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
279 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
280 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
281 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
282 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
283 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
284 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
285 > pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
286 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
287 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
288 > readline |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
289 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
290 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
291 i> write(10) -> 10: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
292 i> pre-hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
293 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
294 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
295 i> write(6) -> 6: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
296 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
297 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
298 o> 413\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
299 i> write(98) -> 98: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
300 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
301 i> pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
302 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
303 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
304 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
305 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
306 o> 1\n |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
307 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
308 $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-no-args --debug debugpeer ssh://user@dummy/server |
35989
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35976
diff
changeset
|
309 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35976
diff
changeset
|
310 running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
311 sending no-args command |
37813
58bbd14b0c62
sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents:
37652
diff
changeset
|
312 devel-peer-request: hello+between |
58bbd14b0c62
sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents:
37652
diff
changeset
|
313 devel-peer-request: pairs: 81 bytes |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
314 sending hello command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
315 sending between command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
316 remote: 0 |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
317 remote: 413 |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
318 remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
319 remote: 1 |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
320 devel-peer-request: protocaps |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
321 devel-peer-request: caps: * bytes (glob) |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
322 sending protocaps command |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
323 url: ssh://user@dummy/server |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
324 local: no |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
325 pushable: yes |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
326 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
327 Send multiple unknown commands before hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
328 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
329 $ hg -R server debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
330 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
331 > unknown1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
332 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
333 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
334 > unknown2\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
335 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
336 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
337 > unknown3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
338 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
339 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
340 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
341 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
342 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
343 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
344 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
345 > pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
346 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
347 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
348 > readline |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
349 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
350 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
351 i> write(9) -> 9: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
352 i> unknown1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
353 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
354 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
355 i> write(9) -> 9: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
356 i> unknown2\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
357 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
358 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
359 i> write(9) -> 9: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
360 i> unknown3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
361 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
362 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
363 i> write(6) -> 6: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
364 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
365 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
366 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
367 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
368 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
369 i> write(98) -> 98: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
370 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
371 i> pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
372 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
373 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
374 o> 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
375 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
376 o> \n |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
377 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
378 $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-multiple-no-args --debug debugpeer ssh://user@dummy/server |
35989
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35976
diff
changeset
|
379 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35976
diff
changeset
|
380 running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
381 sending unknown1 command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
382 sending unknown2 command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
383 sending unknown3 command |
37813
58bbd14b0c62
sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents:
37652
diff
changeset
|
384 devel-peer-request: hello+between |
58bbd14b0c62
sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents:
37652
diff
changeset
|
385 devel-peer-request: pairs: 81 bytes |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
386 sending hello command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
387 sending between command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
388 remote: 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
389 remote: 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
390 remote: 0 |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
391 remote: 413 |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
392 remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
393 remote: 1 |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
394 devel-peer-request: protocaps |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
395 devel-peer-request: caps: * bytes (glob) |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
396 sending protocaps command |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
397 url: ssh://user@dummy/server |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
398 local: no |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
399 pushable: yes |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
400 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
401 Send an unknown command before hello that has arguments |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
402 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
403 $ cd server |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
404 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
405 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
406 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
407 > with-args\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
408 > foo 13\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
409 > value for foo\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
410 > bar 13\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
411 > value for bar\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
412 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
413 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
414 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
415 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
416 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
417 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
418 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
419 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
420 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
421 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
422 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
423 > pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
424 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
425 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
426 > readline |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
427 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
428 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
429 i> write(52) -> 52: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
430 i> with-args\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
431 i> foo 13\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
432 i> value for foo\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
433 i> bar 13\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
434 i> value for bar\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
435 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
436 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
437 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
438 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
439 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
440 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
441 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
442 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
443 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
444 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
445 i> write(6) -> 6: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
446 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
447 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
448 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
449 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
450 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
451 i> write(98) -> 98: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
452 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
453 i> pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
454 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
455 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
456 o> 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
457 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
458 o> \n |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
459 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
460 Send an unknown command having an argument that looks numeric |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
461 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
462 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
463 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
464 > unknown\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
465 > foo 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
466 > 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
467 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
468 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
469 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
470 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
471 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
472 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
473 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
474 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
475 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
476 > pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
477 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
478 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
479 > readline |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
480 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
481 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
482 i> write(16) -> 16: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
483 i> unknown\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
484 i> foo 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
485 i> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
486 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
487 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
488 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
489 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
490 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
491 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
492 i> write(6) -> 6: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
493 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
494 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
495 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
496 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
497 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
498 i> write(98) -> 98: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
499 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
500 i> pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
501 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
502 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
503 o> 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
504 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
505 o> \n |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
506 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
507 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
508 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
509 > unknown\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
510 > foo 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
511 > 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
512 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
513 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
514 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
515 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
516 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
517 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
518 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
519 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
520 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
521 > pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
522 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
523 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
524 > readline |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
525 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
526 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
527 i> write(16) -> 16: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
528 i> unknown\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
529 i> foo 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
530 i> 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
531 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
532 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
533 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
534 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
535 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
536 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
537 i> write(6) -> 6: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
538 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
539 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
540 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
541 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
542 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
543 i> write(98) -> 98: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
544 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
545 i> pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
546 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
547 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
548 o> 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
549 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
550 o> \n |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
551 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
552 When sending a dict argument value, it is serialized to |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
553 "<arg> <item count>" followed by "<key> <len>\n<value>" for each item |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
554 in the dict. |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
555 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
556 Dictionary value for unknown command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
557 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
558 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
559 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
560 > unknown\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
561 > dict 3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
562 > key1 3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
563 > foo\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
564 > key2 3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
565 > bar\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
566 > key3 3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
567 > baz\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
568 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
569 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
570 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
571 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
572 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
573 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
574 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
575 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
576 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
577 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
578 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
579 > readline |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
580 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
581 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
582 i> write(48) -> 48: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
583 i> unknown\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
584 i> dict 3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
585 i> key1 3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
586 i> foo\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
587 i> key2 3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
588 i> bar\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
589 i> key3 3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
590 i> baz\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
591 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
592 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
593 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
594 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
595 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
596 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
597 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
598 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
599 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
600 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
601 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
602 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
603 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
604 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
605 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
606 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
607 i> write(6) -> 6: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
608 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
609 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
610 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
611 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
612 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
613 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
614 Incomplete dictionary send |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
615 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
616 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
617 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
618 > unknown\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
619 > dict 3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
620 > key1 3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
621 > foo\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
622 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
623 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
624 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
625 > readline |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
626 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
627 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
628 i> write(26) -> 26: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
629 i> unknown\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
630 i> dict 3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
631 i> key1 3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
632 i> foo\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
633 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
634 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
635 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
636 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
637 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
638 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
639 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
640 o> 0\n |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
641 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
642 Incomplete value send |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
643 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
644 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
645 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
646 > unknown\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
647 > dict 3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
648 > key1 3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
649 > fo |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
650 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
651 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
652 > readline |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
653 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
654 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
655 i> write(24) -> 24: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
656 i> unknown\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
657 i> dict 3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
658 i> key1 3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
659 i> fo |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
660 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
661 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
662 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
663 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
664 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
665 o> 0\n |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
666 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
667 Send a command line with spaces |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
668 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
669 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
670 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
671 > unknown withspace\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
672 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
673 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
674 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
675 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
676 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
677 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
678 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
679 > pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
680 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
681 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
682 > readline |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
683 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
684 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
685 i> write(18) -> 18: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
686 i> unknown withspace\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
687 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
688 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
689 i> write(6) -> 6: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
690 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
691 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
692 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
693 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
694 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
695 i> write(98) -> 98: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
696 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
697 i> pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
698 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
699 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
700 o> 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
701 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
702 o> \n |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
703 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
704 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
705 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
706 > unknown with multiple spaces\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
707 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
708 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
709 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
710 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
711 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
712 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
713 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
714 > pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
715 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
716 > readline |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
717 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
718 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
719 i> write(29) -> 29: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
720 i> unknown with multiple spaces\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
721 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
722 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
723 i> write(6) -> 6: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
724 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
725 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
726 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
727 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
728 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
729 i> write(98) -> 98: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
730 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
731 i> pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
732 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
733 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
734 o> 1\n |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
735 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
736 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
737 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
738 > unknown with spaces\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
739 > key 10\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
740 > some value\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
741 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
742 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
743 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
744 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
745 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
746 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
747 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
748 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
749 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
750 > pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
751 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
752 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
753 > readline |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
754 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
755 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
756 i> write(38) -> 38: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
757 i> unknown with spaces\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
758 i> key 10\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
759 i> some value\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
760 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
761 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
762 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
763 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
764 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
765 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
766 i> write(6) -> 6: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
767 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
768 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
769 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
770 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
771 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
772 i> write(98) -> 98: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
773 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
774 i> pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
775 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
776 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
777 o> 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
778 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
779 o> \n |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
780 Send an unknown command after the "between" |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
781 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
782 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
783 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
784 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
785 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
786 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
787 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
788 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
789 > pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
790 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000unknown |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
791 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
792 > readline |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
793 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
794 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
795 i> write(6) -> 6: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
796 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
797 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
798 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
799 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
800 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
801 i> write(105) -> 105: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
802 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
803 i> pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
804 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000unknown |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
805 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
806 o> 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
807 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
808 o> \n |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
809 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
810 And one with arguments |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
811 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
812 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
813 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
814 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
815 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
816 > pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
817 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
818 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
819 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
820 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
821 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
822 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
823 > unknown\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
824 > foo 5\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
825 > \nvalue\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
826 > bar 3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
827 > baz\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
828 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
829 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
830 > readline |
35930
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
831 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
832 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
833 i> write(104) -> 104: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
834 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
835 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
836 i> pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
837 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
838 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
839 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
840 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
841 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
842 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
843 o> 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
844 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
845 o> \n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
846 i> write(31) -> 31: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
847 i> unknown\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
848 i> foo 5\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
849 i> \n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
850 i> value\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
851 i> bar 3\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
852 i> baz\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
853 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
854 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
855 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
856 o> 0\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
857 o> readline() -> 0: |
35976
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
858 |
36076
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35989
diff
changeset
|
859 Send a valid command before the handshake |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35989
diff
changeset
|
860 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
861 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
862 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
863 > heads\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
864 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
865 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
866 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
867 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
868 > pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
869 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
870 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
871 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
872 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
873 > readline |
36076
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35989
diff
changeset
|
874 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
875 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
876 i> write(6) -> 6: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
877 i> heads\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
878 o> readline() -> 3: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
879 o> 41\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
880 i> write(104) -> 104: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
881 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
882 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
883 i> pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
884 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
885 o> readline() -> 41: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
886 o> 68986213bd4485ea51533535e3fc9e78007a711f\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
887 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
888 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
889 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
890 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
891 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
892 o> 1\n |
36076
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35989
diff
changeset
|
893 |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35989
diff
changeset
|
894 And a variation that doesn't send the between command |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35989
diff
changeset
|
895 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
896 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
897 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
898 > heads\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
899 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
900 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
901 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
902 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
903 > readline |
36076
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35989
diff
changeset
|
904 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
905 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
906 i> write(6) -> 6: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
907 i> heads\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
908 o> readline() -> 3: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
909 o> 41\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
910 i> write(6) -> 6: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
911 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
912 o> readline() -> 41: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
913 o> 68986213bd4485ea51533535e3fc9e78007a711f\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
914 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
915 o> 413\n |
36076
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35989
diff
changeset
|
916 |
35976
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
917 Send an upgrade request to a server that doesn't support that command |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
918 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
919 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
920 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
921 > upgrade 2e82ab3f-9ce3-4b4e-8f8c-6fd1c0e9e23a proto=irrelevant1%2Cirrelevant2\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
922 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
923 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
924 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
925 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
926 > pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
927 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
928 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
929 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
930 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
931 > readline |
35976
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
932 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
933 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
934 i> write(77) -> 77: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
935 i> upgrade 2e82ab3f-9ce3-4b4e-8f8c-6fd1c0e9e23a proto=irrelevant1%2Cirrelevant2\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
936 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
937 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
938 i> write(104) -> 104: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
939 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
940 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
941 i> pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
942 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
943 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
944 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
945 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
946 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
947 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
948 o> 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
949 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
950 o> \n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
951 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
952 $ cd .. |
35976
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
953 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
954 $ hg --config experimental.sshpeer.advertise-v2=true --debug debugpeer ssh://user@dummy/server |
35989
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35976
diff
changeset
|
955 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35976
diff
changeset
|
956 running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
35976
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
957 sending upgrade request: * proto=exp-ssh-v2-0001 (glob) |
37813
58bbd14b0c62
sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents:
37652
diff
changeset
|
958 devel-peer-request: hello+between |
58bbd14b0c62
sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents:
37652
diff
changeset
|
959 devel-peer-request: pairs: 81 bytes |
35976
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
960 sending hello command |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
961 sending between command |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
962 remote: 0 |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
963 remote: 413 |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
964 remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
35976
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
965 remote: 1 |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
966 devel-peer-request: protocaps |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
967 devel-peer-request: caps: * bytes (glob) |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
968 sending protocaps command |
35976
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
969 url: ssh://user@dummy/server |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
970 local: no |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
971 pushable: yes |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
972 |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
973 Enable version 2 support on server. We need to do this in hgrc because we can't |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
974 use --config with `hg serve --stdio`. |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
975 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
976 $ cat >> server/.hg/hgrc << EOF |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
977 > [experimental] |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
978 > sshserver.support-v2 = true |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
979 > EOF |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
980 |
35976
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
981 Send an upgrade request to a server that supports upgrade |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
982 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
983 $ cd server |
36368
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36216
diff
changeset
|
984 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
985 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
986 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
987 > upgrade this-is-some-token proto=exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
988 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
989 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
990 > pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
991 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
992 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
993 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
994 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
995 > EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
996 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
997 i> write(153) -> 153: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
998 i> upgrade this-is-some-token proto=exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
999 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1000 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1001 i> pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1002 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1003 o> readline() -> 44: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1004 o> upgraded this-is-some-token exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1005 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1006 o> 412\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1007 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1008 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1009 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1010 $ cd .. |
35976
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1011 |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1012 $ hg --config experimental.sshpeer.advertise-v2=true --debug debugpeer ssh://user@dummy/server |
35989
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35976
diff
changeset
|
1013 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35976
diff
changeset
|
1014 running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
35976
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1015 sending upgrade request: * proto=exp-ssh-v2-0001 (glob) |
37813
58bbd14b0c62
sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents:
37652
diff
changeset
|
1016 devel-peer-request: hello+between |
58bbd14b0c62
sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents:
37652
diff
changeset
|
1017 devel-peer-request: pairs: 81 bytes |
35976
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1018 sending hello command |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1019 sending between command |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1020 protocol upgraded to exp-ssh-v2-0001 |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1021 remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1022 devel-peer-request: protocaps |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1023 devel-peer-request: caps: * bytes (glob) |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1024 sending protocaps command |
35976
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1025 url: ssh://user@dummy/server |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1026 local: no |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1027 pushable: yes |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1028 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1029 Verify the peer has capabilities |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1030 |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1031 $ hg --config experimental.sshpeer.advertise-v2=true --debug debugcapabilities ssh://user@dummy/server |
35989
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35976
diff
changeset
|
1032 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35976
diff
changeset
|
1033 running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
35976
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1034 sending upgrade request: * proto=exp-ssh-v2-0001 (glob) |
37813
58bbd14b0c62
sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents:
37652
diff
changeset
|
1035 devel-peer-request: hello+between |
58bbd14b0c62
sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents:
37652
diff
changeset
|
1036 devel-peer-request: pairs: 81 bytes |
35976
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1037 sending hello command |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1038 sending between command |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1039 protocol upgraded to exp-ssh-v2-0001 |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1040 remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1041 devel-peer-request: protocaps |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1042 devel-peer-request: caps: * bytes (glob) |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1043 sending protocaps command |
35976
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1044 Main capabilities: |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1045 batch |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1046 branchmap |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1047 $USUAL_BUNDLE2_CAPS_SERVER$ |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1048 changegroupsubset |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1049 getbundle |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1050 known |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1051 lookup |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1052 protocaps |
35976
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1053 pushkey |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1054 streamreqs=generaldelta,revlogv1 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1055 unbundle=HG10GZ,HG10BZ,HG10UN |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1056 unbundlehash |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1057 Bundle2 capabilities: |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1058 HG20 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1059 bookmarks |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1060 changegroup |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1061 01 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1062 02 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1063 digests |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1064 md5 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1065 sha1 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1066 sha512 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1067 error |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1068 abort |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1069 unsupportedcontent |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1070 pushraced |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1071 pushkey |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1072 hgtagsfnodes |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1073 listkeys |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1074 phases |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1075 heads |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1076 pushkey |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1077 remote-changegroup |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1078 http |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35940
diff
changeset
|
1079 https |
36968
2090044a288d
revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents:
36843
diff
changeset
|
1080 rev-branch-cache |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1081 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1082 Command after upgrade to version 2 is processed |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1083 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1084 $ cd server |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1085 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1086 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1087 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1088 > upgrade this-is-some-token proto=exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1089 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1090 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1091 > pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1092 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1093 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1094 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1095 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1096 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1097 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1098 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1099 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1100 > EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1101 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1102 i> write(153) -> 153: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1103 i> upgrade this-is-some-token proto=exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1104 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1105 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1106 i> pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1107 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1108 o> readline() -> 44: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1109 o> upgraded this-is-some-token exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1110 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1111 o> 412\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1112 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1113 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1114 i> write(6) -> 6: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1115 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1116 o> readline() -> 4: |
37533
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37413
diff
changeset
|
1117 o> 397\n |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37413
diff
changeset
|
1118 o> readline() -> 397: |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37413
diff
changeset
|
1119 o> capabilities: branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1120 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1121 Multiple upgrades is not allowed |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1122 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1123 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1124 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1125 > upgrade this-is-some-token proto=exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1126 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1127 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1128 > pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1129 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1130 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1131 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1132 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1133 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1134 > upgrade another-token proto=irrelevant\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1135 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1136 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1137 > readavailable |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1138 > EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1139 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1140 i> write(153) -> 153: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1141 i> upgrade this-is-some-token proto=exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1142 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1143 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1144 i> pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1145 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1146 o> readline() -> 44: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1147 o> upgraded this-is-some-token exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1148 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1149 o> 412\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1150 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1151 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1152 i> write(45) -> 45: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1153 i> upgrade another-token proto=irrelevant\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1154 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1155 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1156 o> \n |
36843
31581528f242
debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents:
36631
diff
changeset
|
1157 o> read(-1) -> 0: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1158 e> read(-1) -> 42: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1159 e> cannot upgrade protocols multiple times\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1160 e> -\n |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1161 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1162 Malformed upgrade request line (not exactly 3 space delimited tokens) |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1163 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1164 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1165 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1166 > upgrade\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1167 > readline |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1168 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1169 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1170 i> write(8) -> 8: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1171 i> upgrade\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1172 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1173 o> 0\n |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1174 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1175 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1176 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1177 > upgrade token\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1178 > readline |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1179 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1180 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1181 i> write(14) -> 14: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1182 i> upgrade token\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1183 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1184 o> 0\n |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1185 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1186 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1187 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1188 > upgrade token foo=bar extra-token\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1189 > readline |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1190 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1191 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1192 i> write(34) -> 34: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1193 i> upgrade token foo=bar extra-token\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1194 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1195 o> 0\n |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1196 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1197 Upgrade request to unsupported protocol is ignored |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1198 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1199 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1200 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1201 > upgrade this-is-some-token proto=unknown1,unknown2\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1202 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1203 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1204 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1205 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1206 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1207 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1208 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1209 > pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1210 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1211 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1212 > readline |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1213 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1214 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1215 i> write(51) -> 51: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1216 i> upgrade this-is-some-token proto=unknown1,unknown2\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1217 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1218 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1219 i> write(6) -> 6: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1220 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1221 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1222 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1223 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1224 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1225 i> write(98) -> 98: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1226 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1227 i> pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1228 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1229 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1230 o> 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1231 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1232 o> \n |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1233 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1234 Upgrade request must be followed by hello + between |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1235 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1236 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1237 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1238 > upgrade token proto=exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1239 > invalid\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1240 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1241 > readavailable |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1242 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1243 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1244 i> write(44) -> 44: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1245 i> upgrade token proto=exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1246 i> invalid\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1247 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1248 o> \n |
36843
31581528f242
debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents:
36631
diff
changeset
|
1249 o> read(-1) -> 0: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1250 e> read(-1) -> 46: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1251 e> malformed handshake protocol: missing hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1252 e> -\n |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1253 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1254 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1255 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1256 > upgrade token proto=exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1257 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1258 > invalid\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1259 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1260 > readavailable |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1261 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1262 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1263 i> write(50) -> 50: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1264 i> upgrade token proto=exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1265 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1266 i> invalid\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1267 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1268 o> \n |
36843
31581528f242
debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents:
36631
diff
changeset
|
1269 o> read(-1) -> 0: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1270 e> read(-1) -> 48: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1271 e> malformed handshake protocol: missing between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1272 e> -\n |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1273 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1274 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1275 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1276 > upgrade token proto=exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1277 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1278 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1279 > invalid\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1280 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1281 > readavailable |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1282 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1283 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1284 i> write(58) -> 58: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1285 i> upgrade token proto=exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1286 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1287 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1288 i> invalid\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1289 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1290 o> \n |
36843
31581528f242
debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents:
36631
diff
changeset
|
1291 o> read(-1) -> 0: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1292 e> read(-1) -> 49: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1293 e> malformed handshake protocol: missing pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1294 e> -\n |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1295 |
36611
6906547c8476
wireproto: don't expose legacy commands to version 2 of wire protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36532
diff
changeset
|
1296 Legacy commands are not exposed to version 2 of protocol |
6906547c8476
wireproto: don't expose legacy commands to version 2 of wire protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36532
diff
changeset
|
1297 |
37294
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1298 TODO re-enable these once we're back to actually using v2 commands |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1299 |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1300 $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1301 > command branches |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1302 > nodes 0000000000000000000000000000000000000000 |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1303 > EOF |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1304 creating ssh peer from handshake results |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1305 sending branches command |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1306 response: |
36611
6906547c8476
wireproto: don't expose legacy commands to version 2 of wire protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36532
diff
changeset
|
1307 |
37294
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1308 $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1309 > command changegroup |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1310 > roots 0000000000000000000000000000000000000000 |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1311 > EOF |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1312 creating ssh peer from handshake results |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1313 sending changegroup command |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1314 response: |
36611
6906547c8476
wireproto: don't expose legacy commands to version 2 of wire protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36532
diff
changeset
|
1315 |
37294
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1316 $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1317 > command changegroupsubset |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1318 > bases 0000000000000000000000000000000000000000 |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1319 > heads 0000000000000000000000000000000000000000 |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1320 > EOF |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1321 creating ssh peer from handshake results |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1322 sending changegroupsubset command |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1323 response: |
36611
6906547c8476
wireproto: don't expose legacy commands to version 2 of wire protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36532
diff
changeset
|
1324 |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1325 $ cd .. |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1326 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1327 Test listkeys for listing namespaces |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1328 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1329 $ hg init empty |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1330 $ cd empty |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1331 $ debugwireproto << EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1332 > command listkeys |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1333 > namespace namespaces |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1334 > EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1335 testing ssh1 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1336 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1337 i> write(104) -> 104: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1338 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1339 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1340 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1341 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1342 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1343 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1344 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1345 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1346 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1347 o> readline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1348 o> 1\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1349 o> readline() -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1350 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1351 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1352 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1353 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1354 i> write(13) -> 13: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1355 i> namespace 10\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1356 i> write(10) -> 10: namespaces |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1357 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1358 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1359 o> 30\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1360 o> bufferedread(30) -> 30: |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1361 o> bookmarks\t\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1362 o> namespaces\t\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1363 o> phases\t |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1364 response: {b'bookmarks': b'', b'namespaces': b'', b'phases': b''} |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1365 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1366 testing ssh2 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1367 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1368 i> write(171) -> 171: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1369 i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1370 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1371 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1372 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1373 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1374 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1375 o> readline() -> 62: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1376 o> upgraded * exp-ssh-v2-0001\n (glob) |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1377 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1378 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1379 o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1380 o> read(1) -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1381 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1382 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1383 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1384 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1385 i> write(13) -> 13: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1386 i> namespace 10\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1387 i> write(10) -> 10: namespaces |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1388 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1389 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1390 o> 30\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1391 o> bufferedread(30) -> 30: |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1392 o> bookmarks\t\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1393 o> namespaces\t\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1394 o> phases\t |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1395 response: {b'bookmarks': b'', b'namespaces': b'', b'phases': b''} |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1396 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1397 $ cd .. |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1398 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1399 Test listkeys for bookmarks |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1400 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1401 $ hg init bookmarkrepo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1402 $ cd bookmarkrepo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1403 $ echo 0 > foo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1404 $ hg add foo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1405 $ hg -q commit -m initial |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1406 $ echo 1 > foo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1407 $ hg commit -m second |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1408 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1409 With no bookmarks set |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1410 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1411 $ debugwireproto << EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1412 > command listkeys |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1413 > namespace bookmarks |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1414 > EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1415 testing ssh1 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1416 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1417 i> write(104) -> 104: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1418 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1419 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1420 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1421 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1422 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1423 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1424 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1425 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1426 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1427 o> readline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1428 o> 1\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1429 o> readline() -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1430 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1431 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1432 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1433 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1434 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1435 i> namespace 9\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1436 i> write(9) -> 9: bookmarks |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1437 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1438 o> bufferedreadline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1439 o> 0\n |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1440 response: {} |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1441 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1442 testing ssh2 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1443 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1444 i> write(171) -> 171: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1445 i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1446 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1447 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1448 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1449 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1450 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1451 o> readline() -> 62: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1452 o> upgraded * exp-ssh-v2-0001\n (glob) |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1453 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1454 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1455 o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1456 o> read(1) -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1457 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1458 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1459 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1460 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1461 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1462 i> namespace 9\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1463 i> write(9) -> 9: bookmarks |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1464 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1465 o> bufferedreadline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1466 o> 0\n |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1467 response: {} |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1468 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1469 With a single bookmark set |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1470 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1471 $ hg book -r 0 bookA |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1472 $ debugwireproto << EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1473 > command listkeys |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1474 > namespace bookmarks |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1475 > EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1476 testing ssh1 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1477 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1478 i> write(104) -> 104: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1479 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1480 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1481 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1482 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1483 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1484 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1485 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1486 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1487 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1488 o> readline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1489 o> 1\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1490 o> readline() -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1491 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1492 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1493 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1494 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1495 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1496 i> namespace 9\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1497 i> write(9) -> 9: bookmarks |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1498 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1499 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1500 o> 46\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1501 o> bufferedread(46) -> 46: bookA\t68986213bd4485ea51533535e3fc9e78007a711f |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1502 response: {b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f'} |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1503 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1504 testing ssh2 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1505 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1506 i> write(171) -> 171: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1507 i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1508 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1509 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1510 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1511 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1512 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1513 o> readline() -> 62: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1514 o> upgraded * exp-ssh-v2-0001\n (glob) |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1515 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1516 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1517 o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1518 o> read(1) -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1519 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1520 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1521 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1522 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1523 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1524 i> namespace 9\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1525 i> write(9) -> 9: bookmarks |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1526 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1527 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1528 o> 46\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1529 o> bufferedread(46) -> 46: bookA\t68986213bd4485ea51533535e3fc9e78007a711f |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1530 response: {b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f'} |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1531 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1532 With multiple bookmarks set |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1533 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1534 $ hg book -r 1 bookB |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1535 $ debugwireproto << EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1536 > command listkeys |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1537 > namespace bookmarks |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1538 > EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1539 testing ssh1 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1540 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1541 i> write(104) -> 104: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1542 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1543 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1544 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1545 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1546 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1547 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1548 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1549 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1550 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1551 o> readline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1552 o> 1\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1553 o> readline() -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1554 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1555 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1556 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1557 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1558 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1559 i> namespace 9\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1560 i> write(9) -> 9: bookmarks |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1561 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1562 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1563 o> 93\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1564 o> bufferedread(93) -> 93: |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1565 o> bookA\t68986213bd4485ea51533535e3fc9e78007a711f\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1566 o> bookB\t1880f3755e2e52e3199e0ee5638128b08642f34d |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1567 response: {b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f', b'bookB': b'1880f3755e2e52e3199e0ee5638128b08642f34d'} |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1568 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1569 testing ssh2 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1570 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1571 i> write(171) -> 171: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1572 i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1573 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1574 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1575 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1576 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1577 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1578 o> readline() -> 62: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1579 o> upgraded * exp-ssh-v2-0001\n (glob) |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1580 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1581 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1582 o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1583 o> read(1) -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1584 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1585 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1586 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1587 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1588 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1589 i> namespace 9\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1590 i> write(9) -> 9: bookmarks |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1591 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1592 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1593 o> 93\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1594 o> bufferedread(93) -> 93: |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1595 o> bookA\t68986213bd4485ea51533535e3fc9e78007a711f\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1596 o> bookB\t1880f3755e2e52e3199e0ee5638128b08642f34d |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1597 response: {b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f', b'bookB': b'1880f3755e2e52e3199e0ee5638128b08642f34d'} |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1598 |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1599 Test pushkey for bookmarks |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1600 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1601 $ debugwireproto << EOF |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1602 > command pushkey |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1603 > namespace bookmarks |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1604 > key remote |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1605 > old |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1606 > new 68986213bd4485ea51533535e3fc9e78007a711f |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1607 > EOF |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1608 testing ssh1 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1609 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1610 i> write(104) -> 104: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1611 i> hello\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1612 i> between\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1613 i> pairs 81\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1614 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1615 i> flush() -> None |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1616 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1617 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1618 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1619 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1620 o> readline() -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1621 o> 1\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1622 o> readline() -> 1: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1623 o> \n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1624 sending pushkey command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1625 i> write(8) -> 8: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1626 i> pushkey\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1627 i> write(6) -> 6: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1628 i> key 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1629 i> write(6) -> 6: remote |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1630 i> write(12) -> 12: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1631 i> namespace 9\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1632 i> write(9) -> 9: bookmarks |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1633 i> write(7) -> 7: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1634 i> new 40\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1635 i> write(40) -> 40: 68986213bd4485ea51533535e3fc9e78007a711f |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1636 i> write(6) -> 6: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1637 i> old 0\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1638 i> flush() -> None |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1639 o> bufferedreadline() -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1640 o> 2\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1641 o> bufferedread(2) -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1642 o> 1\n |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1643 response: True |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1644 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1645 testing ssh2 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1646 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1647 i> write(171) -> 171: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1648 i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1649 i> hello\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1650 i> between\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1651 i> pairs 81\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1652 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1653 i> flush() -> None |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1654 o> readline() -> 62: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1655 o> upgraded * exp-ssh-v2-0001\n (glob) |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1656 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1657 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1658 o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1659 o> read(1) -> 1: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1660 o> \n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1661 sending pushkey command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1662 i> write(8) -> 8: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1663 i> pushkey\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1664 i> write(6) -> 6: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1665 i> key 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1666 i> write(6) -> 6: remote |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1667 i> write(12) -> 12: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1668 i> namespace 9\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1669 i> write(9) -> 9: bookmarks |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1670 i> write(7) -> 7: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1671 i> new 40\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1672 i> write(40) -> 40: 68986213bd4485ea51533535e3fc9e78007a711f |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1673 i> write(6) -> 6: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1674 i> old 0\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1675 i> flush() -> None |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1676 o> bufferedreadline() -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1677 o> 2\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1678 o> bufferedread(2) -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1679 o> 1\n |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1680 response: True |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1681 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1682 $ hg bookmarks |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1683 bookA 0:68986213bd44 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1684 bookB 1:1880f3755e2e |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1685 remote 0:68986213bd44 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1686 |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1687 $ cd .. |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1688 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1689 Test listkeys for phases |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1690 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1691 $ hg init phasesrepo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1692 $ cd phasesrepo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1693 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1694 Phases on empty repo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1695 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1696 $ debugwireproto << EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1697 > command listkeys |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1698 > namespace phases |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1699 > EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1700 testing ssh1 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1701 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1702 i> write(104) -> 104: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1703 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1704 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1705 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1706 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1707 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1708 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1709 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1710 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1711 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1712 o> readline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1713 o> 1\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1714 o> readline() -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1715 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1716 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1717 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1718 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1719 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1720 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1721 i> write(6) -> 6: phases |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1722 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1723 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1724 o> 15\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1725 o> bufferedread(15) -> 15: publishing\tTrue |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1726 response: {b'publishing': b'True'} |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1727 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1728 testing ssh2 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1729 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1730 i> write(171) -> 171: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1731 i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1732 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1733 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1734 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1735 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1736 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1737 o> readline() -> 62: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1738 o> upgraded * exp-ssh-v2-0001\n (glob) |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1739 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1740 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1741 o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1742 o> read(1) -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1743 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1744 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1745 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1746 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1747 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1748 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1749 i> write(6) -> 6: phases |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1750 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1751 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1752 o> 15\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1753 o> bufferedread(15) -> 15: publishing\tTrue |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1754 response: {b'publishing': b'True'} |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1755 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1756 Create some commits |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1757 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1758 $ echo 0 > foo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1759 $ hg add foo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1760 $ hg -q commit -m initial |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1761 $ hg phase --public |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1762 $ echo 1 > foo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1763 $ hg commit -m 'head 1 commit 1' |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1764 $ echo 2 > foo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1765 $ hg commit -m 'head 1 commit 2' |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1766 $ hg -q up 0 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1767 $ echo 1a > foo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1768 $ hg commit -m 'head 2 commit 1' |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1769 created new head |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1770 $ echo 2a > foo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1771 $ hg commit -m 'head 2 commit 2' |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1772 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1773 Two draft heads |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1774 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1775 $ debugwireproto << EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1776 > command listkeys |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1777 > namespace phases |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1778 > EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1779 testing ssh1 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1780 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1781 i> write(104) -> 104: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1782 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1783 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1784 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1785 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1786 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1787 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1788 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1789 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1790 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1791 o> readline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1792 o> 1\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1793 o> readline() -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1794 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1795 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1796 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1797 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1798 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1799 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1800 i> write(6) -> 6: phases |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1801 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1802 o> bufferedreadline() -> 4: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1803 o> 101\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1804 o> bufferedread(101) -> 101: |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1805 o> 20b8a89289d80036e6c4e87c2083e3bea1586637\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1806 o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1807 o> publishing\tTrue |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1808 response: {b'20b8a89289d80036e6c4e87c2083e3bea1586637': b'1', b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', b'publishing': b'True'} |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1809 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1810 testing ssh2 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1811 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1812 i> write(171) -> 171: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1813 i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1814 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1815 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1816 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1817 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1818 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1819 o> readline() -> 62: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1820 o> upgraded * exp-ssh-v2-0001\n (glob) |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1821 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1822 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1823 o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1824 o> read(1) -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1825 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1826 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1827 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1828 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1829 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1830 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1831 i> write(6) -> 6: phases |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1832 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1833 o> bufferedreadline() -> 4: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1834 o> 101\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1835 o> bufferedread(101) -> 101: |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1836 o> 20b8a89289d80036e6c4e87c2083e3bea1586637\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1837 o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1838 o> publishing\tTrue |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1839 response: {b'20b8a89289d80036e6c4e87c2083e3bea1586637': b'1', b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', b'publishing': b'True'} |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1840 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1841 Single draft head |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1842 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1843 $ hg phase --public -r 2 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1844 $ debugwireproto << EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1845 > command listkeys |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1846 > namespace phases |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1847 > EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1848 testing ssh1 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1849 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1850 i> write(104) -> 104: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1851 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1852 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1853 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1854 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1855 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1856 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1857 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1858 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1859 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1860 o> readline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1861 o> 1\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1862 o> readline() -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1863 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1864 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1865 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1866 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1867 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1868 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1869 i> write(6) -> 6: phases |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1870 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1871 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1872 o> 58\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1873 o> bufferedread(58) -> 58: |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1874 o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1875 o> publishing\tTrue |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1876 response: {b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', b'publishing': b'True'} |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1877 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1878 testing ssh2 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1879 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1880 i> write(171) -> 171: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1881 i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1882 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1883 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1884 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1885 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1886 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1887 o> readline() -> 62: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1888 o> upgraded * exp-ssh-v2-0001\n (glob) |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1889 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1890 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1891 o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1892 o> read(1) -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1893 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1894 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1895 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1896 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1897 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1898 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1899 i> write(6) -> 6: phases |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1900 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1901 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1902 o> 58\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1903 o> bufferedread(58) -> 58: |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1904 o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1905 o> publishing\tTrue |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1906 response: {b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', b'publishing': b'True'} |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1907 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1908 All public heads |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1909 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1910 $ hg phase --public -r 4 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1911 $ debugwireproto << EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1912 > command listkeys |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1913 > namespace phases |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1914 > EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1915 testing ssh1 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1916 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1917 i> write(104) -> 104: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1918 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1919 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1920 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1921 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1922 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1923 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1924 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1925 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1926 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1927 o> readline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1928 o> 1\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1929 o> readline() -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1930 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1931 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1932 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1933 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1934 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1935 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1936 i> write(6) -> 6: phases |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1937 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1938 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1939 o> 15\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1940 o> bufferedread(15) -> 15: publishing\tTrue |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1941 response: {b'publishing': b'True'} |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1942 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1943 testing ssh2 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1944 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1945 i> write(171) -> 171: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1946 i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1947 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1948 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1949 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1950 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1951 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1952 o> readline() -> 62: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1953 o> upgraded * exp-ssh-v2-0001\n (glob) |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1954 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1955 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1956 o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1957 o> read(1) -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1958 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1959 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1960 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1961 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1962 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1963 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1964 i> write(6) -> 6: phases |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1965 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1966 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1967 o> 15\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1968 o> bufferedread(15) -> 15: publishing\tTrue |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1969 response: {b'publishing': b'True'} |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
1970 |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1971 Setting public phase via pushkey |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1972 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1973 $ hg phase --draft --force -r . |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1974 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1975 $ debugwireproto << EOF |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1976 > command pushkey |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1977 > namespace phases |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1978 > key 7127240a084fd9dc86fe8d1f98e26229161ec82b |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1979 > old 1 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1980 > new 0 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1981 > EOF |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1982 testing ssh1 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1983 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1984 i> write(104) -> 104: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1985 i> hello\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1986 i> between\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1987 i> pairs 81\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1988 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1989 i> flush() -> None |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1990 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1991 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1992 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1993 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1994 o> readline() -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1995 o> 1\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1996 o> readline() -> 1: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1997 o> \n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1998 sending pushkey command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1999 i> write(8) -> 8: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2000 i> pushkey\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2001 i> write(7) -> 7: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2002 i> key 40\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2003 i> write(40) -> 40: 7127240a084fd9dc86fe8d1f98e26229161ec82b |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2004 i> write(12) -> 12: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2005 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2006 i> write(6) -> 6: phases |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2007 i> write(6) -> 6: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2008 i> new 1\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2009 i> write(1) -> 1: 0 |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2010 i> write(6) -> 6: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2011 i> old 1\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2012 i> write(1) -> 1: 1 |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2013 i> flush() -> None |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2014 o> bufferedreadline() -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2015 o> 2\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2016 o> bufferedread(2) -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2017 o> 1\n |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
2018 response: True |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2019 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2020 testing ssh2 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2021 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2022 i> write(171) -> 171: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2023 i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2024 i> hello\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2025 i> between\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2026 i> pairs 81\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2027 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2028 i> flush() -> None |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2029 o> readline() -> 62: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2030 o> upgraded * exp-ssh-v2-0001\n (glob) |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2031 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
2032 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
2033 o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2034 o> read(1) -> 1: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2035 o> \n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2036 sending pushkey command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2037 i> write(8) -> 8: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2038 i> pushkey\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2039 i> write(7) -> 7: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2040 i> key 40\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2041 i> write(40) -> 40: 7127240a084fd9dc86fe8d1f98e26229161ec82b |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2042 i> write(12) -> 12: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2043 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2044 i> write(6) -> 6: phases |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2045 i> write(6) -> 6: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2046 i> new 1\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2047 i> write(1) -> 1: 0 |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2048 i> write(6) -> 6: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2049 i> old 1\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2050 i> write(1) -> 1: 1 |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2051 i> flush() -> None |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2052 o> bufferedreadline() -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2053 o> 2\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2054 o> bufferedread(2) -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2055 o> 1\n |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
2056 response: True |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2057 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2058 $ hg phase . |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2059 4: public |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2060 |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2061 $ cd .. |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2062 |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2063 Test batching of requests |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2064 |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2065 $ hg init batching |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2066 $ cd batching |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2067 $ echo 0 > foo |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2068 $ hg add foo |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2069 $ hg -q commit -m initial |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2070 $ hg phase --public |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2071 $ echo 1 > foo |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2072 $ hg commit -m 'commit 1' |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2073 $ hg -q up 0 |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2074 $ echo 2 > foo |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2075 $ hg commit -m 'commit 2' |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2076 created new head |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2077 $ hg book -r 1 bookA |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2078 $ hg book -r 2 bookB |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2079 |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2080 $ debugwireproto << EOF |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2081 > batchbegin |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2082 > command heads |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2083 > command listkeys |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2084 > namespace bookmarks |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2085 > command listkeys |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2086 > namespace phases |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2087 > batchsubmit |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2088 > EOF |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2089 testing ssh1 |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2090 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2091 i> write(104) -> 104: |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2092 i> hello\n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2093 i> between\n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2094 i> pairs 81\n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2095 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2096 i> flush() -> None |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2097 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
2098 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
2099 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
2100 o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2101 o> readline() -> 2: |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2102 o> 1\n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2103 o> readline() -> 1: |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2104 o> \n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2105 sending batch with 3 sub-commands |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2106 i> write(6) -> 6: |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2107 i> batch\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2108 i> write(4) -> 4: |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2109 i> * 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2110 i> write(8) -> 8: |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2111 i> cmds 61\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2112 i> write(61) -> 61: heads ;listkeys namespace=bookmarks;listkeys namespace=phases |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2113 i> flush() -> None |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2114 o> bufferedreadline() -> 4: |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2115 o> 278\n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2116 o> bufferedread(278) -> 278: |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2117 o> bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2118 o> ;bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2119 o> bookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6;4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2120 o> bfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2121 o> publishing\tTrue |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2122 response #0: bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2123 response #1: bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\nbookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6 |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2124 response #2: 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\nbfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\npublishing\tTrue |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2125 |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2126 testing ssh2 |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2127 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2128 i> write(171) -> 171: |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2129 i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2130 i> hello\n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2131 i> between\n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2132 i> pairs 81\n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2133 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2134 i> flush() -> None |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2135 o> readline() -> 62: |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2136 o> upgraded * exp-ssh-v2-0001\n (glob) |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2137 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
2138 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
2139 o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2140 o> read(1) -> 1: |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2141 o> \n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2142 sending batch with 3 sub-commands |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2143 i> write(6) -> 6: |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2144 i> batch\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2145 i> write(4) -> 4: |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2146 i> * 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2147 i> write(8) -> 8: |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2148 i> cmds 61\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2149 i> write(61) -> 61: heads ;listkeys namespace=bookmarks;listkeys namespace=phases |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2150 i> flush() -> None |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2151 o> bufferedreadline() -> 4: |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2152 o> 278\n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2153 o> bufferedread(278) -> 278: |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2154 o> bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2155 o> ;bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2156 o> bookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6;4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2157 o> bfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2158 o> publishing\tTrue |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2159 response #0: bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2160 response #1: bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\nbookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6 |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2161 response #2: 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\nbfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\npublishing\tTrue |