Mercurial > hg
annotate tests/test-ssh-proto-unbundle.t @ 51640:4281f225c980 stable
Added tag 6.7.4 for changeset a1a011d4b148
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Wed, 12 Jun 2024 11:26:57 +0200 |
parents | 42d2b31cee0b |
children |
rev | line source |
---|---|
46880
8bf21b3869cd
persistent-nodemap: disable it unconditionally for test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46633
diff
changeset
|
1 persistent-nodemap is not enabled by default. It is not relevant for this test so disable it. |
8bf21b3869cd
persistent-nodemap: disable it unconditionally for test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46633
diff
changeset
|
2 |
8bf21b3869cd
persistent-nodemap: disable it unconditionally for test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46633
diff
changeset
|
3 $ cat << EOF >> $HGRCPATH |
8bf21b3869cd
persistent-nodemap: disable it unconditionally for test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46633
diff
changeset
|
4 > [format] |
8bf21b3869cd
persistent-nodemap: disable it unconditionally for test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46633
diff
changeset
|
5 > use-persistent-nodemap = no |
8bf21b3869cd
persistent-nodemap: disable it unconditionally for test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46633
diff
changeset
|
6 > EOF |
8bf21b3869cd
persistent-nodemap: disable it unconditionally for test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46633
diff
changeset
|
7 |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
8 $ debugwireproto() { |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
9 > commands=`cat -` |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
10 > echo 'testing ssh1' |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
11 > tip=`hg log -r tip -T '{node}'` |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
12 > echo "${commands}" | hg --verbose debugwireproto --localssh --noreadstderr |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
13 > if [ -n "$1" ]; then |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
14 > hg --config extensions.strip= strip --no-backup -r "all() - ::${tip}" |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
15 > fi |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
16 > } |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
17 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
18 Generate some bundle files |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
19 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
20 $ hg init repo |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
21 $ cd repo |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
22 $ echo 0 > foo |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
23 $ hg -q commit -A -m initial |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
24 $ hg bundle --all -t none-v1 ../initial.v1.hg |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
25 1 changesets found |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
26 $ cd .. |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
27 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
28 Test pushing bundle1 payload to a server with bundle1 disabled |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
29 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
30 $ hg init no-bundle1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
31 $ cd no-bundle1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
32 $ cat > .hg/hgrc << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
33 > [server] |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
34 > bundle1 = false |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
35 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
36 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
37 $ debugwireproto << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
38 > command unbundle |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
39 > # This is "force" in hex. |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
40 > heads 666f726365 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
41 > PUSHFILE ../initial.v1.hg |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
42 > readavailable |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
43 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
44 testing ssh1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
45 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
46 i> write(104) -> 104: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
47 i> hello\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
48 i> between\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
49 i> pairs 81\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
50 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
51 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
52 o> readline() -> 4: |
48646
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
53 o> \d+\\n (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
54 o> readline\(\) -> \d+: (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
55 o> capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re) |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
56 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
57 o> 1\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
58 o> readline() -> 1: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
59 o> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
60 sending unbundle command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
61 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
62 i> unbundle\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
63 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
64 i> heads 10\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
65 i> write(10) -> 10: 666f726365 |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
66 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
67 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
68 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
69 i> write(4) -> 4: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
70 i> 426\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
71 i> write(426) -> 426: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
72 i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
73 i> test\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
74 i> 0 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
75 i> foo\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
76 i> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
77 i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
78 i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
79 i> \x00\x00\x00\x00\x00\x00\x00\x00 |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
80 i> write(2) -> 2: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
81 i> 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
82 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
83 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
84 o> 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
85 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
86 o> 1\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
87 o> read(1) -> 1: 0 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
88 result: 0 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
89 remote output: |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
90 e> read(-1) -> 115: |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
91 e> abort: incompatible Mercurial client; bundle2 required\n |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
92 e> (see https://www.mercurial-scm.org/wiki/IncompatibleClient)\n |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
93 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
94 $ cd .. |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
95 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
96 Create a pretxnchangegroup hook that fails. Give it multiple modes of printing |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
97 output so we can test I/O capture and behavior. |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
98 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
99 Test pushing to a server that has a pretxnchangegroup Python hook that fails |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
100 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
101 $ cat > $TESTTMP/failhook << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
102 > import sys |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
103 > def hook1line(ui, repo, **kwargs): |
36660
11b279a75bf1
tests: fix inline extension bytes in test-ssh-proto-unbundle.t
Augie Fackler <augie@google.com>
parents:
36631
diff
changeset
|
104 > ui.write(b'ui.write 1 line\n') |
37943
45a669bad421
test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents:
37413
diff
changeset
|
105 > ui.flush() |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
106 > return 1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
107 > def hook2lines(ui, repo, **kwargs): |
36660
11b279a75bf1
tests: fix inline extension bytes in test-ssh-proto-unbundle.t
Augie Fackler <augie@google.com>
parents:
36631
diff
changeset
|
108 > ui.write(b'ui.write 2 lines 1\n') |
11b279a75bf1
tests: fix inline extension bytes in test-ssh-proto-unbundle.t
Augie Fackler <augie@google.com>
parents:
36631
diff
changeset
|
109 > ui.write(b'ui.write 2 lines 2\n') |
37943
45a669bad421
test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents:
37413
diff
changeset
|
110 > ui.flush() |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
111 > return 1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
112 > def hook1lineflush(ui, repo, **kwargs): |
36660
11b279a75bf1
tests: fix inline extension bytes in test-ssh-proto-unbundle.t
Augie Fackler <augie@google.com>
parents:
36631
diff
changeset
|
113 > ui.write(b'ui.write 1 line flush\n') |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
114 > ui.flush() |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
115 > return 1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
116 > def hookmultiflush(ui, repo, **kwargs): |
36660
11b279a75bf1
tests: fix inline extension bytes in test-ssh-proto-unbundle.t
Augie Fackler <augie@google.com>
parents:
36631
diff
changeset
|
117 > ui.write(b'ui.write 1st\n') |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
118 > ui.flush() |
36660
11b279a75bf1
tests: fix inline extension bytes in test-ssh-proto-unbundle.t
Augie Fackler <augie@google.com>
parents:
36631
diff
changeset
|
119 > ui.write(b'ui.write 2nd\n') |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
120 > ui.flush() |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
121 > return 1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
122 > def hookwriteandwriteerr(ui, repo, **kwargs): |
36660
11b279a75bf1
tests: fix inline extension bytes in test-ssh-proto-unbundle.t
Augie Fackler <augie@google.com>
parents:
36631
diff
changeset
|
123 > ui.write(b'ui.write 1\n') |
11b279a75bf1
tests: fix inline extension bytes in test-ssh-proto-unbundle.t
Augie Fackler <augie@google.com>
parents:
36631
diff
changeset
|
124 > ui.write_err(b'ui.write_err 1\n') |
11b279a75bf1
tests: fix inline extension bytes in test-ssh-proto-unbundle.t
Augie Fackler <augie@google.com>
parents:
36631
diff
changeset
|
125 > ui.write(b'ui.write 2\n') |
11b279a75bf1
tests: fix inline extension bytes in test-ssh-proto-unbundle.t
Augie Fackler <augie@google.com>
parents:
36631
diff
changeset
|
126 > ui.write_err(b'ui.write_err 2\n') |
37943
45a669bad421
test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents:
37413
diff
changeset
|
127 > ui.flush() |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
128 > return 1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
129 > def hookprintstdout(ui, repo, **kwargs): |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
130 > print('printed line') |
37943
45a669bad421
test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents:
37413
diff
changeset
|
131 > sys.stdout.flush() |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
132 > return 1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
133 > def hookprintandwrite(ui, repo, **kwargs): |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
134 > print('print 1') |
37943
45a669bad421
test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents:
37413
diff
changeset
|
135 > sys.stdout.flush() |
36660
11b279a75bf1
tests: fix inline extension bytes in test-ssh-proto-unbundle.t
Augie Fackler <augie@google.com>
parents:
36631
diff
changeset
|
136 > ui.write(b'ui.write 1\n') |
37943
45a669bad421
test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents:
37413
diff
changeset
|
137 > ui.flush() |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
138 > print('print 2') |
37943
45a669bad421
test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents:
37413
diff
changeset
|
139 > sys.stdout.flush() |
36660
11b279a75bf1
tests: fix inline extension bytes in test-ssh-proto-unbundle.t
Augie Fackler <augie@google.com>
parents:
36631
diff
changeset
|
140 > ui.write(b'ui.write 2\n') |
37943
45a669bad421
test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents:
37413
diff
changeset
|
141 > ui.flush() |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
142 > return 1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
143 > def hookprintstderrandstdout(ui, repo, **kwargs): |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
144 > print('stdout 1') |
37943
45a669bad421
test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents:
37413
diff
changeset
|
145 > sys.stdout.flush() |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
146 > print('stderr 1', file=sys.stderr) |
37943
45a669bad421
test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents:
37413
diff
changeset
|
147 > sys.stderr.flush() |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
148 > print('stdout 2') |
37943
45a669bad421
test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents:
37413
diff
changeset
|
149 > sys.stdout.flush() |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
150 > print('stderr 2', file=sys.stderr) |
37943
45a669bad421
test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents:
37413
diff
changeset
|
151 > sys.stderr.flush() |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
152 > return 1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
153 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
154 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
155 $ hg init failrepo |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
156 $ cd failrepo |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
157 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
158 ui.write() in hook is redirected to stderr |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
159 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
160 $ cat > .hg/hgrc << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
161 > [hooks] |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
162 > pretxnchangegroup.fail = python:$TESTTMP/failhook:hook1line |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
163 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
164 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
165 $ debugwireproto << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
166 > command unbundle |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
167 > # This is "force" in hex. |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
168 > heads 666f726365 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
169 > PUSHFILE ../initial.v1.hg |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
170 > readavailable |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
171 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
172 testing ssh1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
173 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
174 i> write(104) -> 104: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
175 i> hello\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
176 i> between\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
177 i> pairs 81\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
178 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
179 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
180 o> readline() -> 4: |
48646
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
181 o> \d+\\n (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
182 o> readline\(\) -> \d+: (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
183 o> capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re) |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
184 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
185 o> 1\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
186 o> readline() -> 1: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
187 o> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
188 sending unbundle command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
189 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
190 i> unbundle\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
191 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
192 i> heads 10\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
193 i> write(10) -> 10: 666f726365 |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
194 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
195 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
196 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
197 i> write(4) -> 4: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
198 i> 426\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
199 i> write(426) -> 426: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
200 i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
201 i> test\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
202 i> 0 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
203 i> foo\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
204 i> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
205 i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
206 i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
207 i> \x00\x00\x00\x00\x00\x00\x00\x00 |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
208 i> write(2) -> 2: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
209 i> 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
210 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
211 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
212 o> 0\n |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
213 o> readline() -> 2: |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
214 o> 1\n |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
215 o> read(1) -> 1: 0 |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
216 result: 0 |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
217 remote output: |
42897
d7304434390f
changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
40919
diff
changeset
|
218 e> read(-1) -> 151: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
219 e> adding changesets\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
220 e> adding manifests\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
221 e> adding file changes\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
222 e> ui.write 1 line\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
223 e> transaction abort!\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
224 e> rollback completed\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
225 e> abort: pretxnchangegroup.fail hook failed\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
226 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
227 And a variation that writes multiple lines using ui.write |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
228 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
229 $ cat > .hg/hgrc << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
230 > [hooks] |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
231 > pretxnchangegroup.fail = python:$TESTTMP/failhook:hook2lines |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
232 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
233 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
234 $ debugwireproto << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
235 > command unbundle |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
236 > # This is "force" in hex. |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
237 > heads 666f726365 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
238 > PUSHFILE ../initial.v1.hg |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
239 > readavailable |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
240 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
241 testing ssh1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
242 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
243 i> write(104) -> 104: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
244 i> hello\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
245 i> between\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
246 i> pairs 81\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
247 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
248 i> flush() -> None |
48646
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
249 o> readline\(\) -> \d+: (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
250 o> \d+\\n (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
251 o> readline\(\) -> \d+: (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
252 o> capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re) |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
253 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
254 o> 1\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
255 o> readline() -> 1: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
256 o> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
257 sending unbundle command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
258 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
259 i> unbundle\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
260 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
261 i> heads 10\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
262 i> write(10) -> 10: 666f726365 |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
263 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
264 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
265 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
266 i> write(4) -> 4: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
267 i> 426\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
268 i> write(426) -> 426: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
269 i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
270 i> test\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
271 i> 0 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
272 i> foo\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
273 i> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
274 i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
275 i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
276 i> \x00\x00\x00\x00\x00\x00\x00\x00 |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
277 i> write(2) -> 2: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
278 i> 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
279 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
280 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
281 o> 0\n |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
282 o> readline() -> 2: |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
283 o> 1\n |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
284 o> read(1) -> 1: 0 |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
285 result: 0 |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
286 remote output: |
42897
d7304434390f
changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
40919
diff
changeset
|
287 e> read(-1) -> 173: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
288 e> adding changesets\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
289 e> adding manifests\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
290 e> adding file changes\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
291 e> ui.write 2 lines 1\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
292 e> ui.write 2 lines 2\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
293 e> transaction abort!\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
294 e> rollback completed\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
295 e> abort: pretxnchangegroup.fail hook failed\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
296 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
297 And a variation that does a ui.flush() after writing output |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
298 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
299 $ cat > .hg/hgrc << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
300 > [hooks] |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
301 > pretxnchangegroup.fail = python:$TESTTMP/failhook:hook1lineflush |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
302 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
303 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
304 $ debugwireproto << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
305 > command unbundle |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
306 > # This is "force" in hex. |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
307 > heads 666f726365 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
308 > PUSHFILE ../initial.v1.hg |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
309 > readavailable |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
310 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
311 testing ssh1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
312 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
313 i> write(104) -> 104: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
314 i> hello\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
315 i> between\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
316 i> pairs 81\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
317 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
318 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
319 o> readline() -> 4: |
48646
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
320 o> \d+\\n (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
321 o> readline\(\) -> \d+: (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
322 o> capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re) |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
323 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
324 o> 1\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
325 o> readline() -> 1: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
326 o> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
327 sending unbundle command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
328 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
329 i> unbundle\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
330 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
331 i> heads 10\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
332 i> write(10) -> 10: 666f726365 |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
333 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
334 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
335 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
336 i> write(4) -> 4: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
337 i> 426\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
338 i> write(426) -> 426: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
339 i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
340 i> test\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
341 i> 0 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
342 i> foo\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
343 i> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
344 i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
345 i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
346 i> \x00\x00\x00\x00\x00\x00\x00\x00 |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
347 i> write(2) -> 2: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
348 i> 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
349 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
350 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
351 o> 0\n |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
352 o> readline() -> 2: |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
353 o> 1\n |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
354 o> read(1) -> 1: 0 |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
355 result: 0 |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
356 remote output: |
42897
d7304434390f
changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
40919
diff
changeset
|
357 e> read(-1) -> 157: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
358 e> adding changesets\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
359 e> adding manifests\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
360 e> adding file changes\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
361 e> ui.write 1 line flush\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
362 e> transaction abort!\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
363 e> rollback completed\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
364 e> abort: pretxnchangegroup.fail hook failed\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
365 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
366 Multiple writes + flush |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
367 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
368 $ cat > .hg/hgrc << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
369 > [hooks] |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
370 > pretxnchangegroup.fail = python:$TESTTMP/failhook:hookmultiflush |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
371 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
372 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
373 $ debugwireproto << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
374 > command unbundle |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
375 > # This is "force" in hex. |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
376 > heads 666f726365 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
377 > PUSHFILE ../initial.v1.hg |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
378 > readavailable |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
379 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
380 testing ssh1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
381 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
382 i> write(104) -> 104: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
383 i> hello\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
384 i> between\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
385 i> pairs 81\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
386 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
387 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
388 o> readline() -> 4: |
48646
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
389 o> \d+\\n (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
390 o> readline\(\) -> \d+: (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
391 o> capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re) |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
392 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
393 o> 1\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
394 o> readline() -> 1: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
395 o> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
396 sending unbundle command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
397 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
398 i> unbundle\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
399 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
400 i> heads 10\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
401 i> write(10) -> 10: 666f726365 |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
402 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
403 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
404 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
405 i> write(4) -> 4: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
406 i> 426\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
407 i> write(426) -> 426: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
408 i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
409 i> test\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
410 i> 0 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
411 i> foo\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
412 i> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
413 i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
414 i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
415 i> \x00\x00\x00\x00\x00\x00\x00\x00 |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
416 i> write(2) -> 2: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
417 i> 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
418 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
419 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
420 o> 0\n |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
421 o> readline() -> 2: |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
422 o> 1\n |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
423 o> read(1) -> 1: 0 |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
424 result: 0 |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
425 remote output: |
42897
d7304434390f
changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
40919
diff
changeset
|
426 e> read(-1) -> 161: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
427 e> adding changesets\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
428 e> adding manifests\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
429 e> adding file changes\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
430 e> ui.write 1st\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
431 e> ui.write 2nd\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
432 e> transaction abort!\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
433 e> rollback completed\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
434 e> abort: pretxnchangegroup.fail hook failed\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
435 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
436 ui.write() + ui.write_err() output is captured |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
437 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
438 $ cat > .hg/hgrc << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
439 > [hooks] |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
440 > pretxnchangegroup.fail = python:$TESTTMP/failhook:hookwriteandwriteerr |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
441 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
442 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
443 $ debugwireproto << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
444 > command unbundle |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
445 > # This is "force" in hex. |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
446 > heads 666f726365 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
447 > PUSHFILE ../initial.v1.hg |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
448 > readavailable |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
449 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
450 testing ssh1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
451 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
452 i> write(104) -> 104: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
453 i> hello\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
454 i> between\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
455 i> pairs 81\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
456 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
457 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
458 o> readline() -> 4: |
48646
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
459 o> \d+\\n (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
460 o> readline\(\) -> \d+: (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
461 o> capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re) |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
462 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
463 o> 1\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
464 o> readline() -> 1: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
465 o> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
466 sending unbundle command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
467 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
468 i> unbundle\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
469 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
470 i> heads 10\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
471 i> write(10) -> 10: 666f726365 |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
472 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
473 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
474 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
475 i> write(4) -> 4: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
476 i> 426\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
477 i> write(426) -> 426: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
478 i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
479 i> test\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
480 i> 0 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
481 i> foo\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
482 i> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
483 i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
484 i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
485 i> \x00\x00\x00\x00\x00\x00\x00\x00 |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
486 i> write(2) -> 2: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
487 i> 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
488 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
489 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
490 o> 0\n |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
491 o> readline() -> 2: |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
492 o> 1\n |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
493 o> read(1) -> 1: 0 |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
494 result: 0 |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
495 remote output: |
42897
d7304434390f
changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
40919
diff
changeset
|
496 e> read(-1) -> 187: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
497 e> adding changesets\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
498 e> adding manifests\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
499 e> adding file changes\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
500 e> ui.write 1\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
501 e> ui.write_err 1\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
502 e> ui.write 2\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
503 e> ui.write_err 2\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
504 e> transaction abort!\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
505 e> rollback completed\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
506 e> abort: pretxnchangegroup.fail hook failed\n |
48526 | 507 |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
508 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
509 print() output is captured |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
510 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
511 $ cat > .hg/hgrc << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
512 > [hooks] |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
513 > pretxnchangegroup.fail = python:$TESTTMP/failhook:hookprintstdout |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
514 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
515 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
516 $ debugwireproto << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
517 > command unbundle |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
518 > # This is "force" in hex. |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
519 > heads 666f726365 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
520 > PUSHFILE ../initial.v1.hg |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
521 > readavailable |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
522 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
523 testing ssh1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
524 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
525 i> write(104) -> 104: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
526 i> hello\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
527 i> between\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
528 i> pairs 81\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
529 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
530 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
531 o> readline() -> 4: |
48646
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
532 o> \d+\\n (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
533 o> readline\(\) -> \d+: (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
534 o> capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re) |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
535 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
536 o> 1\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
537 o> readline() -> 1: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
538 o> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
539 sending unbundle command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
540 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
541 i> unbundle\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
542 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
543 i> heads 10\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
544 i> write(10) -> 10: 666f726365 |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
545 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
546 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
547 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
548 i> write(4) -> 4: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
549 i> 426\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
550 i> write(426) -> 426: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
551 i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
552 i> test\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
553 i> 0 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
554 i> foo\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
555 i> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
556 i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
557 i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
558 i> \x00\x00\x00\x00\x00\x00\x00\x00 |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
559 i> write(2) -> 2: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
560 i> 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
561 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
562 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
563 o> 0\n |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
564 o> readline() -> 2: |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
565 o> 1\n |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
566 o> read(1) -> 1: 0 |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
567 result: 0 |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
568 remote output: |
42897
d7304434390f
changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
40919
diff
changeset
|
569 e> read(-1) -> 148: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
570 e> adding changesets\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
571 e> adding manifests\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
572 e> adding file changes\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
573 e> printed line\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
574 e> transaction abort!\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
575 e> rollback completed\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
576 e> abort: pretxnchangegroup.fail hook failed\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
577 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
578 Mixed print() and ui.write() are both captured |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
579 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
580 $ cat > .hg/hgrc << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
581 > [hooks] |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
582 > pretxnchangegroup.fail = python:$TESTTMP/failhook:hookprintandwrite |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
583 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
584 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
585 $ debugwireproto << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
586 > command unbundle |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
587 > # This is "force" in hex. |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
588 > heads 666f726365 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
589 > PUSHFILE ../initial.v1.hg |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
590 > readavailable |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
591 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
592 testing ssh1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
593 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
594 i> write(104) -> 104: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
595 i> hello\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
596 i> between\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
597 i> pairs 81\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
598 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
599 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
600 o> readline() -> 4: |
48646
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
601 o> \d+\\n (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
602 o> readline\(\) -> \d+: (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
603 o> capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re) |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
604 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
605 o> 1\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
606 o> readline() -> 1: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
607 o> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
608 sending unbundle command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
609 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
610 i> unbundle\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
611 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
612 i> heads 10\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
613 i> write(10) -> 10: 666f726365 |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
614 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
615 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
616 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
617 i> write(4) -> 4: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
618 i> 426\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
619 i> write(426) -> 426: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
620 i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
621 i> test\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
622 i> 0 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
623 i> foo\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
624 i> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
625 i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
626 i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
627 i> \x00\x00\x00\x00\x00\x00\x00\x00 |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
628 i> write(2) -> 2: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
629 i> 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
630 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
631 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
632 o> 0\n |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
633 o> readline() -> 2: |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
634 o> 1\n |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
635 o> read(1) -> 1: 0 |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
636 result: 0 |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
637 remote output: |
42897
d7304434390f
changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
40919
diff
changeset
|
638 e> read(-1) -> 173: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
639 e> adding changesets\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
640 e> adding manifests\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
641 e> adding file changes\n |
37943
45a669bad421
test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents:
37413
diff
changeset
|
642 e> print 1\n |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
643 e> ui.write 1\n |
37943
45a669bad421
test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents:
37413
diff
changeset
|
644 e> print 2\n |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
645 e> ui.write 2\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
646 e> transaction abort!\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
647 e> rollback completed\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
648 e> abort: pretxnchangegroup.fail hook failed\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
649 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
650 print() to stdout and stderr both get captured |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
651 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
652 $ cat > .hg/hgrc << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
653 > [hooks] |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
654 > pretxnchangegroup.fail = python:$TESTTMP/failhook:hookprintstderrandstdout |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
655 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
656 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
657 $ debugwireproto << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
658 > command unbundle |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
659 > # This is "force" in hex. |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
660 > heads 666f726365 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
661 > PUSHFILE ../initial.v1.hg |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
662 > readavailable |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
663 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
664 testing ssh1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
665 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
666 i> write(104) -> 104: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
667 i> hello\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
668 i> between\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
669 i> pairs 81\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
670 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
671 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
672 o> readline() -> 4: |
48646
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
673 o> \d+\\n (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
674 o> readline\(\) -> \d+: (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
675 o> capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re) |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
676 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
677 o> 1\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
678 o> readline() -> 1: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
679 o> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
680 sending unbundle command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
681 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
682 i> unbundle\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
683 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
684 i> heads 10\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
685 i> write(10) -> 10: 666f726365 |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
686 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
687 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
688 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
689 i> write(4) -> 4: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
690 i> 426\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
691 i> write(426) -> 426: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
692 i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
693 i> test\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
694 i> 0 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
695 i> foo\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
696 i> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
697 i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
698 i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
699 i> \x00\x00\x00\x00\x00\x00\x00\x00 |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
700 i> write(2) -> 2: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
701 i> 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
702 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
703 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
704 o> 0\n |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
705 o> readline() -> 2: |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
706 o> 1\n |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
707 o> read(1) -> 1: 0 |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
708 result: 0 |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
709 remote output: |
42897
d7304434390f
changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
40919
diff
changeset
|
710 e> read(-1) -> 171: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
711 e> adding changesets\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
712 e> adding manifests\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
713 e> adding file changes\n |
37943
45a669bad421
test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents:
37413
diff
changeset
|
714 e> stdout 1\n |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
715 e> stderr 1\n |
37943
45a669bad421
test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents:
37413
diff
changeset
|
716 e> stdout 2\n |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
717 e> stderr 2\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
718 e> transaction abort!\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
719 e> rollback completed\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
720 e> abort: pretxnchangegroup.fail hook failed\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
721 |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
722 Shell hook writing to stdout has output captured |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
723 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
724 $ cat > $TESTTMP/hook.sh << EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
725 > echo 'stdout 1' |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
726 > echo 'stdout 2' |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
727 > exit 1 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
728 > EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
729 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
730 $ cat > .hg/hgrc << EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
731 > [hooks] |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
732 > pretxnchangegroup.fail = sh $TESTTMP/hook.sh |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
733 > EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
734 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
735 $ debugwireproto << EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
736 > command unbundle |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
737 > # This is "force" in hex. |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
738 > heads 666f726365 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
739 > PUSHFILE ../initial.v1.hg |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
740 > readavailable |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
741 > EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
742 testing ssh1 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
743 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
744 i> write(104) -> 104: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
745 i> hello\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
746 i> between\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
747 i> pairs 81\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
748 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
749 i> flush() -> None |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
750 o> readline() -> 4: |
48646
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
751 o> \d+\\n (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
752 o> readline\(\) -> \d+: (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
753 o> capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re) |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
754 o> readline() -> 2: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
755 o> 1\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
756 o> readline() -> 1: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
757 o> \n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
758 sending unbundle command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
759 i> write(9) -> 9: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
760 i> unbundle\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
761 i> write(9) -> 9: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
762 i> heads 10\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
763 i> write(10) -> 10: 666f726365 |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
764 i> flush() -> None |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
765 o> readline() -> 2: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
766 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
767 i> write(4) -> 4: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
768 i> 426\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
769 i> write(426) -> 426: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
770 i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
771 i> test\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
772 i> 0 0\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
773 i> foo\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
774 i> \n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
775 i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
776 i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
777 i> \x00\x00\x00\x00\x00\x00\x00\x00 |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
778 i> write(2) -> 2: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
779 i> 0\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
780 i> flush() -> None |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
781 o> readline() -> 2: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
782 o> 0\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
783 o> readline() -> 2: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
784 o> 1\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
785 o> read(1) -> 1: 0 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
786 result: 0 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
787 remote output: |
42897
d7304434390f
changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
40919
diff
changeset
|
788 e> read(-1) -> 167: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
789 e> adding changesets\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
790 e> adding manifests\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
791 e> adding file changes\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
792 e> stdout 1\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
793 e> stdout 2\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
794 e> transaction abort!\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
795 e> rollback completed\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
796 e> abort: pretxnchangegroup.fail hook exited with status 1\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
797 Shell hook writing to stderr has output captured |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
798 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
799 $ cat > $TESTTMP/hook.sh << EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
800 > echo 'stderr 1' 1>&2 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
801 > echo 'stderr 2' 1>&2 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
802 > exit 1 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
803 > EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
804 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
805 $ debugwireproto << EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
806 > command unbundle |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
807 > # This is "force" in hex. |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
808 > heads 666f726365 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
809 > PUSHFILE ../initial.v1.hg |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
810 > readavailable |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
811 > EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
812 testing ssh1 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
813 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
814 i> write(104) -> 104: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
815 i> hello\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
816 i> between\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
817 i> pairs 81\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
818 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
819 i> flush() -> None |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
820 o> readline() -> 4: |
48646
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
821 o> \d+\\n (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
822 o> readline\(\) -> \d+: (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
823 o> capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re) |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
824 o> readline() -> 2: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
825 o> 1\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
826 o> readline() -> 1: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
827 o> \n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
828 sending unbundle command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
829 i> write(9) -> 9: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
830 i> unbundle\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
831 i> write(9) -> 9: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
832 i> heads 10\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
833 i> write(10) -> 10: 666f726365 |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
834 i> flush() -> None |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
835 o> readline() -> 2: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
836 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
837 i> write(4) -> 4: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
838 i> 426\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
839 i> write(426) -> 426: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
840 i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
841 i> test\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
842 i> 0 0\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
843 i> foo\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
844 i> \n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
845 i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
846 i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
847 i> \x00\x00\x00\x00\x00\x00\x00\x00 |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
848 i> write(2) -> 2: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
849 i> 0\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
850 i> flush() -> None |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
851 o> readline() -> 2: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
852 o> 0\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
853 o> readline() -> 2: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
854 o> 1\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
855 o> read(1) -> 1: 0 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
856 result: 0 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
857 remote output: |
42897
d7304434390f
changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
40919
diff
changeset
|
858 e> read(-1) -> 167: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
859 e> adding changesets\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
860 e> adding manifests\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
861 e> adding file changes\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
862 e> stderr 1\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
863 e> stderr 2\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
864 e> transaction abort!\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
865 e> rollback completed\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
866 e> abort: pretxnchangegroup.fail hook exited with status 1\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
867 Shell hook writing to stdout and stderr has output captured |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
868 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
869 $ cat > $TESTTMP/hook.sh << EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
870 > echo 'stdout 1' |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
871 > echo 'stderr 1' 1>&2 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
872 > echo 'stdout 2' |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
873 > echo 'stderr 2' 1>&2 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
874 > exit 1 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
875 > EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
876 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
877 $ debugwireproto << EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
878 > command unbundle |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
879 > # This is "force" in hex. |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
880 > heads 666f726365 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
881 > PUSHFILE ../initial.v1.hg |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
882 > readavailable |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
883 > EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
884 testing ssh1 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
885 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
886 i> write(104) -> 104: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
887 i> hello\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
888 i> between\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
889 i> pairs 81\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
890 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
891 i> flush() -> None |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
892 o> readline() -> 4: |
48646
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
893 o> \d+\\n (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
894 o> readline\(\) -> \d+: (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
895 o> capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re) |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
896 o> readline() -> 2: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
897 o> 1\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
898 o> readline() -> 1: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
899 o> \n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
900 sending unbundle command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
901 i> write(9) -> 9: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
902 i> unbundle\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
903 i> write(9) -> 9: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
904 i> heads 10\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
905 i> write(10) -> 10: 666f726365 |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
906 i> flush() -> None |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
907 o> readline() -> 2: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
908 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
909 i> write(4) -> 4: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
910 i> 426\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
911 i> write(426) -> 426: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
912 i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
913 i> test\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
914 i> 0 0\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
915 i> foo\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
916 i> \n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
917 i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
918 i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
919 i> \x00\x00\x00\x00\x00\x00\x00\x00 |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
920 i> write(2) -> 2: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
921 i> 0\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
922 i> flush() -> None |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
923 o> readline() -> 2: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
924 o> 0\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
925 o> readline() -> 2: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
926 o> 1\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
927 o> read(1) -> 1: 0 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
928 result: 0 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
929 remote output: |
42897
d7304434390f
changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
40919
diff
changeset
|
930 e> read(-1) -> 185: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
931 e> adding changesets\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
932 e> adding manifests\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
933 e> adding file changes\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
934 e> stdout 1\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
935 e> stderr 1\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
936 e> stdout 2\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
937 e> stderr 2\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
938 e> transaction abort!\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
939 e> rollback completed\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
940 e> abort: pretxnchangegroup.fail hook exited with status 1\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
941 Shell and Python hooks writing to stdout and stderr have output captured |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
942 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
943 $ cat > $TESTTMP/hook.sh << EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
944 > echo 'shell stdout 1' |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
945 > echo 'shell stderr 1' 1>&2 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
946 > echo 'shell stdout 2' |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
947 > echo 'shell stderr 2' 1>&2 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
948 > exit 0 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
949 > EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
950 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
951 $ cat > .hg/hgrc << EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
952 > [hooks] |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
953 > pretxnchangegroup.a = sh $TESTTMP/hook.sh |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
954 > pretxnchangegroup.b = python:$TESTTMP/failhook:hookprintstderrandstdout |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
955 > EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
956 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
957 $ debugwireproto << EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
958 > command unbundle |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
959 > # This is "force" in hex. |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
960 > heads 666f726365 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
961 > PUSHFILE ../initial.v1.hg |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
962 > readavailable |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
963 > EOF |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
964 testing ssh1 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
965 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
966 i> write(104) -> 104: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
967 i> hello\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
968 i> between\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
969 i> pairs 81\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
970 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
971 i> flush() -> None |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
972 o> readline() -> 4: |
48646
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
973 o> \d+\\n (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
974 o> readline\(\) -> \d+: (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
975 o> capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re) |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
976 o> readline() -> 2: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
977 o> 1\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
978 o> readline() -> 1: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
979 o> \n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
980 sending unbundle command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
981 i> write(9) -> 9: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
982 i> unbundle\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
983 i> write(9) -> 9: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
984 i> heads 10\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
985 i> write(10) -> 10: 666f726365 |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
986 i> flush() -> None |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
987 o> readline() -> 2: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
988 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
989 i> write(4) -> 4: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
990 i> 426\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
991 i> write(426) -> 426: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
992 i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
993 i> test\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
994 i> 0 0\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
995 i> foo\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
996 i> \n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
997 i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
998 i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
999 i> \x00\x00\x00\x00\x00\x00\x00\x00 |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
1000 i> write(2) -> 2: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1001 i> 0\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1002 i> flush() -> None |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1003 o> readline() -> 2: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1004 o> 0\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1005 o> readline() -> 2: |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1006 o> 1\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1007 o> read(1) -> 1: 0 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1008 result: 0 |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1009 remote output: |
42897
d7304434390f
changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
40919
diff
changeset
|
1010 e> read(-1) -> 228: |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1011 e> adding changesets\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1012 e> adding manifests\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1013 e> adding file changes\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1014 e> shell stdout 1\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1015 e> shell stderr 1\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1016 e> shell stdout 2\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1017 e> shell stderr 2\n |
37943
45a669bad421
test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents:
37413
diff
changeset
|
1018 e> stdout 1\n |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1019 e> stderr 1\n |
37943
45a669bad421
test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents:
37413
diff
changeset
|
1020 e> stdout 2\n |
36614
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1021 e> stderr 2\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1022 e> transaction abort!\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1023 e> rollback completed\n |
1fa02265fae2
tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36612
diff
changeset
|
1024 e> abort: pretxnchangegroup.b hook failed\n |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1025 $ cd .. |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1026 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1027 Pushing a bundle1 with no output |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1028 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1029 $ hg init simplerepo |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1030 $ cd simplerepo |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1031 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1032 $ debugwireproto 1 << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1033 > command unbundle |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1034 > # This is "force" in hex. |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1035 > heads 666f726365 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1036 > PUSHFILE ../initial.v1.hg |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
1037 > readavailable |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1038 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1039 testing ssh1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1040 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
1041 i> write(104) -> 104: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1042 i> hello\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1043 i> between\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1044 i> pairs 81\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1045 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1046 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1047 o> readline() -> 4: |
48646
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
1048 o> \d+\\n (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
1049 o> readline\(\) -> \d+: (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
1050 o> capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re) |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1051 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1052 o> 1\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1053 o> readline() -> 1: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1054 o> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1055 sending unbundle command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
1056 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1057 i> unbundle\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
1058 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1059 i> heads 10\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
1060 i> write(10) -> 10: 666f726365 |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1061 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1062 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1063 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
1064 i> write(4) -> 4: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1065 i> 426\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
1066 i> write(426) -> 426: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1067 i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1068 i> test\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1069 i> 0 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1070 i> foo\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1071 i> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1072 i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1073 i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1074 i> \x00\x00\x00\x00\x00\x00\x00\x00 |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
1075 i> write(2) -> 2: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1076 i> 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1077 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1078 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1079 o> 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1080 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1081 o> 1\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1082 o> read(1) -> 1: 1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1083 result: 1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1084 remote output: |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
1085 e> read(-1) -> 100: |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
1086 e> adding changesets\n |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
1087 e> adding manifests\n |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
1088 e> adding file changes\n |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
1089 e> added 1 changesets with 1 changes to 1 files\n |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1090 $ cd .. |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1091 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1092 Pushing a bundle1 with ui.write() and ui.write_err() |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1093 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1094 $ cat > $TESTTMP/hook << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1095 > def hookuiwrite(ui, repo, **kwargs): |
36660
11b279a75bf1
tests: fix inline extension bytes in test-ssh-proto-unbundle.t
Augie Fackler <augie@google.com>
parents:
36631
diff
changeset
|
1096 > ui.write(b'ui.write 1\n') |
11b279a75bf1
tests: fix inline extension bytes in test-ssh-proto-unbundle.t
Augie Fackler <augie@google.com>
parents:
36631
diff
changeset
|
1097 > ui.write_err(b'ui.write_err 1\n') |
11b279a75bf1
tests: fix inline extension bytes in test-ssh-proto-unbundle.t
Augie Fackler <augie@google.com>
parents:
36631
diff
changeset
|
1098 > ui.write(b'ui.write 2\n') |
11b279a75bf1
tests: fix inline extension bytes in test-ssh-proto-unbundle.t
Augie Fackler <augie@google.com>
parents:
36631
diff
changeset
|
1099 > ui.write_err(b'ui.write_err 2\n') |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1100 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1101 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1102 $ hg init uiwriterepo |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1103 $ cd uiwriterepo |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1104 $ cat > .hg/hgrc << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1105 > [hooks] |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1106 > pretxnchangegroup.hook = python:$TESTTMP/hook:hookuiwrite |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1107 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1108 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1109 $ debugwireproto 1 << EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1110 > command unbundle |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1111 > # This is "force" in hex. |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1112 > heads 666f726365 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1113 > PUSHFILE ../initial.v1.hg |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
1114 > readavailable |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1115 > EOF |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1116 testing ssh1 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1117 creating ssh peer from handshake results |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
1118 i> write(104) -> 104: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1119 i> hello\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1120 i> between\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1121 i> pairs 81\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1122 i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1123 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1124 o> readline() -> 4: |
48646
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
1125 o> \d+\\n (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
1126 o> readline\(\) -> \d+: (re) |
77f8f8caf859
stream-requirements: smoother matching in test-ssh-proto-unbundle.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48526
diff
changeset
|
1127 o> capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re) |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1128 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1129 o> 1\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1130 o> readline() -> 1: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1131 o> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1132 sending unbundle command |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
1133 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1134 i> unbundle\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
1135 i> write(9) -> 9: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1136 i> heads 10\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
1137 i> write(10) -> 10: 666f726365 |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1138 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1139 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1140 o> 0\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
1141 i> write(4) -> 4: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1142 i> 426\n |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
1143 i> write(426) -> 426: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1144 i> HG10UN\x00\x00\x00\x9eh\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>cba485ca3678256e044428f70f58291196f6e9de\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1145 i> test\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1146 i> 0 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1147 i> foo\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1148 i> \n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1149 i> initial\x00\x00\x00\x00\x00\x00\x00\x8d\xcb\xa4\x85\xca6x%n\x04D(\xf7\x0fX)\x11\x96\xf6\xe9\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1150 i> \x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00b6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00h\x98b\x13\xbdD\x85\xeaQS55\xe3\xfc\x9ex\x00zq\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x020\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1151 i> \x00\x00\x00\x00\x00\x00\x00\x00 |
36631
8395fddde46c
util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36628
diff
changeset
|
1152 i> write(2) -> 2: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1153 i> 0\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1154 i> flush() -> None |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1155 o> readline() -> 2: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1156 o> 0\n |
36608
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
1157 o> readline() -> 2: |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
1158 o> 1\n |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
1159 o> read(1) -> 1: 1 |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
1160 result: 1 |
1151c731686e
sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36534
diff
changeset
|
1161 remote output: |
36534
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1162 e> read(-1) -> 152: |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1163 e> adding changesets\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1164 e> adding manifests\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1165 e> adding file changes\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1166 e> ui.write 1\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1167 e> ui.write_err 1\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1168 e> ui.write 2\n |
5faeabb07cf5
debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1169 e> ui.write_err 2\n |
42897
d7304434390f
changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
40919
diff
changeset
|
1170 e> added 1 changesets with 1 changes to 1 files\n |