annotate tests/test-ssh-proto.t @ 37845:b4b7427b5786

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