Mercurial > hg
annotate tests/test-wireproto-command-filedata.t @ 40892:140d455ef40a
test: enable sparse-revlog for test-hgweb-commands.t
We are about to enable sparse-revlog globally. To help with reviewing the
tests change, we isolate them in individual changesets.
Differential Revision: https://phab.mercurial-scm.org/D5319
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Mon, 12 Nov 2018 01:04:59 +0100 |
parents | a732d70253b0 |
children | afdbc9c6a333 |
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 |
39810
0b61d21f05cc
wireprotov2: declare command arguments richly
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39641
diff
changeset
|
60 abort: missing required arguments: nodes, path! |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
61 [255] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
62 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
63 $ sendhttpv2peer << EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
64 > command filedata |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
65 > nodes eval:[] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
66 > EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
67 creating http peer for wire protocol version 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
68 sending filedata command |
39810
0b61d21f05cc
wireprotov2: declare command arguments richly
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39641
diff
changeset
|
69 abort: missing required arguments: path! |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
70 [255] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
71 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
72 Unknown node is an error |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
73 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
74 $ sendhttpv2peer << EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
75 > command filedata |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
76 > 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
|
77 > path eval:b'a' |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
78 > EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
79 creating http peer for wire protocol version 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
80 sending filedata command |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
81 abort: unknown file node: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa! |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
82 [255] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
83 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
84 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
|
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 |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
88 > 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
|
89 > path eval:b'a' |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
90 > EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
91 creating http peer for wire protocol version 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
92 sending filedata command |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
93 response: gen[ |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
94 { |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
95 b'totalitems': 1 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
96 }, |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
97 { |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
98 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
|
99 } |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
100 ] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
101 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
102 Requesting parents works |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
103 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
104 $ sendhttpv2peer << EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
105 > command filedata |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
106 > 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
|
107 > path eval:b'a' |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
108 > fields eval:[b'parents'] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
109 > EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
110 creating http peer for wire protocol version 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
111 sending filedata command |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
112 response: gen[ |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
113 { |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
114 b'totalitems': 1 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
115 }, |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
116 { |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
117 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
|
118 b'parents': [ |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
119 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
|
120 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
|
121 ] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
122 } |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
123 ] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
124 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
125 Requesting revision data works |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
126 (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
|
127 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
128 $ sendhttpv2peer << EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
129 > command filedata |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
130 > 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
|
131 > path eval:b'a' |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
132 > fields eval:[b'revision'] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
133 > EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
134 creating http peer for wire protocol version 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
135 sending filedata command |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
136 response: gen[ |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
137 { |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
138 b'totalitems': 1 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
139 }, |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
140 { |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
141 b'fieldsfollowing': [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
142 [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
143 b'revision', |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
144 84 |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
145 ] |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
146 ], |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
147 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
|
148 }, |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
149 b'a0\n00000000000000000000000000000000000000\n11111111111111111111111111111111111111\na1\n' |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
150 ] |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
151 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
152 haveparents=False should be same as above |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
153 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
154 $ sendhttpv2peer << EOF |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
155 > command filedata |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
156 > 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
|
157 > path eval:b'a' |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
158 > fields eval:[b'revision'] |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
159 > haveparents eval:False |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
160 > EOF |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
161 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
|
162 sending filedata command |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
163 response: gen[ |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
164 { |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
165 b'totalitems': 1 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
166 }, |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
167 { |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
168 b'fieldsfollowing': [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
169 [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
170 b'revision', |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
171 84 |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
172 ] |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
173 ], |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
174 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
|
175 }, |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
176 b'a0\n00000000000000000000000000000000000000\n11111111111111111111111111111111111111\na1\n' |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
177 ] |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
178 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
179 haveparents=True should emit a delta |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
180 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
181 $ sendhttpv2peer << EOF |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
182 > command filedata |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
183 > 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
|
184 > path eval:b'a' |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
185 > fields eval:[b'revision'] |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
186 > haveparents eval:True |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
187 > EOF |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
188 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
|
189 sending filedata command |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
190 response: gen[ |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
191 { |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
192 b'totalitems': 1 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
193 }, |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
194 { |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
195 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
|
196 b'fieldsfollowing': [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
197 [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
198 b'delta', |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
199 15 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
200 ] |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
201 ], |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
202 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
|
203 }, |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
204 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
|
205 ] |
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 Requesting multiple revisions works |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
208 (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
|
209 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
210 $ sendhttpv2peer << EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
211 > command filedata |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
212 > 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
|
213 > path eval:b'a' |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
214 > fields eval:[b'revision'] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
215 > EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
216 creating http peer for wire protocol version 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
217 sending filedata command |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
218 response: gen[ |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
219 { |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
220 b'totalitems': 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
221 }, |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
222 { |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
223 b'fieldsfollowing': [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
224 [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
225 b'revision', |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
226 81 |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
227 ] |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
228 ], |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
229 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
|
230 }, |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
231 b'a0\n00000000000000000000000000000000000000\n11111111111111111111111111111111111111\n', |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
232 { |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
233 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
|
234 b'fieldsfollowing': [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
235 [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
236 b'delta', |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
237 15 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
238 ] |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
239 ], |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
240 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
|
241 }, |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
242 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
|
243 ] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
244 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
245 Revisions are sorted by DAG order, parents first |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
246 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
247 $ sendhttpv2peer << EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
248 > command filedata |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
249 > 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
|
250 > path eval:b'a' |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
251 > fields eval:[b'revision'] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
252 > EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
253 creating http peer for wire protocol version 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
254 sending filedata command |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
255 response: gen[ |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
256 { |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
257 b'totalitems': 2 |
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 { |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
260 b'fieldsfollowing': [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
261 [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
262 b'revision', |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
263 81 |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
264 ] |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
265 ], |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
266 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
|
267 }, |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
268 b'a0\n00000000000000000000000000000000000000\n11111111111111111111111111111111111111\n', |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
269 { |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
270 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
|
271 b'fieldsfollowing': [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
272 [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
273 b'delta', |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
274 15 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
275 ] |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
276 ], |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
277 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
|
278 }, |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
279 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
|
280 ] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
281 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
282 Requesting parents and revision data works |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
283 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
284 $ sendhttpv2peer << EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
285 > command filedata |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
286 > 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
|
287 > path eval:b'a' |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
288 > fields eval:[b'parents', b'revision'] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
289 > EOF |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
290 creating http peer for wire protocol version 2 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
291 sending filedata command |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
292 response: gen[ |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
293 { |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
294 b'totalitems': 1 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
295 }, |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
296 { |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
297 b'fieldsfollowing': [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
298 [ |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
299 b'revision', |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
300 84 |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
301 ] |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39810
diff
changeset
|
302 ], |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
303 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
|
304 b'parents': [ |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
305 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
|
306 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
|
307 ] |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
308 }, |
39863
c73f9f345ec0
tests: use more complex file storage test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39829
diff
changeset
|
309 b'a0\n00000000000000000000000000000000000000\n11111111111111111111111111111111111111\na2\n' |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
310 ] |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
311 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
312 $ cat error.log |