tests/test-ssh-proto-unbundle.t
author Augie Fackler <augie@google.com>
Fri, 18 May 2018 19:52:35 -0400
changeset 38051 cab398cb9b49
parent 37943 45a669bad421
child 38314 565074cc9ac6
permissions -rw-r--r--
py3: whitelist two more passing tests observed by buildbot Differential Revision: https://phab.mercurial-scm.org/D3583
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     1
  $ cat > hgrc-sshv2 << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     2
  > %include $HGRCPATH
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     3
  > [experimental]
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     4
  > sshpeer.advertise-v2 = true
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     5
  > sshserver.support-v2 = true
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     6
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     7
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
  >   echo ""
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    17
  >   echo 'testing ssh2'
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    18
  >   echo "${commands}" | HGRCPATH=$TESTTMP/hgrc-sshv2 hg --verbose debugwireproto --localssh --noreadstderr
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    19
  >   if [ -n "$1" ]; then
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    20
  >       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
    21
  >   fi
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    22
  > }
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    23
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    24
Generate some bundle files
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    25
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    26
  $ hg init repo
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    27
  $ cd repo
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    28
  $ echo 0 > foo
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    29
  $ hg -q commit -A -m initial
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    30
  $ 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
    31
  1 changesets found
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    32
  $ cd ..
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    33
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    34
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
    35
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    36
  $ hg init no-bundle1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    37
  $ cd no-bundle1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    38
  $ cat > .hg/hgrc << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    39
  > [server]
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    40
  > bundle1 = false
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    41
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    42
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    43
  $ debugwireproto << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    44
  > command unbundle
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    45
  > # This is "force" in hex.
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    46
  >     heads 666f726365
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    47
  >     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
    48
  > readavailable
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    49
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    50
  testing ssh1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    51
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
    52
  i> write(104) -> 104:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    53
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    54
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    55
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    56
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    57
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    58
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
    59
  o>     413\n
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
    60
  o> readline() -> 413:
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
    61
  o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    62
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    63
  o>     1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    64
  o> readline() -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    65
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    66
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
    67
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    68
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
    69
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    70
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
    71
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    72
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    73
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    74
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
    75
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    76
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
    77
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    78
  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
    79
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    80
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    81
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    82
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    83
  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
    84
  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
    85
  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
    86
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    87
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    88
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    89
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    90
  o>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    91
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    92
  o>     1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    93
  o> read(1) -> 1: 0
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    94
  result: 0
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    95
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
    96
  o> read(-1) -> 0: 
36608
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
    97
  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
    98
  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
    99
  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
   100
  
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   101
  testing ssh2
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   102
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   103
  i> write(171) -> 171:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   104
  i>     upgrade * proto=exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   105
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   106
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   107
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   108
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   109
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   110
  o> readline() -> 62:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   111
  o>     upgraded * exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   112
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
   113
  o>     412\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
   114
  o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   115
  o> read(1) -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   116
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   117
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   118
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   119
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   120
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   121
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   122
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   123
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   124
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   125
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   126
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   127
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   128
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   129
  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
   130
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   131
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   132
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   133
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   134
  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
   135
  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
   136
  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
   137
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   138
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   139
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   140
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   141
  o>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   142
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   143
  o>     1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   144
  o> read(1) -> 1: 0
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   145
  result: 0
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   146
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
   147
  o> read(-1) -> 0: 
36608
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
   148
  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
   149
  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
   150
  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
   151
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   152
  $ cd ..
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   153
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   154
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
   155
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
   156
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   157
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
   158
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   159
  $ cat > $TESTTMP/failhook << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   160
  > from __future__ import print_function
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   161
  > import sys
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   162
  > 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
   163
  >     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
   164
  >     ui.flush()
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   165
  >     return 1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   166
  > 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
   167
  >     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
   168
  >     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
   169
  >     ui.flush()
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   170
  >     return 1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   171
  > 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
   172
  >     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
   173
  >     ui.flush()
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   174
  >     return 1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   175
  > 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
   176
  >     ui.write(b'ui.write 1st\n')
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   177
  >     ui.flush()
36660
11b279a75bf1 tests: fix inline extension bytes in test-ssh-proto-unbundle.t
Augie Fackler <augie@google.com>
parents: 36631
diff changeset
   178
  >     ui.write(b'ui.write 2nd\n')
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   179
  >     ui.flush()
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   180
  >     return 1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   181
  > 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
   182
  >     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
   183
  >     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
   184
  >     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
   185
  >     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
   186
  >     ui.flush()
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   187
  >     return 1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   188
  > def hookprintstdout(ui, repo, **kwargs):
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   189
  >     print('printed line')
37943
45a669bad421 test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents: 37413
diff changeset
   190
  >     sys.stdout.flush()
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   191
  >     return 1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   192
  > def hookprintandwrite(ui, repo, **kwargs):
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   193
  >     print('print 1')
37943
45a669bad421 test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents: 37413
diff changeset
   194
  >     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
   195
  >     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
   196
  >     ui.flush()
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   197
  >     print('print 2')
37943
45a669bad421 test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents: 37413
diff changeset
   198
  >     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
   199
  >     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
   200
  >     ui.flush()
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   201
  >     return 1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   202
  > def hookprintstderrandstdout(ui, repo, **kwargs):
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   203
  >     print('stdout 1')
37943
45a669bad421 test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents: 37413
diff changeset
   204
  >     sys.stdout.flush()
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   205
  >     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
   206
  >     sys.stderr.flush()
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   207
  >     print('stdout 2')
37943
45a669bad421 test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents: 37413
diff changeset
   208
  >     sys.stdout.flush()
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   209
  >     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
   210
  >     sys.stderr.flush()
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   211
  >     return 1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   212
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   213
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   214
  $ hg init failrepo
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   215
  $ cd failrepo
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   216
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   217
ui.write() in hook is redirected to stderr
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   218
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   219
  $ cat > .hg/hgrc << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   220
  > [hooks]
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   221
  > pretxnchangegroup.fail = python:$TESTTMP/failhook:hook1line
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   222
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   223
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   224
  $ debugwireproto << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   225
  > command unbundle
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   226
  > # This is "force" in hex.
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   227
  >     heads 666f726365
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   228
  >     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
   229
  > readavailable
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   230
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   231
  testing ssh1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   232
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   233
  i> write(104) -> 104:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   234
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   235
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   236
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   237
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   238
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   239
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
   240
  o>     413\n
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
   241
  o> readline() -> 413:
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
   242
  o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   243
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   244
  o>     1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   245
  o> readline() -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   246
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   247
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   248
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   249
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   250
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   251
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   252
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   253
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   254
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   255
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   256
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   257
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   258
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   259
  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
   260
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   261
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   262
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   263
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   264
  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
   265
  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
   266
  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
   267
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   268
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   269
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   270
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   271
  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
   272
  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
   273
  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
   274
  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
   275
  result: 0
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
   276
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
   277
  o> read(-1) -> 0: 
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   278
  e> read(-1) -> 196:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   279
  e>     adding changesets\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   280
  e>     adding manifests\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   281
  e>     adding file changes\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   282
  e>     added 1 changesets with 1 changes to 1 files\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   283
  e>     ui.write 1 line\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   284
  e>     transaction abort!\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   285
  e>     rollback completed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   286
  e>     abort: pretxnchangegroup.fail hook failed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   287
  
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   288
  testing ssh2
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   289
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   290
  i> write(171) -> 171:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   291
  i>     upgrade * proto=exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   292
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   293
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   294
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   295
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   296
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   297
  o> readline() -> 62:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   298
  o>     upgraded * exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   299
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
   300
  o>     412\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
   301
  o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   302
  o> read(1) -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   303
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   304
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   305
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   306
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   307
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   308
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   309
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   310
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   311
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   312
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   313
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   314
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   315
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   316
  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
   317
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   318
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   319
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   320
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   321
  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
   322
  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
   323
  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
   324
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   325
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   326
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   327
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   328
  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
   329
  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
   330
  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
   331
  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
   332
  result: 0
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
   333
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
   334
  o> read(-1) -> 0: 
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   335
  e> read(-1) -> 196:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   336
  e>     adding changesets\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   337
  e>     adding manifests\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   338
  e>     adding file changes\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   339
  e>     added 1 changesets with 1 changes to 1 files\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   340
  e>     ui.write 1 line\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   341
  e>     transaction abort!\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   342
  e>     rollback completed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   343
  e>     abort: pretxnchangegroup.fail hook failed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   344
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   345
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
   346
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   347
  $ cat > .hg/hgrc << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   348
  > [hooks]
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   349
  > pretxnchangegroup.fail = python:$TESTTMP/failhook:hook2lines
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   350
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   351
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   352
  $ debugwireproto << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   353
  > command unbundle
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   354
  > # This is "force" in hex.
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   355
  >     heads 666f726365
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   356
  >     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
   357
  > readavailable
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   358
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   359
  testing ssh1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   360
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   361
  i> write(104) -> 104:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   362
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   363
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   364
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   365
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   366
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   367
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
   368
  o>     413\n
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
   369
  o> readline() -> 413:
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
   370
  o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   371
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   372
  o>     1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   373
  o> readline() -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   374
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   375
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   376
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   377
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   378
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   379
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   380
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   381
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   382
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   383
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   384
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   385
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   386
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   387
  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
   388
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   389
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   390
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   391
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   392
  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
   393
  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
   394
  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
   395
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   396
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   397
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   398
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   399
  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
   400
  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
   401
  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
   402
  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
   403
  result: 0
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
   404
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
   405
  o> read(-1) -> 0: 
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   406
  e> read(-1) -> 218:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   407
  e>     adding changesets\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   408
  e>     adding manifests\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   409
  e>     adding file changes\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   410
  e>     added 1 changesets with 1 changes to 1 files\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   411
  e>     ui.write 2 lines 1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   412
  e>     ui.write 2 lines 2\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   413
  e>     transaction abort!\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   414
  e>     rollback completed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   415
  e>     abort: pretxnchangegroup.fail hook failed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   416
  
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   417
  testing ssh2
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   418
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   419
  i> write(171) -> 171:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   420
  i>     upgrade * proto=exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   421
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   422
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   423
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   424
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   425
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   426
  o> readline() -> 62:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   427
  o>     upgraded * exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   428
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
   429
  o>     412\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
   430
  o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   431
  o> read(1) -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   432
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   433
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   434
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   435
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   436
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   437
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   438
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   439
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   440
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   441
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   442
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   443
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   444
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   445
  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
   446
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   447
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   448
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   449
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   450
  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
   451
  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
   452
  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
   453
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   454
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   455
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   456
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   457
  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
   458
  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
   459
  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
   460
  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
   461
  result: 0
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
   462
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
   463
  o> read(-1) -> 0: 
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   464
  e> read(-1) -> 218:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   465
  e>     adding changesets\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   466
  e>     adding manifests\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   467
  e>     adding file changes\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   468
  e>     added 1 changesets with 1 changes to 1 files\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   469
  e>     ui.write 2 lines 1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   470
  e>     ui.write 2 lines 2\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   471
  e>     transaction abort!\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   472
  e>     rollback completed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   473
  e>     abort: pretxnchangegroup.fail hook failed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   474
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   475
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
   476
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   477
  $ cat > .hg/hgrc << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   478
  > [hooks]
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   479
  > pretxnchangegroup.fail = python:$TESTTMP/failhook:hook1lineflush
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   480
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   481
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   482
  $ debugwireproto << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   483
  > command unbundle
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   484
  > # This is "force" in hex.
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   485
  >     heads 666f726365
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   486
  >     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
   487
  > readavailable
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   488
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   489
  testing ssh1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   490
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   491
  i> write(104) -> 104:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   492
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   493
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   494
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   495
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   496
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   497
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
   498
  o>     413\n
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
   499
  o> readline() -> 413:
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
   500
  o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   501
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   502
  o>     1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   503
  o> readline() -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   504
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   505
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   506
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   507
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   508
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   509
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   510
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   511
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   512
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   513
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   514
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   515
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   516
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   517
  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
   518
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   519
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   520
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   521
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   522
  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
   523
  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
   524
  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
   525
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   526
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   527
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   528
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   529
  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
   530
  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
   531
  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
   532
  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
   533
  result: 0
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
   534
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
   535
  o> read(-1) -> 0: 
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   536
  e> read(-1) -> 202:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   537
  e>     adding changesets\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   538
  e>     adding manifests\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   539
  e>     adding file changes\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   540
  e>     added 1 changesets with 1 changes to 1 files\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   541
  e>     ui.write 1 line flush\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   542
  e>     transaction abort!\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   543
  e>     rollback completed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   544
  e>     abort: pretxnchangegroup.fail hook failed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   545
  
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   546
  testing ssh2
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   547
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   548
  i> write(171) -> 171:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   549
  i>     upgrade * proto=exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   550
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   551
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   552
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   553
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   554
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   555
  o> readline() -> 62:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   556
  o>     upgraded * exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   557
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
   558
  o>     412\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
   559
  o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   560
  o> read(1) -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   561
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   562
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   563
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   564
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   565
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   566
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   567
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   568
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   569
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   570
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   571
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   572
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   573
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   574
  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
   575
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   576
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   577
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   578
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   579
  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
   580
  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
   581
  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
   582
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   583
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   584
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   585
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   586
  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
   587
  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
   588
  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
   589
  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
   590
  result: 0
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
   591
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
   592
  o> read(-1) -> 0: 
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   593
  e> read(-1) -> 202:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   594
  e>     adding changesets\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   595
  e>     adding manifests\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   596
  e>     adding file changes\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   597
  e>     added 1 changesets with 1 changes to 1 files\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   598
  e>     ui.write 1 line flush\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   599
  e>     transaction abort!\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   600
  e>     rollback completed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   601
  e>     abort: pretxnchangegroup.fail hook failed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   602
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   603
Multiple writes + flush
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   604
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   605
  $ cat > .hg/hgrc << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   606
  > [hooks]
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   607
  > pretxnchangegroup.fail = python:$TESTTMP/failhook:hookmultiflush
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   608
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   609
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   610
  $ debugwireproto << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   611
  > command unbundle
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   612
  > # This is "force" in hex.
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   613
  >     heads 666f726365
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   614
  >     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
   615
  > readavailable
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   616
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   617
  testing ssh1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   618
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   619
  i> write(104) -> 104:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   620
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   621
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   622
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   623
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   624
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   625
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
   626
  o>     413\n
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
   627
  o> readline() -> 413:
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
   628
  o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   629
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   630
  o>     1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   631
  o> readline() -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   632
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   633
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   634
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   635
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   636
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   637
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   638
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   639
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   640
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   641
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   642
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   643
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   644
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   645
  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
   646
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   647
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   648
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   649
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   650
  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
   651
  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
   652
  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
   653
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   654
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   655
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   656
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   657
  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
   658
  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
   659
  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
   660
  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
   661
  result: 0
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
   662
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
   663
  o> read(-1) -> 0: 
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   664
  e> read(-1) -> 206:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   665
  e>     adding changesets\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   666
  e>     adding manifests\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   667
  e>     adding file changes\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   668
  e>     added 1 changesets with 1 changes to 1 files\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   669
  e>     ui.write 1st\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   670
  e>     ui.write 2nd\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   671
  e>     transaction abort!\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   672
  e>     rollback completed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   673
  e>     abort: pretxnchangegroup.fail hook failed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   674
  
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   675
  testing ssh2
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   676
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   677
  i> write(171) -> 171:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   678
  i>     upgrade * proto=exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   679
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   680
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   681
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   682
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   683
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   684
  o> readline() -> 62:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   685
  o>     upgraded * exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   686
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
   687
  o>     412\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
   688
  o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   689
  o> read(1) -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   690
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   691
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   692
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   693
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   694
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   695
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   696
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   697
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   698
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   699
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   700
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   701
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   702
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   703
  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
   704
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   705
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   706
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   707
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   708
  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
   709
  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
   710
  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
   711
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   712
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   713
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   714
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   715
  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
   716
  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
   717
  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
   718
  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
   719
  result: 0
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
   720
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
   721
  o> read(-1) -> 0: 
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   722
  e> read(-1) -> 206:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   723
  e>     adding changesets\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   724
  e>     adding manifests\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   725
  e>     adding file changes\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   726
  e>     added 1 changesets with 1 changes to 1 files\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   727
  e>     ui.write 1st\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   728
  e>     ui.write 2nd\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   729
  e>     transaction abort!\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   730
  e>     rollback completed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   731
  e>     abort: pretxnchangegroup.fail hook failed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   732
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   733
ui.write() + ui.write_err() output is captured
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   734
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   735
  $ cat > .hg/hgrc << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   736
  > [hooks]
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   737
  > pretxnchangegroup.fail = python:$TESTTMP/failhook:hookwriteandwriteerr
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   738
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   739
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   740
  $ debugwireproto << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   741
  > command unbundle
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   742
  > # This is "force" in hex.
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   743
  >     heads 666f726365
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   744
  >     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
   745
  > readavailable
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   746
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   747
  testing ssh1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   748
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   749
  i> write(104) -> 104:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   750
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   751
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   752
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   753
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   754
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   755
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
   756
  o>     413\n
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
   757
  o> readline() -> 413:
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
   758
  o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   759
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   760
  o>     1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   761
  o> readline() -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   762
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   763
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   764
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   765
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   766
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   767
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   768
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   769
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   770
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   771
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   772
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   773
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   774
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   775
  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
   776
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   777
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   778
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   779
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   780
  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
   781
  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
   782
  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
   783
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   784
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   785
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   786
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   787
  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
   788
  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
   789
  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
   790
  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
   791
  result: 0
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
   792
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
   793
  o> read(-1) -> 0: 
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   794
  e> read(-1) -> 232:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   795
  e>     adding changesets\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   796
  e>     adding manifests\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   797
  e>     adding file changes\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   798
  e>     added 1 changesets with 1 changes to 1 files\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   799
  e>     ui.write 1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   800
  e>     ui.write_err 1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   801
  e>     ui.write 2\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   802
  e>     ui.write_err 2\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   803
  e>     transaction abort!\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   804
  e>     rollback completed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   805
  e>     abort: pretxnchangegroup.fail hook failed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   806
  
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   807
  testing ssh2
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   808
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   809
  i> write(171) -> 171:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   810
  i>     upgrade * proto=exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   811
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   812
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   813
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   814
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   815
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   816
  o> readline() -> 62:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   817
  o>     upgraded * exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   818
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
   819
  o>     412\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
   820
  o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   821
  o> read(1) -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   822
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   823
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   824
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   825
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   826
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   827
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   828
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   829
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   830
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   831
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   832
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   833
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   834
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   835
  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
   836
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   837
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   838
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   839
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   840
  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
   841
  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
   842
  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
   843
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   844
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   845
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   846
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   847
  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
   848
  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
   849
  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
   850
  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
   851
  result: 0
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
   852
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
   853
  o> read(-1) -> 0: 
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   854
  e> read(-1) -> 232:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   855
  e>     adding changesets\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   856
  e>     adding manifests\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   857
  e>     adding file changes\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   858
  e>     added 1 changesets with 1 changes to 1 files\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   859
  e>     ui.write 1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   860
  e>     ui.write_err 1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   861
  e>     ui.write 2\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   862
  e>     ui.write_err 2\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   863
  e>     transaction abort!\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   864
  e>     rollback completed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   865
  e>     abort: pretxnchangegroup.fail hook failed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   866
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   867
print() output is captured
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   868
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   869
  $ cat > .hg/hgrc << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   870
  > [hooks]
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   871
  > pretxnchangegroup.fail = python:$TESTTMP/failhook:hookprintstdout
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   872
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   873
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   874
  $ debugwireproto << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   875
  > command unbundle
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   876
  > # This is "force" in hex.
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   877
  >     heads 666f726365
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   878
  >     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
   879
  > readavailable
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   880
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   881
  testing ssh1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   882
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   883
  i> write(104) -> 104:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   884
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   885
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   886
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   887
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   888
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   889
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
   890
  o>     413\n
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
   891
  o> readline() -> 413:
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
   892
  o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   893
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   894
  o>     1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   895
  o> readline() -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   896
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   897
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   898
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   899
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   900
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   901
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   902
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   903
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   904
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   905
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   906
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   907
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   908
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   909
  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
   910
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   911
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   912
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   913
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   914
  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
   915
  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
   916
  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
   917
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   918
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   919
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   920
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   921
  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
   922
  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
   923
  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
   924
  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
   925
  result: 0
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
   926
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
   927
  o> read(-1) -> 0: 
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   928
  e> read(-1) -> 193:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   929
  e>     adding changesets\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   930
  e>     adding manifests\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   931
  e>     adding file changes\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   932
  e>     added 1 changesets with 1 changes to 1 files\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   933
  e>     printed line\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   934
  e>     transaction abort!\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   935
  e>     rollback completed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   936
  e>     abort: pretxnchangegroup.fail hook failed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   937
  
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   938
  testing ssh2
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   939
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   940
  i> write(171) -> 171:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   941
  i>     upgrade * proto=exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   942
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   943
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   944
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   945
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   946
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   947
  o> readline() -> 62:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   948
  o>     upgraded * exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   949
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
   950
  o>     412\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
   951
  o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   952
  o> read(1) -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   953
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   954
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   955
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   956
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   957
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   958
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   959
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   960
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   961
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   962
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   963
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   964
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
   965
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   966
  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
   967
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   968
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   969
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   970
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   971
  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
   972
  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
   973
  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
   974
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   975
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   976
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   977
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   978
  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
   979
  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
   980
  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
   981
  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
   982
  result: 0
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
   983
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
   984
  o> read(-1) -> 0: 
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   985
  e> read(-1) -> 193:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   986
  e>     adding changesets\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   987
  e>     adding manifests\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   988
  e>     adding file changes\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   989
  e>     added 1 changesets with 1 changes to 1 files\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   990
  e>     printed line\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   991
  e>     transaction abort!\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   992
  e>     rollback completed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   993
  e>     abort: pretxnchangegroup.fail hook failed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   994
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   995
Mixed print() and ui.write() are both captured
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   996
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   997
  $ cat > .hg/hgrc << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   998
  > [hooks]
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   999
  > pretxnchangegroup.fail = python:$TESTTMP/failhook:hookprintandwrite
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1000
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1001
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1002
  $ debugwireproto << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1003
  > command unbundle
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1004
  > # This is "force" in hex.
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1005
  >     heads 666f726365
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1006
  >     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
  1007
  > readavailable
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1008
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1009
  testing ssh1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1010
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1011
  i> write(104) -> 104:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1012
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1013
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1014
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1015
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1016
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1017
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1018
  o>     413\n
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1019
  o> readline() -> 413:
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
  1020
  o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1021
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1022
  o>     1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1023
  o> readline() -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1024
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1025
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1026
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1027
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1028
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1029
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1030
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1031
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1032
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1033
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1034
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1035
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1036
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1037
  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
  1038
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1039
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1040
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1041
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1042
  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
  1043
  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
  1044
  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
  1045
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1046
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1047
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1048
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1049
  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
  1050
  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
  1051
  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
  1052
  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
  1053
  result: 0
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
  1054
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
  1055
  o> read(-1) -> 0: 
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1056
  e> read(-1) -> 218:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1057
  e>     adding changesets\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1058
  e>     adding manifests\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1059
  e>     adding file changes\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1060
  e>     added 1 changesets with 1 changes to 1 files\n
37943
45a669bad421 test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents: 37413
diff changeset
  1061
  e>     print 1\n
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1062
  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
  1063
  e>     print 2\n
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1064
  e>     ui.write 2\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1065
  e>     transaction abort!\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1066
  e>     rollback completed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1067
  e>     abort: pretxnchangegroup.fail hook failed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1068
  
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1069
  testing ssh2
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1070
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1071
  i> write(171) -> 171:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1072
  i>     upgrade * proto=exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1073
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1074
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1075
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1076
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
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() -> 62:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1079
  o>     upgraded * exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1080
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1081
  o>     412\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
  1082
  o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1083
  o> read(1) -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1084
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1085
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1086
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1087
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1088
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1089
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1090
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1091
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1092
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1093
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1094
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1095
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1096
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1097
  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
  1098
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1099
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1100
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1101
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1102
  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
  1103
  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
  1104
  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
  1105
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1106
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1107
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1108
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1109
  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
  1110
  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
  1111
  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
  1112
  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
  1113
  result: 0
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
  1114
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
  1115
  o> read(-1) -> 0: 
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1116
  e> read(-1) -> 218:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1117
  e>     adding changesets\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1118
  e>     adding manifests\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1119
  e>     adding file changes\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1120
  e>     added 1 changesets with 1 changes to 1 files\n
37943
45a669bad421 test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents: 37413
diff changeset
  1121
  e>     print 1\n
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1122
  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
  1123
  e>     print 2\n
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1124
  e>     ui.write 2\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1125
  e>     transaction abort!\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1126
  e>     rollback completed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1127
  e>     abort: pretxnchangegroup.fail hook failed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1128
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1129
print() to stdout and stderr both get captured
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1130
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1131
  $ cat > .hg/hgrc << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1132
  > [hooks]
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1133
  > pretxnchangegroup.fail = python:$TESTTMP/failhook:hookprintstderrandstdout
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1134
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1135
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1136
  $ debugwireproto << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1137
  > command unbundle
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1138
  > # This is "force" in hex.
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1139
  >     heads 666f726365
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1140
  >     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
  1141
  > readavailable
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1142
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1143
  testing ssh1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1144
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1145
  i> write(104) -> 104:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1146
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1147
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1148
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1149
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1150
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1151
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1152
  o>     413\n
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1153
  o> readline() -> 413:
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
  1154
  o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
36534
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>     1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1157
  o> readline() -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1158
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1159
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1160
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1161
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1162
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1163
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1164
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1165
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1166
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1167
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1168
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1169
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1170
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1171
  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
  1172
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1173
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1174
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1175
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1176
  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
  1177
  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
  1178
  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
  1179
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1180
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1181
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1182
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1183
  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
  1184
  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
  1185
  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
  1186
  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
  1187
  result: 0
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
  1188
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
  1189
  o> read(-1) -> 0: 
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1190
  e> read(-1) -> 216:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1191
  e>     adding changesets\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1192
  e>     adding manifests\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1193
  e>     adding file changes\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1194
  e>     added 1 changesets with 1 changes to 1 files\n
37943
45a669bad421 test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents: 37413
diff changeset
  1195
  e>     stdout 1\n
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1196
  e>     stderr 1\n
37943
45a669bad421 test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents: 37413
diff changeset
  1197
  e>     stdout 2\n
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1198
  e>     stderr 2\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1199
  e>     transaction abort!\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1200
  e>     rollback completed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1201
  e>     abort: pretxnchangegroup.fail hook failed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1202
  
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1203
  testing ssh2
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1204
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1205
  i> write(171) -> 171:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1206
  i>     upgrade * proto=exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1207
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1208
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1209
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1210
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1211
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1212
  o> readline() -> 62:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1213
  o>     upgraded * exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1214
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1215
  o>     412\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
  1216
  o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1217
  o> read(1) -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1218
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1219
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1220
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1221
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1222
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1223
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1224
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1225
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1226
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1227
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1228
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1229
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1230
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1231
  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
  1232
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1233
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1234
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1235
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1236
  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
  1237
  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
  1238
  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
  1239
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1240
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1241
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1242
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1243
  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
  1244
  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
  1245
  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
  1246
  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
  1247
  result: 0
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
  1248
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
  1249
  o> read(-1) -> 0: 
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1250
  e> read(-1) -> 216:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1251
  e>     adding changesets\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1252
  e>     adding manifests\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1253
  e>     adding file changes\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1254
  e>     added 1 changesets with 1 changes to 1 files\n
37943
45a669bad421 test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents: 37413
diff changeset
  1255
  e>     stdout 1\n
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1256
  e>     stderr 1\n
37943
45a669bad421 test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents: 37413
diff changeset
  1257
  e>     stdout 2\n
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1258
  e>     stderr 2\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1259
  e>     transaction abort!\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1260
  e>     rollback completed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1261
  e>     abort: pretxnchangegroup.fail hook failed\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1262
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1263
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
  1264
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1265
  $ 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
  1266
  > echo 'stdout 1'
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1267
  > echo 'stdout 2'
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1268
  > exit 1
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1269
  > EOF
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1270
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1271
  $ cat > .hg/hgrc << EOF
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1272
  > [hooks]
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1273
  > 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
  1274
  > EOF
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1275
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1276
  $ debugwireproto << EOF
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1277
  > command unbundle
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1278
  > # 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
  1279
  >     heads 666f726365
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1280
  >     PUSHFILE ../initial.v1.hg
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1281
  > readavailable
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1282
  > EOF
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1283
  testing ssh1
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1284
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1285
  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
  1286
  i>     hello\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1287
  i>     between\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1288
  i>     pairs 81\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1289
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1290
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1291
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1292
  o>     413\n
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1293
  o> readline() -> 413:
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
  1294
  o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1295
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1296
  o>     1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1297
  o> readline() -> 1:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1298
  o>     \n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1299
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1300
  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
  1301
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1302
  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
  1303
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1304
  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
  1305
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1306
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1307
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1308
  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
  1309
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1310
  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
  1311
  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
  1312
  i>     test\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1313
  i>     0 0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1314
  i>     foo\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1315
  i>     \n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1316
  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
  1317
  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
  1318
  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
  1319
  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
  1320
  i>     0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1321
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1322
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1323
  o>     0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1324
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1325
  o>     1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1326
  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
  1327
  result: 0
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1328
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
  1329
  o> read(-1) -> 0: 
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1330
  e> read(-1) -> 212:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1331
  e>     adding changesets\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1332
  e>     adding manifests\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1333
  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
  1334
  e>     added 1 changesets with 1 changes to 1 files\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1335
  e>     stdout 1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1336
  e>     stdout 2\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1337
  e>     transaction abort!\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1338
  e>     rollback completed\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1339
  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
  1340
  
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1341
  testing ssh2
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1342
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1343
  i> write(171) -> 171:
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1344
  i>     upgrade * proto=exp-ssh-v2-0001\n (glob)
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1345
  i>     hello\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1346
  i>     between\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1347
  i>     pairs 81\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1348
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1349
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1350
  o> readline() -> 62:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1351
  o>     upgraded * exp-ssh-v2-0001\n (glob)
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1352
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1353
  o>     412\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
  1354
  o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1355
  o> read(1) -> 1:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1356
  o>     \n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1357
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1358
  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
  1359
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1360
  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
  1361
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1362
  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
  1363
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1364
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1365
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1366
  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
  1367
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1368
  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
  1369
  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
  1370
  i>     test\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1371
  i>     0 0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1372
  i>     foo\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1373
  i>     \n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1374
  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
  1375
  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
  1376
  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
  1377
  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
  1378
  i>     0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1379
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1380
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1381
  o>     0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1382
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1383
  o>     1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1384
  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
  1385
  result: 0
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1386
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
  1387
  o> read(-1) -> 0: 
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1388
  e> read(-1) -> 212:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1389
  e>     adding changesets\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1390
  e>     adding manifests\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1391
  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
  1392
  e>     added 1 changesets with 1 changes to 1 files\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1393
  e>     stdout 1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1394
  e>     stdout 2\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1395
  e>     transaction abort!\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1396
  e>     rollback completed\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1397
  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
  1398
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1399
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
  1400
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1401
  $ 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
  1402
  > 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
  1403
  > 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
  1404
  > exit 1
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1405
  > EOF
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1406
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1407
  $ debugwireproto << EOF
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1408
  > command unbundle
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1409
  > # 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
  1410
  >     heads 666f726365
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1411
  >     PUSHFILE ../initial.v1.hg
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1412
  > readavailable
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1413
  > EOF
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1414
  testing ssh1
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1415
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1416
  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
  1417
  i>     hello\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1418
  i>     between\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1419
  i>     pairs 81\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1420
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1421
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1422
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1423
  o>     413\n
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1424
  o> readline() -> 413:
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
  1425
  o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1426
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1427
  o>     1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1428
  o> readline() -> 1:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1429
  o>     \n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1430
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1431
  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
  1432
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1433
  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
  1434
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1435
  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
  1436
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1437
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1438
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1439
  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
  1440
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1441
  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
  1442
  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
  1443
  i>     test\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1444
  i>     0 0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1445
  i>     foo\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1446
  i>     \n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1447
  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
  1448
  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
  1449
  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
  1450
  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
  1451
  i>     0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1452
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1453
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1454
  o>     0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1455
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1456
  o>     1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1457
  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
  1458
  result: 0
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1459
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
  1460
  o> read(-1) -> 0: 
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1461
  e> read(-1) -> 212:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1462
  e>     adding changesets\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1463
  e>     adding manifests\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1464
  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
  1465
  e>     added 1 changesets with 1 changes to 1 files\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1466
  e>     stderr 1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1467
  e>     stderr 2\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1468
  e>     transaction abort!\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1469
  e>     rollback completed\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1470
  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
  1471
  
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1472
  testing ssh2
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1473
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1474
  i> write(171) -> 171:
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1475
  i>     upgrade * proto=exp-ssh-v2-0001\n (glob)
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1476
  i>     hello\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1477
  i>     between\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1478
  i>     pairs 81\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1479
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1480
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1481
  o> readline() -> 62:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1482
  o>     upgraded * exp-ssh-v2-0001\n (glob)
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1483
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1484
  o>     412\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
  1485
  o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1486
  o> read(1) -> 1:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1487
  o>     \n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1488
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1489
  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
  1490
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1491
  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
  1492
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1493
  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
  1494
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1495
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1496
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1497
  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
  1498
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1499
  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
  1500
  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
  1501
  i>     test\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1502
  i>     0 0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1503
  i>     foo\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1504
  i>     \n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1505
  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
  1506
  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
  1507
  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
  1508
  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
  1509
  i>     0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1510
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1511
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1512
  o>     0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1513
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1514
  o>     1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1515
  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
  1516
  result: 0
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1517
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
  1518
  o> read(-1) -> 0: 
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1519
  e> read(-1) -> 212:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1520
  e>     adding changesets\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1521
  e>     adding manifests\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1522
  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
  1523
  e>     added 1 changesets with 1 changes to 1 files\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1524
  e>     stderr 1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1525
  e>     stderr 2\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1526
  e>     transaction abort!\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1527
  e>     rollback completed\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1528
  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
  1529
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1530
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
  1531
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1532
  $ 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
  1533
  > echo 'stdout 1'
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1534
  > 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
  1535
  > echo 'stdout 2'
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1536
  > 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
  1537
  > exit 1
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1538
  > EOF
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1539
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1540
  $ debugwireproto << EOF
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1541
  > command unbundle
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1542
  > # 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
  1543
  >     heads 666f726365
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1544
  >     PUSHFILE ../initial.v1.hg
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1545
  > readavailable
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1546
  > EOF
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1547
  testing ssh1
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1548
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1549
  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
  1550
  i>     hello\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1551
  i>     between\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1552
  i>     pairs 81\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1553
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1554
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1555
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1556
  o>     413\n
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1557
  o> readline() -> 413:
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
  1558
  o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1559
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1560
  o>     1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1561
  o> readline() -> 1:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1562
  o>     \n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1563
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1564
  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
  1565
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1566
  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
  1567
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1568
  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
  1569
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1570
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1571
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1572
  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
  1573
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1574
  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
  1575
  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
  1576
  i>     test\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1577
  i>     0 0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1578
  i>     foo\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1579
  i>     \n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1580
  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
  1581
  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
  1582
  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
  1583
  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
  1584
  i>     0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1585
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1586
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1587
  o>     0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1588
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1589
  o>     1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1590
  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
  1591
  result: 0
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1592
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
  1593
  o> read(-1) -> 0: 
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1594
  e> read(-1) -> 230:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1595
  e>     adding changesets\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1596
  e>     adding manifests\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1597
  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
  1598
  e>     added 1 changesets with 1 changes to 1 files\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1599
  e>     stdout 1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1600
  e>     stderr 1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1601
  e>     stdout 2\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1602
  e>     stderr 2\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1603
  e>     transaction abort!\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1604
  e>     rollback completed\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1605
  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
  1606
  
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1607
  testing ssh2
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1608
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1609
  i> write(171) -> 171:
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1610
  i>     upgrade * proto=exp-ssh-v2-0001\n (glob)
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1611
  i>     hello\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1612
  i>     between\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1613
  i>     pairs 81\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1614
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1615
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1616
  o> readline() -> 62:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1617
  o>     upgraded * exp-ssh-v2-0001\n (glob)
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1618
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1619
  o>     412\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
  1620
  o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1621
  o> read(1) -> 1:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1622
  o>     \n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1623
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1624
  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
  1625
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1626
  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
  1627
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1628
  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
  1629
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1630
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1631
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1632
  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
  1633
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1634
  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
  1635
  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
  1636
  i>     test\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1637
  i>     0 0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1638
  i>     foo\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1639
  i>     \n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1640
  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
  1641
  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
  1642
  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
  1643
  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
  1644
  i>     0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1645
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1646
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1647
  o>     0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1648
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1649
  o>     1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1650
  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
  1651
  result: 0
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1652
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
  1653
  o> read(-1) -> 0: 
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1654
  e> read(-1) -> 230:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1655
  e>     adding changesets\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1656
  e>     adding manifests\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1657
  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
  1658
  e>     added 1 changesets with 1 changes to 1 files\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1659
  e>     stdout 1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1660
  e>     stderr 1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1661
  e>     stdout 2\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1662
  e>     stderr 2\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1663
  e>     transaction abort!\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1664
  e>     rollback completed\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1665
  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
  1666
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1667
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
  1668
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1669
  $ 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
  1670
  > echo 'shell stdout 1'
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1671
  > 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
  1672
  > echo 'shell stdout 2'
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1673
  > 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
  1674
  > exit 0
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1675
  > EOF
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1676
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1677
  $ cat > .hg/hgrc << EOF
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1678
  > [hooks]
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1679
  > 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
  1680
  > 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
  1681
  > EOF
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1682
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1683
  $ debugwireproto << EOF
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1684
  > command unbundle
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1685
  > # 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
  1686
  >     heads 666f726365
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1687
  >     PUSHFILE ../initial.v1.hg
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1688
  > readavailable
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1689
  > EOF
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1690
  testing ssh1
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1691
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1692
  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
  1693
  i>     hello\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1694
  i>     between\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1695
  i>     pairs 81\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1696
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1697
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1698
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1699
  o>     413\n
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1700
  o> readline() -> 413:
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
  1701
  o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1702
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1703
  o>     1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1704
  o> readline() -> 1:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1705
  o>     \n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1706
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1707
  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
  1708
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1709
  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
  1710
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1711
  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
  1712
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1713
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1714
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1715
  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
  1716
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1717
  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
  1718
  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
  1719
  i>     test\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1720
  i>     0 0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1721
  i>     foo\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1722
  i>     \n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1723
  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
  1724
  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
  1725
  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
  1726
  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
  1727
  i>     0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1728
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1729
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1730
  o>     0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1731
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1732
  o>     1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1733
  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
  1734
  result: 0
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1735
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
  1736
  o> read(-1) -> 0: 
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1737
  e> read(-1) -> 273:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1738
  e>     adding changesets\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1739
  e>     adding manifests\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1740
  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
  1741
  e>     added 1 changesets with 1 changes to 1 files\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1742
  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
  1743
  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
  1744
  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
  1745
  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
  1746
  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
  1747
  e>     stderr 1\n
37943
45a669bad421 test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents: 37413
diff changeset
  1748
  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
  1749
  e>     stderr 2\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1750
  e>     transaction abort!\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1751
  e>     rollback completed\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1752
  e>     abort: pretxnchangegroup.b hook failed\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1753
  
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1754
  testing ssh2
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1755
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1756
  i> write(171) -> 171:
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1757
  i>     upgrade * proto=exp-ssh-v2-0001\n (glob)
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1758
  i>     hello\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1759
  i>     between\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1760
  i>     pairs 81\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1761
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1762
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1763
  o> readline() -> 62:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1764
  o>     upgraded * exp-ssh-v2-0001\n (glob)
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1765
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1766
  o>     412\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
  1767
  o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1768
  o> read(1) -> 1:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1769
  o>     \n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1770
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1771
  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
  1772
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1773
  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
  1774
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1775
  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
  1776
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1777
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1778
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1779
  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
  1780
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1781
  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
  1782
  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
  1783
  i>     test\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1784
  i>     0 0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1785
  i>     foo\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1786
  i>     \n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1787
  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
  1788
  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
  1789
  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
  1790
  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
  1791
  i>     0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1792
  i> flush() -> None
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1793
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1794
  o>     0\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1795
  o> readline() -> 2:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1796
  o>     1\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1797
  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
  1798
  result: 0
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1799
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
  1800
  o> read(-1) -> 0: 
36614
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1801
  e> read(-1) -> 273:
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1802
  e>     adding changesets\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1803
  e>     adding manifests\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1804
  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
  1805
  e>     added 1 changesets with 1 changes to 1 files\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1806
  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
  1807
  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
  1808
  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
  1809
  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
  1810
  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
  1811
  e>     stderr 1\n
37943
45a669bad421 test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents: 37413
diff changeset
  1812
  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
  1813
  e>     stderr 2\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1814
  e>     transaction abort!\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1815
  e>     rollback completed\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1816
  e>     abort: pretxnchangegroup.b hook failed\n
1fa02265fae2 tests: add more tests around hook output and getbundle
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36612
diff changeset
  1817
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1818
  $ cd ..
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1819
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1820
Pushing a bundle1 with no output
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1821
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1822
  $ hg init simplerepo
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1823
  $ cd simplerepo
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1824
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1825
  $ debugwireproto 1 << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1826
  > command unbundle
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1827
  > # This is "force" in hex.
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1828
  >     heads 666f726365
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1829
  >     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
  1830
  > readavailable
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1831
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1832
  testing ssh1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1833
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1834
  i> write(104) -> 104:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1835
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1836
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1837
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1838
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1839
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1840
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1841
  o>     413\n
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1842
  o> readline() -> 413:
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
  1843
  o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1844
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1845
  o>     1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1846
  o> readline() -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1847
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1848
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1849
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1850
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1851
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1852
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1853
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1854
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1855
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1856
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1857
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1858
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1859
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1860
  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
  1861
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1862
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1863
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1864
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1865
  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
  1866
  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
  1867
  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
  1868
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1869
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1870
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1871
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1872
  o>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1873
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1874
  o>     1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1875
  o> read(1) -> 1: 1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1876
  result: 1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1877
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
  1878
  o> read(-1) -> 0: 
36608
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
  1879
  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
  1880
  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
  1881
  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
  1882
  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
  1883
  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
  1884
  
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1885
  testing ssh2
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1886
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1887
  i> write(171) -> 171:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1888
  i>     upgrade * proto=exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1889
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1890
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1891
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1892
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1893
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1894
  o> readline() -> 62:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1895
  o>     upgraded * exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1896
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1897
  o>     412\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
  1898
  o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1899
  o> read(1) -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1900
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1901
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1902
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1903
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1904
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1905
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1906
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1907
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1908
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1909
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1910
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1911
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1912
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1913
  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
  1914
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1915
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1916
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1917
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1918
  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
  1919
  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
  1920
  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
  1921
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1922
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1923
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1924
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1925
  o>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1926
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1927
  o>     1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1928
  o> read(1) -> 1: 1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1929
  result: 1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1930
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
  1931
  o> read(-1) -> 0: 
36608
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
  1932
  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
  1933
  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
  1934
  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
  1935
  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
  1936
  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
  1937
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1938
  $ cd ..
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1939
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1940
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
  1941
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1942
  $ cat > $TESTTMP/hook << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1943
  > 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
  1944
  >     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
  1945
  >     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
  1946
  >     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
  1947
  >     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
  1948
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1949
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1950
  $ hg init uiwriterepo
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1951
  $ cd uiwriterepo
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1952
  $ cat > .hg/hgrc << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1953
  > [hooks]
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1954
  > pretxnchangegroup.hook = python:$TESTTMP/hook:hookuiwrite
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1955
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1956
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1957
  $ debugwireproto 1 << EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1958
  > command unbundle
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1959
  > # This is "force" in hex.
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1960
  >     heads 666f726365
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1961
  >     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
  1962
  > readavailable
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1963
  > EOF
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1964
  testing ssh1
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1965
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1966
  i> write(104) -> 104:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1967
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1968
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1969
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1970
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1971
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1972
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1973
  o>     413\n
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  1974
  o> readline() -> 413:
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
  1975
  o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1976
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1977
  o>     1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1978
  o> readline() -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1979
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1980
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1981
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1982
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1983
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1984
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1985
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1986
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1987
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1988
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1989
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1990
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  1991
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1992
  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
  1993
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1994
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1995
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1996
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  1997
  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
  1998
  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
  1999
  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
  2000
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2001
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2002
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2003
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2004
  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
  2005
  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
  2006
  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
  2007
  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
  2008
  result: 1
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
  2009
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
  2010
  o> read(-1) -> 0: 
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2011
  e> read(-1) -> 152:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2012
  e>     adding changesets\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2013
  e>     adding manifests\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2014
  e>     adding file changes\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2015
  e>     added 1 changesets with 1 changes to 1 files\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2016
  e>     ui.write 1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2017
  e>     ui.write_err 1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2018
  e>     ui.write 2\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2019
  e>     ui.write_err 2\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2020
  
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2021
  testing ssh2
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2022
  creating ssh peer from handshake results
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  2023
  i> write(171) -> 171:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2024
  i>     upgrade * proto=exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2025
  i>     hello\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2026
  i>     between\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2027
  i>     pairs 81\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2028
  i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2029
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2030
  o> readline() -> 62:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2031
  o>     upgraded * exp-ssh-v2-0001\n (glob)
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2032
  o> readline() -> 4:
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
  2033
  o>     412\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37393
diff changeset
  2034
  o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2035
  o> read(1) -> 1:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2036
  o>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2037
  sending unbundle command
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  2038
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2039
  i>     unbundle\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  2040
  i> write(9) -> 9:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2041
  i>     heads 10\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  2042
  i> write(10) -> 10: 666f726365
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2043
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2044
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2045
  o>     0\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  2046
  i> write(4) -> 4:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2047
  i>     426\n
36631
8395fddde46c util: report integer result from write()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36628
diff changeset
  2048
  i> write(426) -> 426:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2049
  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
  2050
  i>     test\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2051
  i>     0 0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2052
  i>     foo\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2053
  i>     \n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2054
  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
  2055
  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
  2056
  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
  2057
  i> write(2) -> 2:
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2058
  i>     0\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2059
  i> flush() -> None
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2060
  o> readline() -> 2:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2061
  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
  2062
  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
  2063
  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
  2064
  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
  2065
  result: 1
1151c731686e sshpeer: don't read from stderr when that behavior is disabled
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36534
diff changeset
  2066
  remote output: 
36843
31581528f242 debugwireproto: close the write end before consuming all available data
Yuya Nishihara <yuya@tcha.org>
parents: 36660
diff changeset
  2067
  o> read(-1) -> 0: 
36534
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2068
  e> read(-1) -> 152:
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2069
  e>     adding changesets\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2070
  e>     adding manifests\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2071
  e>     adding file changes\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2072
  e>     added 1 changesets with 1 changes to 1 files\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2073
  e>     ui.write 1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2074
  e>     ui.write_err 1\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2075
  e>     ui.write 2\n
5faeabb07cf5 debugcommands: support for triggering push protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
  2076
  e>     ui.write_err 2\n