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