159 transferred. This maps to the set of revisions in the requested node |
159 transferred. This maps to the set of revisions in the requested node |
160 range, not the total number of records that follow (see below for why). |
160 range, not the total number of records that follow (see below for why). |
161 |
161 |
162 Following the map header is a series of 0 or more CBOR values. If values |
162 Following the map header is a series of 0 or more CBOR values. If values |
163 are present, the first value will always be a map describing a single changeset |
163 are present, the first value will always be a map describing a single changeset |
164 revision. If revision data is requested, the raw revision data (encoded as |
164 revision. |
165 a CBOR bytestring) will follow the map describing it. Otherwise, another CBOR |
165 |
166 map describing the next changeset revision will occur. |
166 If the ``fieldsfollowing`` key is present, the map will immediately be followed |
167 |
167 by N CBOR bytestring values, where N is the number of elements in |
168 Each map has the following bytestring keys: |
168 ``fieldsfollowing``. Each bytestring value corresponds to a field denoted |
|
169 by ``fieldsfollowing``. |
|
170 |
|
171 Following the optional bytestring field values is the next revision descriptor |
|
172 map, or end of stream. |
|
173 |
|
174 Each revision descriptor map has the following bytestring keys: |
169 |
175 |
170 node |
176 node |
171 (bytestring) The node value for this revision. This is the SHA-1 hash of |
177 (bytestring) The node value for this revision. This is the SHA-1 hash of |
172 the raw revision data. |
178 the raw revision data. |
173 |
179 |
174 bookmarks (optional) |
180 bookmarks (optional) |
175 (array of bytestrings) Bookmarks attached to this revision. Only present |
181 (array of bytestrings) Bookmarks attached to this revision. Only present |
176 if ``bookmarks`` data is being requested and the revision has bookmarks |
182 if ``bookmarks`` data is being requested and the revision has bookmarks |
177 attached. |
183 attached. |
178 |
184 |
|
185 fieldsfollowing (optional) |
|
186 (array of 2-array) Denotes what fields immediately follow this map. Each |
|
187 value is an array with 2 elements: the bytestring field name and an unsigned |
|
188 integer describing the length of the data, in bytes. |
|
189 |
|
190 If this key isn't present, no special fields will follow this map. |
|
191 |
|
192 The following fields may be present: |
|
193 |
|
194 revision |
|
195 Raw, revision data for the changelog entry. Contains a serialized form |
|
196 of the changeset data, including the author, date, commit message, set |
|
197 of changed files, manifest node, and other metadata. |
|
198 |
|
199 Only present if the ``revision`` field was requested. |
|
200 |
179 parents (optional) |
201 parents (optional) |
180 (array of bytestrings) The nodes representing the parent revisions of this |
202 (array of bytestrings) The nodes representing the parent revisions of this |
181 revision. Only present if ``parents`` data is being requested. |
203 revision. Only present if ``parents`` data is being requested. |
182 |
204 |
183 phase (optional) |
205 phase (optional) |
184 (bytestring) The phase that a revision is in. Recognized values are |
206 (bytestring) The phase that a revision is in. Recognized values are |
185 ``secret``, ``draft``, and ``public``. Only present if ``phase`` data |
207 ``secret``, ``draft``, and ``public``. Only present if ``phase`` data |
186 is being requested. |
208 is being requested. |
187 |
|
188 revisionsize (optional) |
|
189 (unsigned integer) Indicates the size of raw revision data that follows this |
|
190 map. The following data contains a serialized form of the changeset data, |
|
191 including the author, date, commit message, set of changed files, manifest |
|
192 node, and other metadata. |
|
193 |
|
194 Only present if ``revision`` data was requested and the data follows this |
|
195 map. |
|
196 |
209 |
197 If nodes are requested via ``noderange``, they will be emitted in DAG order, |
210 If nodes are requested via ``noderange``, they will be emitted in DAG order, |
198 parents always before children. |
211 parents always before children. |
199 |
212 |
200 If nodes are requested via ``nodes``, they will be emitted in requested order. |
213 If nodes are requested via ``nodes``, they will be emitted in requested order. |
259 |
272 |
260 totalitems |
273 totalitems |
261 (unsigned integer) Total number of file revisions whose data is |
274 (unsigned integer) Total number of file revisions whose data is |
262 being returned. |
275 being returned. |
263 |
276 |
264 Following the header map is a series of 0 or more CBOR values. The first |
277 Following the map header is a series of 0 or more CBOR values. If values |
265 value is always a map describing a file revision. If this map has the |
278 are present, the first value will always be a map describing a single changeset |
266 ``deltasize`` or ``revisionsize`` keys, a bytestring containing the delta |
279 revision. |
267 or revision, respectively, will immediately follow the map. Otherwise |
280 |
268 the next value will be a map describing the next file revision. |
281 If the ``fieldsfollowing`` key is present, the map will immediately be followed |
|
282 by N CBOR bytestring values, where N is the number of elements in |
|
283 ``fieldsfollowing``. Each bytestring value corresponds to a field denoted |
|
284 by ``fieldsfollowing``. |
|
285 |
|
286 Following the optional bytestring field values is the next revision descriptor |
|
287 map, or end of stream. |
|
288 |
|
289 Each revision descriptor map has the following bytestring keys: |
269 |
290 |
270 Each map has the following bytestring keys: |
291 Each map has the following bytestring keys: |
271 |
292 |
272 node |
293 node |
273 (bytestring) The node of the file revision whose data is represented. |
294 (bytestring) The node of the file revision whose data is represented. |
276 (bytestring) Node of the file revision the following delta is against. |
297 (bytestring) Node of the file revision the following delta is against. |
277 |
298 |
278 Only present if the ``revision`` field is requested and delta data |
299 Only present if the ``revision`` field is requested and delta data |
279 follows this map. |
300 follows this map. |
280 |
301 |
281 deltasize |
302 fieldsfollowing |
282 (unsigned integer) The size of the delta data that follows this map. |
303 (array of 2-array) Denotes extra bytestring fields that following this map. |
283 |
304 See the documentation for ``changesetdata`` for semantics. |
284 Only present if the ``revision`` field is requested and delta data |
305 |
285 follows this map. |
306 The following named fields may be present: |
|
307 |
|
308 ``delta`` |
|
309 The delta data to use to construct the fulltext revision. |
|
310 |
|
311 Only present if the ``revision`` field is requested and a delta is |
|
312 being emitted. The ``deltabasenode`` top-level key will also be |
|
313 present if this field is being emitted. |
|
314 |
|
315 ``revision`` |
|
316 The fulltext revision data for this manifest. Only present if the |
|
317 ``revision`` field is requested and a fulltext revision is being emitted. |
286 |
318 |
287 parents |
319 parents |
288 (array of bytestring) The nodes of the parents of this file revision. |
320 (array of bytestring) The nodes of the parents of this file revision. |
289 |
321 |
290 Only present if the ``parents`` field is requested. |
322 Only present if the ``parents`` field is requested. |
291 |
323 |
292 revisionsize |
|
293 (unsigned integer) The size of the fulltext revision data that follows |
|
294 this map. |
|
295 |
|
296 Only present if the ``revision`` field is requested and fulltext revision |
|
297 data follows this map. |
|
298 |
|
299 When ``revision`` data is requested, the server chooses to emit either fulltext |
324 When ``revision`` data is requested, the server chooses to emit either fulltext |
300 revision data or a delta. What the server decides can be inferred by looking |
325 revision data or a delta. What the server decides can be inferred by looking |
301 for the presence of the ``deltasize`` or ``revisionsize`` keys in the map. |
326 for the presence of the ``delta`` or ``revision`` keys in the |
302 Servers MUST NOT define both keys. |
327 ``fieldsfollowing`` array. |
303 |
328 |
304 heads |
329 heads |
305 ----- |
330 ----- |
306 |
331 |
307 Obtain DAG heads in the repository. |
332 Obtain DAG heads in the repository. |
407 |
432 |
408 totalitems |
433 totalitems |
409 (unsigned integer) Total number of manifest revisions whose data is |
434 (unsigned integer) Total number of manifest revisions whose data is |
410 being returned. |
435 being returned. |
411 |
436 |
412 Following the header map is a series of 0 or more CBOR values. The first |
437 Following the map header is a series of 0 or more CBOR values. If values |
413 value is always a map describing a manifest revision. If this map has the |
438 are present, the first value will always be a map describing a single manifest |
414 ``deltasize`` or ``revisionsize`` keys, a bytestring containing the delta |
439 revision. |
415 or revision, respectively, will immediately follow the map. Otherwise |
440 |
416 the next value will be a map describing the next manifest revision. |
441 If the ``fieldsfollowing`` key is present, the map will immediately be followed |
417 |
442 by N CBOR bytestring values, where N is the number of elements in |
418 Each map has the following bytestring keys: |
443 ``fieldsfollowing``. Each bytestring value corresponds to a field denoted |
|
444 by ``fieldsfollowing``. |
|
445 |
|
446 Following the optional bytestring field values is the next revision descriptor |
|
447 map, or end of stream. |
|
448 |
|
449 Each revision descriptor map has the following bytestring keys: |
419 |
450 |
420 node |
451 node |
421 (bytestring) The node of the manifest revision whose data is represented. |
452 (bytestring) The node of the manifest revision whose data is represented. |
422 |
453 |
423 deltabasenode |
454 deltabasenode |
424 (bytestring) The node that the delta representation of this revision is |
455 (bytestring) The node that the delta representation of this revision is |
425 computed against. Only present if the ``revision`` field is requested and |
456 computed against. Only present if the ``revision`` field is requested and |
426 a delta is being emitted. |
457 a delta is being emitted. |
427 |
458 |
428 deltasize |
459 fieldsfollowing |
429 (unsigned integer) The size of the delta data that follows this map. |
460 (array of 2-array) Denotes extra bytestring fields that following this map. |
430 Only present if the ``revision`` field is requested and a delta is |
461 See the documentation for ``changesetdata`` for semantics. |
431 being emitted. |
462 |
|
463 The following named fields may be present: |
|
464 |
|
465 ``delta`` |
|
466 The delta data to use to construct the fulltext revision. |
|
467 |
|
468 Only present if the ``revision`` field is requested and a delta is |
|
469 being emitted. The ``deltabasenode`` top-level key will also be |
|
470 present if this field is being emitted. |
|
471 |
|
472 ``revision`` |
|
473 The fulltext revision data for this manifest. Only present if the |
|
474 ``revision`` field is requested and a fulltext revision is being emitted. |
432 |
475 |
433 parents |
476 parents |
434 (array of bytestring) The nodes of the parents of this manifest revision. |
477 (array of bytestring) The nodes of the parents of this manifest revision. |
435 Only present if the ``parents`` field is requested. |
478 Only present if the ``parents`` field is requested. |
436 |
479 |
437 revisionsize |
|
438 (unsigned integer) The size of the fulltext revision data that follows |
|
439 this map. Only present if the ``revision`` field is requested and a fulltext |
|
440 revision is being emitted. |
|
441 |
|
442 When ``revision`` data is requested, the server chooses to emit either fulltext |
480 When ``revision`` data is requested, the server chooses to emit either fulltext |
443 revision data or a delta. What the server decides can be inferred by looking |
481 revision data or a delta. What the server decides can be inferred by looking |
444 for the presence of the ``deltasize`` or ``revisionsize`` keys in the map. |
482 for the presence of ``delta`` or ``revision`` in the ``fieldsfollowing`` array. |
445 Servers MUST NOT define both keys. |
|
446 |
483 |
447 pushkey |
484 pushkey |
448 ------- |
485 ------- |
449 |
486 |
450 Set a value using the ``pushkey`` protocol. |
487 Set a value using the ``pushkey`` protocol. |