tests/test-ssh-proto.t
changeset 36527 44dc34b8d17b
parent 36368 02782e6e2c38
child 36528 72e487851a53
equal deleted inserted replaced
36526:7cc4a9b9732a 36527:44dc34b8d17b
    36   $ hg -R server serve --stdio << EOF
    36   $ hg -R server serve --stdio << EOF
    37   > hello
    37   > hello
    38   > EOF
    38   > EOF
    39   384
    39   384
    40   capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN
    40   capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN
       
    41 
       
    42 `hg debugserve --sshstdio` works
       
    43 
       
    44   $ cd server
       
    45   $ hg debugserve --sshstdio << EOF
       
    46   > hello
       
    47   > EOF
       
    48   384
       
    49   capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN
       
    50 
       
    51 I/O logging works
       
    52 
       
    53   $ hg debugserve --sshstdio --logiofd 1 << EOF
       
    54   > hello
       
    55   > EOF
       
    56   o> write(4) -> None:
       
    57   o>     384\n
       
    58   o> write(384) -> None:
       
    59   o>     capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN\n
       
    60   384
       
    61   capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN
       
    62   o> flush() -> None
       
    63 
       
    64   $ hg debugserve --sshstdio --logiofile $TESTTMP/io << EOF
       
    65   > hello
       
    66   > EOF
       
    67   384
       
    68   capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN
       
    69 
       
    70   $ cat $TESTTMP/io
       
    71   o> write(4) -> None:
       
    72   o>     384\n
       
    73   o> write(384) -> None:
       
    74   o>     capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN\n
       
    75   o> flush() -> None
       
    76 
       
    77   $ cd ..
    41 
    78 
    42 >=0.9.1 clients send a "hello" + "between" for the null range as part of handshake.
    79 >=0.9.1 clients send a "hello" + "between" for the null range as part of handshake.
    43 Server should reply with capabilities and should send "1\n\n" as a successful
    80 Server should reply with capabilities and should send "1\n\n" as a successful
    44 reply with empty response to the "between".
    81 reply with empty response to the "between".
    45 
    82