mercurial/help/internals/wireprotocolv2.txt
author Gregory Szorc <gregory.szorc@gmail.com>
Thu, 23 Aug 2018 13:11:13 -0700
changeset 39458 dc61a67c1fc0
parent 37726 mercurial/help/internals/wireprotocol.txt@0c184ca594bb
child 39478 7df9ae38c75c
permissions -rw-r--r--
internals: extract wire protocol version 2 commands to standalone doc wireprotocol.txt is a bit long and unwieldy. I think splitting it up will help aid comprehension. Let's start by extracting wire protocol version 2 commands to a standalone document. As part of the port, I munged with the section titles a bit and expanded the TODO around node namespaces. Differential Revision: https://phab.mercurial-scm.org/D4442
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
39458
dc61a67c1fc0 internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37726
diff changeset
     1
Wire Protocol Version 2
dc61a67c1fc0 internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37726
diff changeset
     2
=======================
37485
0b7475ea38cf wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37393
diff changeset
     3
0b7475ea38cf wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37393
diff changeset
     4
**Experimental and under active development**
0b7475ea38cf wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37393
diff changeset
     5
0b7475ea38cf wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37393
diff changeset
     6
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
     7
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
     8
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
     9
transports.
0b7475ea38cf wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37393
diff changeset
    10
0b7475ea38cf wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37393
diff changeset
    11
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
    12
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
    13
types.
0b7475ea38cf wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37393
diff changeset
    14
0b7475ea38cf wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37393
diff changeset
    15
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
    16
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
    17
39458
dc61a67c1fc0 internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37726
diff changeset
    18
TODOs
dc61a67c1fc0 internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37726
diff changeset
    19
=====
dc61a67c1fc0 internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37726
diff changeset
    20
dc61a67c1fc0 internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37726
diff changeset
    21
* 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
    22
  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
    23
  "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
    24
  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
    25
  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
    26
dc61a67c1fc0 internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37726
diff changeset
    27
Commands
dc61a67c1fc0 internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37726
diff changeset
    28
========
dc61a67c1fc0 internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37726
diff changeset
    29
dc61a67c1fc0 internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37726
diff changeset
    30
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
    31
2.
37485
0b7475ea38cf wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37393
diff changeset
    32
37488
3b99eb028859 wireproto: port branchmap to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37487
diff changeset
    33
branchmap
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
3b99eb028859 wireproto: port branchmap to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37487
diff changeset
    36
Obtain heads in named branches.
3b99eb028859 wireproto: port branchmap to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37487
diff changeset
    37
3b99eb028859 wireproto: port branchmap to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37487
diff changeset
    38
Receives no arguments.
3b99eb028859 wireproto: port branchmap to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37487
diff changeset
    39
3b99eb028859 wireproto: port branchmap to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37487
diff changeset
    40
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
    41
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
    42
37533
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    43
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
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    46
Obtain the server's capabilities.
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    47
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    48
Receives no arguments.
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
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
    51
initial connection establishment.
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    52
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    53
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
    54
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    55
The defined keys are:
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
commands
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    58
   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
    59
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    60
   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
    61
   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
    62
   are:
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    63
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    64
      args
37535
69e46c1834ac wireproto: define and expose types of wire command arguments
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37533
diff changeset
    65
         A map of argument names and their expected types.
69e46c1834ac wireproto: define and expose types of wire command arguments
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37533
diff changeset
    66
69e46c1834ac wireproto: define and expose types of wire command arguments
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37533
diff changeset
    67
         Types are defined as a representative value for the expected type.
69e46c1834ac wireproto: define and expose types of wire command arguments
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37533
diff changeset
    68
         e.g. an argument expecting a boolean type will have its value
69e46c1834ac wireproto: define and expose types of wire command arguments
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37533
diff changeset
    69
         set to true. An integer type will have its value set to 42. The
69e46c1834ac wireproto: define and expose types of wire command arguments
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37533
diff changeset
    70
         actual values are arbitrary and may not have meaning.
37533
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    71
      permissions
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    72
         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
    73
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    74
compression
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    75
   An array of maps defining available compression format support.
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    76
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    77
   The array is sorted from most preferred to least preferred.
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    78
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    79
   Each entry has the following bytestring keys:
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    80
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    81
      name
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    82
         Name of the compression engine. e.g. ``zstd`` or ``zlib``.
df4985497986 wireproto: implement capabilities for wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
    83
37653
b2fa1591fb44 wireproto: add media type to version 2 capabilities response
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37557
diff changeset
    84
framingmediatypes
b2fa1591fb44 wireproto: add media type to version 2 capabilities response
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37557
diff changeset
    85
   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
    86
   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
    87
37657
23c4ddda7bbe wireproto: expose repository formats via capabilities
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37653
diff changeset
    88
rawrepoformats
23c4ddda7bbe wireproto: expose repository formats via capabilities
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37653
diff changeset
    89
   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
    90
   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
    91
   *raw* copy of file data available.
23c4ddda7bbe wireproto: expose repository formats via capabilities
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37653
diff changeset
    92
37485
0b7475ea38cf wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37393
diff changeset
    93
heads
0b7475ea38cf wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37393
diff changeset
    94
-----
0b7475ea38cf wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37393
diff changeset
    95
0b7475ea38cf wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37393
diff changeset
    96
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
    97
0b7475ea38cf wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37393
diff changeset
    98
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
    99
0b7475ea38cf wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37393
diff changeset
   100
publiconly (optional)
0b7475ea38cf wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37393
diff changeset
   101
   (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
   102
   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
   103
0b7475ea38cf wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37393
diff changeset
   104
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
   105
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
   106
changesets satisfied the request.
0b7475ea38cf wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37393
diff changeset
   107
0b7475ea38cf wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37393
diff changeset
   108
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
   109
6847542bb8d7 wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37485
diff changeset
   110
known
6847542bb8d7 wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37485
diff changeset
   111
-----
6847542bb8d7 wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37485
diff changeset
   112
6847542bb8d7 wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37485
diff changeset
   113
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
   114
6847542bb8d7 wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37485
diff changeset
   115
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
   116
6847542bb8d7 wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37485
diff changeset
   117
nodes
6847542bb8d7 wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37485
diff changeset
   118
   (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
   119
   query.
6847542bb8d7 wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37485
diff changeset
   120
6847542bb8d7 wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37485
diff changeset
   121
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
   122
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
   123
6847542bb8d7 wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37485
diff changeset
   124
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
   125
68915b9f8e96 wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37486
diff changeset
   126
listkeys
68915b9f8e96 wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37486
diff changeset
   127
--------
68915b9f8e96 wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37486
diff changeset
   128
68915b9f8e96 wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37486
diff changeset
   129
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
   130
68915b9f8e96 wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37486
diff changeset
   131
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
   132
68915b9f8e96 wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37486
diff changeset
   133
namespace
68915b9f8e96 wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37486
diff changeset
   134
   (bytestring) Pushkey namespace to query.
68915b9f8e96 wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37486
diff changeset
   135
68915b9f8e96 wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37486
diff changeset
   136
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
   137
68915b9f8e96 wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37486
diff changeset
   138
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
   139
37538
89fed81bbb6c wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37537
diff changeset
   140
lookup
89fed81bbb6c wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37537
diff changeset
   141
------
89fed81bbb6c wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37537
diff changeset
   142
89fed81bbb6c wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37537
diff changeset
   143
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
   144
89fed81bbb6c wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37537
diff changeset
   145
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
   146
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
   147
89fed81bbb6c wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37537
diff changeset
   148
The command receives the following arguments:
89fed81bbb6c wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37537
diff changeset
   149
89fed81bbb6c wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37537
diff changeset
   150
key
89fed81bbb6c wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37537
diff changeset
   151
   (bytestring) Value to try to resolve.
89fed81bbb6c wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37537
diff changeset
   152
89fed81bbb6c wireproto: port lookup to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37537
diff changeset
   153
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
   154
37537
be5d4749edc0 wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37535
diff changeset
   155
pushkey
be5d4749edc0 wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37535
diff changeset
   156
-------
be5d4749edc0 wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37535
diff changeset
   157
be5d4749edc0 wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37535
diff changeset
   158
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
   159
be5d4749edc0 wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37535
diff changeset
   160
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
   161
be5d4749edc0 wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37535
diff changeset
   162
namespace
be5d4749edc0 wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37535
diff changeset
   163
   (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
   164
key
be5d4749edc0 wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37535
diff changeset
   165
   (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
   166
old
be5d4749edc0 wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37535
diff changeset
   167
   (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
   168
new
be5d4749edc0 wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37535
diff changeset
   169
   (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
   170
be5d4749edc0 wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37535
diff changeset
   171
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
   172
TODO better define response type and meaning.