tests/test-wireproto-command-filedata.t
changeset 39863 c73f9f345ec0
parent 39829 34074e8ea160
child 40034 393e44324037
equal deleted inserted replaced
39862:5a9ab91e0a45 39863:c73f9f345ec0
     1   $ . $TESTDIR/wireprotohelpers.sh
     1   $ . $TESTDIR/wireprotohelpers.sh
     2 
     2 
     3   $ hg init server
     3   $ hg init server
     4   $ enablehttpv2 server
     4   $ enablehttpv2 server
     5   $ cd server
     5   $ cd server
     6   $ echo a0 > a
     6   $ cat > a << EOF
       
     7   > a0
       
     8   > 00000000000000000000000000000000000000
       
     9   > 11111111111111111111111111111111111111
       
    10   > EOF
     7   $ echo b0 > b
    11   $ echo b0 > b
     8   $ mkdir -p dir0/child0 dir0/child1 dir1
    12   $ mkdir -p dir0/child0 dir0/child1 dir1
     9   $ echo c0 > dir0/c
    13   $ echo c0 > dir0/c
    10   $ echo d0 > dir0/d
    14   $ echo d0 > dir0/d
    11   $ echo e0 > dir0/child0/e
    15   $ echo e0 > dir0/child0/e
    12   $ echo f0 > dir0/child1/f
    16   $ echo f0 > dir0/child1/f
    13   $ hg -q commit -A -m 'commit 0'
    17   $ hg -q commit -A -m 'commit 0'
    14 
    18 
    15   $ echo a1 > a
    19   $ echo a1 >> a
    16   $ echo d1 > dir0/d
    20   $ echo d1 > dir0/d
    17   $ hg commit -m 'commit 1'
    21   $ hg commit -m 'commit 1'
    18   $ echo f0 > dir0/child1/f
    22   $ echo f0 > dir0/child1/f
    19   $ hg commit -m 'commit 2'
    23   $ hg commit -m 'commit 2'
    20   nothing changed
    24   nothing changed
    21   [1]
    25   [1]
    22 
    26 
    23   $ hg -q up -r 0
    27   $ hg -q up -r 0
    24   $ echo a2 > a
    28   $ echo a2 >> a
    25   $ hg commit -m 'commit 3'
    29   $ hg commit -m 'commit 3'
    26   created new head
    30   created new head
    27 
    31 
    28   $ hg log -G -T '{rev}:{node} {desc}\n'
    32   $ hg log -G -T '{rev}:{node} {desc}\n'
    29   @  2:c8757a2ffe552850d1e0dfe60d295ebf64c196d9 commit 3
    33   @  2:5ce944d7fece1252dae06c34422b573c191b9489 commit 3
    30   |
    34   |
    31   | o  1:650165e803375748a94df471e5b58d85763e0b29 commit 1
    35   | o  1:3ef5e551f219ba505481d34d6b0316b017fa3f00 commit 1
    32   |/
    36   |/
    33   o  0:6d85ca1270b377d320098556ba5bfad34a9ee12d commit 0
    37   o  0:91b232a2253ce0638496f67bdfd7a4933fb51b25 commit 0
    34   
    38   
    35 
    39 
    36   $ hg --debug debugindex a
    40   $ hg --debug debugindex a
    37      rev linkrev nodeid                                   p1                                       p2
    41      rev linkrev nodeid                                   p1                                       p2
    38        0       0 2b4eb07319bfa077a40a2f04913659aef0da42da 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
    42        0       0 649d149df43d83882523b7fb1e6a3af6f1907b39 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
    39        1       1 9a38122997b3ac97be2a9aa2e556838341fdf2cc 2b4eb07319bfa077a40a2f04913659aef0da42da 0000000000000000000000000000000000000000
    43        1       1 0a86321f1379d1a9ecd0579a22977af7a5acaf11 649d149df43d83882523b7fb1e6a3af6f1907b39 0000000000000000000000000000000000000000
    40        2       2 0879345e39377229634b420c639454156726c6b6 2b4eb07319bfa077a40a2f04913659aef0da42da 0000000000000000000000000000000000000000
    44        2       2 7e5801b6d5f03a5a54f3c47b583f7567aad43e5b 649d149df43d83882523b7fb1e6a3af6f1907b39 0000000000000000000000000000000000000000
    41 
    45 
    42   $ hg --debug debugindex dir0/child0/e
    46   $ hg --debug debugindex dir0/child0/e
    43      rev linkrev nodeid                                   p1                                       p2
    47      rev linkrev nodeid                                   p1                                       p2
    44        0       0 bbba6c06b30f443d34ff841bc985c4d0827c6be4 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
    48        0       0 bbba6c06b30f443d34ff841bc985c4d0827c6be4 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
    45 
    49 
   148 
   152 
   149 Fetching a single revision returns just metadata by default
   153 Fetching a single revision returns just metadata by default
   150 
   154 
   151   $ sendhttpv2peer << EOF
   155   $ sendhttpv2peer << EOF
   152   > command filedata
   156   > command filedata
   153   >     nodes eval:[b'\x9a\x38\x12\x29\x97\xb3\xac\x97\xbe\x2a\x9a\xa2\xe5\x56\x83\x83\x41\xfd\xf2\xcc']
   157   >     nodes eval:[b'\x0a\x86\x32\x1f\x13\x79\xd1\xa9\xec\xd0\x57\x9a\x22\x97\x7a\xf7\xa5\xac\xaf\x11']
   154   >     path eval:b'a'
   158   >     path eval:b'a'
   155   > EOF
   159   > EOF
   156   creating http peer for wire protocol version 2
   160   creating http peer for wire protocol version 2
   157   sending filedata command
   161   sending filedata command
   158   s>     POST /api/exp-http-v2-0002/ro/filedata HTTP/1.1\r\n
   162   s>     POST /api/exp-http-v2-0002/ro/filedata HTTP/1.1\r\n
   161   s>     content-type: application/mercurial-exp-framing-0005\r\n
   165   s>     content-type: application/mercurial-exp-framing-0005\r\n
   162   s>     content-length: 64\r\n
   166   s>     content-length: 64\r\n
   163   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   167   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   164   s>     user-agent: Mercurial debugwireproto\r\n
   168   s>     user-agent: Mercurial debugwireproto\r\n
   165   s>     \r\n
   169   s>     \r\n
   166   s>     8\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2Enodes\x81T\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xccDpathAaDnameHfiledata
   170   s>     8\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2Enodes\x81T\n
       
   171   s>     \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11DpathAaDnameHfiledata
   167   s> makefile('rb', None)
   172   s> makefile('rb', None)
   168   s>     HTTP/1.1 200 OK\r\n
   173   s>     HTTP/1.1 200 OK\r\n
   169   s>     Server: testing stub value\r\n
   174   s>     Server: testing stub value\r\n
   170   s>     Date: $HTTP_DATE$\r\n
   175   s>     Date: $HTTP_DATE$\r\n
   171   s>     Content-Type: application/mercurial-exp-framing-0005\r\n
   176   s>     Content-Type: application/mercurial-exp-framing-0005\r\n
   176   s>     \xa1FstatusBok
   181   s>     \xa1FstatusBok
   177   s>     \r\n
   182   s>     \r\n
   178   received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
   183   received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
   179   s>     30\r\n
   184   s>     30\r\n
   180   s>     (\x00\x00\x01\x00\x02\x001
   185   s>     (\x00\x00\x01\x00\x02\x001
   181   s>     \xa1Jtotalitems\x01\xa1DnodeT\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xcc
   186   s>     \xa1Jtotalitems\x01\xa1DnodeT\n
       
   187   s>     \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11
   182   s>     \r\n
   188   s>     \r\n
   183   received frame(size=40; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
   189   received frame(size=40; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
   184   s>     8\r\n
   190   s>     8\r\n
   185   s>     \x00\x00\x00\x01\x00\x02\x002
   191   s>     \x00\x00\x00\x01\x00\x02\x002
   186   s>     \r\n
   192   s>     \r\n
   190   response: gen[
   196   response: gen[
   191     {
   197     {
   192       b'totalitems': 1
   198       b'totalitems': 1
   193     },
   199     },
   194     {
   200     {
   195       b'node': b'\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xcc'
   201       b'node': b'\n\x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11'
   196     }
   202     }
   197   ]
   203   ]
   198 
   204 
   199 Requesting parents works
   205 Requesting parents works
   200 
   206 
   201   $ sendhttpv2peer << EOF
   207   $ sendhttpv2peer << EOF
   202   > command filedata
   208   > command filedata
   203   >     nodes eval:[b'\x9a\x38\x12\x29\x97\xb3\xac\x97\xbe\x2a\x9a\xa2\xe5\x56\x83\x83\x41\xfd\xf2\xcc']
   209   >     nodes eval:[b'\x0a\x86\x32\x1f\x13\x79\xd1\xa9\xec\xd0\x57\x9a\x22\x97\x7a\xf7\xa5\xac\xaf\x11']
   204   >     path eval:b'a'
   210   >     path eval:b'a'
   205   >     fields eval:[b'parents']
   211   >     fields eval:[b'parents']
   206   > EOF
   212   > EOF
   207   creating http peer for wire protocol version 2
   213   creating http peer for wire protocol version 2
   208   sending filedata command
   214   sending filedata command
   212   s>     content-type: application/mercurial-exp-framing-0005\r\n
   218   s>     content-type: application/mercurial-exp-framing-0005\r\n
   213   s>     content-length: 80\r\n
   219   s>     content-length: 80\r\n
   214   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   220   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   215   s>     user-agent: Mercurial debugwireproto\r\n
   221   s>     user-agent: Mercurial debugwireproto\r\n
   216   s>     \r\n
   222   s>     \r\n
   217   s>     H\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa3Ffields\x81GparentsEnodes\x81T\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xccDpathAaDnameHfiledata
   223   s>     H\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa3Ffields\x81GparentsEnodes\x81T\n
       
   224   s>     \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11DpathAaDnameHfiledata
   218   s> makefile('rb', None)
   225   s> makefile('rb', None)
   219   s>     HTTP/1.1 200 OK\r\n
   226   s>     HTTP/1.1 200 OK\r\n
   220   s>     Server: testing stub value\r\n
   227   s>     Server: testing stub value\r\n
   221   s>     Date: $HTTP_DATE$\r\n
   228   s>     Date: $HTTP_DATE$\r\n
   222   s>     Content-Type: application/mercurial-exp-framing-0005\r\n
   229   s>     Content-Type: application/mercurial-exp-framing-0005\r\n
   227   s>     \xa1FstatusBok
   234   s>     \xa1FstatusBok
   228   s>     \r\n
   235   s>     \r\n
   229   received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
   236   received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
   230   s>     63\r\n
   237   s>     63\r\n
   231   s>     [\x00\x00\x01\x00\x02\x001
   238   s>     [\x00\x00\x01\x00\x02\x001
   232   s>     \xa1Jtotalitems\x01\xa2DnodeT\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xccGparents\x82T+N\xb0s\x19\xbf\xa0w\xa4\n
   239   s>     \xa1Jtotalitems\x01\xa2DnodeT\n
   233   s>     /\x04\x916Y\xae\xf0\xdaB\xdaT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
   240   s>     \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11Gparents\x82Td\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
   234   s>     \r\n
   241   s>     \r\n
   235   received frame(size=91; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
   242   received frame(size=91; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
   236   s>     8\r\n
   243   s>     8\r\n
   237   s>     \x00\x00\x00\x01\x00\x02\x002
   244   s>     \x00\x00\x00\x01\x00\x02\x002
   238   s>     \r\n
   245   s>     \r\n
   242   response: gen[
   249   response: gen[
   243     {
   250     {
   244       b'totalitems': 1
   251       b'totalitems': 1
   245     },
   252     },
   246     {
   253     {
   247       b'node': b'\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xcc',
   254       b'node': b'\n\x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11',
   248       b'parents': [
   255       b'parents': [
   249         b'+N\xb0s\x19\xbf\xa0w\xa4\n/\x04\x916Y\xae\xf0\xdaB\xda',
   256         b'd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9',
   250         b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
   257         b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
   251       ]
   258       ]
   252     }
   259     }
   253   ]
   260   ]
   254 
   261 
   255 Requesting revision data works
   262 Requesting revision data works
   256 (haveparents defaults to False, so fulltext is emitted)
   263 (haveparents defaults to False, so fulltext is emitted)
   257 
   264 
   258   $ sendhttpv2peer << EOF
   265   $ sendhttpv2peer << EOF
   259   > command filedata
   266   > command filedata
   260   >     nodes eval:[b'\x9a\x38\x12\x29\x97\xb3\xac\x97\xbe\x2a\x9a\xa2\xe5\x56\x83\x83\x41\xfd\xf2\xcc']
   267   >     nodes eval:[b'\x0a\x86\x32\x1f\x13\x79\xd1\xa9\xec\xd0\x57\x9a\x22\x97\x7a\xf7\xa5\xac\xaf\x11']
   261   >     path eval:b'a'
   268   >     path eval:b'a'
   262   >     fields eval:[b'revision']
   269   >     fields eval:[b'revision']
   263   > EOF
   270   > EOF
   264   creating http peer for wire protocol version 2
   271   creating http peer for wire protocol version 2
   265   sending filedata command
   272   sending filedata command
   269   s>     content-type: application/mercurial-exp-framing-0005\r\n
   276   s>     content-type: application/mercurial-exp-framing-0005\r\n
   270   s>     content-length: 81\r\n
   277   s>     content-length: 81\r\n
   271   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   278   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   272   s>     user-agent: Mercurial debugwireproto\r\n
   279   s>     user-agent: Mercurial debugwireproto\r\n
   273   s>     \r\n
   280   s>     \r\n
   274   s>     I\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa3Ffields\x81HrevisionEnodes\x81T\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xccDpathAaDnameHfiledata
   281   s>     I\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa3Ffields\x81HrevisionEnodes\x81T\n
   275   s> makefile('rb', None)
   282   s>     \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11DpathAaDnameHfiledata
   276   s>     HTTP/1.1 200 OK\r\n
   283   s> makefile('rb', None)
   277   s>     Server: testing stub value\r\n
   284   s>     HTTP/1.1 200 OK\r\n
   278   s>     Date: $HTTP_DATE$\r\n
   285   s>     Server: testing stub value\r\n
   279   s>     Content-Type: application/mercurial-exp-framing-0005\r\n
   286   s>     Date: $HTTP_DATE$\r\n
   280   s>     Transfer-Encoding: chunked\r\n
   287   s>     Content-Type: application/mercurial-exp-framing-0005\r\n
   281   s>     \r\n
   288   s>     Transfer-Encoding: chunked\r\n
   282   s>     13\r\n
   289   s>     \r\n
   283   s>     \x0b\x00\x00\x01\x00\x02\x011
   290   s>     13\r\n
   284   s>     \xa1FstatusBok
   291   s>     \x0b\x00\x00\x01\x00\x02\x011
   285   s>     \r\n
   292   s>     \xa1FstatusBok
   286   received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
   293   s>     \r\n
   287   s>     50\r\n
   294   received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
   288   s>     H\x00\x00\x01\x00\x02\x001
   295   s>     a3\r\n
   289   s>     \xa1Jtotalitems\x01\xa2Ofieldsfollowing\x81\x82Hrevision\x03DnodeT\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xccCa1\n
   296   s>     \x9b\x00\x00\x01\x00\x02\x001
   290   s>     \r\n
   297   s>     \xa1Jtotalitems\x01\xa2Ofieldsfollowing\x81\x82Hrevision\x18TDnodeT\n
   291   received frame(size=72; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
   298   s>     \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11XTa0\n
       
   299   s>     00000000000000000000000000000000000000\n
       
   300   s>     11111111111111111111111111111111111111\n
       
   301   s>     a1\n
       
   302   s>     \r\n
       
   303   received frame(size=155; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
   292   s>     8\r\n
   304   s>     8\r\n
   293   s>     \x00\x00\x00\x01\x00\x02\x002
   305   s>     \x00\x00\x00\x01\x00\x02\x002
   294   s>     \r\n
   306   s>     \r\n
   295   s>     0\r\n
   307   s>     0\r\n
   296   s>     \r\n
   308   s>     \r\n
   301     },
   313     },
   302     {
   314     {
   303       b'fieldsfollowing': [
   315       b'fieldsfollowing': [
   304         [
   316         [
   305           b'revision',
   317           b'revision',
   306           3
   318           84
   307         ]
   319         ]
   308       ],
   320       ],
   309       b'node': b'\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xcc'
   321       b'node': b'\n\x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11'
   310     },
   322     },
   311     b'a1\n'
   323     b'a0\n00000000000000000000000000000000000000\n11111111111111111111111111111111111111\na1\n'
   312   ]
   324   ]
   313 
   325 
   314 haveparents=False should be same as above
   326 haveparents=False should be same as above
   315 
   327 
   316   $ sendhttpv2peer << EOF
   328   $ sendhttpv2peer << EOF
   317   > command filedata
   329   > command filedata
   318   >     nodes eval:[b'\x9a\x38\x12\x29\x97\xb3\xac\x97\xbe\x2a\x9a\xa2\xe5\x56\x83\x83\x41\xfd\xf2\xcc']
   330   >     nodes eval:[b'\x0a\x86\x32\x1f\x13\x79\xd1\xa9\xec\xd0\x57\x9a\x22\x97\x7a\xf7\xa5\xac\xaf\x11']
   319   >     path eval:b'a'
   331   >     path eval:b'a'
   320   >     fields eval:[b'revision']
   332   >     fields eval:[b'revision']
   321   >     haveparents eval:False
   333   >     haveparents eval:False
   322   > EOF
   334   > EOF
   323   creating http peer for wire protocol version 2
   335   creating http peer for wire protocol version 2
   328   s>     content-type: application/mercurial-exp-framing-0005\r\n
   340   s>     content-type: application/mercurial-exp-framing-0005\r\n
   329   s>     content-length: 94\r\n
   341   s>     content-length: 94\r\n
   330   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   342   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   331   s>     user-agent: Mercurial debugwireproto\r\n
   343   s>     user-agent: Mercurial debugwireproto\r\n
   332   s>     \r\n
   344   s>     \r\n
   333   s>     V\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa4Ffields\x81HrevisionKhaveparents\xf4Enodes\x81T\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xccDpathAaDnameHfiledata
   345   s>     V\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa4Ffields\x81HrevisionKhaveparents\xf4Enodes\x81T\n
   334   s> makefile('rb', None)
   346   s>     \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11DpathAaDnameHfiledata
   335   s>     HTTP/1.1 200 OK\r\n
   347   s> makefile('rb', None)
   336   s>     Server: testing stub value\r\n
   348   s>     HTTP/1.1 200 OK\r\n
   337   s>     Date: $HTTP_DATE$\r\n
   349   s>     Server: testing stub value\r\n
   338   s>     Content-Type: application/mercurial-exp-framing-0005\r\n
   350   s>     Date: $HTTP_DATE$\r\n
   339   s>     Transfer-Encoding: chunked\r\n
   351   s>     Content-Type: application/mercurial-exp-framing-0005\r\n
   340   s>     \r\n
   352   s>     Transfer-Encoding: chunked\r\n
   341   s>     13\r\n
   353   s>     \r\n
   342   s>     \x0b\x00\x00\x01\x00\x02\x011
   354   s>     13\r\n
   343   s>     \xa1FstatusBok
   355   s>     \x0b\x00\x00\x01\x00\x02\x011
   344   s>     \r\n
   356   s>     \xa1FstatusBok
   345   received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
   357   s>     \r\n
   346   s>     50\r\n
   358   received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
   347   s>     H\x00\x00\x01\x00\x02\x001
   359   s>     a3\r\n
   348   s>     \xa1Jtotalitems\x01\xa2Ofieldsfollowing\x81\x82Hrevision\x03DnodeT\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xccCa1\n
   360   s>     \x9b\x00\x00\x01\x00\x02\x001
   349   s>     \r\n
   361   s>     \xa1Jtotalitems\x01\xa2Ofieldsfollowing\x81\x82Hrevision\x18TDnodeT\n
   350   received frame(size=72; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
   362   s>     \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11XTa0\n
       
   363   s>     00000000000000000000000000000000000000\n
       
   364   s>     11111111111111111111111111111111111111\n
       
   365   s>     a1\n
       
   366   s>     \r\n
       
   367   received frame(size=155; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
   351   s>     8\r\n
   368   s>     8\r\n
   352   s>     \x00\x00\x00\x01\x00\x02\x002
   369   s>     \x00\x00\x00\x01\x00\x02\x002
   353   s>     \r\n
   370   s>     \r\n
   354   s>     0\r\n
   371   s>     0\r\n
   355   s>     \r\n
   372   s>     \r\n
   360     },
   377     },
   361     {
   378     {
   362       b'fieldsfollowing': [
   379       b'fieldsfollowing': [
   363         [
   380         [
   364           b'revision',
   381           b'revision',
   365           3
   382           84
   366         ]
   383         ]
   367       ],
   384       ],
   368       b'node': b'\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xcc'
   385       b'node': b'\n\x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11'
   369     },
   386     },
   370     b'a1\n'
   387     b'a0\n00000000000000000000000000000000000000\n11111111111111111111111111111111111111\na1\n'
   371   ]
   388   ]
   372 
   389 
   373 haveparents=True should emit a delta
   390 haveparents=True should emit a delta
   374 
   391 
   375   $ sendhttpv2peer << EOF
   392   $ sendhttpv2peer << EOF
   376   > command filedata
   393   > command filedata
   377   >     nodes eval:[b'\x9a\x38\x12\x29\x97\xb3\xac\x97\xbe\x2a\x9a\xa2\xe5\x56\x83\x83\x41\xfd\xf2\xcc']
   394   >     nodes eval:[b'\x0a\x86\x32\x1f\x13\x79\xd1\xa9\xec\xd0\x57\x9a\x22\x97\x7a\xf7\xa5\xac\xaf\x11']
   378   >     path eval:b'a'
   395   >     path eval:b'a'
   379   >     fields eval:[b'revision']
   396   >     fields eval:[b'revision']
   380   >     haveparents eval:True
   397   >     haveparents eval:True
   381   > EOF
   398   > EOF
   382   creating http peer for wire protocol version 2
   399   creating http peer for wire protocol version 2
   387   s>     content-type: application/mercurial-exp-framing-0005\r\n
   404   s>     content-type: application/mercurial-exp-framing-0005\r\n
   388   s>     content-length: 94\r\n
   405   s>     content-length: 94\r\n
   389   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   406   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   390   s>     user-agent: Mercurial debugwireproto\r\n
   407   s>     user-agent: Mercurial debugwireproto\r\n
   391   s>     \r\n
   408   s>     \r\n
   392   s>     V\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa4Ffields\x81HrevisionKhaveparents\xf5Enodes\x81T\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xccDpathAaDnameHfiledata
   409   s>     V\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa4Ffields\x81HrevisionKhaveparents\xf5Enodes\x81T\n
       
   410   s>     \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11DpathAaDnameHfiledata
   393   s> makefile('rb', None)
   411   s> makefile('rb', None)
   394   s>     HTTP/1.1 200 OK\r\n
   412   s>     HTTP/1.1 200 OK\r\n
   395   s>     Server: testing stub value\r\n
   413   s>     Server: testing stub value\r\n
   396   s>     Date: $HTTP_DATE$\r\n
   414   s>     Date: $HTTP_DATE$\r\n
   397   s>     Content-Type: application/mercurial-exp-framing-0005\r\n
   415   s>     Content-Type: application/mercurial-exp-framing-0005\r\n
   402   s>     \xa1FstatusBok
   420   s>     \xa1FstatusBok
   403   s>     \r\n
   421   s>     \r\n
   404   received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
   422   received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
   405   s>     7c\r\n
   423   s>     7c\r\n
   406   s>     t\x00\x00\x01\x00\x02\x001
   424   s>     t\x00\x00\x01\x00\x02\x001
   407   s>     \xa1Jtotalitems\x01\xa3MdeltabasenodeT+N\xb0s\x19\xbf\xa0w\xa4\n
   425   s>     \xa1Jtotalitems\x01\xa3MdeltabasenodeTd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9Ofieldsfollowing\x81\x82Edelta\x0fDnodeT\n
   408   s>     /\x04\x916Y\xae\xf0\xdaB\xdaOfieldsfollowing\x81\x82Edelta\x0fDnodeT\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xccO\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x03a1\n
   426   s>     \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11O\x00\x00\x00Q\x00\x00\x00Q\x00\x00\x00\x03a1\n
   409   s>     \r\n
   427   s>     \r\n
   410   received frame(size=116; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
   428   received frame(size=116; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
   411   s>     8\r\n
   429   s>     8\r\n
   412   s>     \x00\x00\x00\x01\x00\x02\x002
   430   s>     \x00\x00\x00\x01\x00\x02\x002
   413   s>     \r\n
   431   s>     \r\n
   417   response: gen[
   435   response: gen[
   418     {
   436     {
   419       b'totalitems': 1
   437       b'totalitems': 1
   420     },
   438     },
   421     {
   439     {
   422       b'deltabasenode': b'+N\xb0s\x19\xbf\xa0w\xa4\n/\x04\x916Y\xae\xf0\xdaB\xda',
   440       b'deltabasenode': b'd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9',
   423       b'fieldsfollowing': [
   441       b'fieldsfollowing': [
   424         [
   442         [
   425           b'delta',
   443           b'delta',
   426           15
   444           15
   427         ]
   445         ]
   428       ],
   446       ],
   429       b'node': b'\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xcc'
   447       b'node': b'\n\x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11'
   430     },
   448     },
   431     b'\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x03a1\n'
   449     b'\x00\x00\x00Q\x00\x00\x00Q\x00\x00\x00\x03a1\n'
   432   ]
   450   ]
   433 
   451 
   434 Requesting multiple revisions works
   452 Requesting multiple revisions works
   435 (first revision is a fulltext since haveparents=False by default)
   453 (first revision is a fulltext since haveparents=False by default)
   436 
   454 
   437   $ sendhttpv2peer << EOF
   455   $ sendhttpv2peer << EOF
   438   > command filedata
   456   > command filedata
   439   >     nodes eval:[b'\x2b\x4e\xb0\x73\x19\xbf\xa0\x77\xa4\x0a\x2f\x04\x91\x36\x59\xae\xf0\xda\x42\xda', b'\x9a\x38\x12\x29\x97\xb3\xac\x97\xbe\x2a\x9a\xa2\xe5\x56\x83\x83\x41\xfd\xf2\xcc']
   457   >     nodes eval:[b'\x64\x9d\x14\x9d\xf4\x3d\x83\x88\x25\x23\xb7\xfb\x1e\x6a\x3a\xf6\xf1\x90\x7b\x39', b'\x0a\x86\x32\x1f\x13\x79\xd1\xa9\xec\xd0\x57\x9a\x22\x97\x7a\xf7\xa5\xac\xaf\x11']
   440   >     path eval:b'a'
   458   >     path eval:b'a'
   441   >     fields eval:[b'revision']
   459   >     fields eval:[b'revision']
   442   > EOF
   460   > EOF
   443   creating http peer for wire protocol version 2
   461   creating http peer for wire protocol version 2
   444   sending filedata command
   462   sending filedata command
   448   s>     content-type: application/mercurial-exp-framing-0005\r\n
   466   s>     content-type: application/mercurial-exp-framing-0005\r\n
   449   s>     content-length: 102\r\n
   467   s>     content-length: 102\r\n
   450   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   468   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   451   s>     user-agent: Mercurial debugwireproto\r\n
   469   s>     user-agent: Mercurial debugwireproto\r\n
   452   s>     \r\n
   470   s>     \r\n
   453   s>     ^\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa3Ffields\x81HrevisionEnodes\x82T+N\xb0s\x19\xbf\xa0w\xa4\n
   471   s>     ^\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa3Ffields\x81HrevisionEnodes\x82Td\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9T\n
   454   s>     /\x04\x916Y\xae\xf0\xdaB\xdaT\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xccDpathAaDnameHfiledata
   472   s>     \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11DpathAaDnameHfiledata
   455   s> makefile('rb', None)
   473   s> makefile('rb', None)
   456   s>     HTTP/1.1 200 OK\r\n
   474   s>     HTTP/1.1 200 OK\r\n
   457   s>     Server: testing stub value\r\n
   475   s>     Server: testing stub value\r\n
   458   s>     Date: $HTTP_DATE$\r\n
   476   s>     Date: $HTTP_DATE$\r\n
   459   s>     Content-Type: application/mercurial-exp-framing-0005\r\n
   477   s>     Content-Type: application/mercurial-exp-framing-0005\r\n
   460   s>     Transfer-Encoding: chunked\r\n
   478   s>     Transfer-Encoding: chunked\r\n
   461   s>     \r\n
   479   s>     \r\n
   462   s>     13\r\n
   480   s>     13\r\n
   463   s>     \x0b\x00\x00\x01\x00\x02\x011
   481   s>     \x0b\x00\x00\x01\x00\x02\x011
   464   s>     \xa1FstatusBok
   482   s>     \xa1FstatusBok
   465   s>     \r\n
   483   s>     \r\n
   466   received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
   484   received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
   467   s>     b7\r\n
   485   s>     107\r\n
   468   s>     \xaf\x00\x00\x01\x00\x02\x001
   486   s>     \xff\x00\x00\x01\x00\x02\x001
   469   s>     \xa1Jtotalitems\x02\xa2Ofieldsfollowing\x81\x82Hrevision\x03DnodeT+N\xb0s\x19\xbf\xa0w\xa4\n
   487   s>     \xa1Jtotalitems\x02\xa2Ofieldsfollowing\x81\x82Hrevision\x18QDnodeTd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9XQa0\n
   470   s>     /\x04\x916Y\xae\xf0\xdaB\xdaCa0\n
   488   s>     00000000000000000000000000000000000000\n
   471   s>     \xa3MdeltabasenodeT+N\xb0s\x19\xbf\xa0w\xa4\n
   489   s>     11111111111111111111111111111111111111\n
   472   s>     /\x04\x916Y\xae\xf0\xdaB\xdaOfieldsfollowing\x81\x82Edelta\x0fDnodeT\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xccO\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x03a1\n
   490   s>     \xa3MdeltabasenodeTd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9Ofieldsfollowing\x81\x82Edelta\x0fDnodeT\n
   473   s>     \r\n
   491   s>     \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11O\x00\x00\x00Q\x00\x00\x00Q\x00\x00\x00\x03a1\n
   474   received frame(size=175; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
   492   s>     \r\n
       
   493   received frame(size=255; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
   475   s>     8\r\n
   494   s>     8\r\n
   476   s>     \x00\x00\x00\x01\x00\x02\x002
   495   s>     \x00\x00\x00\x01\x00\x02\x002
   477   s>     \r\n
   496   s>     \r\n
   478   s>     0\r\n
   497   s>     0\r\n
   479   s>     \r\n
   498   s>     \r\n
   484     },
   503     },
   485     {
   504     {
   486       b'fieldsfollowing': [
   505       b'fieldsfollowing': [
   487         [
   506         [
   488           b'revision',
   507           b'revision',
   489           3
   508           81
   490         ]
   509         ]
   491       ],
   510       ],
   492       b'node': b'+N\xb0s\x19\xbf\xa0w\xa4\n/\x04\x916Y\xae\xf0\xdaB\xda'
   511       b'node': b'd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9'
   493     },
   512     },
   494     b'a0\n',
   513     b'a0\n00000000000000000000000000000000000000\n11111111111111111111111111111111111111\n',
   495     {
   514     {
   496       b'deltabasenode': b'+N\xb0s\x19\xbf\xa0w\xa4\n/\x04\x916Y\xae\xf0\xdaB\xda',
   515       b'deltabasenode': b'd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9',
   497       b'fieldsfollowing': [
   516       b'fieldsfollowing': [
   498         [
   517         [
   499           b'delta',
   518           b'delta',
   500           15
   519           15
   501         ]
   520         ]
   502       ],
   521       ],
   503       b'node': b'\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xcc'
   522       b'node': b'\n\x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11'
   504     },
   523     },
   505     b'\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x03a1\n'
   524     b'\x00\x00\x00Q\x00\x00\x00Q\x00\x00\x00\x03a1\n'
   506   ]
   525   ]
   507 
   526 
   508 Revisions are sorted by DAG order, parents first
   527 Revisions are sorted by DAG order, parents first
   509 
   528 
   510   $ sendhttpv2peer << EOF
   529   $ sendhttpv2peer << EOF
   511   > command filedata
   530   > command filedata
   512   >     nodes eval:[b'\x9a\x38\x12\x29\x97\xb3\xac\x97\xbe\x2a\x9a\xa2\xe5\x56\x83\x83\x41\xfd\xf2\xcc', b'\x2b\x4e\xb0\x73\x19\xbf\xa0\x77\xa4\x0a\x2f\x04\x91\x36\x59\xae\xf0\xda\x42\xda']
   531   >     nodes eval:[b'\x0a\x86\x32\x1f\x13\x79\xd1\xa9\xec\xd0\x57\x9a\x22\x97\x7a\xf7\xa5\xac\xaf\x11', b'\x64\x9d\x14\x9d\xf4\x3d\x83\x88\x25\x23\xb7\xfb\x1e\x6a\x3a\xf6\xf1\x90\x7b\x39']
   513   >     path eval:b'a'
   532   >     path eval:b'a'
   514   >     fields eval:[b'revision']
   533   >     fields eval:[b'revision']
   515   > EOF
   534   > EOF
   516   creating http peer for wire protocol version 2
   535   creating http peer for wire protocol version 2
   517   sending filedata command
   536   sending filedata command
   521   s>     content-type: application/mercurial-exp-framing-0005\r\n
   540   s>     content-type: application/mercurial-exp-framing-0005\r\n
   522   s>     content-length: 102\r\n
   541   s>     content-length: 102\r\n
   523   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   542   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   524   s>     user-agent: Mercurial debugwireproto\r\n
   543   s>     user-agent: Mercurial debugwireproto\r\n
   525   s>     \r\n
   544   s>     \r\n
   526   s>     ^\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa3Ffields\x81HrevisionEnodes\x82T\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xccT+N\xb0s\x19\xbf\xa0w\xa4\n
   545   s>     ^\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa3Ffields\x81HrevisionEnodes\x82T\n
   527   s>     /\x04\x916Y\xae\xf0\xdaB\xdaDpathAaDnameHfiledata
   546   s>     \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11Td\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9DpathAaDnameHfiledata
   528   s> makefile('rb', None)
   547   s> makefile('rb', None)
   529   s>     HTTP/1.1 200 OK\r\n
   548   s>     HTTP/1.1 200 OK\r\n
   530   s>     Server: testing stub value\r\n
   549   s>     Server: testing stub value\r\n
   531   s>     Date: $HTTP_DATE$\r\n
   550   s>     Date: $HTTP_DATE$\r\n
   532   s>     Content-Type: application/mercurial-exp-framing-0005\r\n
   551   s>     Content-Type: application/mercurial-exp-framing-0005\r\n
   533   s>     Transfer-Encoding: chunked\r\n
   552   s>     Transfer-Encoding: chunked\r\n
   534   s>     \r\n
   553   s>     \r\n
   535   s>     13\r\n
   554   s>     13\r\n
   536   s>     \x0b\x00\x00\x01\x00\x02\x011
   555   s>     \x0b\x00\x00\x01\x00\x02\x011
   537   s>     \xa1FstatusBok
   556   s>     \xa1FstatusBok
   538   s>     \r\n
   557   s>     \r\n
   539   received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
   558   received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
   540   s>     b7\r\n
   559   s>     107\r\n
   541   s>     \xaf\x00\x00\x01\x00\x02\x001
   560   s>     \xff\x00\x00\x01\x00\x02\x001
   542   s>     \xa1Jtotalitems\x02\xa2Ofieldsfollowing\x81\x82Hrevision\x03DnodeT+N\xb0s\x19\xbf\xa0w\xa4\n
   561   s>     \xa1Jtotalitems\x02\xa2Ofieldsfollowing\x81\x82Hrevision\x18QDnodeTd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9XQa0\n
   543   s>     /\x04\x916Y\xae\xf0\xdaB\xdaCa0\n
   562   s>     00000000000000000000000000000000000000\n
   544   s>     \xa3MdeltabasenodeT+N\xb0s\x19\xbf\xa0w\xa4\n
   563   s>     11111111111111111111111111111111111111\n
   545   s>     /\x04\x916Y\xae\xf0\xdaB\xdaOfieldsfollowing\x81\x82Edelta\x0fDnodeT\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xccO\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x03a1\n
   564   s>     \xa3MdeltabasenodeTd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9Ofieldsfollowing\x81\x82Edelta\x0fDnodeT\n
   546   s>     \r\n
   565   s>     \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11O\x00\x00\x00Q\x00\x00\x00Q\x00\x00\x00\x03a1\n
   547   received frame(size=175; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
   566   s>     \r\n
       
   567   received frame(size=255; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
   548   s>     8\r\n
   568   s>     8\r\n
   549   s>     \x00\x00\x00\x01\x00\x02\x002
   569   s>     \x00\x00\x00\x01\x00\x02\x002
   550   s>     \r\n
   570   s>     \r\n
   551   s>     0\r\n
   571   s>     0\r\n
   552   s>     \r\n
   572   s>     \r\n
   557     },
   577     },
   558     {
   578     {
   559       b'fieldsfollowing': [
   579       b'fieldsfollowing': [
   560         [
   580         [
   561           b'revision',
   581           b'revision',
   562           3
   582           81
   563         ]
   583         ]
   564       ],
   584       ],
   565       b'node': b'+N\xb0s\x19\xbf\xa0w\xa4\n/\x04\x916Y\xae\xf0\xdaB\xda'
   585       b'node': b'd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9'
   566     },
   586     },
   567     b'a0\n',
   587     b'a0\n00000000000000000000000000000000000000\n11111111111111111111111111111111111111\n',
   568     {
   588     {
   569       b'deltabasenode': b'+N\xb0s\x19\xbf\xa0w\xa4\n/\x04\x916Y\xae\xf0\xdaB\xda',
   589       b'deltabasenode': b'd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9',
   570       b'fieldsfollowing': [
   590       b'fieldsfollowing': [
   571         [
   591         [
   572           b'delta',
   592           b'delta',
   573           15
   593           15
   574         ]
   594         ]
   575       ],
   595       ],
   576       b'node': b'\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xcc'
   596       b'node': b'\n\x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11'
   577     },
   597     },
   578     b'\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x03a1\n'
   598     b'\x00\x00\x00Q\x00\x00\x00Q\x00\x00\x00\x03a1\n'
   579   ]
   599   ]
   580 
   600 
   581 Requesting parents and revision data works
   601 Requesting parents and revision data works
   582 
   602 
   583   $ sendhttpv2peer << EOF
   603   $ sendhttpv2peer << EOF
   584   > command filedata
   604   > command filedata
   585   >     nodes eval:[b'\x08\x79\x34\x5e\x39\x37\x72\x29\x63\x4b\x42\x0c\x63\x94\x54\x15\x67\x26\xc6\xb6']
   605   >     nodes eval:[b'\x7e\x58\x01\xb6\xd5\xf0\x3a\x5a\x54\xf3\xc4\x7b\x58\x3f\x75\x67\xaa\xd4\x3e\x5b']
   586   >     path eval:b'a'
   606   >     path eval:b'a'
   587   >     fields eval:[b'parents', b'revision']
   607   >     fields eval:[b'parents', b'revision']
   588   > EOF
   608   > EOF
   589   creating http peer for wire protocol version 2
   609   creating http peer for wire protocol version 2
   590   sending filedata command
   610   sending filedata command
   594   s>     content-type: application/mercurial-exp-framing-0005\r\n
   614   s>     content-type: application/mercurial-exp-framing-0005\r\n
   595   s>     content-length: 89\r\n
   615   s>     content-length: 89\r\n
   596   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   616   s>     host: $LOCALIP:$HGPORT\r\n (glob)
   597   s>     user-agent: Mercurial debugwireproto\r\n
   617   s>     user-agent: Mercurial debugwireproto\r\n
   598   s>     \r\n
   618   s>     \r\n
   599   s>     Q\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa3Ffields\x82GparentsHrevisionEnodes\x81T\x08y4^97r)cKB\x0cc\x94T\x15g&\xc6\xb6DpathAaDnameHfiledata
   619   s>     Q\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa3Ffields\x82GparentsHrevisionEnodes\x81T~X\x01\xb6\xd5\xf0:ZT\xf3\xc4{X?ug\xaa\xd4>[DpathAaDnameHfiledata
   600   s> makefile('rb', None)
   620   s> makefile('rb', None)
   601   s>     HTTP/1.1 200 OK\r\n
   621   s>     HTTP/1.1 200 OK\r\n
   602   s>     Server: testing stub value\r\n
   622   s>     Server: testing stub value\r\n
   603   s>     Date: $HTTP_DATE$\r\n
   623   s>     Date: $HTTP_DATE$\r\n
   604   s>     Content-Type: application/mercurial-exp-framing-0005\r\n
   624   s>     Content-Type: application/mercurial-exp-framing-0005\r\n
   605   s>     Transfer-Encoding: chunked\r\n
   625   s>     Transfer-Encoding: chunked\r\n
   606   s>     \r\n
   626   s>     \r\n
   607   s>     13\r\n
   627   s>     13\r\n
   608   s>     \x0b\x00\x00\x01\x00\x02\x011
   628   s>     \x0b\x00\x00\x01\x00\x02\x011
   609   s>     \xa1FstatusBok
   629   s>     \xa1FstatusBok
   610   s>     \r\n
   630   s>     \r\n
   611   received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
   631   received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
   612   s>     83\r\n
   632   s>     d6\r\n
   613   s>     {\x00\x00\x01\x00\x02\x001
   633   s>     \xce\x00\x00\x01\x00\x02\x001
   614   s>     \xa1Jtotalitems\x01\xa3Ofieldsfollowing\x81\x82Hrevision\x03DnodeT\x08y4^97r)cKB\x0cc\x94T\x15g&\xc6\xb6Gparents\x82T+N\xb0s\x19\xbf\xa0w\xa4\n
   634   s>     \xa1Jtotalitems\x01\xa3Ofieldsfollowing\x81\x82Hrevision\x18TDnodeT~X\x01\xb6\xd5\xf0:ZT\xf3\xc4{X?ug\xaa\xd4>[Gparents\x82Td\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00XTa0\n
   615   s>     /\x04\x916Y\xae\xf0\xdaB\xdaT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00Ca2\n
   635   s>     00000000000000000000000000000000000000\n
   616   s>     \r\n
   636   s>     11111111111111111111111111111111111111\n
   617   received frame(size=123; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
   637   s>     a2\n
       
   638   s>     \r\n
       
   639   received frame(size=206; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
   618   s>     8\r\n
   640   s>     8\r\n
   619   s>     \x00\x00\x00\x01\x00\x02\x002
   641   s>     \x00\x00\x00\x01\x00\x02\x002
   620   s>     \r\n
   642   s>     \r\n
   621   s>     0\r\n
   643   s>     0\r\n
   622   s>     \r\n
   644   s>     \r\n
   627     },
   649     },
   628     {
   650     {
   629       b'fieldsfollowing': [
   651       b'fieldsfollowing': [
   630         [
   652         [
   631           b'revision',
   653           b'revision',
   632           3
   654           84
   633         ]
   655         ]
   634       ],
   656       ],
   635       b'node': b'\x08y4^97r)cKB\x0cc\x94T\x15g&\xc6\xb6',
   657       b'node': b'~X\x01\xb6\xd5\xf0:ZT\xf3\xc4{X?ug\xaa\xd4>[',
   636       b'parents': [
   658       b'parents': [
   637         b'+N\xb0s\x19\xbf\xa0w\xa4\n/\x04\x916Y\xae\xf0\xdaB\xda',
   659         b'd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9',
   638         b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
   660         b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
   639       ]
   661       ]
   640     },
   662     },
   641     b'a2\n'
   663     b'a0\n00000000000000000000000000000000000000\n11111111111111111111111111111111111111\na2\n'
   642   ]
   664   ]
   643 
   665 
   644   $ cat error.log
   666   $ cat error.log