diff mercurial/help/internals/wireprotocolv2.txt @ 39818:c30faea8d02d

wireprotov2: advertise set of valid values for requestable fields changesetdata, manifestdata, and filedata all allow the caller to specify what data fields to request. Data fields are extensible and may evolve over time. In order to prevent clients from making requests for fields that are not available, the client needs to know what fields are available. This commit teaches the server to declare a set of "valid values" for wire protocol command arguments. That set of values is exposed in the command's capabilities descriptor. The changesetdata, manifestdata, and filedata commands all declare their set of available "fields." Differential Revision: https://phab.mercurial-scm.org/D4619
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 17 Sep 2018 11:54:00 -0700
parents 8e7e822e85ec
children d059cb669632
line wrap: on
line diff
--- a/mercurial/help/internals/wireprotocolv2.txt	Mon Sep 17 10:15:27 2018 -0700
+++ b/mercurial/help/internals/wireprotocolv2.txt	Mon Sep 17 11:54:00 2018 -0700
@@ -77,6 +77,13 @@
          type
             (bytestring) The type of the argument. e.g. ``bytes`` or ``bool``.
 
+         validvalues
+            (set) Values that are recognized for this argument. Some arguments
+            only allow a fixed set of values to be specified. These arguments
+            may advertise that set in this key. If this set is advertised and
+            a value not in this set is specified, the command should result
+            in error.
+
       permissions
          An array of permissions required to execute this command.