Mercurial > public > mercurial-scm > hg
diff mercurial/help/internals/wireprotocolv2.txt @ 39812:8e7e822e85ec
wireprotov2: expose rich arguments metadata
Now that we internally store rich metadata about arguments, it makes
sense to make that metadata available to the client. This will allow
clients to validate outgoing command requests before they are sent
over the wire.
Strictly speaking, we should bump the wire protocol version for this
change since it is backwards incompatible. But no client-side code
touches the arguments map and I don't want to incur the work.
Differential Revision: https://phab.mercurial-scm.org/D4618
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 17 Sep 2018 10:15:27 -0700 |
parents | ae20f52437e9 |
children | c30faea8d02d |
line wrap: on
line diff
--- a/mercurial/help/internals/wireprotocolv2.txt Mon Sep 17 09:49:28 2018 -0700 +++ b/mercurial/help/internals/wireprotocolv2.txt Mon Sep 17 10:15:27 2018 -0700 @@ -59,12 +59,24 @@ are: args - A map of argument names and their expected types. + (map) Describes arguments accepted by the command. + + Keys are bytestrings denoting the argument name. + + Values are maps describing the argument. The map has the following + bytestring keys: - Types are defined as a representative value for the expected type. - e.g. an argument expecting a boolean type will have its value - set to true. An integer type will have its value set to 42. The - actual values are arbitrary and may not have meaning. + default + (varied) The default value for this argument if not specified. Only + present if ``required`` is not true. + + required + (boolean) Whether the argument must be specified. Failure to send + required arguments will result in an error executing the command. + + type + (bytestring) The type of the argument. e.g. ``bytes`` or ``bool``. + permissions An array of permissions required to execute this command.