diff mercurial/help/internals/wireprotocol.txt @ 37535:69e46c1834ac

wireproto: define and expose types of wire command arguments Exposing the set of argument names is cool. But with wire protocol version 2, we're using CBOR to transport arguments and this allows us to have typing for arguments. Typed arguments are much nicer because they will cut down on transfer overhead and processing overhead for decoding values. This commit teaches @wireprotocommand to accept a dictionary for arguments. The arguments registered for version 2 transports are canonically stored as dictionaries rather than a space-delimited string. It is an error to defined arguments with a dictionary for commands using version 1 transports. This reinforces my intent to fully decouple command handlers for version 2 transports. Differential Revision: https://phab.mercurial-scm.org/D3202
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 06 Apr 2018 17:14:06 -0700
parents df4985497986
children be5d4749edc0
line wrap: on
line diff
--- a/mercurial/help/internals/wireprotocol.txt	Fri Apr 06 16:49:57 2018 -0700
+++ b/mercurial/help/internals/wireprotocol.txt	Fri Apr 06 17:14:06 2018 -0700
@@ -1712,7 +1712,12 @@
    are:
 
       args
-         An array of argument names accepted by this command.
+         A map of argument names and their expected types.
+
+         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.
       permissions
          An array of permissions required to execute this command.