##// 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 are:
59 are:
60
60
61 args
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.
69 default
65 e.g. an argument expecting a boolean type will have its value
70 (varied) The default value for this argument if not specified. Only
66 set to true. An integer type will have its value set to 42. The
71 present if ``required`` is not true.
67 actual values are arbitrary and may not have meaning.
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 permissions
80 permissions
69 An array of permissions required to execute this command.
81 An array of permissions required to execute this command.
70
82
@@ -436,7 +436,18 b' def _capabilitiesv2(repo, proto):'
436 # TODO expose available changesetdata fields.
436 # TODO expose available changesetdata fields.
437
437
438 for command, entry in COMMANDS.items():
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 caps['commands'][command] = {
452 caps['commands'][command] = {
442 'args': args,
453 'args': args,
@@ -313,7 +313,7 b' Client with HTTPv2 enabled automatically'
313 s> Content-Type: application/mercurial-cbor\r\n
313 s> Content-Type: application/mercurial-cbor\r\n
314 s> Content-Length: *\r\n (glob)
314 s> Content-Length: *\r\n (glob)
315 s> \r\n
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 sending heads command
317 sending heads command
318 s> POST /api/exp-http-v2-0001/ro/heads HTTP/1.1\r\n
318 s> POST /api/exp-http-v2-0001/ro/heads HTTP/1.1\r\n
319 s> Accept-Encoding: identity\r\n
319 s> Accept-Encoding: identity\r\n
@@ -212,7 +212,7 b' Request for HTTPv2 service returns infor'
212 s> Content-Type: application/mercurial-cbor\r\n
212 s> Content-Type: application/mercurial-cbor\r\n
213 s> Content-Length: *\r\n (glob)
213 s> Content-Length: *\r\n (glob)
214 s> \r\n
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 cbor> {
216 cbor> {
217 b'apibase': b'api/',
217 b'apibase': b'api/',
218 b'apis': {
218 b'apis': {
@@ -232,21 +232,21 b' Request for HTTPv2 service returns infor'
232 },
232 },
233 b'changesetdata': {
233 b'changesetdata': {
234 b'args': {
234 b'args': {
235 b'fields': set([
235 b'fields': {
236 b'parents',
236 b'default': set([]),
237 b'revision'
237 b'required': False,
238 ]),
238 b'type': b'set'
239 b'noderange': [
239 },
240 [
240 b'noderange': {
241 b'0123456...'
241 b'default': None,
242 ],
242 b'required': False,
243 [
243 b'type': b'list'
244 b'abcdef...'
244 },
245 ]
245 b'nodes': {
246 ],
246 b'default': None,
247 b'nodes': [
247 b'required': False,
248 b'0123456...'
248 b'type': b'list'
249 ]
249 }
250 },
250 },
251 b'permissions': [
251 b'permissions': [
252 b'pull'
252 b'pull'
@@ -254,15 +254,24 b' Request for HTTPv2 service returns infor'
254 },
254 },
255 b'filedata': {
255 b'filedata': {
256 b'args': {
256 b'args': {
257 b'fields': set([
257 b'fields': {
258 b'parents',
258 b'default': set([]),
259 b'revision'
259 b'required': False,
260 ]),
260 b'type': b'set'
261 b'haveparents': True,
261 },
262 b'nodes': [
262 b'haveparents': {
263 b'0123456...'
263 b'default': False,
264 ],
264 b'required': False,
265 b'path': b'foo.txt'
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 b'permissions': [
276 b'permissions': [
268 b'pull'
277 b'pull'
@@ -270,7 +279,11 b' Request for HTTPv2 service returns infor'
270 },
279 },
271 b'heads': {
280 b'heads': {
272 b'args': {
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 b'permissions': [
288 b'permissions': [
276 b'pull'
289 b'pull'
@@ -278,9 +291,11 b' Request for HTTPv2 service returns infor'
278 },
291 },
279 b'known': {
292 b'known': {
280 b'args': {
293 b'args': {
281 b'nodes': [
294 b'nodes': {
282 b'deadbeef'
295 b'default': [],
283 ]
296 b'required': False,
297 b'type': b'list'
298 }
284 },
299 },
285 b'permissions': [
300 b'permissions': [
286 b'pull'
301 b'pull'
@@ -288,7 +303,10 b' Request for HTTPv2 service returns infor'
288 },
303 },
289 b'listkeys': {
304 b'listkeys': {
290 b'args': {
305 b'args': {
291 b'namespace': b'ns'
306 b'namespace': {
307 b'required': True,
308 b'type': b'bytes'
309 }
292 },
310 },
293 b'permissions': [
311 b'permissions': [
294 b'pull'
312 b'pull'
@@ -296,7 +314,10 b' Request for HTTPv2 service returns infor'
296 },
314 },
297 b'lookup': {
315 b'lookup': {
298 b'args': {
316 b'args': {
299 b'key': b'foo'
317 b'key': {
318 b'required': True,
319 b'type': b'bytes'
320 }
300 },
321 },
301 b'permissions': [
322 b'permissions': [
302 b'pull'
323 b'pull'
@@ -304,15 +325,24 b' Request for HTTPv2 service returns infor'
304 },
325 },
305 b'manifestdata': {
326 b'manifestdata': {
306 b'args': {
327 b'args': {
307 b'fields': set([
328 b'fields': {
308 b'parents',
329 b'default': set([]),
309 b'revision'
330 b'required': False,
310 ]),
331 b'type': b'set'
311 b'haveparents': True,
332 },
312 b'nodes': [
333 b'haveparents': {
313 b'0123456...'
334 b'default': False,
314 ],
335 b'required': False,
315 b'tree': b''
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 b'permissions': [
347 b'permissions': [
318 b'pull'
348 b'pull'
@@ -320,10 +350,22 b' Request for HTTPv2 service returns infor'
320 },
350 },
321 b'pushkey': {
351 b'pushkey': {
322 b'args': {
352 b'args': {
323 b'key': b'key',
353 b'key': {
324 b'namespace': b'ns',
354 b'required': True,
325 b'new': b'new',
355 b'type': b'bytes'
326 b'old': b'old'
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 b'permissions': [
370 b'permissions': [
329 b'push'
371 b'push'
@@ -373,7 +415,7 b' capabilities command returns expected in'
373 s> Content-Type: application/mercurial-cbor\r\n
415 s> Content-Type: application/mercurial-cbor\r\n
374 s> Content-Length: *\r\n (glob)
416 s> Content-Length: *\r\n (glob)
375 s> \r\n
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 sending capabilities command
419 sending capabilities command
378 s> POST /api/exp-http-v2-0001/ro/capabilities HTTP/1.1\r\n
420 s> POST /api/exp-http-v2-0001/ro/capabilities HTTP/1.1\r\n
379 s> Accept-Encoding: identity\r\n
421 s> Accept-Encoding: identity\r\n
@@ -396,11 +438,11 b' capabilities command returns expected in'
396 s> \xa1FstatusBok
438 s> \xa1FstatusBok
397 s> \r\n
439 s> \r\n
398 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
440 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
399 s> 33e\r\n
441 s> 485\r\n
400 s> 6\x03\x00\x01\x00\x02\x001
442 s> }\x04\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
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 s> \r\n
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 s> 8\r\n
446 s> 8\r\n
405 s> \x00\x00\x00\x01\x00\x02\x002
447 s> \x00\x00\x00\x01\x00\x02\x002
406 s> \r\n
448 s> \r\n
@@ -424,21 +466,21 b' capabilities command returns expected in'
424 },
466 },
425 b'changesetdata': {
467 b'changesetdata': {
426 b'args': {
468 b'args': {
427 b'fields': set([
469 b'fields': {
428 b'parents',
470 b'default': set([]),
429 b'revision'
471 b'required': False,
430 ]),
472 b'type': b'set'
431 b'noderange': [
473 },
432 [
474 b'noderange': {
433 b'0123456...'
475 b'default': None,
434 ],
476 b'required': False,
435 [
477 b'type': b'list'
436 b'abcdef...'
478 },
437 ]
479 b'nodes': {
438 ],
480 b'default': None,
439 b'nodes': [
481 b'required': False,
440 b'0123456...'
482 b'type': b'list'
441 ]
483 }
442 },
484 },
443 b'permissions': [
485 b'permissions': [
444 b'pull'
486 b'pull'
@@ -446,15 +488,24 b' capabilities command returns expected in'
446 },
488 },
447 b'filedata': {
489 b'filedata': {
448 b'args': {
490 b'args': {
449 b'fields': set([
491 b'fields': {
450 b'parents',
492 b'default': set([]),
451 b'revision'
493 b'required': False,
452 ]),
494 b'type': b'set'
453 b'haveparents': True,
495 },
454 b'nodes': [
496 b'haveparents': {
455 b'0123456...'
497 b'default': False,
456 ],
498 b'required': False,
457 b'path': b'foo.txt'
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 b'permissions': [
510 b'permissions': [
460 b'pull'
511 b'pull'
@@ -462,7 +513,11 b' capabilities command returns expected in'
462 },
513 },
463 b'heads': {
514 b'heads': {
464 b'args': {
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 b'permissions': [
522 b'permissions': [
468 b'pull'
523 b'pull'
@@ -470,9 +525,11 b' capabilities command returns expected in'
470 },
525 },
471 b'known': {
526 b'known': {
472 b'args': {
527 b'args': {
473 b'nodes': [
528 b'nodes': {
474 b'deadbeef'
529 b'default': [],
475 ]
530 b'required': False,
531 b'type': b'list'
532 }
476 },
533 },
477 b'permissions': [
534 b'permissions': [
478 b'pull'
535 b'pull'
@@ -480,7 +537,10 b' capabilities command returns expected in'
480 },
537 },
481 b'listkeys': {
538 b'listkeys': {
482 b'args': {
539 b'args': {
483 b'namespace': b'ns'
540 b'namespace': {
541 b'required': True,
542 b'type': b'bytes'
543 }
484 },
544 },
485 b'permissions': [
545 b'permissions': [
486 b'pull'
546 b'pull'
@@ -488,7 +548,10 b' capabilities command returns expected in'
488 },
548 },
489 b'lookup': {
549 b'lookup': {
490 b'args': {
550 b'args': {
491 b'key': b'foo'
551 b'key': {
552 b'required': True,
553 b'type': b'bytes'
554 }
492 },
555 },
493 b'permissions': [
556 b'permissions': [
494 b'pull'
557 b'pull'
@@ -496,15 +559,24 b' capabilities command returns expected in'
496 },
559 },
497 b'manifestdata': {
560 b'manifestdata': {
498 b'args': {
561 b'args': {
499 b'fields': set([
562 b'fields': {
500 b'parents',
563 b'default': set([]),
501 b'revision'
564 b'required': False,
502 ]),
565 b'type': b'set'
503 b'haveparents': True,
566 },
504 b'nodes': [
567 b'haveparents': {
505 b'0123456...'
568 b'default': False,
506 ],
569 b'required': False,
507 b'tree': b''
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 b'permissions': [
581 b'permissions': [
510 b'pull'
582 b'pull'
@@ -512,10 +584,22 b' capabilities command returns expected in'
512 },
584 },
513 b'pushkey': {
585 b'pushkey': {
514 b'args': {
586 b'args': {
515 b'key': b'key',
587 b'key': {
516 b'namespace': b'ns',
588 b'required': True,
517 b'new': b'new',
589 b'type': b'bytes'
518 b'old': b'old'
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 b'permissions': [
604 b'permissions': [
521 b'push'
605 b'push'
General Comments 0
You need to be logged in to leave comments. Login now