Mercurial > hg
annotate tests/test-ssh-proto.t @ 39083:8f83a953dddf
revlog: skip over empty revision when looking for delta base
There is no point in keeping an empty revision in the middle of a chain since
they won't contribute any data. So we filter them out when looking for a valid
base delta.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 27 Jul 2018 19:09:41 +0200 |
parents | 565074cc9ac6 |
children | 0f549da54379 |
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 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1157 e> read(-1) -> 42: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1158 e> cannot upgrade protocols multiple times\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1159 e> -\n |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1160 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1161 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
|
1162 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1163 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1164 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1165 > upgrade\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1166 > readline |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1167 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1168 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1169 i> write(8) -> 8: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1170 i> upgrade\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1171 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1172 o> 0\n |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1173 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1174 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1175 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1176 > upgrade token\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1177 > readline |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1178 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1179 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1180 i> write(14) -> 14: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1181 i> upgrade token\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1182 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1183 o> 0\n |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1184 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1185 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1186 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1187 > upgrade token foo=bar extra-token\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1188 > readline |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1189 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1190 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1191 i> write(34) -> 34: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1192 i> upgrade token foo=bar extra-token\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1193 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1194 o> 0\n |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1195 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1196 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
|
1197 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1198 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1199 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1200 > upgrade this-is-some-token proto=unknown1,unknown2\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1201 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1202 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1203 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1204 > readline |
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 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1207 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1208 > pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1209 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1210 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1211 > readline |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1212 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1213 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1214 i> write(51) -> 51: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1215 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
|
1216 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1217 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1218 i> write(6) -> 6: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1219 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1220 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1221 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1222 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1223 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
|
1224 i> write(98) -> 98: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1225 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1226 i> pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1227 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1228 o> readline() -> 2: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1229 o> 1\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1230 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1231 o> \n |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1232 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1233 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
|
1234 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1235 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1236 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1237 > upgrade token proto=exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1238 > invalid\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1239 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1240 > readavailable |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1241 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1242 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1243 i> write(44) -> 44: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1244 i> upgrade token proto=exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1245 i> invalid\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1246 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1247 o> \n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1248 e> read(-1) -> 46: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1249 e> malformed handshake protocol: missing hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1250 e> -\n |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1251 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1252 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1253 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1254 > upgrade token proto=exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1255 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1256 > invalid\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1257 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1258 > readavailable |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1259 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1260 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1261 i> write(50) -> 50: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1262 i> upgrade token proto=exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1263 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1264 i> invalid\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1265 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1266 o> \n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1267 e> read(-1) -> 48: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1268 e> malformed handshake protocol: missing between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1269 e> -\n |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1270 |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1271 $ hg debugwireproto --localssh --peer raw << EOF |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1272 > raw |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1273 > upgrade token proto=exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1274 > hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1275 > between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1276 > invalid\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1277 > readline |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1278 > readavailable |
36215
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36076
diff
changeset
|
1279 > EOF |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1280 using raw connection to peer |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1281 i> write(58) -> 58: |
36528
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1282 i> upgrade token proto=exp-ssh-v2-0001\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1283 i> hello\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1284 i> between\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1285 i> invalid\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1286 o> readline() -> 1: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1287 o> \n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1288 e> read(-1) -> 49: |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1289 e> malformed handshake protocol: missing pairs 81\n |
72e487851a53
debugcommands: add debugwireproto command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36527
diff
changeset
|
1290 e> -\n |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1291 |
36611
6906547c8476
wireproto: don't expose legacy commands to version 2 of wire protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36532
diff
changeset
|
1292 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
|
1293 |
37294
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1294 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
|
1295 |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1296 $ 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
|
1297 > command branches |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1298 > nodes 0000000000000000000000000000000000000000 |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1299 > EOF |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1300 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
|
1301 sending branches command |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1302 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
|
1303 |
37294
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1304 $ 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
|
1305 > command changegroup |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1306 > roots 0000000000000000000000000000000000000000 |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1307 > EOF |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1308 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
|
1309 sending changegroup command |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1310 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
|
1311 |
37294
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1312 $ 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
|
1313 > command changegroupsubset |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1314 > bases 0000000000000000000000000000000000000000 |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1315 > heads 0000000000000000000000000000000000000000 |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1316 > EOF |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1317 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
|
1318 sending changegroupsubset command |
27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37053
diff
changeset
|
1319 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
|
1320 |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1321 $ cd .. |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1322 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1323 Test listkeys for listing namespaces |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1324 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1325 $ hg init empty |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1326 $ cd empty |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1327 $ debugwireproto << EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1328 > command listkeys |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1329 > namespace namespaces |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1330 > EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1331 testing ssh1 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1332 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1333 i> write(104) -> 104: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1334 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1335 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1336 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1337 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1338 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1339 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1340 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1341 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1342 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
|
1343 o> readline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1344 o> 1\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1345 o> readline() -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1346 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1347 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1348 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1349 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1350 i> write(13) -> 13: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1351 i> namespace 10\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1352 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
|
1353 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1354 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1355 o> 30\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1356 o> bufferedread(30) -> 30: |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1357 o> bookmarks\t\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1358 o> namespaces\t\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1359 o> phases\t |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1360 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
|
1361 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1362 testing ssh2 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1363 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1364 i> write(171) -> 171: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1365 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
|
1366 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1367 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1368 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1369 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1370 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1371 o> readline() -> 62: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1372 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
|
1373 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1374 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1375 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
|
1376 o> read(1) -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1377 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1378 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1379 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1380 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1381 i> write(13) -> 13: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1382 i> namespace 10\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1383 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
|
1384 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1385 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1386 o> 30\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1387 o> bufferedread(30) -> 30: |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1388 o> bookmarks\t\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1389 o> namespaces\t\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1390 o> phases\t |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1391 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
|
1392 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1393 $ cd .. |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1394 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1395 Test listkeys for bookmarks |
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 $ hg init bookmarkrepo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1398 $ cd bookmarkrepo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1399 $ echo 0 > foo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1400 $ hg add foo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1401 $ hg -q commit -m initial |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1402 $ echo 1 > foo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1403 $ hg commit -m second |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1404 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1405 With no bookmarks set |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1406 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1407 $ debugwireproto << EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1408 > command listkeys |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1409 > namespace bookmarks |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1410 > EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1411 testing ssh1 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1412 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1413 i> write(104) -> 104: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1414 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1415 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1416 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1417 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1418 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1419 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1420 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1421 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1422 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
|
1423 o> readline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1424 o> 1\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1425 o> readline() -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1426 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1427 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1428 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1429 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1430 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1431 i> namespace 9\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1432 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
|
1433 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1434 o> bufferedreadline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1435 o> 0\n |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1436 response: {} |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1437 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1438 testing ssh2 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1439 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1440 i> write(171) -> 171: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1441 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
|
1442 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1443 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1444 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1445 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1446 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1447 o> readline() -> 62: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1448 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
|
1449 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1450 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1451 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
|
1452 o> read(1) -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1453 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1454 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1455 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1456 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1457 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1458 i> namespace 9\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1459 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
|
1460 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1461 o> bufferedreadline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1462 o> 0\n |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1463 response: {} |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1464 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1465 With a single bookmark set |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1466 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1467 $ hg book -r 0 bookA |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1468 $ debugwireproto << EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1469 > command listkeys |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1470 > namespace bookmarks |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1471 > EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1472 testing ssh1 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1473 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1474 i> write(104) -> 104: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1475 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1476 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1477 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1478 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1479 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1480 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1481 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1482 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1483 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
|
1484 o> readline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1485 o> 1\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1486 o> readline() -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1487 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1488 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1489 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1490 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1491 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1492 i> namespace 9\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1493 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
|
1494 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1495 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1496 o> 46\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1497 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
|
1498 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
|
1499 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1500 testing ssh2 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1501 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1502 i> write(171) -> 171: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1503 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
|
1504 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1505 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1506 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1507 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1508 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1509 o> readline() -> 62: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1510 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
|
1511 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1512 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1513 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
|
1514 o> read(1) -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1515 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1516 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1517 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1518 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1519 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1520 i> namespace 9\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1521 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
|
1522 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1523 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1524 o> 46\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1525 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
|
1526 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
|
1527 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1528 With multiple bookmarks set |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1529 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1530 $ hg book -r 1 bookB |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1531 $ debugwireproto << EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1532 > command listkeys |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1533 > namespace bookmarks |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1534 > EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1535 testing ssh1 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1536 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1537 i> write(104) -> 104: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1538 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1539 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1540 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1541 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1542 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1543 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1544 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1545 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1546 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
|
1547 o> readline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1548 o> 1\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1549 o> readline() -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1550 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1551 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1552 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1553 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1554 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1555 i> namespace 9\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1556 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
|
1557 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1558 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1559 o> 93\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1560 o> bufferedread(93) -> 93: |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1561 o> bookA\t68986213bd4485ea51533535e3fc9e78007a711f\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1562 o> bookB\t1880f3755e2e52e3199e0ee5638128b08642f34d |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1563 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
|
1564 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1565 testing ssh2 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1566 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1567 i> write(171) -> 171: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1568 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
|
1569 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1570 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1571 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1572 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1573 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1574 o> readline() -> 62: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1575 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
|
1576 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1577 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1578 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
|
1579 o> read(1) -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1580 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1581 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1582 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1583 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1584 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1585 i> namespace 9\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1586 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
|
1587 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1588 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1589 o> 93\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1590 o> bufferedread(93) -> 93: |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1591 o> bookA\t68986213bd4485ea51533535e3fc9e78007a711f\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1592 o> bookB\t1880f3755e2e52e3199e0ee5638128b08642f34d |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1593 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
|
1594 |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1595 Test pushkey for bookmarks |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1596 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1597 $ debugwireproto << EOF |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1598 > command pushkey |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1599 > namespace bookmarks |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1600 > key remote |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1601 > old |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1602 > new 68986213bd4485ea51533535e3fc9e78007a711f |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1603 > EOF |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1604 testing ssh1 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1605 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1606 i> write(104) -> 104: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1607 i> hello\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1608 i> between\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1609 i> pairs 81\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1610 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1611 i> flush() -> None |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1612 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1613 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1614 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1615 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
|
1616 o> readline() -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1617 o> 1\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1618 o> readline() -> 1: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1619 o> \n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1620 sending pushkey command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1621 i> write(8) -> 8: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1622 i> pushkey\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1623 i> write(6) -> 6: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1624 i> key 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1625 i> write(6) -> 6: remote |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1626 i> write(12) -> 12: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1627 i> namespace 9\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1628 i> write(9) -> 9: bookmarks |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1629 i> write(7) -> 7: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1630 i> new 40\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1631 i> write(40) -> 40: 68986213bd4485ea51533535e3fc9e78007a711f |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1632 i> write(6) -> 6: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1633 i> old 0\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1634 i> flush() -> None |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1635 o> bufferedreadline() -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1636 o> 2\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1637 o> bufferedread(2) -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1638 o> 1\n |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1639 response: True |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1640 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1641 testing ssh2 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1642 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1643 i> write(171) -> 171: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1644 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
|
1645 i> hello\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1646 i> between\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1647 i> pairs 81\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1648 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1649 i> flush() -> None |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1650 o> readline() -> 62: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1651 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
|
1652 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1653 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1654 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
|
1655 o> read(1) -> 1: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1656 o> \n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1657 sending pushkey command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1658 i> write(8) -> 8: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1659 i> pushkey\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1660 i> write(6) -> 6: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1661 i> key 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1662 i> write(6) -> 6: remote |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1663 i> write(12) -> 12: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1664 i> namespace 9\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1665 i> write(9) -> 9: bookmarks |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1666 i> write(7) -> 7: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1667 i> new 40\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1668 i> write(40) -> 40: 68986213bd4485ea51533535e3fc9e78007a711f |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1669 i> write(6) -> 6: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1670 i> old 0\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1671 i> flush() -> None |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1672 o> bufferedreadline() -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1673 o> 2\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1674 o> bufferedread(2) -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1675 o> 1\n |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1676 response: True |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1677 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1678 $ hg bookmarks |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1679 bookA 0:68986213bd44 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1680 bookB 1:1880f3755e2e |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1681 remote 0:68986213bd44 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1682 |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1683 $ cd .. |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1684 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1685 Test listkeys for phases |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1686 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1687 $ hg init phasesrepo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1688 $ cd phasesrepo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1689 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1690 Phases on empty repo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1691 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1692 $ debugwireproto << EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1693 > command listkeys |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1694 > namespace phases |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1695 > EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1696 testing ssh1 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1697 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1698 i> write(104) -> 104: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1699 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1700 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1701 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1702 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1703 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1704 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1705 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1706 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1707 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
|
1708 o> readline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1709 o> 1\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1710 o> readline() -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1711 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1712 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1713 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1714 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1715 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1716 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1717 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
|
1718 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1719 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1720 o> 15\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1721 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
|
1722 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
|
1723 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1724 testing ssh2 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1725 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1726 i> write(171) -> 171: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1727 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
|
1728 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1729 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1730 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1731 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1732 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1733 o> readline() -> 62: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1734 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
|
1735 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1736 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1737 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
|
1738 o> read(1) -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1739 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1740 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1741 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1742 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1743 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1744 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1745 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
|
1746 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1747 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1748 o> 15\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1749 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
|
1750 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
|
1751 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1752 Create some commits |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1753 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1754 $ echo 0 > foo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1755 $ hg add foo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1756 $ hg -q commit -m initial |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1757 $ hg phase --public |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1758 $ echo 1 > foo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1759 $ 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
|
1760 $ echo 2 > foo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1761 $ 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
|
1762 $ hg -q up 0 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1763 $ echo 1a > foo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1764 $ 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
|
1765 created new head |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1766 $ echo 2a > foo |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1767 $ 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
|
1768 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1769 Two draft heads |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1770 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1771 $ debugwireproto << EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1772 > command listkeys |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1773 > namespace phases |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1774 > EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1775 testing ssh1 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1776 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1777 i> write(104) -> 104: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1778 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1779 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1780 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1781 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1782 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1783 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1784 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1785 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1786 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
|
1787 o> readline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1788 o> 1\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1789 o> readline() -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1790 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1791 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1792 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1793 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1794 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1795 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1796 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
|
1797 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1798 o> bufferedreadline() -> 4: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1799 o> 101\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1800 o> bufferedread(101) -> 101: |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1801 o> 20b8a89289d80036e6c4e87c2083e3bea1586637\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1802 o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1803 o> publishing\tTrue |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1804 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
|
1805 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1806 testing ssh2 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1807 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1808 i> write(171) -> 171: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1809 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
|
1810 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1811 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1812 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1813 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1814 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1815 o> readline() -> 62: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1816 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
|
1817 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1818 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1819 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
|
1820 o> read(1) -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1821 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1822 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1823 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1824 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1825 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1826 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1827 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
|
1828 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1829 o> bufferedreadline() -> 4: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1830 o> 101\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1831 o> bufferedread(101) -> 101: |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1832 o> 20b8a89289d80036e6c4e87c2083e3bea1586637\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1833 o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1834 o> publishing\tTrue |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1835 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
|
1836 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1837 Single draft head |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1838 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1839 $ hg phase --public -r 2 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1840 $ debugwireproto << EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1841 > command listkeys |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1842 > namespace phases |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1843 > EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1844 testing ssh1 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1845 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1846 i> write(104) -> 104: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1847 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1848 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1849 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1850 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1851 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1852 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1853 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1854 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1855 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
|
1856 o> readline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1857 o> 1\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1858 o> readline() -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1859 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1860 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1861 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1862 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1863 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1864 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1865 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
|
1866 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1867 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1868 o> 58\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1869 o> bufferedread(58) -> 58: |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1870 o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1871 o> publishing\tTrue |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1872 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
|
1873 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1874 testing ssh2 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1875 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1876 i> write(171) -> 171: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1877 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
|
1878 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1879 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1880 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1881 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1882 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1883 o> readline() -> 62: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1884 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
|
1885 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1886 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1887 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
|
1888 o> read(1) -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1889 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1890 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1891 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1892 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1893 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1894 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1895 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
|
1896 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1897 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1898 o> 58\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1899 o> bufferedread(58) -> 58: |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1900 o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1901 o> publishing\tTrue |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
1902 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
|
1903 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1904 All public heads |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1905 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1906 $ hg phase --public -r 4 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1907 $ debugwireproto << EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1908 > command listkeys |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1909 > namespace phases |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1910 > EOF |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1911 testing ssh1 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1912 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1913 i> write(104) -> 104: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1914 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1915 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1916 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1917 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1918 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1919 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1920 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1921 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1922 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
|
1923 o> readline() -> 2: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1924 o> 1\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1925 o> readline() -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1926 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1927 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1928 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1929 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1930 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1931 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1932 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
|
1933 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1934 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1935 o> 15\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1936 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
|
1937 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
|
1938 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1939 testing ssh2 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1940 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1941 i> write(171) -> 171: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1942 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
|
1943 i> hello\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1944 i> between\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1945 i> pairs 81\n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1946 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1947 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1948 o> readline() -> 62: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1949 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
|
1950 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1951 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1952 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
|
1953 o> read(1) -> 1: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1954 o> \n |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1955 sending listkeys command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1956 i> write(9) -> 9: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1957 i> listkeys\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1958 i> write(12) -> 12: |
36530
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1959 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1960 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
|
1961 i> flush() -> None |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1962 o> bufferedreadline() -> 3: |
bde0bd50f368
debugcommands: allow sending of simple commands with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36528
diff
changeset
|
1963 o> 15\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
1964 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
|
1965 response: {b'publishing': b'True'} |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
1966 |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1967 Setting public phase via pushkey |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1968 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1969 $ hg phase --draft --force -r . |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1970 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1971 $ debugwireproto << EOF |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1972 > command pushkey |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1973 > namespace phases |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1974 > key 7127240a084fd9dc86fe8d1f98e26229161ec82b |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1975 > old 1 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1976 > new 0 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1977 > EOF |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1978 testing ssh1 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1979 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1980 i> write(104) -> 104: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1981 i> hello\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1982 i> between\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1983 i> pairs 81\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1984 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1985 i> flush() -> None |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1986 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1987 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
1988 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
1989 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
|
1990 o> readline() -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1991 o> 1\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1992 o> readline() -> 1: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1993 o> \n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1994 sending pushkey command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1995 i> write(8) -> 8: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1996 i> pushkey\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1997 i> write(7) -> 7: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
1998 i> key 40\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1999 i> write(40) -> 40: 7127240a084fd9dc86fe8d1f98e26229161ec82b |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2000 i> write(12) -> 12: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2001 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2002 i> write(6) -> 6: phases |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2003 i> write(6) -> 6: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2004 i> new 1\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2005 i> write(1) -> 1: 0 |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2006 i> write(6) -> 6: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2007 i> old 1\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2008 i> write(1) -> 1: 1 |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2009 i> flush() -> None |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2010 o> bufferedreadline() -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2011 o> 2\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2012 o> bufferedread(2) -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2013 o> 1\n |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
2014 response: True |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2015 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2016 testing ssh2 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2017 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2018 i> write(171) -> 171: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2019 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
|
2020 i> hello\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2021 i> between\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2022 i> pairs 81\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2023 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2024 i> flush() -> None |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2025 o> readline() -> 62: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2026 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
|
2027 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
2028 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
2029 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
|
2030 o> read(1) -> 1: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2031 o> \n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2032 sending pushkey command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2033 i> write(8) -> 8: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2034 i> pushkey\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2035 i> write(7) -> 7: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2036 i> key 40\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2037 i> write(40) -> 40: 7127240a084fd9dc86fe8d1f98e26229161ec82b |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2038 i> write(12) -> 12: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2039 i> namespace 6\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2040 i> write(6) -> 6: phases |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2041 i> write(6) -> 6: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2042 i> new 1\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2043 i> write(1) -> 1: 0 |
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2044 i> write(6) -> 6: |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2045 i> old 1\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2046 i> write(1) -> 1: 1 |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2047 i> flush() -> None |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2048 o> bufferedreadline() -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2049 o> 2\n |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2050 o> bufferedread(2) -> 2: |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2051 o> 1\n |
37652
fe8c6f9f2914
debugcommands: use command executor for invoking commands
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
2052 response: True |
36532
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2053 |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2054 $ hg phase . |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2055 4: public |
1138e5c0fbc9
tests: add wire protocol tests for pushkey
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36531
diff
changeset
|
2056 |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2057 $ cd .. |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2058 |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2059 Test batching of requests |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2060 |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2061 $ hg init batching |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2062 $ cd batching |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2063 $ echo 0 > foo |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2064 $ hg add foo |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2065 $ hg -q commit -m initial |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2066 $ hg phase --public |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2067 $ echo 1 > foo |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2068 $ hg commit -m 'commit 1' |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2069 $ hg -q up 0 |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2070 $ echo 2 > foo |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2071 $ hg commit -m 'commit 2' |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2072 created new head |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2073 $ hg book -r 1 bookA |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2074 $ hg book -r 2 bookB |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2075 |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2076 $ debugwireproto << EOF |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2077 > batchbegin |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2078 > command heads |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2079 > command listkeys |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2080 > namespace bookmarks |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2081 > command listkeys |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2082 > namespace phases |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2083 > batchsubmit |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2084 > EOF |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2085 testing ssh1 |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2086 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2087 i> write(104) -> 104: |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2088 i> hello\n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2089 i> between\n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2090 i> pairs 81\n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2091 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2092 i> flush() -> None |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2093 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
2094 o> 413\n |
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
2095 o> readline() -> 413: |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
2096 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
|
2097 o> readline() -> 2: |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2098 o> 1\n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2099 o> readline() -> 1: |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2100 o> \n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2101 sending batch with 3 sub-commands |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2102 i> write(6) -> 6: |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2103 i> batch\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2104 i> write(4) -> 4: |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2105 i> * 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2106 i> write(8) -> 8: |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2107 i> cmds 61\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2108 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
|
2109 i> flush() -> None |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2110 o> bufferedreadline() -> 4: |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2111 o> 278\n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2112 o> bufferedread(278) -> 278: |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2113 o> bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2114 o> ;bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2115 o> bookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6;4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2116 o> bfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2117 o> publishing\tTrue |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2118 response #0: bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2119 response #1: bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\nbookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6 |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2120 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
|
2121 |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2122 testing ssh2 |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2123 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2124 i> write(171) -> 171: |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2125 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
|
2126 i> hello\n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2127 i> between\n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2128 i> pairs 81\n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2129 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2130 i> flush() -> None |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2131 o> readline() -> 62: |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2132 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
|
2133 o> readline() -> 4: |
37393
afcfdf53e4b5
wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents:
37322
diff
changeset
|
2134 o> 412\n |
37413
33af46d639b4
wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents:
37393
diff
changeset
|
2135 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
|
2136 o> read(1) -> 1: |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2137 o> \n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2138 sending batch with 3 sub-commands |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2139 i> write(6) -> 6: |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2140 i> batch\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2141 i> write(4) -> 4: |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2142 i> * 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2143 i> write(8) -> 8: |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2144 i> cmds 61\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
2145 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
|
2146 i> flush() -> None |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2147 o> bufferedreadline() -> 4: |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2148 o> 278\n |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2149 o> bufferedread(278) -> 278: |
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2150 o> bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2151 o> ;bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2152 o> bookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6;4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2153 o> bfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\n |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2154 o> publishing\tTrue |
36531
097ad1079192
debugcommands: support for sending "batch" requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36530
diff
changeset
|
2155 response #0: bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
37322
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2156 response #1: bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\nbookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6 |
a67fd1fe5109
stringutil: drop escapedata() in favor of escapestr()
Yuya Nishihara <yuya@tcha.org>
parents:
37300
diff
changeset
|
2157 response #2: 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\nbfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\npublishing\tTrue |