Mercurial > hg
annotate mercurial/help/internals/wireprotocolv2.txt @ 40178:46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Previously, the only way to access file revision data was the
"filedata" command. This command is useful to have. But, it only
allowed resolving revision data for a single file. This meant that
clients needed to send 1 command for each tracked path they were
seeking data on. Furthermore, those commands would need to enumerate
the exact file nodes they wanted data for.
This approach meant that clients were sending a lot of data to
remotes in order to request file data. e.g. if there were 1M
file revisions, we'd need at least 20,000,000 bytes just to encode
file nodes! Many clients on the internet don't have that kind of
upload capacity.
In order to limit the amount of data that clients must send, we'll
need more efficient ways to request repository data.
This commit defines and implements a new "filesdata" command. This
command allows the retrieval of data for multiple files by specifying
changeset revisions and optional file patterns. The command figures
out what file revisions are "relevant" and sends them in bulk.
The logic around choosing which file revisions to send in the case of
haveparents not being set is overly simple and will over-send files. We
will need more smarts here eventually. (Specifically, the client will
need to tell the server which revisions it knows about.) This work
is deferred until a later time.
Differential Revision: https://phab.mercurial-scm.org/D4981
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 03 Oct 2018 12:54:39 -0700 |
parents | 41263df08109 |
children | ed55a0077490 |
rev | line source |
---|---|
37485
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
1 **Experimental and under active development** |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
2 |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
3 This section documents the wire protocol commands exposed to transports |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
4 using the frame-based protocol. The set of commands exposed through |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
5 these transports is distinct from the set of commands exposed to legacy |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
6 transports. |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
7 |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
8 The frame-based protocol uses CBOR to encode command execution requests. |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
9 All command arguments must be mapped to a specific or set of CBOR data |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
10 types. |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
11 |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
12 The response to many commands is also CBOR. There is no common response |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
13 format: each command defines its own response format. |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
14 |
39439
dc61a67c1fc0
internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37726
diff
changeset
|
15 TODOs |
dc61a67c1fc0
internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37726
diff
changeset
|
16 ===== |
dc61a67c1fc0
internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37726
diff
changeset
|
17 |
dc61a67c1fc0
internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37726
diff
changeset
|
18 * Add "node namespace" support to each command. In order to support |
dc61a67c1fc0
internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37726
diff
changeset
|
19 SHA-1 hash transition, we want servers to be able to expose different |
dc61a67c1fc0
internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37726
diff
changeset
|
20 "node namespaces" for the same data. Every command operating on nodes |
dc61a67c1fc0
internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37726
diff
changeset
|
21 should specify which "node namespace" it is operating on and responses |
dc61a67c1fc0
internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37726
diff
changeset
|
22 should encode the "node namespace" accordingly. |
dc61a67c1fc0
internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37726
diff
changeset
|
23 |
dc61a67c1fc0
internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37726
diff
changeset
|
24 Commands |
dc61a67c1fc0
internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37726
diff
changeset
|
25 ======== |
dc61a67c1fc0
internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37726
diff
changeset
|
26 |
dc61a67c1fc0
internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37726
diff
changeset
|
27 The sections below detail all commands available to wire protocol version |
dc61a67c1fc0
internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37726
diff
changeset
|
28 2. |
37485
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
29 |
37488
3b99eb028859
wireproto: port branchmap to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37487
diff
changeset
|
30 branchmap |
3b99eb028859
wireproto: port branchmap to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37487
diff
changeset
|
31 --------- |
3b99eb028859
wireproto: port branchmap to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37487
diff
changeset
|
32 |
3b99eb028859
wireproto: port branchmap to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37487
diff
changeset
|
33 Obtain heads in named branches. |
3b99eb028859
wireproto: port branchmap to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37487
diff
changeset
|
34 |
3b99eb028859
wireproto: port branchmap to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37487
diff
changeset
|
35 Receives no arguments. |
3b99eb028859
wireproto: port branchmap to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37487
diff
changeset
|
36 |
3b99eb028859
wireproto: port branchmap to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37487
diff
changeset
|
37 The response is a map with bytestring keys defining the branch name. |
3b99eb028859
wireproto: port branchmap to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37487
diff
changeset
|
38 Values are arrays of bytestring defining raw changeset nodes. |
3b99eb028859
wireproto: port branchmap to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37487
diff
changeset
|
39 |
37533
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
40 capabilities |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
41 ------------ |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
42 |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
43 Obtain the server's capabilities. |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
44 |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
45 Receives no arguments. |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
46 |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
47 This command is typically called only as part of the handshake during |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
48 initial connection establishment. |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
49 |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
50 The response is a map with bytestring keys defining server information. |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
51 |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
52 The defined keys are: |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
53 |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
54 commands |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
55 A map defining available wire protocol commands on this server. |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
56 |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
57 Keys in the map are the names of commands that can be invoked. Values |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
58 are maps defining information about that command. The bytestring keys |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
59 are: |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
60 |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
61 args |
39812
8e7e822e85ec
wireprotov2: expose rich arguments metadata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39811
diff
changeset
|
62 (map) Describes arguments accepted by the command. |
8e7e822e85ec
wireprotov2: expose rich arguments metadata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39811
diff
changeset
|
63 |
8e7e822e85ec
wireprotov2: expose rich arguments metadata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39811
diff
changeset
|
64 Keys are bytestrings denoting the argument name. |
8e7e822e85ec
wireprotov2: expose rich arguments metadata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39811
diff
changeset
|
65 |
8e7e822e85ec
wireprotov2: expose rich arguments metadata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39811
diff
changeset
|
66 Values are maps describing the argument. The map has the following |
8e7e822e85ec
wireprotov2: expose rich arguments metadata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39811
diff
changeset
|
67 bytestring keys: |
37535
69e46c1834ac
wireproto: define and expose types of wire command arguments
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37533
diff
changeset
|
68 |
39812
8e7e822e85ec
wireprotov2: expose rich arguments metadata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39811
diff
changeset
|
69 default |
8e7e822e85ec
wireprotov2: expose rich arguments metadata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39811
diff
changeset
|
70 (varied) The default value for this argument if not specified. Only |
8e7e822e85ec
wireprotov2: expose rich arguments metadata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39811
diff
changeset
|
71 present if ``required`` is not true. |
8e7e822e85ec
wireprotov2: expose rich arguments metadata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39811
diff
changeset
|
72 |
8e7e822e85ec
wireprotov2: expose rich arguments metadata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39811
diff
changeset
|
73 required |
8e7e822e85ec
wireprotov2: expose rich arguments metadata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39811
diff
changeset
|
74 (boolean) Whether the argument must be specified. Failure to send |
8e7e822e85ec
wireprotov2: expose rich arguments metadata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39811
diff
changeset
|
75 required arguments will result in an error executing the command. |
8e7e822e85ec
wireprotov2: expose rich arguments metadata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39811
diff
changeset
|
76 |
8e7e822e85ec
wireprotov2: expose rich arguments metadata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39811
diff
changeset
|
77 type |
8e7e822e85ec
wireprotov2: expose rich arguments metadata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39811
diff
changeset
|
78 (bytestring) The type of the argument. e.g. ``bytes`` or ``bool``. |
8e7e822e85ec
wireprotov2: expose rich arguments metadata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39811
diff
changeset
|
79 |
39813
c30faea8d02d
wireprotov2: advertise set of valid values for requestable fields
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39812
diff
changeset
|
80 validvalues |
c30faea8d02d
wireprotov2: advertise set of valid values for requestable fields
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39812
diff
changeset
|
81 (set) Values that are recognized for this argument. Some arguments |
c30faea8d02d
wireprotov2: advertise set of valid values for requestable fields
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39812
diff
changeset
|
82 only allow a fixed set of values to be specified. These arguments |
c30faea8d02d
wireprotov2: advertise set of valid values for requestable fields
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39812
diff
changeset
|
83 may advertise that set in this key. If this set is advertised and |
c30faea8d02d
wireprotov2: advertise set of valid values for requestable fields
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39812
diff
changeset
|
84 a value not in this set is specified, the command should result |
c30faea8d02d
wireprotov2: advertise set of valid values for requestable fields
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39812
diff
changeset
|
85 in error. |
c30faea8d02d
wireprotov2: advertise set of valid values for requestable fields
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39812
diff
changeset
|
86 |
37533
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
87 permissions |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
88 An array of permissions required to execute this command. |
df4985497986
wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37498
diff
changeset
|
89 |
40172
30f70d11c224
wireprotov2: advertise recommended batch size for requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40122
diff
changeset
|
90 * |
30f70d11c224
wireprotov2: advertise recommended batch size for requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40122
diff
changeset
|
91 (various) Individual commands may define extra keys that supplement |
30f70d11c224
wireprotov2: advertise recommended batch size for requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40122
diff
changeset
|
92 generic command metadata. See the command definition for more. |
30f70d11c224
wireprotov2: advertise recommended batch size for requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40122
diff
changeset
|
93 |
37653
b2fa1591fb44
wireproto: add media type to version 2 capabilities response
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37557
diff
changeset
|
94 framingmediatypes |
b2fa1591fb44
wireproto: add media type to version 2 capabilities response
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37557
diff
changeset
|
95 An array of bytestrings defining the supported framing protocol |
b2fa1591fb44
wireproto: add media type to version 2 capabilities response
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37557
diff
changeset
|
96 media types. Servers will not accept media types not in this list. |
b2fa1591fb44
wireproto: add media type to version 2 capabilities response
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37557
diff
changeset
|
97 |
39811
ae20f52437e9
wireprotov2: advertise recognized path filter prefixes
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39641
diff
changeset
|
98 pathfilterprefixes |
ae20f52437e9
wireprotov2: advertise recognized path filter prefixes
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39641
diff
changeset
|
99 (set of bytestring) Matcher prefixes that are recognized when performing |
ae20f52437e9
wireprotov2: advertise recognized path filter prefixes
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39641
diff
changeset
|
100 path filtering. Specifying a path filter whose type/prefix does not |
ae20f52437e9
wireprotov2: advertise recognized path filter prefixes
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39641
diff
changeset
|
101 match one in this set will likely be rejected by the server. |
ae20f52437e9
wireprotov2: advertise recognized path filter prefixes
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39641
diff
changeset
|
102 |
37657
23c4ddda7bbe
wireproto: expose repository formats via capabilities
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37653
diff
changeset
|
103 rawrepoformats |
23c4ddda7bbe
wireproto: expose repository formats via capabilities
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37653
diff
changeset
|
104 An array of storage formats the repository is using. This set of |
23c4ddda7bbe
wireproto: expose repository formats via capabilities
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37653
diff
changeset
|
105 requirements can be used to determine whether a client can read a |
23c4ddda7bbe
wireproto: expose repository formats via capabilities
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37653
diff
changeset
|
106 *raw* copy of file data available. |
23c4ddda7bbe
wireproto: expose repository formats via capabilities
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37653
diff
changeset
|
107 |
40022
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
108 redirect |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
109 A map declaring potential *content redirects* that may be used by this |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
110 server. Contains the following bytestring keys: |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
111 |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
112 targets |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
113 (array of maps) Potential redirect targets. Values are maps describing |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
114 this target in more detail. Each map has the following bytestring keys: |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
115 |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
116 name |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
117 (bytestring) Identifier for this target. The identifier will be used |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
118 by clients to uniquely identify this target. |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
119 |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
120 protocol |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
121 (bytestring) High-level network protocol. Values can be |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
122 ``http``, ```https``, ``ssh``, etc. |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
123 |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
124 uris |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
125 (array of bytestrings) Representative URIs for this target. |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
126 |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
127 snirequired (optional) |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
128 (boolean) Indicates whether Server Name Indication is required |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
129 to use this target. Defaults to False. |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
130 |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
131 tlsversions (optional) |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
132 (array of bytestring) Indicates which TLS versions are supported by |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
133 this target. Values are ``1.1``, ``1.2``, ``1.3``, etc. |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
134 |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
135 hashes |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
136 (array of bytestring) Indicates support for hashing algorithms that are |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
137 used to ensure content integrity. Values include ``sha1``, ``sha256``, |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
138 etc. |
33eb670e2834
wireprotov2: define semantics for content redirects
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39815
diff
changeset
|
139 |
39630
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
140 changesetdata |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
141 ------------- |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
142 |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
143 Obtain various data related to changesets. |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
144 |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
145 The command accepts the following arguments: |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
146 |
40176
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
147 revisions |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
148 (array of maps) Specifies revisions whose data is being requested. Each |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
149 value in the array is a map describing revisions. See the |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
150 *Revisions Specifiers* section below for the format of this map. |
39630
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
151 |
40176
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
152 Data will be sent for the union of all revisions resolved by all |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
153 revision specifiers. |
39630
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
154 |
40176
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
155 Only revision specifiers operating on changeset revisions are allowed. |
39815
d3d333ab167a
wireprotov2: teach changesetdata to fetch ancestors until depth
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39814
diff
changeset
|
156 |
39630
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
157 fields |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
158 (set of bytestring) Which data associated with changelog revisions to |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
159 fetch. The following values are recognized: |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
160 |
39634
9dffa99f9158
wireprotov2: add bookmarks to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39632
diff
changeset
|
161 bookmarks |
9dffa99f9158
wireprotov2: add bookmarks to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39632
diff
changeset
|
162 Bookmarks associated with a revision. |
9dffa99f9158
wireprotov2: add bookmarks to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39632
diff
changeset
|
163 |
39630
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
164 parents |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
165 Parent revisions. |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
166 |
39632
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
167 phase |
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
168 The phase state of a revision. |
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
169 |
39630
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
170 revision |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
171 The raw, revision data for the changelog entry. The hash of this data |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
172 will match the revision's node value. |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
173 |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
174 The response bytestream starts with a CBOR map describing the data that follows. |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
175 This map has the following bytestring keys: |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
176 |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
177 totalitems |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
178 (unsigned integer) Total number of changelog revisions whose data is being |
39632
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
179 transferred. This maps to the set of revisions in the requested node |
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
180 range, not the total number of records that follow (see below for why). |
39630
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
181 |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
182 Following the map header is a series of 0 or more CBOR values. If values |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
183 are present, the first value will always be a map describing a single changeset |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
184 revision. |
39630
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
185 |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
186 If the ``fieldsfollowing`` key is present, the map will immediately be followed |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
187 by N CBOR bytestring values, where N is the number of elements in |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
188 ``fieldsfollowing``. Each bytestring value corresponds to a field denoted |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
189 by ``fieldsfollowing``. |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
190 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
191 Following the optional bytestring field values is the next revision descriptor |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
192 map, or end of stream. |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
193 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
194 Each revision descriptor map has the following bytestring keys: |
39630
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
195 |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
196 node |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
197 (bytestring) The node value for this revision. This is the SHA-1 hash of |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
198 the raw revision data. |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
199 |
39634
9dffa99f9158
wireprotov2: add bookmarks to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39632
diff
changeset
|
200 bookmarks (optional) |
9dffa99f9158
wireprotov2: add bookmarks to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39632
diff
changeset
|
201 (array of bytestrings) Bookmarks attached to this revision. Only present |
9dffa99f9158
wireprotov2: add bookmarks to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39632
diff
changeset
|
202 if ``bookmarks`` data is being requested and the revision has bookmarks |
9dffa99f9158
wireprotov2: add bookmarks to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39632
diff
changeset
|
203 attached. |
9dffa99f9158
wireprotov2: add bookmarks to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39632
diff
changeset
|
204 |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
205 fieldsfollowing (optional) |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
206 (array of 2-array) Denotes what fields immediately follow this map. Each |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
207 value is an array with 2 elements: the bytestring field name and an unsigned |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
208 integer describing the length of the data, in bytes. |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
209 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
210 If this key isn't present, no special fields will follow this map. |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
211 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
212 The following fields may be present: |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
213 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
214 revision |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
215 Raw, revision data for the changelog entry. Contains a serialized form |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
216 of the changeset data, including the author, date, commit message, set |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
217 of changed files, manifest node, and other metadata. |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
218 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
219 Only present if the ``revision`` field was requested. |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
220 |
39630
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
221 parents (optional) |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
222 (array of bytestrings) The nodes representing the parent revisions of this |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
223 revision. Only present if ``parents`` data is being requested. |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
224 |
39632
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
225 phase (optional) |
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
226 (bytestring) The phase that a revision is in. Recognized values are |
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
227 ``secret``, ``draft``, and ``public``. Only present if ``phase`` data |
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
228 is being requested. |
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
229 |
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
230 The set of changeset revisions emitted may not match the exact set of |
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
231 changesets requested. Furthermore, the set of keys present on each |
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
232 map may vary. This is to facilitate emitting changeset updates as well |
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
233 as new revisions. |
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
234 |
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
235 For example, if the request wants ``phase`` and ``revision`` data, |
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
236 the response may contain entries for each changeset in the common nodes |
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
237 set with the ``phase`` key and without the ``revision`` key in order |
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
238 to reflect a phase-only update. |
c1aacb0d76ff
wireprotov2: add phases to "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39630
diff
changeset
|
239 |
39630
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
240 TODO support different revision selection mechanisms (e.g. non-public, specific |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
241 revisions) |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
242 TODO support different hash "namespaces" for revisions (e.g. sha-1 versus other) |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
243 TODO support emitting obsolescence data |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
244 TODO support filtering based on relevant paths (narrow clone) |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
245 TODO support hgtagsfnodes cache / tags data |
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
246 TODO support branch heads cache |
39815
d3d333ab167a
wireprotov2: teach changesetdata to fetch ancestors until depth
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39814
diff
changeset
|
247 TODO consider unify query mechanism. e.g. as an array of "query descriptors" |
d3d333ab167a
wireprotov2: teach changesetdata to fetch ancestors until depth
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39814
diff
changeset
|
248 rather than a set of top-level arguments that have semantics when combined. |
39630
9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39461
diff
changeset
|
249 |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
250 filedata |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
251 -------- |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
252 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
253 Obtain various data related to an individual tracked file. |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
254 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
255 The command accepts the following arguments: |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
256 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
257 fields |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
258 (set of bytestring) Which data associated with a file to fetch. |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
259 The following values are recognized: |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
260 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
261 parents |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
262 Parent nodes for the revision. |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
263 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
264 revision |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
265 The raw revision data for a file. |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
266 |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
267 haveparents |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
268 (bool) Whether the client has the parent revisions of all requested |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
269 nodes. If set, the server may emit revision data as deltas against |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
270 any parent revision. If not set, the server MUST only emit deltas for |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
271 revisions previously emitted by this command. |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
272 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
273 False is assumed in the absence of any value. |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
274 |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
275 nodes |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
276 (array of bytestrings) File nodes whose data to retrieve. |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
277 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
278 path |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
279 (bytestring) Path of the tracked file whose data to retrieve. |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
280 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
281 TODO allow specifying revisions via alternate means (such as from |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
282 changeset revisions or ranges) |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
283 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
284 The response bytestream starts with a CBOR map describing the data that |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
285 follows. It has the following bytestream keys: |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
286 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
287 totalitems |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
288 (unsigned integer) Total number of file revisions whose data is |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
289 being returned. |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
290 |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
291 Following the map header is a series of 0 or more CBOR values. If values |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
292 are present, the first value will always be a map describing a single changeset |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
293 revision. |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
294 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
295 If the ``fieldsfollowing`` key is present, the map will immediately be followed |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
296 by N CBOR bytestring values, where N is the number of elements in |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
297 ``fieldsfollowing``. Each bytestring value corresponds to a field denoted |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
298 by ``fieldsfollowing``. |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
299 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
300 Following the optional bytestring field values is the next revision descriptor |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
301 map, or end of stream. |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
302 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
303 Each revision descriptor map has the following bytestring keys: |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
304 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
305 Each map has the following bytestring keys: |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
306 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
307 node |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
308 (bytestring) The node of the file revision whose data is represented. |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
309 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
310 deltabasenode |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
311 (bytestring) Node of the file revision the following delta is against. |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
312 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
313 Only present if the ``revision`` field is requested and delta data |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
314 follows this map. |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
315 |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
316 fieldsfollowing |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
317 (array of 2-array) Denotes extra bytestring fields that following this map. |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
318 See the documentation for ``changesetdata`` for semantics. |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
319 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
320 The following named fields may be present: |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
321 |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
322 ``delta`` |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
323 The delta data to use to construct the fulltext revision. |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
324 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
325 Only present if the ``revision`` field is requested and a delta is |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
326 being emitted. The ``deltabasenode`` top-level key will also be |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
327 present if this field is being emitted. |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
328 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
329 ``revision`` |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
330 The fulltext revision data for this manifest. Only present if the |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
331 ``revision`` field is requested and a fulltext revision is being emitted. |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
332 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
333 parents |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
334 (array of bytestring) The nodes of the parents of this file revision. |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
335 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
336 Only present if the ``parents`` field is requested. |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
337 |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
338 When ``revision`` data is requested, the server chooses to emit either fulltext |
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
339 revision data or a delta. What the server decides can be inferred by looking |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
340 for the presence of the ``delta`` or ``revision`` keys in the |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
341 ``fieldsfollowing`` array. |
39639
0e03e6a44dee
wireprotov2: define and implement "filedata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39637
diff
changeset
|
342 |
40178
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
343 filesdata |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
344 --------- |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
345 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
346 Obtain various data related to multiple tracked files for specific changesets. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
347 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
348 This command is similar to ``filedata`` with the main difference being that |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
349 individual requests operate on multiple file paths. This allows clients to |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
350 request data for multiple paths by issuing a single command. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
351 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
352 The command accepts the following arguments: |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
353 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
354 fields |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
355 (set of bytestring) Which data associated with a file to fetch. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
356 The following values are recognized: |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
357 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
358 parents |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
359 Parent nodes for the revision. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
360 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
361 revision |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
362 The raw revision data for a file. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
363 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
364 haveparents |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
365 (bool) Whether the client has the parent revisions of all requested |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
366 nodes. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
367 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
368 pathfilter |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
369 (map) Defines a filter that determines what file paths are relevant. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
370 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
371 See the *Path Filters* section for more. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
372 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
373 If the argument is omitted, it is assumed that all paths are relevant. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
374 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
375 revisions |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
376 (array of maps) Specifies revisions whose data is being requested. Each value |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
377 in the array is a map describing revisions. See the *Revisions Specifiers* |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
378 section below for the format of this map. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
379 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
380 Data will be sent for the union of all revisions resolved by all revision |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
381 specifiers. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
382 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
383 Only revision specifiers operating on changeset revisions are allowed. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
384 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
385 The response bytestream starts with a CBOR map describing the data that |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
386 follows. This map has the following bytestring keys: |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
387 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
388 totalpaths |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
389 (unsigned integer) Total number of paths whose data is being transferred. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
390 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
391 totalitems |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
392 (unsigned integer) Total number of file revisions whose data is being |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
393 transferred. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
394 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
395 Following the map header are 0 or more sequences of CBOR values. Each sequence |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
396 represents data for a specific tracked path. Each sequence begins with a CBOR |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
397 map describing the file data that follows. Following that map is N CBOR values |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
398 describing file revision data. The format of this data is identical to that |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
399 returned by the ``filedata`` command. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
400 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
401 Each sequence's map header has the following bytestring keys: |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
402 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
403 path |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
404 (bytestring) The tracked file path whose data follows. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
405 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
406 totalitems |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
407 (unsigned integer) Total number of file revisions whose data is being |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
408 transferred. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
409 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
410 The ``haveparents`` argument has significant implications on the data |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
411 transferred. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
412 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
413 When ``haveparents`` is true, the command MAY only emit data for file |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
414 revisions introduced by the set of changeset revisions whose data is being |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
415 requested. In other words, the command may assume that all file revisions |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
416 for all relevant paths for ancestors of the requested changeset revisions |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
417 are present on the receiver. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
418 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
419 When ``haveparents`` is false, the command MUST assume that the receiver |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
420 has no file revisions data. This means that all referenced file revisions |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
421 in the queried set of changeset revisions will be sent. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
422 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
423 TODO we'll probably want a more complicated mechanism for the client to |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
424 specify which ancestor revisions are known. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
425 |
37485
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
426 heads |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
427 ----- |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
428 |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
429 Obtain DAG heads in the repository. |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
430 |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
431 The command accepts the following arguments: |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
432 |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
433 publiconly (optional) |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
434 (boolean) If set, operate on the DAG for public phase changesets only. |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
435 Non-public (i.e. draft) phase DAG heads will not be returned. |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
436 |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
437 The response is a CBOR array of bytestrings defining changeset nodes |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
438 of DAG heads. The array can be empty if the repository is empty or no |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
439 changesets satisfied the request. |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
440 |
0b7475ea38cf
wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37393
diff
changeset
|
441 TODO consider exposing phase of heads in response |
37486
6847542bb8d7
wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37485
diff
changeset
|
442 |
6847542bb8d7
wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37485
diff
changeset
|
443 known |
6847542bb8d7
wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37485
diff
changeset
|
444 ----- |
6847542bb8d7
wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37485
diff
changeset
|
445 |
6847542bb8d7
wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37485
diff
changeset
|
446 Determine whether a series of changeset nodes is known to the server. |
6847542bb8d7
wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37485
diff
changeset
|
447 |
6847542bb8d7
wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37485
diff
changeset
|
448 The command accepts the following arguments: |
6847542bb8d7
wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37485
diff
changeset
|
449 |
6847542bb8d7
wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37485
diff
changeset
|
450 nodes |
6847542bb8d7
wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37485
diff
changeset
|
451 (array of bytestrings) List of changeset nodes whose presence to |
6847542bb8d7
wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37485
diff
changeset
|
452 query. |
6847542bb8d7
wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37485
diff
changeset
|
453 |
6847542bb8d7
wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37485
diff
changeset
|
454 The response is a bytestring where each byte contains a 0 or 1 for the |
6847542bb8d7
wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37485
diff
changeset
|
455 corresponding requested node at the same index. |
6847542bb8d7
wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37485
diff
changeset
|
456 |
6847542bb8d7
wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37485
diff
changeset
|
457 TODO use a bit array for even more compact response |
37487
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37486
diff
changeset
|
458 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37486
diff
changeset
|
459 listkeys |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37486
diff
changeset
|
460 -------- |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37486
diff
changeset
|
461 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37486
diff
changeset
|
462 List values in a specified ``pushkey`` namespace. |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37486
diff
changeset
|
463 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37486
diff
changeset
|
464 The command receives the following arguments: |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37486
diff
changeset
|
465 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37486
diff
changeset
|
466 namespace |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37486
diff
changeset
|
467 (bytestring) Pushkey namespace to query. |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37486
diff
changeset
|
468 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37486
diff
changeset
|
469 The response is a map with bytestring keys and values. |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37486
diff
changeset
|
470 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37486
diff
changeset
|
471 TODO consider using binary to represent nodes in certain pushkey namespaces. |
37537
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37535
diff
changeset
|
472 |
37538
89fed81bbb6c
wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37537
diff
changeset
|
473 lookup |
89fed81bbb6c
wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37537
diff
changeset
|
474 ------ |
89fed81bbb6c
wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37537
diff
changeset
|
475 |
89fed81bbb6c
wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37537
diff
changeset
|
476 Try to resolve a value to a changeset revision. |
89fed81bbb6c
wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37537
diff
changeset
|
477 |
89fed81bbb6c
wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37537
diff
changeset
|
478 Unlike ``known`` which operates on changeset nodes, lookup operates on |
89fed81bbb6c
wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37537
diff
changeset
|
479 node fragments and other names that a user may use. |
89fed81bbb6c
wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37537
diff
changeset
|
480 |
89fed81bbb6c
wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37537
diff
changeset
|
481 The command receives the following arguments: |
89fed81bbb6c
wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37537
diff
changeset
|
482 |
89fed81bbb6c
wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37537
diff
changeset
|
483 key |
89fed81bbb6c
wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37537
diff
changeset
|
484 (bytestring) Value to try to resolve. |
89fed81bbb6c
wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37537
diff
changeset
|
485 |
89fed81bbb6c
wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37537
diff
changeset
|
486 On success, returns a bytestring containing the resolved node. |
89fed81bbb6c
wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37537
diff
changeset
|
487 |
39637
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
488 manifestdata |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
489 ------------ |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
490 |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
491 Obtain various data related to manifests (which are lists of files in |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
492 a revision). |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
493 |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
494 The command accepts the following arguments: |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
495 |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
496 fields |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
497 (set of bytestring) Which data associated with manifests to fetch. |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
498 The following values are recognized: |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
499 |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
500 parents |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
501 Parent nodes for the manifest. |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
502 |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
503 revision |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
504 The raw revision data for the manifest. |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
505 |
39641
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
506 haveparents |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
507 (bool) Whether the client has the parent revisions of all requested |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
508 nodes. If set, the server may emit revision data as deltas against |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
509 any parent revision. If not set, the server MUST only emit deltas for |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
510 revisions previously emitted by this command. |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
511 |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
512 False is assumed in the absence of any value. |
aa7e312375cf
wireprotov2: let clients drive delta behavior
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39639
diff
changeset
|
513 |
39637
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
514 nodes |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
515 (array of bytestring) Manifest nodes whose data to retrieve. |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
516 |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
517 tree |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
518 (bytestring) Path to manifest to retrieve. The empty bytestring represents |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
519 the root manifest. All other values represent directories/trees within |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
520 the repository. |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
521 |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
522 TODO allow specifying revisions via alternate means (such as from changeset |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
523 revisions or ranges) |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
524 TODO consider recursive expansion of manifests (with path filtering for |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
525 narrow use cases) |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
526 |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
527 The response bytestream starts with a CBOR map describing the data that |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
528 follows. It has the following bytestring keys: |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
529 |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
530 totalitems |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
531 (unsigned integer) Total number of manifest revisions whose data is |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
532 being returned. |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
533 |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
534 Following the map header is a series of 0 or more CBOR values. If values |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
535 are present, the first value will always be a map describing a single manifest |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
536 revision. |
39637
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
537 |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
538 If the ``fieldsfollowing`` key is present, the map will immediately be followed |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
539 by N CBOR bytestring values, where N is the number of elements in |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
540 ``fieldsfollowing``. Each bytestring value corresponds to a field denoted |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
541 by ``fieldsfollowing``. |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
542 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
543 Following the optional bytestring field values is the next revision descriptor |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
544 map, or end of stream. |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
545 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
546 Each revision descriptor map has the following bytestring keys: |
39637
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
547 |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
548 node |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
549 (bytestring) The node of the manifest revision whose data is represented. |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
550 |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
551 deltabasenode |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
552 (bytestring) The node that the delta representation of this revision is |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
553 computed against. Only present if the ``revision`` field is requested and |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
554 a delta is being emitted. |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
555 |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
556 fieldsfollowing |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
557 (array of 2-array) Denotes extra bytestring fields that following this map. |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
558 See the documentation for ``changesetdata`` for semantics. |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
559 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
560 The following named fields may be present: |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
561 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
562 ``delta`` |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
563 The delta data to use to construct the fulltext revision. |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
564 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
565 Only present if the ``revision`` field is requested and a delta is |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
566 being emitted. The ``deltabasenode`` top-level key will also be |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
567 present if this field is being emitted. |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
568 |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
569 ``revision`` |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
570 The fulltext revision data for this manifest. Only present if the |
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
571 ``revision`` field is requested and a fulltext revision is being emitted. |
39637
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
572 |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
573 parents |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
574 (array of bytestring) The nodes of the parents of this manifest revision. |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
575 Only present if the ``parents`` field is requested. |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
576 |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
577 When ``revision`` data is requested, the server chooses to emit either fulltext |
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
578 revision data or a delta. What the server decides can be inferred by looking |
39814
d059cb669632
wireprotov2: allow multiple fields to follow revision maps
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39813
diff
changeset
|
579 for the presence of ``delta`` or ``revision`` in the ``fieldsfollowing`` array. |
39637
c7a7c7e844e5
wireprotov2: define and implement "manifestdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39634
diff
changeset
|
580 |
40172
30f70d11c224
wireprotov2: advertise recommended batch size for requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40122
diff
changeset
|
581 Servers MAY advertise the following extra fields in the capabilities |
30f70d11c224
wireprotov2: advertise recommended batch size for requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40122
diff
changeset
|
582 descriptor for this command: |
30f70d11c224
wireprotov2: advertise recommended batch size for requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40122
diff
changeset
|
583 |
30f70d11c224
wireprotov2: advertise recommended batch size for requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40122
diff
changeset
|
584 recommendedbatchsize |
30f70d11c224
wireprotov2: advertise recommended batch size for requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40122
diff
changeset
|
585 (unsigned integer) Number of revisions the server recommends as a batch |
30f70d11c224
wireprotov2: advertise recommended batch size for requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40122
diff
changeset
|
586 query size. If defined, clients needing to issue multiple ``manifestdata`` |
30f70d11c224
wireprotov2: advertise recommended batch size for requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40122
diff
changeset
|
587 commands to obtain needed data SHOULD construct their commands to have |
30f70d11c224
wireprotov2: advertise recommended batch size for requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40122
diff
changeset
|
588 this many revisions per request. |
30f70d11c224
wireprotov2: advertise recommended batch size for requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40122
diff
changeset
|
589 |
37537
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37535
diff
changeset
|
590 pushkey |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37535
diff
changeset
|
591 ------- |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37535
diff
changeset
|
592 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37535
diff
changeset
|
593 Set a value using the ``pushkey`` protocol. |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37535
diff
changeset
|
594 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37535
diff
changeset
|
595 The command receives the following arguments: |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37535
diff
changeset
|
596 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37535
diff
changeset
|
597 namespace |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37535
diff
changeset
|
598 (bytestring) Pushkey namespace to operate on. |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37535
diff
changeset
|
599 key |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37535
diff
changeset
|
600 (bytestring) The pushkey key to set. |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37535
diff
changeset
|
601 old |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37535
diff
changeset
|
602 (bytestring) Old value for this key. |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37535
diff
changeset
|
603 new |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37535
diff
changeset
|
604 (bytestring) New value for this key. |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37535
diff
changeset
|
605 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37535
diff
changeset
|
606 TODO consider using binary to represent nodes is certain pushkey namespaces. |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37535
diff
changeset
|
607 TODO better define response type and meaning. |
40176
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
608 |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
609 Revision Specifiers |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
610 =================== |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
611 |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
612 A *revision specifier* is a map that evaluates to a set of revisions. |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
613 |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
614 A *revision specifier* has a ``type`` key that defines the revision |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
615 selection type to perform. Other keys in the map are used in a |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
616 type-specific manner. |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
617 |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
618 The following types are defined: |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
619 |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
620 changesetexplicit |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
621 An explicit set of enumerated changeset revisions. |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
622 |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
623 The ``nodes`` key MUST contain an array of full binary nodes, expressed |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
624 as bytestrings. |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
625 |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
626 changesetexplicitdepth |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
627 Like ``changesetexplicit``, but contains a ``depth`` key defining the |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
628 unsigned integer number of ancestor revisions to also resolve. For each |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
629 value in ``nodes``, DAG ancestors will be walked until up to N total |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
630 revisions from that ancestry walk are present in the final resolved set. |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
631 |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
632 changesetdagrange |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
633 Defines revisions via a DAG range of changesets on the changelog. |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
634 |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
635 The ``roots`` key MUST contain an array of full, binary node values |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
636 representing the *root* revisions. |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
637 |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
638 The ``heads`` key MUST contain an array of full, binary nodes values |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
639 representing the *head* revisions. |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
640 |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
641 The DAG range between ``roots`` and ``heads`` will be resolved and all |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
642 revisions between will be used. Nodes in ``roots`` are not part of the |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
643 resolved set. Nodes in ``heads`` are. The ``roots`` array may be empty. |
41263df08109
wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40172
diff
changeset
|
644 The ``heads`` array MUST be defined. |
40178
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
645 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
646 Path Filters |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
647 ============ |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
648 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
649 Various commands accept a *path filter* argument that defines the set of file |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
650 paths relevant to the request. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
651 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
652 A *path filter* is defined as a map with the bytestring keys ``include`` and |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
653 ``exclude``. Each is an array of bytestring values. Each value defines a pattern |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
654 rule (see :hg:`help patterns`) that is used to match file paths. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
655 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
656 A path matches the path filter if it is matched by a rule in the ``include`` |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
657 set but doesn't match a rule in the ``exclude`` set. In other words, a path |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
658 matcher takes the union of all ``include`` patterns and then substracts the |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
659 union of all ``exclude`` patterns. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
660 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
661 Patterns MUST be prefixed with their pattern type. Only the following pattern |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
662 types are allowed: ``path:``, ``rootfilesin:``. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
663 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
664 If the ``include`` key is omitted, it is assumed that all paths are |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
665 relevant. The patterns from ``exclude`` will still be used, if defined. |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
666 |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
667 An example value is ``path:tests/foo``, which would match a file named |
46a40bce3ae0
wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40176
diff
changeset
|
668 ``tests/foo`` or a directory ``tests/foo`` and all files under it. |