Mercurial > hg
annotate tests/test-wireproto-command-filedata.t @ 39863:c73f9f345ec0
tests: use more complex file storage test
The previous test was attempting to to test delta storage behavior.
It didn't do a very good job at it because there was a good chance
a delta wasn't being used in storage.
Let's switch the test to yield a delta in storage so an upcoming
change to delegate delta logic to storage has the desired effect.
Differential Revision: https://phab.mercurial-scm.org/D4723
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 21 Sep 2018 14:54:59 -0700 |
parents | 34074e8ea160 |
children | 393e44324037 |
rev | line source |
---|---|
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1 $ . $TESTDIR/wireprotohelpers.sh |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
3 $ hg init server |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
4 $ enablehttpv2 server |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
5 $ cd server |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
6 $ cat > a << EOF |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
7 > a0 |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
8 > 00000000000000000000000000000000000000 |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
9 > 11111111111111111111111111111111111111 |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
10 > EOF |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
11 $ echo b0 > b |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
12 $ mkdir -p dir0/child0 dir0/child1 dir1 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
13 $ echo c0 > dir0/c |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
14 $ echo d0 > dir0/d |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
15 $ echo e0 > dir0/child0/e |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
16 $ echo f0 > dir0/child1/f |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
17 $ hg -q commit -A -m 'commit 0' |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
18 |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
19 $ echo a1 >> a |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
20 $ echo d1 > dir0/d |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
21 $ hg commit -m 'commit 1' |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
22 $ echo f0 > dir0/child1/f |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
23 $ hg commit -m 'commit 2' |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
24 nothing changed |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
25 [1] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
26 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
27 $ hg -q up -r 0 |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
28 $ echo a2 >> a |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
29 $ hg commit -m 'commit 3' |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
30 created new head |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
31 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
32 $ hg log -G -T '{rev}:{node} {desc}\n' |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
33 @ 2:5ce944d7fece1252dae06c34422b573c191b9489 commit 3 |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
34 | |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
35 | o 1:3ef5e551f219ba505481d34d6b0316b017fa3f00 commit 1 |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
36 |/ |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
37 o 0:91b232a2253ce0638496f67bdfd7a4933fb51b25 commit 0 |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
38 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
39 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
40 $ hg --debug debugindex a |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
41 rev linkrev nodeid p1 p2 |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
42 0 0 649d149df43d83882523b7fb1e6a3af6f1907b39 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
43 1 1 0a86321f1379d1a9ecd0579a22977af7a5acaf11 649d149df43d83882523b7fb1e6a3af6f1907b39 0000000000000000000000000000000000000000 |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
44 2 2 7e5801b6d5f03a5a54f3c47b583f7567aad43e5b 649d149df43d83882523b7fb1e6a3af6f1907b39 0000000000000000000000000000000000000000 |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
45 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
46 $ hg --debug debugindex dir0/child0/e |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
47 rev linkrev nodeid p1 p2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
48 0 0 bbba6c06b30f443d34ff841bc985c4d0827c6be4 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
49 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
50 $ hg serve -p $HGPORT -d --pid-file hg.pid -E error.log |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
51 $ cat hg.pid > $DAEMON_PIDS |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
52 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
53 Missing arguments is an error |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
54 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
55 $ sendhttpv2peer << EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
56 > command filedata |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
57 > EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
58 creating http peer for wire protocol version 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
59 sending filedata command |
39815
d3d333ab167a
wireprotov2: teach changesetdata to fetch ancestors until depth
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39814
diff
changeset
|
60 s> POST /api/exp-http-v2-0002/ro/filedata HTTP/1.1\r\n |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
61 s> Accept-Encoding: identity\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
62 s> accept: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
63 s> content-type: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
64 s> content-length: 23\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
65 s> host: $LOCALIP:$HGPORT\r\n (glob) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
66 s> user-agent: Mercurial debugwireproto\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
67 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
68 s> \x0f\x00\x00\x01\x00\x01\x01\x11\xa1DnameHfiledata |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
69 s> makefile('rb', None) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
70 s> HTTP/1.1 200 OK\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
71 s> Server: testing stub value\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
72 s> Date: $HTTP_DATE$\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
73 s> Content-Type: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
74 s> Transfer-Encoding: chunked\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
75 s> \r\n |
39810
0b61d21f05cc
wireprotov2: declare command arguments richly
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39641
diff
changeset
|
76 s> 4e\r\n |
0b61d21f05cc
wireprotov2: declare command arguments richly
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39641
diff
changeset
|
77 s> F\x00\x00\x01\x00\x02\x012 |
0b61d21f05cc
wireprotov2: declare command arguments richly
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39641
diff
changeset
|
78 s> \xa2Eerror\xa1GmessageX\'missing required arguments: nodes, pathFstatusEerror |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
79 s> \r\n |
39810
0b61d21f05cc
wireprotov2: declare command arguments richly
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39641
diff
changeset
|
80 received frame(size=70; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=eos) |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
81 s> 0\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
82 s> \r\n |
39810
0b61d21f05cc
wireprotov2: declare command arguments richly
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39641
diff
changeset
|
83 abort: missing required arguments: nodes, path! |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
84 [255] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
85 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
86 $ sendhttpv2peer << EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
87 > command filedata |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
88 > nodes eval:[] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
89 > EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
90 creating http peer for wire protocol version 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
91 sending filedata command |
39815
d3d333ab167a
wireprotov2: teach changesetdata to fetch ancestors until depth
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39814
diff
changeset
|
92 s> POST /api/exp-http-v2-0002/ro/filedata HTTP/1.1\r\n |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
93 s> Accept-Encoding: identity\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
94 s> accept: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
95 s> content-type: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
96 s> content-length: 36\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
97 s> host: $LOCALIP:$HGPORT\r\n (glob) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
98 s> user-agent: Mercurial debugwireproto\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
99 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
100 s> \x1c\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa1Enodes\x80DnameHfiledata |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
101 s> makefile('rb', None) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
102 s> HTTP/1.1 200 OK\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
103 s> Server: testing stub value\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
104 s> Date: $HTTP_DATE$\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
105 s> Content-Type: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
106 s> Transfer-Encoding: chunked\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
107 s> \r\n |
39810
0b61d21f05cc
wireprotov2: declare command arguments richly
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39641
diff
changeset
|
108 s> 47\r\n |
0b61d21f05cc
wireprotov2: declare command arguments richly
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39641
diff
changeset
|
109 s> ?\x00\x00\x01\x00\x02\x012 |
0b61d21f05cc
wireprotov2: declare command arguments richly
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39641
diff
changeset
|
110 s> \xa2Eerror\xa1GmessageX missing required arguments: pathFstatusEerror |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
111 s> \r\n |
39810
0b61d21f05cc
wireprotov2: declare command arguments richly
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39641
diff
changeset
|
112 received frame(size=63; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=eos) |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
113 s> 0\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
114 s> \r\n |
39810
0b61d21f05cc
wireprotov2: declare command arguments richly
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39641
diff
changeset
|
115 abort: missing required arguments: path! |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
116 [255] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
117 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
118 Unknown node is an error |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
119 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
120 $ sendhttpv2peer << EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
121 > command filedata |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
122 > nodes eval:[b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa'] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
123 > path eval:b'a' |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
124 > EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
125 creating http peer for wire protocol version 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
126 sending filedata command |
39815
d3d333ab167a
wireprotov2: teach changesetdata to fetch ancestors until depth
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39814
diff
changeset
|
127 s> POST /api/exp-http-v2-0002/ro/filedata HTTP/1.1\r\n |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
128 s> Accept-Encoding: identity\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
129 s> accept: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
130 s> content-type: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
131 s> content-length: 64\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
132 s> host: $LOCALIP:$HGPORT\r\n (glob) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
133 s> user-agent: Mercurial debugwireproto\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
134 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
135 s> 8\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2Enodes\x81T\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaaDpathAaDnameHfiledata |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
136 s> makefile('rb', None) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
137 s> HTTP/1.1 200 OK\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
138 s> Server: testing stub value\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
139 s> Date: $HTTP_DATE$\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
140 s> Content-Type: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
141 s> Transfer-Encoding: chunked\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
142 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
143 s> 6b\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
144 s> c\x00\x00\x01\x00\x02\x012 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
145 s> \xa2Eerror\xa2Dargs\x81X(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaGmessageUunknown file node: %sFstatusEerror |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
146 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
147 received frame(size=99; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=eos) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
148 s> 0\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
149 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
150 abort: unknown file node: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa! |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
151 [255] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
152 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
153 Fetching a single revision returns just metadata by default |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
154 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
155 $ sendhttpv2peer << EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
156 > command filedata |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
157 > nodes eval:[b'\x0a\x86\x32\x1f\x13\x79\xd1\xa9\xec\xd0\x57\x9a\x22\x97\x7a\xf7\xa5\xac\xaf\x11'] |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
158 > path eval:b'a' |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
159 > EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
160 creating http peer for wire protocol version 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
161 sending filedata command |
39815
d3d333ab167a
wireprotov2: teach changesetdata to fetch ancestors until depth
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39814
diff
changeset
|
162 s> POST /api/exp-http-v2-0002/ro/filedata HTTP/1.1\r\n |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
163 s> Accept-Encoding: identity\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
164 s> accept: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
165 s> content-type: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
166 s> content-length: 64\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
167 s> host: $LOCALIP:$HGPORT\r\n (glob) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
168 s> user-agent: Mercurial debugwireproto\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
169 s> \r\n |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
170 s> 8\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2Enodes\x81T\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
171 s> \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11DpathAaDnameHfiledata |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
172 s> makefile('rb', None) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
173 s> HTTP/1.1 200 OK\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
174 s> Server: testing stub value\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
175 s> Date: $HTTP_DATE$\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
176 s> Content-Type: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
177 s> Transfer-Encoding: chunked\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
178 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
179 s> 13\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
180 s> \x0b\x00\x00\x01\x00\x02\x011 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
181 s> \xa1FstatusBok |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
182 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
183 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
184 s> 30\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
185 s> (\x00\x00\x01\x00\x02\x001 |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
186 s> \xa1Jtotalitems\x01\xa1DnodeT\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
187 s> \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11 |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
188 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
189 received frame(size=40; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
190 s> 8\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
191 s> \x00\x00\x00\x01\x00\x02\x002 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
192 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
193 s> 0\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
194 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
195 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
196 response: gen[ |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
197 { |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
198 b'totalitems': 1 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
199 }, |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
200 { |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
201 b'node': b'\n\x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11' |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
202 } |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
203 ] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
204 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
205 Requesting parents works |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
206 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
207 $ sendhttpv2peer << EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
208 > command filedata |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
209 > nodes eval:[b'\x0a\x86\x32\x1f\x13\x79\xd1\xa9\xec\xd0\x57\x9a\x22\x97\x7a\xf7\xa5\xac\xaf\x11'] |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
210 > path eval:b'a' |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
211 > fields eval:[b'parents'] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
212 > EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
213 creating http peer for wire protocol version 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
214 sending filedata command |
39815
d3d333ab167a
wireprotov2: teach changesetdata to fetch ancestors until depth
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39814
diff
changeset
|
215 s> POST /api/exp-http-v2-0002/ro/filedata HTTP/1.1\r\n |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
216 s> Accept-Encoding: identity\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
217 s> accept: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
218 s> content-type: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
219 s> content-length: 80\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
220 s> host: $LOCALIP:$HGPORT\r\n (glob) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
221 s> user-agent: Mercurial debugwireproto\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
222 s> \r\n |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
223 s> H\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa3Ffields\x81GparentsEnodes\x81T\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
224 s> \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11DpathAaDnameHfiledata |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
225 s> makefile('rb', None) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
226 s> HTTP/1.1 200 OK\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
227 s> Server: testing stub value\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
228 s> Date: $HTTP_DATE$\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
229 s> Content-Type: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
230 s> Transfer-Encoding: chunked\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
231 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
232 s> 13\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
233 s> \x0b\x00\x00\x01\x00\x02\x011 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
234 s> \xa1FstatusBok |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
235 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
236 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
237 s> 63\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
238 s> [\x00\x00\x01\x00\x02\x001 |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
239 s> \xa1Jtotalitems\x01\xa2DnodeT\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
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 |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
241 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
242 received frame(size=91; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
243 s> 8\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
244 s> \x00\x00\x00\x01\x00\x02\x002 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
245 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
246 s> 0\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
247 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
248 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
249 response: gen[ |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
250 { |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
251 b'totalitems': 1 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
252 }, |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
253 { |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
254 b'node': b'\n\x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11', |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
255 b'parents': [ |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
256 b'd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9', |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
257 b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
258 ] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
259 } |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
260 ] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
261 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
262 Requesting revision data works |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
263 (haveparents defaults to False, so fulltext is emitted) |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
264 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
265 $ sendhttpv2peer << EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
266 > command filedata |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
267 > nodes eval:[b'\x0a\x86\x32\x1f\x13\x79\xd1\xa9\xec\xd0\x57\x9a\x22\x97\x7a\xf7\xa5\xac\xaf\x11'] |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
268 > path eval:b'a' |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
269 > fields eval:[b'revision'] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
270 > EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
271 creating http peer for wire protocol version 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
272 sending filedata command |
39815
d3d333ab167a
wireprotov2: teach changesetdata to fetch ancestors until depth
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39814
diff
changeset
|
273 s> POST /api/exp-http-v2-0002/ro/filedata HTTP/1.1\r\n |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
274 s> Accept-Encoding: identity\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
275 s> accept: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
276 s> content-type: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
277 s> content-length: 81\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
278 s> host: $LOCALIP:$HGPORT\r\n (glob) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
279 s> user-agent: Mercurial debugwireproto\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
280 s> \r\n |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
281 s> I\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa3Ffields\x81HrevisionEnodes\x81T\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
282 s> \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11DpathAaDnameHfiledata |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
283 s> makefile('rb', None) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
284 s> HTTP/1.1 200 OK\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
285 s> Server: testing stub value\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
286 s> Date: $HTTP_DATE$\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
287 s> Content-Type: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
288 s> Transfer-Encoding: chunked\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
289 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
290 s> 13\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
291 s> \x0b\x00\x00\x01\x00\x02\x011 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
292 s> \xa1FstatusBok |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
293 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
294 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
295 s> a3\r\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
296 s> \x9b\x00\x00\x01\x00\x02\x001 |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
297 s> \xa1Jtotalitems\x01\xa2Ofieldsfollowing\x81\x82Hrevision\x18TDnodeT\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
298 s> \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11XTa0\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
299 s> 00000000000000000000000000000000000000\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
300 s> 11111111111111111111111111111111111111\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
301 s> a1\n |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
302 s> \r\n |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
303 received frame(size=155; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
304 s> 8\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
305 s> \x00\x00\x00\x01\x00\x02\x002 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
306 s> \r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
307 s> 0\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
308 s> \r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
309 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
310 response: gen[ |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
311 { |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
312 b'totalitems': 1 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
313 }, |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
314 { |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
315 b'fieldsfollowing': [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
316 [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
317 b'revision', |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
318 84 |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
319 ] |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
320 ], |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
321 b'node': b'\n\x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11' |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
322 }, |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
323 b'a0\n00000000000000000000000000000000000000\n11111111111111111111111111111111111111\na1\n' |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
324 ] |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
325 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
326 haveparents=False should be same as above |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
327 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
328 $ sendhttpv2peer << EOF |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
329 > command filedata |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
330 > nodes eval:[b'\x0a\x86\x32\x1f\x13\x79\xd1\xa9\xec\xd0\x57\x9a\x22\x97\x7a\xf7\xa5\xac\xaf\x11'] |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
331 > path eval:b'a' |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
332 > fields eval:[b'revision'] |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
333 > haveparents eval:False |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
334 > EOF |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
335 creating http peer for wire protocol version 2 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
336 sending filedata command |
39815
d3d333ab167a
wireprotov2: teach changesetdata to fetch ancestors until depth
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39814
diff
changeset
|
337 s> POST /api/exp-http-v2-0002/ro/filedata HTTP/1.1\r\n |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
338 s> Accept-Encoding: identity\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
339 s> accept: application/mercurial-exp-framing-0005\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
340 s> content-type: application/mercurial-exp-framing-0005\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
341 s> content-length: 94\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
342 s> host: $LOCALIP:$HGPORT\r\n (glob) |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
343 s> user-agent: Mercurial debugwireproto\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
344 s> \r\n |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
345 s> V\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa4Ffields\x81HrevisionKhaveparents\xf4Enodes\x81T\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
346 s> \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11DpathAaDnameHfiledata |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
347 s> makefile('rb', None) |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
348 s> HTTP/1.1 200 OK\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
349 s> Server: testing stub value\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
350 s> Date: $HTTP_DATE$\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
351 s> Content-Type: application/mercurial-exp-framing-0005\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
352 s> Transfer-Encoding: chunked\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
353 s> \r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
354 s> 13\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
355 s> \x0b\x00\x00\x01\x00\x02\x011 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
356 s> \xa1FstatusBok |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
357 s> \r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
358 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
359 s> a3\r\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
360 s> \x9b\x00\x00\x01\x00\x02\x001 |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
361 s> \xa1Jtotalitems\x01\xa2Ofieldsfollowing\x81\x82Hrevision\x18TDnodeT\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
362 s> \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11XTa0\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
363 s> 00000000000000000000000000000000000000\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
364 s> 11111111111111111111111111111111111111\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
365 s> a1\n |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
366 s> \r\n |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
367 received frame(size=155; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
368 s> 8\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
369 s> \x00\x00\x00\x01\x00\x02\x002 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
370 s> \r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
371 s> 0\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
372 s> \r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
373 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
374 response: gen[ |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
375 { |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
376 b'totalitems': 1 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
377 }, |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
378 { |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
379 b'fieldsfollowing': [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
380 [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
381 b'revision', |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
382 84 |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
383 ] |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
384 ], |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
385 b'node': b'\n\x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11' |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
386 }, |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
387 b'a0\n00000000000000000000000000000000000000\n11111111111111111111111111111111111111\na1\n' |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
388 ] |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
389 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
390 haveparents=True should emit a delta |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
391 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
392 $ sendhttpv2peer << EOF |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
393 > command filedata |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
394 > nodes eval:[b'\x0a\x86\x32\x1f\x13\x79\xd1\xa9\xec\xd0\x57\x9a\x22\x97\x7a\xf7\xa5\xac\xaf\x11'] |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
395 > path eval:b'a' |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
396 > fields eval:[b'revision'] |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
397 > haveparents eval:True |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
398 > EOF |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
399 creating http peer for wire protocol version 2 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
400 sending filedata command |
39815
d3d333ab167a
wireprotov2: teach changesetdata to fetch ancestors until depth
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39814
diff
changeset
|
401 s> POST /api/exp-http-v2-0002/ro/filedata HTTP/1.1\r\n |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
402 s> Accept-Encoding: identity\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
403 s> accept: application/mercurial-exp-framing-0005\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
404 s> content-type: application/mercurial-exp-framing-0005\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
405 s> content-length: 94\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
406 s> host: $LOCALIP:$HGPORT\r\n (glob) |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
407 s> user-agent: Mercurial debugwireproto\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
408 s> \r\n |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
409 s> V\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa4Ffields\x81HrevisionKhaveparents\xf5Enodes\x81T\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
410 s> \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11DpathAaDnameHfiledata |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
411 s> makefile('rb', None) |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
412 s> HTTP/1.1 200 OK\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
413 s> Server: testing stub value\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
414 s> Date: $HTTP_DATE$\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
415 s> Content-Type: application/mercurial-exp-framing-0005\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
416 s> Transfer-Encoding: chunked\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
417 s> \r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
418 s> 13\r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
419 s> \x0b\x00\x00\x01\x00\x02\x011 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
420 s> \xa1FstatusBok |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
421 s> \r\n |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
422 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
423 s> 7c\r\n |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
424 s> t\x00\x00\x01\x00\x02\x001 |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
425 s> \xa1Jtotalitems\x01\xa3MdeltabasenodeTd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9Ofieldsfollowing\x81\x82Edelta\x0fDnodeT\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
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 |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
427 s> \r\n |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
428 received frame(size=116; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
429 s> 8\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
430 s> \x00\x00\x00\x01\x00\x02\x002 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
431 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
432 s> 0\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
433 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
434 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
435 response: gen[ |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
436 { |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
437 b'totalitems': 1 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
438 }, |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
439 { |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
440 b'deltabasenode': b'd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9', |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
441 b'fieldsfollowing': [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
442 [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
443 b'delta', |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
444 15 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
445 ] |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
446 ], |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
447 b'node': b'\n\x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11' |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
448 }, |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
449 b'\x00\x00\x00Q\x00\x00\x00Q\x00\x00\x00\x03a1\n' |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
450 ] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
451 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
452 Requesting multiple revisions works |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
453 (first revision is a fulltext since haveparents=False by default) |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
454 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
455 $ sendhttpv2peer << EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
456 > command filedata |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
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'] |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
458 > path eval:b'a' |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
459 > fields eval:[b'revision'] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
460 > EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
461 creating http peer for wire protocol version 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
462 sending filedata command |
39815
d3d333ab167a
wireprotov2: teach changesetdata to fetch ancestors until depth
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39814
diff
changeset
|
463 s> POST /api/exp-http-v2-0002/ro/filedata HTTP/1.1\r\n |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
464 s> Accept-Encoding: identity\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
465 s> accept: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
466 s> content-type: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
467 s> content-length: 102\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
468 s> host: $LOCALIP:$HGPORT\r\n (glob) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
469 s> user-agent: Mercurial debugwireproto\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
470 s> \r\n |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
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 |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
472 s> \x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11DpathAaDnameHfiledata |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
473 s> makefile('rb', None) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
474 s> HTTP/1.1 200 OK\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
475 s> Server: testing stub value\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
476 s> Date: $HTTP_DATE$\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
477 s> Content-Type: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
478 s> Transfer-Encoding: chunked\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
479 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
480 s> 13\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
481 s> \x0b\x00\x00\x01\x00\x02\x011 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
482 s> \xa1FstatusBok |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
483 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
484 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
485 s> 107\r\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
486 s> \xff\x00\x00\x01\x00\x02\x001 |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
487 s> \xa1Jtotalitems\x02\xa2Ofieldsfollowing\x81\x82Hrevision\x18QDnodeTd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9XQa0\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
488 s> 00000000000000000000000000000000000000\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
489 s> 11111111111111111111111111111111111111\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
490 s> \xa3MdeltabasenodeTd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9Ofieldsfollowing\x81\x82Edelta\x0fDnodeT\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
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 |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
492 s> \r\n |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
493 received frame(size=255; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
494 s> 8\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
495 s> \x00\x00\x00\x01\x00\x02\x002 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
496 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
497 s> 0\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
498 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
499 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
500 response: gen[ |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
501 { |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
502 b'totalitems': 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
503 }, |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
504 { |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
505 b'fieldsfollowing': [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
506 [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
507 b'revision', |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
508 81 |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
509 ] |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
510 ], |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
511 b'node': b'd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9' |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
512 }, |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
513 b'a0\n00000000000000000000000000000000000000\n11111111111111111111111111111111111111\n', |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
514 { |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
515 b'deltabasenode': b'd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9', |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
516 b'fieldsfollowing': [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
517 [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
518 b'delta', |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
519 15 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
520 ] |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
521 ], |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
522 b'node': b'\n\x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11' |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
523 }, |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
524 b'\x00\x00\x00Q\x00\x00\x00Q\x00\x00\x00\x03a1\n' |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
525 ] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
526 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
527 Revisions are sorted by DAG order, parents first |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
528 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
529 $ sendhttpv2peer << EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
530 > command filedata |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
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'] |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
532 > path eval:b'a' |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
533 > fields eval:[b'revision'] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
534 > EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
535 creating http peer for wire protocol version 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
536 sending filedata command |
39815
d3d333ab167a
wireprotov2: teach changesetdata to fetch ancestors until depth
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39814
diff
changeset
|
537 s> POST /api/exp-http-v2-0002/ro/filedata HTTP/1.1\r\n |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
538 s> Accept-Encoding: identity\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
539 s> accept: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
540 s> content-type: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
541 s> content-length: 102\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
542 s> host: $LOCALIP:$HGPORT\r\n (glob) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
543 s> user-agent: Mercurial debugwireproto\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
544 s> \r\n |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
545 s> ^\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa3Ffields\x81HrevisionEnodes\x82T\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
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 |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
547 s> makefile('rb', None) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
548 s> HTTP/1.1 200 OK\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
549 s> Server: testing stub value\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
550 s> Date: $HTTP_DATE$\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
551 s> Content-Type: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
552 s> Transfer-Encoding: chunked\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
553 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
554 s> 13\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
555 s> \x0b\x00\x00\x01\x00\x02\x011 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
556 s> \xa1FstatusBok |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
557 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
558 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
559 s> 107\r\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
560 s> \xff\x00\x00\x01\x00\x02\x001 |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
561 s> \xa1Jtotalitems\x02\xa2Ofieldsfollowing\x81\x82Hrevision\x18QDnodeTd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9XQa0\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
562 s> 00000000000000000000000000000000000000\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
563 s> 11111111111111111111111111111111111111\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
564 s> \xa3MdeltabasenodeTd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9Ofieldsfollowing\x81\x82Edelta\x0fDnodeT\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
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 |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
566 s> \r\n |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
567 received frame(size=255; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
568 s> 8\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
569 s> \x00\x00\x00\x01\x00\x02\x002 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
570 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
571 s> 0\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
572 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
573 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
574 response: gen[ |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
575 { |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
576 b'totalitems': 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
577 }, |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
578 { |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
579 b'fieldsfollowing': [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
580 [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
581 b'revision', |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
582 81 |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
583 ] |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
584 ], |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
585 b'node': b'd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9' |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
586 }, |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
587 b'a0\n00000000000000000000000000000000000000\n11111111111111111111111111111111111111\n', |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
588 { |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
589 b'deltabasenode': b'd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9', |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
590 b'fieldsfollowing': [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
591 [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
592 b'delta', |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
593 15 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
594 ] |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
595 ], |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
596 b'node': b'\n\x862\x1f\x13y\xd1\xa9\xec\xd0W\x9a"\x97z\xf7\xa5\xac\xaf\x11' |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
597 }, |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
598 b'\x00\x00\x00Q\x00\x00\x00Q\x00\x00\x00\x03a1\n' |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
599 ] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
600 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
601 Requesting parents and revision data works |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
602 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
603 $ sendhttpv2peer << EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
604 > command filedata |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
605 > nodes eval:[b'\x7e\x58\x01\xb6\xd5\xf0\x3a\x5a\x54\xf3\xc4\x7b\x58\x3f\x75\x67\xaa\xd4\x3e\x5b'] |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
606 > path eval:b'a' |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
607 > fields eval:[b'parents', b'revision'] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
608 > EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
609 creating http peer for wire protocol version 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
610 sending filedata command |
39815
d3d333ab167a
wireprotov2: teach changesetdata to fetch ancestors until depth
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39814
diff
changeset
|
611 s> POST /api/exp-http-v2-0002/ro/filedata HTTP/1.1\r\n |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
612 s> Accept-Encoding: identity\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
613 s> accept: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
614 s> content-type: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
615 s> content-length: 89\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
616 s> host: $LOCALIP:$HGPORT\r\n (glob) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
617 s> user-agent: Mercurial debugwireproto\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
618 s> \r\n |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
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 |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
620 s> makefile('rb', None) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
621 s> HTTP/1.1 200 OK\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
622 s> Server: testing stub value\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
623 s> Date: $HTTP_DATE$\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
624 s> Content-Type: application/mercurial-exp-framing-0005\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
625 s> Transfer-Encoding: chunked\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
626 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
627 s> 13\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
628 s> \x0b\x00\x00\x01\x00\x02\x011 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
629 s> \xa1FstatusBok |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
630 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
631 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
632 s> d6\r\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
633 s> \xce\x00\x00\x01\x00\x02\x001 |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
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 |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
635 s> 00000000000000000000000000000000000000\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
636 s> 11111111111111111111111111111111111111\n |
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
637 s> a2\n |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
638 s> \r\n |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
639 received frame(size=206; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
640 s> 8\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
641 s> \x00\x00\x00\x01\x00\x02\x002 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
642 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
643 s> 0\r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
644 s> \r\n |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
645 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
646 response: gen[ |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
647 { |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
648 b'totalitems': 1 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
649 }, |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
650 { |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
651 b'fieldsfollowing': [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
652 [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
653 b'revision', |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
654 84 |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
655 ] |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
656 ], |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
657 b'node': b'~X\x01\xb6\xd5\xf0:ZT\xf3\xc4{X?ug\xaa\xd4>[', |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
658 b'parents': [ |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
659 b'd\x9d\x14\x9d\xf4=\x83\x88%#\xb7\xfb\x1ej:\xf6\xf1\x90{9', |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
660 b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
661 ] |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
662 }, |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
663 b'a0\n00000000000000000000000000000000000000\n11111111111111111111111111111111111111\na2\n' |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
664 ] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
665 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
666 $ cat error.log |