##// END OF EJS Templates
wireprotov2: expose rich arguments metadata...
Gregory Szorc -
r39837:8e7e822e default
parent child Browse files
Show More
@@ -59,12 +59,24 b' commands'
59 59 are:
60 60
61 61 args
62 A map of argument names and their expected types.
62 (map) Describes arguments accepted by the command.
63
64 Keys are bytestrings denoting the argument name.
65
66 Values are maps describing the argument. The map has the following
67 bytestring keys:
63 68
64 Types are defined as a representative value for the expected type.
65 e.g. an argument expecting a boolean type will have its value
66 set to true. An integer type will have its value set to 42. The
67 actual values are arbitrary and may not have meaning.
69 default
70 (varied) The default value for this argument if not specified. Only
71 present if ``required`` is not true.
72
73 required
74 (boolean) Whether the argument must be specified. Failure to send
75 required arguments will result in an error executing the command.
76
77 type
78 (bytestring) The type of the argument. e.g. ``bytes`` or ``bool``.
79
68 80 permissions
69 81 An array of permissions required to execute this command.
70 82
@@ -436,7 +436,18 b' def _capabilitiesv2(repo, proto):'
436 436 # TODO expose available changesetdata fields.
437 437
438 438 for command, entry in COMMANDS.items():
439 args = {arg: meta['example'] for arg, meta in entry.args.items()}
439 args = {}
440
441 for arg, meta in entry.args.items():
442 args[arg] = {
443 # TODO should this be a normalized type using CBOR's
444 # terminology?
445 b'type': meta['type'],
446 b'required': meta['required'],
447 }
448
449 if not meta['required']:
450 args[arg][b'default'] = meta['default']()
440 451
441 452 caps['commands'][command] = {
442 453 'args': args,
@@ -313,7 +313,7 b' Client with HTTPv2 enabled automatically'
313 313 s> Content-Type: application/mercurial-cbor\r\n
314 314 s> Content-Length: *\r\n (glob)
315 315 s> \r\n
316 s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0001\xa5Hcommands\xaaIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xd9\x01\x02\x82GparentsHrevisionInoderange\x82\x81J0123456...\x81Iabcdef...Enodes\x81J0123456...Kpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xf5Enodes\x81J0123456...DpathGfoo.txtKpermissions\x81DpullEheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullLmanifestdata\xa2Dargs\xa4Ffields\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xf5Enodes\x81J0123456...Dtree@Kpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyInamespaceBnsCnewCnewColdColdKpermissions\x81DpushKcompression\x81\xa1DnameDzlibQframingmediatypes\x81X&application/mercurial-exp-framing-0005Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x82LgeneraldeltaHrevlogv1Nv1capabilitiesY\x01\xd3batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
316 s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0001\xa5Hcommands\xaaIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xa3Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetInoderange\xa3Gdefault\xf6Hrequired\xf4DtypeDlistEnodes\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa3Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa2Dargs\xa4Ffields\xa3Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullGpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushKcompression\x81\xa1DnameDzlibQframingmediatypes\x81X&application/mercurial-exp-framing-0005Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x82LgeneraldeltaHrevlogv1Nv1capabilitiesY\x01\xd3batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
317 317 sending heads command
318 318 s> POST /api/exp-http-v2-0001/ro/heads HTTP/1.1\r\n
319 319 s> Accept-Encoding: identity\r\n
@@ -212,7 +212,7 b' Request for HTTPv2 service returns infor'
212 212 s> Content-Type: application/mercurial-cbor\r\n
213 213 s> Content-Length: *\r\n (glob)
214 214 s> \r\n
215 s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0001\xa5Hcommands\xaaIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xd9\x01\x02\x82GparentsHrevisionInoderange\x82\x81J0123456...\x81Iabcdef...Enodes\x81J0123456...Kpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xf5Enodes\x81J0123456...DpathGfoo.txtKpermissions\x81DpullEheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullLmanifestdata\xa2Dargs\xa4Ffields\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xf5Enodes\x81J0123456...Dtree@Kpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyInamespaceBnsCnewCnewColdColdKpermissions\x81DpushKcompression\x81\xa1DnameDzlibQframingmediatypes\x81X&application/mercurial-exp-framing-0005Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x82LgeneraldeltaHrevlogv1Nv1capabilitiesY\x01\xd3batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
215 s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0001\xa5Hcommands\xaaIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xa3Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetInoderange\xa3Gdefault\xf6Hrequired\xf4DtypeDlistEnodes\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa3Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa2Dargs\xa4Ffields\xa3Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullGpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushKcompression\x81\xa1DnameDzlibQframingmediatypes\x81X&application/mercurial-exp-framing-0005Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x82LgeneraldeltaHrevlogv1Nv1capabilitiesY\x01\xd3batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
216 216 cbor> {
217 217 b'apibase': b'api/',
218 218 b'apis': {
@@ -232,21 +232,21 b' Request for HTTPv2 service returns infor'
232 232 },
233 233 b'changesetdata': {
234 234 b'args': {
235 b'fields': set([
236 b'parents',
237 b'revision'
238 ]),
239 b'noderange': [
240 [
241 b'0123456...'
242 ],
243 [
244 b'abcdef...'
245 ]
246 ],
247 b'nodes': [
248 b'0123456...'
249 ]
235 b'fields': {
236 b'default': set([]),
237 b'required': False,
238 b'type': b'set'
239 },
240 b'noderange': {
241 b'default': None,
242 b'required': False,
243 b'type': b'list'
244 },
245 b'nodes': {
246 b'default': None,
247 b'required': False,
248 b'type': b'list'
249 }
250 250 },
251 251 b'permissions': [
252 252 b'pull'
@@ -254,15 +254,24 b' Request for HTTPv2 service returns infor'
254 254 },
255 255 b'filedata': {
256 256 b'args': {
257 b'fields': set([
258 b'parents',
259 b'revision'
260 ]),
261 b'haveparents': True,
262 b'nodes': [
263 b'0123456...'
264 ],
265 b'path': b'foo.txt'
257 b'fields': {
258 b'default': set([]),
259 b'required': False,
260 b'type': b'set'
261 },
262 b'haveparents': {
263 b'default': False,
264 b'required': False,
265 b'type': b'bool'
266 },
267 b'nodes': {
268 b'required': True,
269 b'type': b'list'
270 },
271 b'path': {
272 b'required': True,
273 b'type': b'bytes'
274 }
266 275 },
267 276 b'permissions': [
268 277 b'pull'
@@ -270,7 +279,11 b' Request for HTTPv2 service returns infor'
270 279 },
271 280 b'heads': {
272 281 b'args': {
273 b'publiconly': False
282 b'publiconly': {
283 b'default': False,
284 b'required': False,
285 b'type': b'bool'
286 }
274 287 },
275 288 b'permissions': [
276 289 b'pull'
@@ -278,9 +291,11 b' Request for HTTPv2 service returns infor'
278 291 },
279 292 b'known': {
280 293 b'args': {
281 b'nodes': [
282 b'deadbeef'
283 ]
294 b'nodes': {
295 b'default': [],
296 b'required': False,
297 b'type': b'list'
298 }
284 299 },
285 300 b'permissions': [
286 301 b'pull'
@@ -288,7 +303,10 b' Request for HTTPv2 service returns infor'
288 303 },
289 304 b'listkeys': {
290 305 b'args': {
291 b'namespace': b'ns'
306 b'namespace': {
307 b'required': True,
308 b'type': b'bytes'
309 }
292 310 },
293 311 b'permissions': [
294 312 b'pull'
@@ -296,7 +314,10 b' Request for HTTPv2 service returns infor'
296 314 },
297 315 b'lookup': {
298 316 b'args': {
299 b'key': b'foo'
317 b'key': {
318 b'required': True,
319 b'type': b'bytes'
320 }
300 321 },
301 322 b'permissions': [
302 323 b'pull'
@@ -304,15 +325,24 b' Request for HTTPv2 service returns infor'
304 325 },
305 326 b'manifestdata': {
306 327 b'args': {
307 b'fields': set([
308 b'parents',
309 b'revision'
310 ]),
311 b'haveparents': True,
312 b'nodes': [
313 b'0123456...'
314 ],
315 b'tree': b''
328 b'fields': {
329 b'default': set([]),
330 b'required': False,
331 b'type': b'set'
332 },
333 b'haveparents': {
334 b'default': False,
335 b'required': False,
336 b'type': b'bool'
337 },
338 b'nodes': {
339 b'required': True,
340 b'type': b'list'
341 },
342 b'tree': {
343 b'required': True,
344 b'type': b'bytes'
345 }
316 346 },
317 347 b'permissions': [
318 348 b'pull'
@@ -320,10 +350,22 b' Request for HTTPv2 service returns infor'
320 350 },
321 351 b'pushkey': {
322 352 b'args': {
323 b'key': b'key',
324 b'namespace': b'ns',
325 b'new': b'new',
326 b'old': b'old'
353 b'key': {
354 b'required': True,
355 b'type': b'bytes'
356 },
357 b'namespace': {
358 b'required': True,
359 b'type': b'bytes'
360 },
361 b'new': {
362 b'required': True,
363 b'type': b'bytes'
364 },
365 b'old': {
366 b'required': True,
367 b'type': b'bytes'
368 }
327 369 },
328 370 b'permissions': [
329 371 b'push'
@@ -373,7 +415,7 b' capabilities command returns expected in'
373 415 s> Content-Type: application/mercurial-cbor\r\n
374 416 s> Content-Length: *\r\n (glob)
375 417 s> \r\n
376 s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0001\xa5Hcommands\xaaIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xd9\x01\x02\x82GparentsHrevisionInoderange\x82\x81J0123456...\x81Iabcdef...Enodes\x81J0123456...Kpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xf5Enodes\x81J0123456...DpathGfoo.txtKpermissions\x81DpullEheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullLmanifestdata\xa2Dargs\xa4Ffields\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xf5Enodes\x81J0123456...Dtree@Kpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyInamespaceBnsCnewCnewColdColdKpermissions\x81DpushKcompression\x81\xa1DnameDzlibQframingmediatypes\x81X&application/mercurial-exp-framing-0005Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x82LgeneraldeltaHrevlogv1Nv1capabilitiesY\x01\xd3batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
418 s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0001\xa5Hcommands\xaaIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xa3Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetInoderange\xa3Gdefault\xf6Hrequired\xf4DtypeDlistEnodes\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa3Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa2Dargs\xa4Ffields\xa3Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullGpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushKcompression\x81\xa1DnameDzlibQframingmediatypes\x81X&application/mercurial-exp-framing-0005Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x82LgeneraldeltaHrevlogv1Nv1capabilitiesY\x01\xd3batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
377 419 sending capabilities command
378 420 s> POST /api/exp-http-v2-0001/ro/capabilities HTTP/1.1\r\n
379 421 s> Accept-Encoding: identity\r\n
@@ -396,11 +438,11 b' capabilities command returns expected in'
396 438 s> \xa1FstatusBok
397 439 s> \r\n
398 440 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
399 s> 33e\r\n
400 s> 6\x03\x00\x01\x00\x02\x001
401 s> \xa5Hcommands\xaaIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xd9\x01\x02\x82GparentsHrevisionInoderange\x82\x81J0123456...\x81Iabcdef...Enodes\x81J0123456...Kpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xf5Enodes\x81J0123456...DpathGfoo.txtKpermissions\x81DpullEheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullLmanifestdata\xa2Dargs\xa4Ffields\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xf5Enodes\x81J0123456...Dtree@Kpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyInamespaceBnsCnewCnewColdColdKpermissions\x81DpushKcompression\x81\xa1DnameDzlibQframingmediatypes\x81X&application/mercurial-exp-framing-0005Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x82LgeneraldeltaHrevlogv1
441 s> 485\r\n
442 s> }\x04\x00\x01\x00\x02\x001
443 s> \xa5Hcommands\xaaIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xa3Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetInoderange\xa3Gdefault\xf6Hrequired\xf4DtypeDlistEnodes\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa3Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa2Dargs\xa4Ffields\xa3Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullGpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushKcompression\x81\xa1DnameDzlibQframingmediatypes\x81X&application/mercurial-exp-framing-0005Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x82LgeneraldeltaHrevlogv1
402 444 s> \r\n
403 received frame(size=822; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
445 received frame(size=1149; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
404 446 s> 8\r\n
405 447 s> \x00\x00\x00\x01\x00\x02\x002
406 448 s> \r\n
@@ -424,21 +466,21 b' capabilities command returns expected in'
424 466 },
425 467 b'changesetdata': {
426 468 b'args': {
427 b'fields': set([
428 b'parents',
429 b'revision'
430 ]),
431 b'noderange': [
432 [
433 b'0123456...'
434 ],
435 [
436 b'abcdef...'
437 ]
438 ],
439 b'nodes': [
440 b'0123456...'
441 ]
469 b'fields': {
470 b'default': set([]),
471 b'required': False,
472 b'type': b'set'
473 },
474 b'noderange': {
475 b'default': None,
476 b'required': False,
477 b'type': b'list'
478 },
479 b'nodes': {
480 b'default': None,
481 b'required': False,
482 b'type': b'list'
483 }
442 484 },
443 485 b'permissions': [
444 486 b'pull'
@@ -446,15 +488,24 b' capabilities command returns expected in'
446 488 },
447 489 b'filedata': {
448 490 b'args': {
449 b'fields': set([
450 b'parents',
451 b'revision'
452 ]),
453 b'haveparents': True,
454 b'nodes': [
455 b'0123456...'
456 ],
457 b'path': b'foo.txt'
491 b'fields': {
492 b'default': set([]),
493 b'required': False,
494 b'type': b'set'
495 },
496 b'haveparents': {
497 b'default': False,
498 b'required': False,
499 b'type': b'bool'
500 },
501 b'nodes': {
502 b'required': True,
503 b'type': b'list'
504 },
505 b'path': {
506 b'required': True,
507 b'type': b'bytes'
508 }
458 509 },
459 510 b'permissions': [
460 511 b'pull'
@@ -462,7 +513,11 b' capabilities command returns expected in'
462 513 },
463 514 b'heads': {
464 515 b'args': {
465 b'publiconly': False
516 b'publiconly': {
517 b'default': False,
518 b'required': False,
519 b'type': b'bool'
520 }
466 521 },
467 522 b'permissions': [
468 523 b'pull'
@@ -470,9 +525,11 b' capabilities command returns expected in'
470 525 },
471 526 b'known': {
472 527 b'args': {
473 b'nodes': [
474 b'deadbeef'
475 ]
528 b'nodes': {
529 b'default': [],
530 b'required': False,
531 b'type': b'list'
532 }
476 533 },
477 534 b'permissions': [
478 535 b'pull'
@@ -480,7 +537,10 b' capabilities command returns expected in'
480 537 },
481 538 b'listkeys': {
482 539 b'args': {
483 b'namespace': b'ns'
540 b'namespace': {
541 b'required': True,
542 b'type': b'bytes'
543 }
484 544 },
485 545 b'permissions': [
486 546 b'pull'
@@ -488,7 +548,10 b' capabilities command returns expected in'
488 548 },
489 549 b'lookup': {
490 550 b'args': {
491 b'key': b'foo'
551 b'key': {
552 b'required': True,
553 b'type': b'bytes'
554 }
492 555 },
493 556 b'permissions': [
494 557 b'pull'
@@ -496,15 +559,24 b' capabilities command returns expected in'
496 559 },
497 560 b'manifestdata': {
498 561 b'args': {
499 b'fields': set([
500 b'parents',
501 b'revision'
502 ]),
503 b'haveparents': True,
504 b'nodes': [
505 b'0123456...'
506 ],
507 b'tree': b''
562 b'fields': {
563 b'default': set([]),
564 b'required': False,
565 b'type': b'set'
566 },
567 b'haveparents': {
568 b'default': False,
569 b'required': False,
570 b'type': b'bool'
571 },
572 b'nodes': {
573 b'required': True,
574 b'type': b'list'
575 },
576 b'tree': {
577 b'required': True,
578 b'type': b'bytes'
579 }
508 580 },
509 581 b'permissions': [
510 582 b'pull'
@@ -512,10 +584,22 b' capabilities command returns expected in'
512 584 },
513 585 b'pushkey': {
514 586 b'args': {
515 b'key': b'key',
516 b'namespace': b'ns',
517 b'new': b'new',
518 b'old': b'old'
587 b'key': {
588 b'required': True,
589 b'type': b'bytes'
590 },
591 b'namespace': {
592 b'required': True,
593 b'type': b'bytes'
594 },
595 b'new': {
596 b'required': True,
597 b'type': b'bytes'
598 },
599 b'old': {
600 b'required': True,
601 b'type': b'bytes'
602 }
519 603 },
520 604 b'permissions': [
521 605 b'push'
General Comments 0
You need to be logged in to leave comments. Login now