tests/test-ssh-proto.t
changeset 48671 a746d13987a6
parent 48561 04688c51f81f
equal deleted inserted replaced
48670:2a13ad130f49 48671:a746d13987a6
    53   running .* ".*[/\\]dummyssh" ['"]user@dummy['"] ['"]hg -R server serve --stdio['"] (re)
    53   running .* ".*[/\\]dummyssh" ['"]user@dummy['"] ['"]hg -R server serve --stdio['"] (re)
    54   devel-peer-request: hello+between
    54   devel-peer-request: hello+between
    55   devel-peer-request:   pairs: 81 bytes
    55   devel-peer-request:   pairs: 81 bytes
    56   sending hello command
    56   sending hello command
    57   sending between command
    57   sending between command
    58   remote: 444
    58   remote: \d+ (re)
    59   remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
    59   remote: capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (re)
    60   remote: 1
    60   remote: 1
    61   devel-peer-request: protocaps
    61   devel-peer-request: protocaps
    62   devel-peer-request:   caps: * bytes (glob)
    62   devel-peer-request:   caps: * bytes (glob)
    63   sending protocaps command
    63   sending protocaps command
    64   url: ssh://user@dummy/server
    64   url: ssh://user@dummy/server
    75   > EOF
    75   > EOF
    76   using raw connection to peer
    76   using raw connection to peer
    77   i> write(6) -> 6:
    77   i> write(6) -> 6:
    78   i>     hello\n
    78   i>     hello\n
    79   o> readline() -> 4:
    79   o> readline() -> 4:
    80   o>     444\n
    80   o>     \d+\\n (re)
    81   o> readline() -> 444:
    81   o> readline\(\) -> \d+: (re)
    82   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
    82   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
    83 
    83 
    84 `hg debugserve --sshstdio` works
    84 `hg debugserve --sshstdio` works
    85 
    85 
    86   $ cd server
    86   $ cd server
    87   $ hg debugserve --sshstdio << EOF
    87   $ hg debugserve --sshstdio << EOF
    88   > hello
    88   > hello
    89   > EOF
    89   > EOF
    90   444
    90   \d+ (re)
    91   capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
    91   capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (re)
    92 
    92 
    93 I/O logging works
    93 I/O logging works
    94 
    94 
    95   $ hg debugserve --sshstdio --logiofd 1 << EOF
    95   $ hg debugserve --sshstdio --logiofd 1 << EOF
    96   > hello
    96   > hello
    97   > EOF
    97   > EOF
    98   e> flush() -> None
    98   e> flush() -> None
    99   o> write(4) -> 4:
    99   o> write(4) -> 4:
   100   o>     444\n
   100   o>     \d+\\n (re)
   101   o> write(444) -> 444:
   101   o> write\(\d+\) -> \d+: (re)
   102   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   102   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
   103   444
   103   \d+ (re)
   104   capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
   104   capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (re)
   105   o> flush() -> None
   105   o> flush() -> None
   106 
   106 
   107   $ hg debugserve --sshstdio --logiofile $TESTTMP/io << EOF
   107   $ hg debugserve --sshstdio --logiofile $TESTTMP/io << EOF
   108   > hello
   108   > hello
   109   > EOF
   109   > EOF
   110   444
   110   \d+ (re)
   111   capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
   111   capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (re)
   112 
   112 
   113   $ cat $TESTTMP/io
   113   $ cat $TESTTMP/io
   114   e> flush() -> None
   114   e> flush() -> None
   115   o> write(4) -> 4:
   115   o> write(4) -> 4:
   116   o>     444\n
   116   o>     \d+\\n (re)
   117   o> write(444) -> 444:
   117   o> write\(\d+\) -> \d+: (re)
   118   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   118   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
   119   o> flush() -> None
   119   o> flush() -> None
   120 
   120 
   121   $ cd ..
   121   $ cd ..
   122 
   122 
   123 >=0.9.1 clients send a "hello" + "between" for the null range as part of handshake.
   123 >=0.9.1 clients send a "hello" + "between" for the null range as part of handshake.
   138   > EOF
   138   > EOF
   139   using raw connection to peer
   139   using raw connection to peer
   140   i> write(6) -> 6:
   140   i> write(6) -> 6:
   141   i>     hello\n
   141   i>     hello\n
   142   o> readline() -> 4:
   142   o> readline() -> 4:
   143   o>     444\n
   143   o>     \d+\\n (re)
   144   o> readline() -> 444:
   144   o> readline\(\) -> \d+: (re)
   145   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   145   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
   146   i> write(98) -> 98:
   146   i> write(98) -> 98:
   147   i>     between\n
   147   i>     between\n
   148   i>     pairs 81\n
   148   i>     pairs 81\n
   149   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   149   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   150   o> readline() -> 2:
   150   o> readline() -> 2:
   175   remote: banner: line 5
   175   remote: banner: line 5
   176   remote: banner: line 6
   176   remote: banner: line 6
   177   remote: banner: line 7
   177   remote: banner: line 7
   178   remote: banner: line 8
   178   remote: banner: line 8
   179   remote: banner: line 9
   179   remote: banner: line 9
   180   remote: 444
   180   remote: \d+ (re)
   181   remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
   181   remote: capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (re)
   182   remote: 1
   182   remote: 1
   183   devel-peer-request: protocaps
   183   devel-peer-request: protocaps
   184   devel-peer-request:   caps: * bytes (glob)
   184   devel-peer-request:   caps: * bytes (glob)
   185   sending protocaps command
   185   sending protocaps command
   186   url: ssh://user@dummy/server
   186   url: ssh://user@dummy/server
   233   o> readline() -> 15:
   233   o> readline() -> 15:
   234   o>     banner: line 8\n
   234   o>     banner: line 8\n
   235   o> readline() -> 15:
   235   o> readline() -> 15:
   236   o>     banner: line 9\n
   236   o>     banner: line 9\n
   237   o> readline() -> 4:
   237   o> readline() -> 4:
   238   o>     444\n
   238   o>     \d+\\n (re)
   239   o> readline() -> 444:
   239   o> readline\(\) -> \d+: (re)
   240   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   240   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
   241   i> write(98) -> 98:
   241   i> write(98) -> 98:
   242   i>     between\n
   242   i>     between\n
   243   i>     pairs 81\n
   243   i>     pairs 81\n
   244   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   244   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   245   o> readline() -> 2:
   245   o> readline() -> 2:
   284   o> readline() -> 2:
   284   o> readline() -> 2:
   285   o>     0\n
   285   o>     0\n
   286   i> write(6) -> 6:
   286   i> write(6) -> 6:
   287   i>     hello\n
   287   i>     hello\n
   288   o> readline() -> 4:
   288   o> readline() -> 4:
   289   o>     444\n
   289   o>     \d+\\n (re)
   290   i> write(98) -> 98:
   290   i> write(98) -> 98:
   291   i>     between\n
   291   i>     between\n
   292   i>     pairs 81\n
   292   i>     pairs 81\n
   293   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   293   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   294   o> readline() -> 444:
   294   o> readline\(\) -> \d+: (re)
   295   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   295   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
   296   o> readline() -> 2:
   296   o> readline() -> 2:
   297   o>     1\n
   297   o>     1\n
   298 
   298 
   299   $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-no-args --debug debugpeer ssh://user@dummy/server
   299   $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-no-args --debug debugpeer ssh://user@dummy/server
   300   running .* ".*[/\\]dummyssh" ['"]user@dummy['"] ['"]hg -R server serve --stdio['"] (re)
   300   running .* ".*[/\\]dummyssh" ['"]user@dummy['"] ['"]hg -R server serve --stdio['"] (re)
   302   devel-peer-request: hello+between
   302   devel-peer-request: hello+between
   303   devel-peer-request:   pairs: 81 bytes
   303   devel-peer-request:   pairs: 81 bytes
   304   sending hello command
   304   sending hello command
   305   sending between command
   305   sending between command
   306   remote: 0
   306   remote: 0
   307   remote: 444
   307   remote: \d+ (re)
   308   remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
   308   remote: capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (re)
   309   remote: 1
   309   remote: 1
   310   devel-peer-request: protocaps
   310   devel-peer-request: protocaps
   311   devel-peer-request:   caps: * bytes (glob)
   311   devel-peer-request:   caps: * bytes (glob)
   312   sending protocaps command
   312   sending protocaps command
   313   url: ssh://user@dummy/server
   313   url: ssh://user@dummy/server
   351   o> readline() -> 2:
   351   o> readline() -> 2:
   352   o>     0\n
   352   o>     0\n
   353   i> write(6) -> 6:
   353   i> write(6) -> 6:
   354   i>     hello\n
   354   i>     hello\n
   355   o> readline() -> 4:
   355   o> readline() -> 4:
   356   o>     444\n
   356   o>     \d+\\n (re)
   357   o> readline() -> 444:
   357   o> readline\(\) -> \d+: (re)
   358   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   358   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
   359   i> write(98) -> 98:
   359   i> write(98) -> 98:
   360   i>     between\n
   360   i>     between\n
   361   i>     pairs 81\n
   361   i>     pairs 81\n
   362   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   362   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   363   o> readline() -> 2:
   363   o> readline() -> 2:
   375   sending hello command
   375   sending hello command
   376   sending between command
   376   sending between command
   377   remote: 0
   377   remote: 0
   378   remote: 0
   378   remote: 0
   379   remote: 0
   379   remote: 0
   380   remote: 444
   380   remote: \d+ (re)
   381   remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
   381   remote: capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (re)
   382   remote: 1
   382   remote: 1
   383   devel-peer-request: protocaps
   383   devel-peer-request: protocaps
   384   devel-peer-request:   caps: * bytes (glob)
   384   devel-peer-request:   caps: * bytes (glob)
   385   sending protocaps command
   385   sending protocaps command
   386   url: ssh://user@dummy/server
   386   url: ssh://user@dummy/server
   432   o> readline() -> 2:
   432   o> readline() -> 2:
   433   o>     0\n
   433   o>     0\n
   434   i> write(6) -> 6:
   434   i> write(6) -> 6:
   435   i>     hello\n
   435   i>     hello\n
   436   o> readline() -> 4:
   436   o> readline() -> 4:
   437   o>     444\n
   437   o>     \d+\\n (re)
   438   o> readline() -> 444:
   438   o> readline\(\) -> \d+: (re)
   439   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   439   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
   440   i> write(98) -> 98:
   440   i> write(98) -> 98:
   441   i>     between\n
   441   i>     between\n
   442   i>     pairs 81\n
   442   i>     pairs 81\n
   443   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   443   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   444   o> readline() -> 2:
   444   o> readline() -> 2:
   479   o> readline() -> 2:
   479   o> readline() -> 2:
   480   o>     0\n
   480   o>     0\n
   481   i> write(6) -> 6:
   481   i> write(6) -> 6:
   482   i>     hello\n
   482   i>     hello\n
   483   o> readline() -> 4:
   483   o> readline() -> 4:
   484   o>     444\n
   484   o>     \d+\\n (re)
   485   o> readline() -> 444:
   485   o> readline\(\) -> \d+: (re)
   486   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   486   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
   487   i> write(98) -> 98:
   487   i> write(98) -> 98:
   488   i>     between\n
   488   i>     between\n
   489   i>     pairs 81\n
   489   i>     pairs 81\n
   490   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   490   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   491   o> readline() -> 2:
   491   o> readline() -> 2:
   524   o> readline() -> 2:
   524   o> readline() -> 2:
   525   o>     0\n
   525   o>     0\n
   526   i> write(6) -> 6:
   526   i> write(6) -> 6:
   527   i>     hello\n
   527   i>     hello\n
   528   o> readline() -> 4:
   528   o> readline() -> 4:
   529   o>     444\n
   529   o>     \d+\\n (re)
   530   o> readline() -> 444:
   530   o> readline\(\) -> \d+: (re)
   531   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   531   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
   532   i> write(98) -> 98:
   532   i> write(98) -> 98:
   533   i>     between\n
   533   i>     between\n
   534   i>     pairs 81\n
   534   i>     pairs 81\n
   535   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   535   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   536   o> readline() -> 2:
   536   o> readline() -> 2:
   594   o> readline() -> 2:
   594   o> readline() -> 2:
   595   o>     0\n
   595   o>     0\n
   596   i> write(6) -> 6:
   596   i> write(6) -> 6:
   597   i>     hello\n
   597   i>     hello\n
   598   o> readline() -> 4:
   598   o> readline() -> 4:
   599   o>     444\n
   599   o>     \d+\\n (re)
   600   o> readline() -> 444:
   600   o> readline\(\) -> \d+: (re)
   601   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   601   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
   602 
   602 
   603 Incomplete dictionary send
   603 Incomplete dictionary send
   604 
   604 
   605   $ hg debugwireproto --localssh --peer raw << EOF
   605   $ hg debugwireproto --localssh --peer raw << EOF
   606   > raw
   606   > raw
   676   o> readline() -> 2:
   676   o> readline() -> 2:
   677   o>     0\n
   677   o>     0\n
   678   i> write(6) -> 6:
   678   i> write(6) -> 6:
   679   i>     hello\n
   679   i>     hello\n
   680   o> readline() -> 4:
   680   o> readline() -> 4:
   681   o>     444\n
   681   o>     \d+\\n (re)
   682   o> readline() -> 444:
   682   o> readline\(\) -> \d+: (re)
   683   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   683   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
   684   i> write(98) -> 98:
   684   i> write(98) -> 98:
   685   i>     between\n
   685   i>     between\n
   686   i>     pairs 81\n
   686   i>     pairs 81\n
   687   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   687   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   688   o> readline() -> 2:
   688   o> readline() -> 2:
   710   o> readline() -> 2:
   710   o> readline() -> 2:
   711   o>     0\n
   711   o>     0\n
   712   i> write(6) -> 6:
   712   i> write(6) -> 6:
   713   i>     hello\n
   713   i>     hello\n
   714   o> readline() -> 4:
   714   o> readline() -> 4:
   715   o>     444\n
   715   o>     \d+\\n (re)
   716   o> readline() -> 444:
   716   o> readline\(\) -> \d+: (re)
   717   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   717   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
   718   i> write(98) -> 98:
   718   i> write(98) -> 98:
   719   i>     between\n
   719   i>     between\n
   720   i>     pairs 81\n
   720   i>     pairs 81\n
   721   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   721   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   722   o> readline() -> 2:
   722   o> readline() -> 2:
   753   o> readline() -> 2:
   753   o> readline() -> 2:
   754   o>     0\n
   754   o>     0\n
   755   i> write(6) -> 6:
   755   i> write(6) -> 6:
   756   i>     hello\n
   756   i>     hello\n
   757   o> readline() -> 4:
   757   o> readline() -> 4:
   758   o>     444\n
   758   o>     \d+\\n (re)
   759   o> readline() -> 444:
   759   o> readline\(\) -> \d+: (re)
   760   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   760   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
   761   i> write(98) -> 98:
   761   i> write(98) -> 98:
   762   i>     between\n
   762   i>     between\n
   763   i>     pairs 81\n
   763   i>     pairs 81\n
   764   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   764   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   765   o> readline() -> 2:
   765   o> readline() -> 2:
   782   > EOF
   782   > EOF
   783   using raw connection to peer
   783   using raw connection to peer
   784   i> write(6) -> 6:
   784   i> write(6) -> 6:
   785   i>     hello\n
   785   i>     hello\n
   786   o> readline() -> 4:
   786   o> readline() -> 4:
   787   o>     444\n
   787   o>     \d+\\n (re)
   788   o> readline() -> 444:
   788   o> readline\(\) -> \d+: (re)
   789   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   789   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
   790   i> write(105) -> 105:
   790   i> write(105) -> 105:
   791   i>     between\n
   791   i>     between\n
   792   i>     pairs 81\n
   792   i>     pairs 81\n
   793   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000unknown
   793   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000unknown
   794   o> readline() -> 2:
   794   o> readline() -> 2:
   823   i>     hello\n
   823   i>     hello\n
   824   i>     between\n
   824   i>     between\n
   825   i>     pairs 81\n
   825   i>     pairs 81\n
   826   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   826   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   827   o> readline() -> 4:
   827   o> readline() -> 4:
   828   o>     444\n
   828   o>     \d+\\n (re)
   829   o> readline() -> 444:
   829   o> readline\(\) -> \d+: (re)
   830   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   830   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
   831   o> readline() -> 2:
   831   o> readline() -> 2:
   832   o>     1\n
   832   o>     1\n
   833   o> readline() -> 1:
   833   o> readline() -> 1:
   834   o>     \n
   834   o>     \n
   835   i> write(31) -> 31:
   835   i> write(31) -> 31:
   872   i>     pairs 81\n
   872   i>     pairs 81\n
   873   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   873   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   874   o> readline() -> 41:
   874   o> readline() -> 41:
   875   o>     68986213bd4485ea51533535e3fc9e78007a711f\n
   875   o>     68986213bd4485ea51533535e3fc9e78007a711f\n
   876   o> readline() -> 4:
   876   o> readline() -> 4:
   877   o>     444\n
   877   o>     \d+\\n (re)
   878   o> readline() -> 444:
   878   o> readline\(\) -> \d+: (re)
   879   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   879   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
   880   o> readline() -> 2:
   880   o> readline() -> 2:
   881   o>     1\n
   881   o>     1\n
   882 
   882 
   883 And a variation that doesn't send the between command
   883 And a variation that doesn't send the between command
   884 
   884 
   899   i> write(6) -> 6:
   899   i> write(6) -> 6:
   900   i>     hello\n
   900   i>     hello\n
   901   o> readline() -> 41:
   901   o> readline() -> 41:
   902   o>     68986213bd4485ea51533535e3fc9e78007a711f\n
   902   o>     68986213bd4485ea51533535e3fc9e78007a711f\n
   903   o> readline() -> 4:
   903   o> readline() -> 4:
   904   o>     444\n
   904   o>     \d+\\n (re)
   905 
   905 
   906   $ cd ..
   906   $ cd ..
   907 
   907 
   908 Test listkeys for listing namespaces
   908 Test listkeys for listing namespaces
   909 
   909 
   920   i>     between\n
   920   i>     between\n
   921   i>     pairs 81\n
   921   i>     pairs 81\n
   922   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   922   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   923   i> flush() -> None
   923   i> flush() -> None
   924   o> readline() -> 4:
   924   o> readline() -> 4:
   925   o>     444\n
   925   o>     \d+\\n (re)
   926   o> readline() -> 444:
   926   o> readline\(\) -> \d+: (re)
   927   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   927   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
   928   o> readline() -> 2:
   928   o> readline() -> 2:
   929   o>     1\n
   929   o>     1\n
   930   o> readline() -> 1:
   930   o> readline() -> 1:
   931   o>     \n
   931   o>     \n
   932   sending listkeys command
   932   sending listkeys command
   973   i>     between\n
   973   i>     between\n
   974   i>     pairs 81\n
   974   i>     pairs 81\n
   975   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   975   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
   976   i> flush() -> None
   976   i> flush() -> None
   977   o> readline() -> 4:
   977   o> readline() -> 4:
   978   o>     444\n
   978   o>     \d+\\n (re)
   979   o> readline() -> 444:
   979   o> readline\(\) -> \d+: (re)
   980   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   980   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
   981   o> readline() -> 2:
   981   o> readline() -> 2:
   982   o>     1\n
   982   o>     1\n
   983   o> readline() -> 1:
   983   o> readline() -> 1:
   984   o>     \n
   984   o>     \n
   985   sending listkeys command
   985   sending listkeys command
  1007   i>     between\n
  1007   i>     between\n
  1008   i>     pairs 81\n
  1008   i>     pairs 81\n
  1009   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
  1009   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
  1010   i> flush() -> None
  1010   i> flush() -> None
  1011   o> readline() -> 4:
  1011   o> readline() -> 4:
  1012   o>     444\n
  1012   o>     \d+\\n (re)
  1013   o> readline() -> 444:
  1013   o> readline\(\) -> \d+: (re)
  1014   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
  1014   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
  1015   o> readline() -> 2:
  1015   o> readline() -> 2:
  1016   o>     1\n
  1016   o>     1\n
  1017   o> readline() -> 1:
  1017   o> readline() -> 1:
  1018   o>     \n
  1018   o>     \n
  1019   sending listkeys command
  1019   sending listkeys command
  1044   i>     between\n
  1044   i>     between\n
  1045   i>     pairs 81\n
  1045   i>     pairs 81\n
  1046   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
  1046   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
  1047   i> flush() -> None
  1047   i> flush() -> None
  1048   o> readline() -> 4:
  1048   o> readline() -> 4:
  1049   o>     444\n
  1049   o>     \d+\\n (re)
  1050   o> readline() -> 444:
  1050   o> readline\(\) -> \d+: (re)
  1051   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
  1051   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
  1052   o> readline() -> 2:
  1052   o> readline() -> 2:
  1053   o>     1\n
  1053   o>     1\n
  1054   o> readline() -> 1:
  1054   o> readline() -> 1:
  1055   o>     \n
  1055   o>     \n
  1056   sending listkeys command
  1056   sending listkeys command
  1086   i>     between\n
  1086   i>     between\n
  1087   i>     pairs 81\n
  1087   i>     pairs 81\n
  1088   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
  1088   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
  1089   i> flush() -> None
  1089   i> flush() -> None
  1090   o> readline() -> 4:
  1090   o> readline() -> 4:
  1091   o>     444\n
  1091   o>     \d+\\n (re)
  1092   o> readline() -> 444:
  1092   o> readline\(\) -> \d+: (re)
  1093   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
  1093   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
  1094   o> readline() -> 2:
  1094   o> readline() -> 2:
  1095   o>     1\n
  1095   o>     1\n
  1096   o> readline() -> 1:
  1096   o> readline() -> 1:
  1097   o>     \n
  1097   o>     \n
  1098   sending pushkey command
  1098   sending pushkey command
  1141   i>     between\n
  1141   i>     between\n
  1142   i>     pairs 81\n
  1142   i>     pairs 81\n
  1143   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
  1143   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
  1144   i> flush() -> None
  1144   i> flush() -> None
  1145   o> readline() -> 4:
  1145   o> readline() -> 4:
  1146   o>     444\n
  1146   o>     \d+\\n (re)
  1147   o> readline() -> 444:
  1147   o> readline\(\) -> \d+: (re)
  1148   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
  1148   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
  1149   o> readline() -> 2:
  1149   o> readline() -> 2:
  1150   o>     1\n
  1150   o>     1\n
  1151   o> readline() -> 1:
  1151   o> readline() -> 1:
  1152   o>     \n
  1152   o>     \n
  1153   sending listkeys command
  1153   sending listkeys command
  1194   i>     between\n
  1194   i>     between\n
  1195   i>     pairs 81\n
  1195   i>     pairs 81\n
  1196   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
  1196   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
  1197   i> flush() -> None
  1197   i> flush() -> None
  1198   o> readline() -> 4:
  1198   o> readline() -> 4:
  1199   o>     444\n
  1199   o>     \d+\\n (re)
  1200   o> readline() -> 444:
  1200   o> readline\(\) -> \d+: (re)
  1201   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
  1201   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
  1202   o> readline() -> 2:
  1202   o> readline() -> 2:
  1203   o>     1\n
  1203   o>     1\n
  1204   o> readline() -> 1:
  1204   o> readline() -> 1:
  1205   o>     \n
  1205   o>     \n
  1206   sending listkeys command
  1206   sending listkeys command
  1236   i>     between\n
  1236   i>     between\n
  1237   i>     pairs 81\n
  1237   i>     pairs 81\n
  1238   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
  1238   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
  1239   i> flush() -> None
  1239   i> flush() -> None
  1240   o> readline() -> 4:
  1240   o> readline() -> 4:
  1241   o>     444\n
  1241   o>     \d+\\n (re)
  1242   o> readline() -> 444:
  1242   o> readline\(\) -> \d+: (re)
  1243   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
  1243   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
  1244   o> readline() -> 2:
  1244   o> readline() -> 2:
  1245   o>     1\n
  1245   o>     1\n
  1246   o> readline() -> 1:
  1246   o> readline() -> 1:
  1247   o>     \n
  1247   o>     \n
  1248   sending listkeys command
  1248   sending listkeys command
  1276   i>     between\n
  1276   i>     between\n
  1277   i>     pairs 81\n
  1277   i>     pairs 81\n
  1278   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
  1278   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
  1279   i> flush() -> None
  1279   i> flush() -> None
  1280   o> readline() -> 4:
  1280   o> readline() -> 4:
  1281   o>     444\n
  1281   o>     \d+\\n (re)
  1282   o> readline() -> 444:
  1282   o> readline\(\) -> \d+: (re)
  1283   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
  1283   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
  1284   o> readline() -> 2:
  1284   o> readline() -> 2:
  1285   o>     1\n
  1285   o>     1\n
  1286   o> readline() -> 1:
  1286   o> readline() -> 1:
  1287   o>     \n
  1287   o>     \n
  1288   sending listkeys command
  1288   sending listkeys command
  1317   i>     between\n
  1317   i>     between\n
  1318   i>     pairs 81\n
  1318   i>     pairs 81\n
  1319   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
  1319   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
  1320   i> flush() -> None
  1320   i> flush() -> None
  1321   o> readline() -> 4:
  1321   o> readline() -> 4:
  1322   o>     444\n
  1322   o>     \d+\\n (re)
  1323   o> readline() -> 444:
  1323   o> readline\(\) -> \d+: (re)
  1324   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
  1324   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
  1325   o> readline() -> 2:
  1325   o> readline() -> 2:
  1326   o>     1\n
  1326   o>     1\n
  1327   o> readline() -> 1:
  1327   o> readline() -> 1:
  1328   o>     \n
  1328   o>     \n
  1329   sending pushkey command
  1329   sending pushkey command
  1386   i>     between\n
  1386   i>     between\n
  1387   i>     pairs 81\n
  1387   i>     pairs 81\n
  1388   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
  1388   i>     0000000000000000000000000000000000000000-0000000000000000000000000000000000000000
  1389   i> flush() -> None
  1389   i> flush() -> None
  1390   o> readline() -> 4:
  1390   o> readline() -> 4:
  1391   o>     444\n
  1391   o>     \d+\\n (re)
  1392   o> readline() -> 444:
  1392   o> readline\(\) -> \d+: (re)
  1393   o>     capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
  1393   o>     capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\\n (re)
  1394   o> readline() -> 2:
  1394   o> readline() -> 2:
  1395   o>     1\n
  1395   o>     1\n
  1396   o> readline() -> 1:
  1396   o> readline() -> 1:
  1397   o>     \n
  1397   o>     \n
  1398   sending batch with 3 sub-commands
  1398   sending batch with 3 sub-commands