Show More
@@ -283,6 +283,7 def _fetchmanifests(repo, tr, remote, ma | |||
|
283 | 283 | b'tree': b'', |
|
284 | 284 | b'nodes': batch, |
|
285 | 285 | b'fields': {b'parents', b'revision'}, |
|
286 | b'haveparents': True, | |
|
286 | 287 | }).result() |
|
287 | 288 | |
|
288 | 289 | # Chomp off header object. |
@@ -374,7 +375,8 def _fetchfiles(repo, tr, remote, fnodes | |||
|
374 | 375 | fs.append((path, e.callcommand(b'filedata', { |
|
375 | 376 | b'path': path, |
|
376 | 377 | b'nodes': sorted(nodes), |
|
377 | b'fields': {b'parents', b'revision'} | |
|
378 | b'fields': {b'parents', b'revision'}, | |
|
379 | b'haveparents': True, | |
|
378 | 380 | }))) |
|
379 | 381 | |
|
380 | 382 | locallinkrevs[path] = { |
@@ -213,6 +213,14 fields | |||
|
213 | 213 | revision |
|
214 | 214 | The raw revision data for a file. |
|
215 | 215 | |
|
216 | haveparents | |
|
217 | (bool) Whether the client has the parent revisions of all requested | |
|
218 | nodes. If set, the server may emit revision data as deltas against | |
|
219 | any parent revision. If not set, the server MUST only emit deltas for | |
|
220 | revisions previously emitted by this command. | |
|
221 | ||
|
222 | False is assumed in the absence of any value. | |
|
223 | ||
|
216 | 224 | nodes |
|
217 | 225 | (array of bytestrings) File nodes whose data to retrieve. |
|
218 | 226 | |
@@ -349,6 +357,14 fields | |||
|
349 | 357 | revision |
|
350 | 358 | The raw revision data for the manifest. |
|
351 | 359 | |
|
360 | haveparents | |
|
361 | (bool) Whether the client has the parent revisions of all requested | |
|
362 | nodes. If set, the server may emit revision data as deltas against | |
|
363 | any parent revision. If not set, the server MUST only emit deltas for | |
|
364 | revisions previously emitted by this command. | |
|
365 | ||
|
366 | False is assumed in the absence of any value. | |
|
367 | ||
|
352 | 368 | nodes |
|
353 | 369 | (array of bytestring) Manifest nodes whose data to retrieve. |
|
354 | 370 | |
@@ -361,7 +377,6 TODO allow specifying revisions via alte | |||
|
361 | 377 | revisions or ranges) |
|
362 | 378 | TODO consider recursive expansion of manifests (with path filtering for |
|
363 | 379 | narrow use cases) |
|
364 | TODO more control over whether to emit fulltexts or deltas | |
|
365 | 380 | |
|
366 | 381 | The response bytestream starts with a CBOR map describing the data that |
|
367 | 382 | follows. It has the following bytestring keys: |
@@ -415,7 +415,7 def _capabilitiesv2(repo, proto): | |||
|
415 | 415 | |
|
416 | 416 | return proto.addcapabilities(repo, caps) |
|
417 | 417 | |
|
418 | def builddeltarequests(store, nodes): | |
|
418 | def builddeltarequests(store, nodes, haveparents): | |
|
419 | 419 | """Build a series of revision delta requests against a backend store. |
|
420 | 420 | |
|
421 | 421 | Returns a list of revision numbers in the order they should be sent |
@@ -430,50 +430,69 def builddeltarequests(store, nodes): | |||
|
430 | 430 | revs = dagop.linearize({store.rev(n) for n in nodes}, store.parentrevs) |
|
431 | 431 | |
|
432 | 432 | requests = [] |
|
433 | seenrevs = set() | |
|
433 | 434 | |
|
434 | 435 | for rev in revs: |
|
435 | 436 | node = store.node(rev) |
|
436 | parents = store.parents(node) | |
|
437 | deltaparent = store.node(store.deltaparent(rev)) | |
|
437 | parentnodes = store.parents(node) | |
|
438 | parentrevs = [store.rev(n) for n in parentnodes] | |
|
439 | deltabaserev = store.deltaparent(rev) | |
|
440 | deltabasenode = store.node(deltabaserev) | |
|
438 | 441 | |
|
439 | # There is a delta in storage. That means we can send the delta | |
|
440 | # efficiently. | |
|
442 | # The choice of whether to send a fulltext revision or a delta and | |
|
443 | # what delta to send is governed by a few factors. | |
|
441 | 444 | # |
|
442 | # But, the delta may be against a revision the receiver doesn't | |
|
443 | # have (e.g. shallow clone or when the delta isn't against a parent | |
|
444 | # revision). For now, we ignore the problem of shallow clone. As | |
|
445 | # long as a delta exists against a parent, we send it. | |
|
446 | # TODO allow arguments to control this behavior, as the receiver | |
|
447 | # may not have the base revision in some scenarios. | |
|
448 | if deltaparent != nullid and deltaparent in parents: | |
|
449 | basenode = deltaparent | |
|
445 | # To send a delta, we need to ensure the receiver is capable of | |
|
446 | # decoding it. And that requires the receiver to have the base | |
|
447 | # revision the delta is against. | |
|
448 | # | |
|
449 | # We can only guarantee the receiver has the base revision if | |
|
450 | # a) we've already sent the revision as part of this group | |
|
451 | # b) the receiver has indicated they already have the revision. | |
|
452 | # And the mechanism for "b" is the client indicating they have | |
|
453 | # parent revisions. So this means we can only send the delta if | |
|
454 | # it is sent before or it is against a delta and the receiver says | |
|
455 | # they have a parent. | |
|
450 | 456 | |
|
451 | # Else there is no delta parent in storage or the delta that is | |
|
452 | # # there isn't suitable. Let's use a delta against a parent | |
|
453 | # revision, if possible. | |
|
454 | # | |
|
455 | # There is room to check if the delta parent is in the ancestry of | |
|
456 | # this node. But there isn't an API on the manifest storage object | |
|
457 | # for that. So ignore this case for now. | |
|
457 | # We can send storage delta if it is against a revision we've sent | |
|
458 | # in this group. | |
|
459 | if deltabaserev != nullrev and deltabaserev in seenrevs: | |
|
460 | basenode = deltabasenode | |
|
461 | ||
|
462 | # We can send storage delta if it is against a parent revision and | |
|
463 | # the receiver indicates they have the parents. | |
|
464 | elif (deltabaserev != nullrev and deltabaserev in parentrevs | |
|
465 | and haveparents): | |
|
466 | basenode = deltabasenode | |
|
458 | 467 | |
|
459 | elif parents[0] != nullid: | |
|
460 | basenode = parents[0] | |
|
461 | elif parents[1] != nullid: | |
|
462 | basenode = parents[1] | |
|
468 | # Otherwise the storage delta isn't appropriate. Fall back to | |
|
469 | # using another delta, if possible. | |
|
463 | 470 | |
|
464 | # No potential bases to delta against. Send a full revision. | |
|
471 | # Use p1 if we've emitted it or receiver says they have it. | |
|
472 | elif parentrevs[0] != nullrev and ( | |
|
473 | parentrevs[0] in seenrevs or haveparents): | |
|
474 | basenode = parentnodes[0] | |
|
475 | ||
|
476 | # Use p2 if we've emitted it or receiver says they have it. | |
|
477 | elif parentrevs[1] != nullrev and ( | |
|
478 | parentrevs[1] in seenrevs or haveparents): | |
|
479 | basenode = parentnodes[1] | |
|
480 | ||
|
481 | # Nothing appropriate to delta against. Send the full revision. | |
|
465 | 482 | else: |
|
466 | 483 | basenode = nullid |
|
467 | 484 | |
|
468 | 485 | requests.append(changegroup.revisiondeltarequest( |
|
469 | 486 | node=node, |
|
470 | p1node=parents[0], | |
|
471 | p2node=parents[1], | |
|
487 | p1node=parentnodes[0], | |
|
488 | p2node=parentnodes[1], | |
|
472 | 489 | # Receiver deals with linknode resolution. |
|
473 | 490 | linknode=nullid, |
|
474 | 491 | basenode=basenode, |
|
475 | 492 | )) |
|
476 | 493 | |
|
494 | seenrevs.add(rev) | |
|
495 | ||
|
477 | 496 | return revs, requests |
|
478 | 497 | |
|
479 | 498 | def wireprotocommand(name, args=None, permission='push'): |
@@ -674,12 +693,14 def getfilestore(repo, proto, path): | |||
|
674 | 693 | |
|
675 | 694 | @wireprotocommand('filedata', |
|
676 | 695 | args={ |
|
696 | 'haveparents': True, | |
|
677 | 697 | 'nodes': [b'0123456...'], |
|
678 | 698 | 'fields': [b'parents', b'revision'], |
|
679 | 699 | 'path': b'foo.txt', |
|
680 | 700 | }, |
|
681 | 701 | permission='pull') |
|
682 |
def filedata(repo, proto, nodes=None, fields=None, |
|
|
702 | def filedata(repo, proto, haveparents=False, nodes=None, fields=None, | |
|
703 | path=None): | |
|
683 | 704 | fields = fields or set() |
|
684 | 705 | |
|
685 | 706 | if nodes is None: |
@@ -702,7 +723,7 def filedata(repo, proto, nodes=None, fi | |||
|
702 | 723 | raise error.WireprotoCommandError('unknown file node: %s', |
|
703 | 724 | (hex(node),)) |
|
704 | 725 | |
|
705 | revs, requests = builddeltarequests(store, nodes) | |
|
726 | revs, requests = builddeltarequests(store, nodes, haveparents) | |
|
706 | 727 | |
|
707 | 728 | yield { |
|
708 | 729 | b'totalitems': len(revs), |
@@ -804,11 +825,13 def lookupv2(repo, proto, key): | |||
|
804 | 825 | @wireprotocommand('manifestdata', |
|
805 | 826 | args={ |
|
806 | 827 | 'nodes': [b'0123456...'], |
|
828 | 'haveparents': True, | |
|
807 | 829 | 'fields': [b'parents', b'revision'], |
|
808 | 830 | 'tree': b'', |
|
809 | 831 | }, |
|
810 | 832 | permission='pull') |
|
811 |
def manifestdata(repo, proto, nodes=None, fields=None, |
|
|
833 | def manifestdata(repo, proto, haveparents=False, nodes=None, fields=None, | |
|
834 | tree=None): | |
|
812 | 835 | fields = fields or set() |
|
813 | 836 | |
|
814 | 837 | if nodes is None: |
@@ -829,7 +852,7 def manifestdata(repo, proto, nodes=None | |||
|
829 | 852 | raise error.WireprotoCommandError( |
|
830 | 853 | 'unknown node: %s', (node,)) |
|
831 | 854 | |
|
832 | revs, requests = builddeltarequests(store, nodes) | |
|
855 | revs, requests = builddeltarequests(store, nodes, haveparents) | |
|
833 | 856 | |
|
834 | 857 | yield { |
|
835 | 858 | b'totalitems': len(revs), |
@@ -313,7 +313,7 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\xa4Hcommands\xaaIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xd9\x01\x02\x82GparentsHrevisionInoderange\x82\x81J0123456...\x81Iabcdef...Enodes\x81J0123456...Kpermissions\x81DpullHfiledata\xa2Dargs\xa |
|
|
316 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xaaIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xd9\x01\x02\x82GparentsHrevisionInoderange\x82\x81J0123456...\x81Iabcdef...Enodes\x81J0123456...Kpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\x82GparentsHrevisionKhaveparents\xf5Enodes\x81J0123456...DpathGfoo.txtKpermissions\x81DpullEheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullLmanifestdata\xa2Dargs\xa4Ffields\x82GparentsHrevisionKhaveparents\xf5Enodes\x81J0123456...Dtree@Kpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyInamespaceBnsCnewCnewColdColdKpermissions\x81DpushKcompression\x81\xa1DnameDzlibQframingmediatypes\x81X&application/mercurial-exp-framing-0005Nrawrepoformats\x82LgeneraldeltaHrevlogv1Nv1capabilitiesY\x01\xc5batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ 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 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\xa4Hcommands\xaaIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xd9\x01\x02\x82GparentsHrevisionInoderange\x82\x81J0123456...\x81Iabcdef...Enodes\x81J0123456...Kpermissions\x81DpullHfiledata\xa2Dargs\xa |
|
|
215 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xaaIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xd9\x01\x02\x82GparentsHrevisionInoderange\x82\x81J0123456...\x81Iabcdef...Enodes\x81J0123456...Kpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\x82GparentsHrevisionKhaveparents\xf5Enodes\x81J0123456...DpathGfoo.txtKpermissions\x81DpullEheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullLmanifestdata\xa2Dargs\xa4Ffields\x82GparentsHrevisionKhaveparents\xf5Enodes\x81J0123456...Dtree@Kpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyInamespaceBnsCnewCnewColdColdKpermissions\x81DpushKcompression\x81\xa1DnameDzlibQframingmediatypes\x81X&application/mercurial-exp-framing-0005Nrawrepoformats\x82LgeneraldeltaHrevlogv1Nv1capabilitiesY\x01\xc5batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ 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': { |
@@ -258,6 +258,7 Request for HTTPv2 service returns infor | |||
|
258 | 258 | b'parents', |
|
259 | 259 | b'revision' |
|
260 | 260 | ], |
|
261 | b'haveparents': True, | |
|
261 | 262 | b'nodes': [ |
|
262 | 263 | b'0123456...' |
|
263 | 264 | ], |
@@ -307,6 +308,7 Request for HTTPv2 service returns infor | |||
|
307 | 308 | b'parents', |
|
308 | 309 | b'revision' |
|
309 | 310 | ], |
|
311 | b'haveparents': True, | |
|
310 | 312 | b'nodes': [ |
|
311 | 313 | b'0123456...' |
|
312 | 314 | ], |
@@ -367,7 +369,7 capabilities command returns expected in | |||
|
367 | 369 | s> Content-Type: application/mercurial-cbor\r\n |
|
368 | 370 | s> Content-Length: *\r\n (glob) |
|
369 | 371 | s> \r\n |
|
370 |
s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xaaIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xd9\x01\x02\x82GparentsHrevisionInoderange\x82\x81J0123456...\x81Iabcdef...Enodes\x81J0123456...Kpermissions\x81DpullHfiledata\xa2Dargs\xa |
|
|
372 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xaaIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xd9\x01\x02\x82GparentsHrevisionInoderange\x82\x81J0123456...\x81Iabcdef...Enodes\x81J0123456...Kpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\x82GparentsHrevisionKhaveparents\xf5Enodes\x81J0123456...DpathGfoo.txtKpermissions\x81DpullEheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullLmanifestdata\xa2Dargs\xa4Ffields\x82GparentsHrevisionKhaveparents\xf5Enodes\x81J0123456...Dtree@Kpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyInamespaceBnsCnewCnewColdColdKpermissions\x81DpushKcompression\x81\xa1DnameDzlibQframingmediatypes\x81X&application/mercurial-exp-framing-0005Nrawrepoformats\x82LgeneraldeltaHrevlogv1Nv1capabilitiesY\x01\xc5batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ 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 | |
|
371 | 373 | sending capabilities command |
|
372 | 374 | s> POST /api/exp-http-v2-0001/ro/capabilities HTTP/1.1\r\n |
|
373 | 375 | s> Accept-Encoding: identity\r\n |
@@ -390,11 +392,11 capabilities command returns expected in | |||
|
390 | 392 | s> \xa1FstatusBok |
|
391 | 393 | s> \r\n |
|
392 | 394 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
|
393 |
s> |
|
|
394 |
s> \x |
|
|
395 |
s> \xa4Hcommands\xaaIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xd9\x01\x02\x82GparentsHrevisionInoderange\x82\x81J0123456...\x81Iabcdef...Enodes\x81J0123456...Kpermissions\x81DpullHfiledata\xa2Dargs\xa |
|
|
395 | s> 30e\r\n | |
|
396 | s> \x06\x03\x00\x01\x00\x02\x001 | |
|
397 | s> \xa4Hcommands\xaaIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xd9\x01\x02\x82GparentsHrevisionInoderange\x82\x81J0123456...\x81Iabcdef...Enodes\x81J0123456...Kpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\x82GparentsHrevisionKhaveparents\xf5Enodes\x81J0123456...DpathGfoo.txtKpermissions\x81DpullEheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullLmanifestdata\xa2Dargs\xa4Ffields\x82GparentsHrevisionKhaveparents\xf5Enodes\x81J0123456...Dtree@Kpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyInamespaceBnsCnewCnewColdColdKpermissions\x81DpushKcompression\x81\xa1DnameDzlibQframingmediatypes\x81X&application/mercurial-exp-framing-0005Nrawrepoformats\x82LgeneraldeltaHrevlogv1 | |
|
396 | 398 | s> \r\n |
|
397 |
received frame(size=74 |
|
|
399 | received frame(size=774; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
|
398 | 400 | s> 8\r\n |
|
399 | 401 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
400 | 402 | s> \r\n |
@@ -444,6 +446,7 capabilities command returns expected in | |||
|
444 | 446 | b'parents', |
|
445 | 447 | b'revision' |
|
446 | 448 | ], |
|
449 | b'haveparents': True, | |
|
447 | 450 | b'nodes': [ |
|
448 | 451 | b'0123456...' |
|
449 | 452 | ], |
@@ -493,6 +496,7 capabilities command returns expected in | |||
|
493 | 496 | b'parents', |
|
494 | 497 | b'revision' |
|
495 | 498 | ], |
|
499 | b'haveparents': True, | |
|
496 | 500 | b'nodes': [ |
|
497 | 501 | b'0123456...' |
|
498 | 502 | ], |
@@ -253,6 +253,7 Requesting parents works | |||
|
253 | 253 | ] |
|
254 | 254 | |
|
255 | 255 | Requesting revision data works |
|
256 | (haveparents defaults to False, so fulltext is emitted) | |
|
256 | 257 | |
|
257 | 258 | $ sendhttpv2peer << EOF |
|
258 | 259 | > command filedata |
@@ -283,6 +284,114 Requesting revision data works | |||
|
283 | 284 | s> \xa1FstatusBok |
|
284 | 285 | s> \r\n |
|
285 | 286 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
|
287 | s> 42\r\n | |
|
288 | s> :\x00\x00\x01\x00\x02\x001 | |
|
289 | s> \xa1Jtotalitems\x01\xa2DnodeT\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xccLrevisionsize\x03Ca1\n | |
|
290 | s> \r\n | |
|
291 | received frame(size=58; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
|
292 | s> 8\r\n | |
|
293 | s> \x00\x00\x00\x01\x00\x02\x002 | |
|
294 | s> \r\n | |
|
295 | s> 0\r\n | |
|
296 | s> \r\n | |
|
297 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
|
298 | response: gen[ | |
|
299 | { | |
|
300 | b'totalitems': 1 | |
|
301 | }, | |
|
302 | { | |
|
303 | b'node': b'\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xcc', | |
|
304 | b'revisionsize': 3 | |
|
305 | }, | |
|
306 | b'a1\n' | |
|
307 | ] | |
|
308 | ||
|
309 | haveparents=False should be same as above | |
|
310 | ||
|
311 | $ sendhttpv2peer << EOF | |
|
312 | > command filedata | |
|
313 | > nodes eval:[b'\x9a\x38\x12\x29\x97\xb3\xac\x97\xbe\x2a\x9a\xa2\xe5\x56\x83\x83\x41\xfd\xf2\xcc'] | |
|
314 | > path eval:b'a' | |
|
315 | > fields eval:[b'revision'] | |
|
316 | > haveparents eval:False | |
|
317 | > EOF | |
|
318 | creating http peer for wire protocol version 2 | |
|
319 | sending filedata command | |
|
320 | s> POST /api/exp-http-v2-0001/ro/filedata HTTP/1.1\r\n | |
|
321 | s> Accept-Encoding: identity\r\n | |
|
322 | s> accept: application/mercurial-exp-framing-0005\r\n | |
|
323 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
|
324 | s> content-length: 94\r\n | |
|
325 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
326 | s> user-agent: Mercurial debugwireproto\r\n | |
|
327 | s> \r\n | |
|
328 | s> V\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa4Ffields\x81HrevisionKhaveparents\xf4Enodes\x81T\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xccDpathAaDnameHfiledata | |
|
329 | s> makefile('rb', None) | |
|
330 | s> HTTP/1.1 200 OK\r\n | |
|
331 | s> Server: testing stub value\r\n | |
|
332 | s> Date: $HTTP_DATE$\r\n | |
|
333 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
|
334 | s> Transfer-Encoding: chunked\r\n | |
|
335 | s> \r\n | |
|
336 | s> 13\r\n | |
|
337 | s> \x0b\x00\x00\x01\x00\x02\x011 | |
|
338 | s> \xa1FstatusBok | |
|
339 | s> \r\n | |
|
340 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
|
341 | s> 42\r\n | |
|
342 | s> :\x00\x00\x01\x00\x02\x001 | |
|
343 | s> \xa1Jtotalitems\x01\xa2DnodeT\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xccLrevisionsize\x03Ca1\n | |
|
344 | s> \r\n | |
|
345 | received frame(size=58; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
|
346 | s> 8\r\n | |
|
347 | s> \x00\x00\x00\x01\x00\x02\x002 | |
|
348 | s> \r\n | |
|
349 | s> 0\r\n | |
|
350 | s> \r\n | |
|
351 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
|
352 | response: gen[ | |
|
353 | { | |
|
354 | b'totalitems': 1 | |
|
355 | }, | |
|
356 | { | |
|
357 | b'node': b'\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xcc', | |
|
358 | b'revisionsize': 3 | |
|
359 | }, | |
|
360 | b'a1\n' | |
|
361 | ] | |
|
362 | ||
|
363 | haveparents=True should emit a delta | |
|
364 | ||
|
365 | $ sendhttpv2peer << EOF | |
|
366 | > command filedata | |
|
367 | > nodes eval:[b'\x9a\x38\x12\x29\x97\xb3\xac\x97\xbe\x2a\x9a\xa2\xe5\x56\x83\x83\x41\xfd\xf2\xcc'] | |
|
368 | > path eval:b'a' | |
|
369 | > fields eval:[b'revision'] | |
|
370 | > haveparents eval:True | |
|
371 | > EOF | |
|
372 | creating http peer for wire protocol version 2 | |
|
373 | sending filedata command | |
|
374 | s> POST /api/exp-http-v2-0001/ro/filedata HTTP/1.1\r\n | |
|
375 | s> Accept-Encoding: identity\r\n | |
|
376 | s> accept: application/mercurial-exp-framing-0005\r\n | |
|
377 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
|
378 | s> content-length: 94\r\n | |
|
379 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
380 | s> user-agent: Mercurial debugwireproto\r\n | |
|
381 | s> \r\n | |
|
382 | s> V\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa4Ffields\x81HrevisionKhaveparents\xf5Enodes\x81T\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xccDpathAaDnameHfiledata | |
|
383 | s> makefile('rb', None) | |
|
384 | s> HTTP/1.1 200 OK\r\n | |
|
385 | s> Server: testing stub value\r\n | |
|
386 | s> Date: $HTTP_DATE$\r\n | |
|
387 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
|
388 | s> Transfer-Encoding: chunked\r\n | |
|
389 | s> \r\n | |
|
390 | s> 13\r\n | |
|
391 | s> \x0b\x00\x00\x01\x00\x02\x011 | |
|
392 | s> \xa1FstatusBok | |
|
393 | s> \r\n | |
|
394 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
|
286 | 395 | s> 6e\r\n |
|
287 | 396 | s> f\x00\x00\x01\x00\x02\x001 |
|
288 | 397 | s> \xa1Jtotalitems\x01\xa3MdeltabasenodeT+N\xb0s\x19\xbf\xa0w\xa4\n |
@@ -308,7 +417,7 Requesting revision data works | |||
|
308 | 417 | ] |
|
309 | 418 | |
|
310 | 419 | Requesting multiple revisions works |
|
311 |
(first revision s |
|
|
420 | (first revision is a fulltext since haveparents=False by default) | |
|
312 | 421 | |
|
313 | 422 | $ sendhttpv2peer << EOF |
|
314 | 423 | > command filedata |
@@ -465,13 +574,12 Requesting parents and revision data wor | |||
|
465 | 574 | s> \xa1FstatusBok |
|
466 | 575 | s> \r\n |
|
467 | 576 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
|
468 |
s> |
|
|
469 |
s> |
|
|
470 |
s> \xa1Jtotalitems\x01\xa |
|
|
471 | s> /\x04\x916Y\xae\xf0\xdaB\xdaIdeltasize\x0fDnodeT\x08y4^97r)cKB\x0cc\x94T\x15g&\xc6\xb6Gparents\x82T+N\xb0s\x19\xbf\xa0w\xa4\n | |
|
472 | s> /\x04\x916Y\xae\xf0\xdaB\xdaT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00O\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x03a2\n | |
|
577 | s> 75\r\n | |
|
578 | s> m\x00\x00\x01\x00\x02\x001 | |
|
579 | s> \xa1Jtotalitems\x01\xa3DnodeT\x08y4^97r)cKB\x0cc\x94T\x15g&\xc6\xb6Gparents\x82T+N\xb0s\x19\xbf\xa0w\xa4\n | |
|
580 | s> /\x04\x916Y\xae\xf0\xdaB\xdaT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00Lrevisionsize\x03Ca2\n | |
|
473 | 581 | s> \r\n |
|
474 |
received frame(size=1 |
|
|
582 | received frame(size=109; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
|
475 | 583 | s> 8\r\n |
|
476 | 584 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
477 | 585 | s> \r\n |
@@ -483,15 +591,14 Requesting parents and revision data wor | |||
|
483 | 591 | b'totalitems': 1 |
|
484 | 592 | }, |
|
485 | 593 | { |
|
486 | b'deltabasenode': b'+N\xb0s\x19\xbf\xa0w\xa4\n/\x04\x916Y\xae\xf0\xdaB\xda', | |
|
487 | b'deltasize': 15, | |
|
488 | 594 | b'node': b'\x08y4^97r)cKB\x0cc\x94T\x15g&\xc6\xb6', |
|
489 | 595 | b'parents': [ |
|
490 | 596 | b'+N\xb0s\x19\xbf\xa0w\xa4\n/\x04\x916Y\xae\xf0\xdaB\xda', |
|
491 | 597 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
|
492 | ] | |
|
598 | ], | |
|
599 | b'revisionsize': 3 | |
|
493 | 600 | }, |
|
494 | b'\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x03a2\n' | |
|
601 | b'a2\n' | |
|
495 | 602 | ] |
|
496 | 603 | |
|
497 | 604 | $ cat error.log |
@@ -248,6 +248,7 Requesting parents works | |||
|
248 | 248 | ] |
|
249 | 249 | |
|
250 | 250 | Requesting revision data works |
|
251 | (haveparents defaults to false, so fulltext is emitted) | |
|
251 | 252 | |
|
252 | 253 | $ sendhttpv2peer << EOF |
|
253 | 254 | > command manifestdata |
@@ -278,6 +279,124 Requesting revision data works | |||
|
278 | 279 | s> \xa1FstatusBok |
|
279 | 280 | s> \r\n |
|
280 | 281 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
|
282 | s> 167\r\n | |
|
283 | s> _\x01\x00\x01\x00\x02\x001 | |
|
284 | s> \xa1Jtotalitems\x01\xa2DnodeTF\xa6r\x1b^\xda\xf0\xea\x04\xb7\x9a\\\xb3!\x88T\xa4\xd2\xab\xa0Lrevisionsize\x19\x01$Y\x01$a\x000879345e39377229634b420c639454156726c6b6\n | |
|
285 | s> b\x00819e258d31a5e1606629f365bb902a1b21ee4216\n | |
|
286 | s> dir0/c\x00914445346a0ca0629bd47ceb5dfe07e4d4cf2501\n | |
|
287 | s> dir0/child0/e\x00bbba6c06b30f443d34ff841bc985c4d0827c6be4\n | |
|
288 | s> dir0/child1/f\x0012fc7dcd773b5a0a929ce195228083c6ddc9cec4\n | |
|
289 | s> dir0/d\x00538206dc971e521540d6843abfe6d16032f6d426\n | |
|
290 | s> \r\n | |
|
291 | received frame(size=351; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
|
292 | s> 8\r\n | |
|
293 | s> \x00\x00\x00\x01\x00\x02\x002 | |
|
294 | s> \r\n | |
|
295 | s> 0\r\n | |
|
296 | s> \r\n | |
|
297 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
|
298 | response: gen[ | |
|
299 | { | |
|
300 | b'totalitems': 1 | |
|
301 | }, | |
|
302 | { | |
|
303 | b'node': b'F\xa6r\x1b^\xda\xf0\xea\x04\xb7\x9a\\\xb3!\x88T\xa4\xd2\xab\xa0', | |
|
304 | b'revisionsize': 292 | |
|
305 | }, | |
|
306 | b'a\x000879345e39377229634b420c639454156726c6b6\nb\x00819e258d31a5e1606629f365bb902a1b21ee4216\ndir0/c\x00914445346a0ca0629bd47ceb5dfe07e4d4cf2501\ndir0/child0/e\x00bbba6c06b30f443d34ff841bc985c4d0827c6be4\ndir0/child1/f\x0012fc7dcd773b5a0a929ce195228083c6ddc9cec4\ndir0/d\x00538206dc971e521540d6843abfe6d16032f6d426\n' | |
|
307 | ] | |
|
308 | ||
|
309 | haveparents=False yields same output | |
|
310 | ||
|
311 | $ sendhttpv2peer << EOF | |
|
312 | > command manifestdata | |
|
313 | > nodes eval:[b'\x46\xa6\x72\x1b\x5e\xda\xf0\xea\x04\xb7\x9a\x5c\xb3\x21\x88\x54\xa4\xd2\xab\xa0'] | |
|
314 | > tree eval:b'' | |
|
315 | > fields eval:[b'revision'] | |
|
316 | > haveparents eval:False | |
|
317 | > EOF | |
|
318 | creating http peer for wire protocol version 2 | |
|
319 | sending manifestdata command | |
|
320 | s> POST /api/exp-http-v2-0001/ro/manifestdata HTTP/1.1\r\n | |
|
321 | s> Accept-Encoding: identity\r\n | |
|
322 | s> accept: application/mercurial-exp-framing-0005\r\n | |
|
323 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
|
324 | s> content-length: 97\r\n | |
|
325 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
326 | s> user-agent: Mercurial debugwireproto\r\n | |
|
327 | s> \r\n | |
|
328 | s> Y\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa4Ffields\x81HrevisionKhaveparents\xf4Enodes\x81TF\xa6r\x1b^\xda\xf0\xea\x04\xb7\x9a\\\xb3!\x88T\xa4\xd2\xab\xa0Dtree@DnameLmanifestdata | |
|
329 | s> makefile('rb', None) | |
|
330 | s> HTTP/1.1 200 OK\r\n | |
|
331 | s> Server: testing stub value\r\n | |
|
332 | s> Date: $HTTP_DATE$\r\n | |
|
333 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
|
334 | s> Transfer-Encoding: chunked\r\n | |
|
335 | s> \r\n | |
|
336 | s> 13\r\n | |
|
337 | s> \x0b\x00\x00\x01\x00\x02\x011 | |
|
338 | s> \xa1FstatusBok | |
|
339 | s> \r\n | |
|
340 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
|
341 | s> 167\r\n | |
|
342 | s> _\x01\x00\x01\x00\x02\x001 | |
|
343 | s> \xa1Jtotalitems\x01\xa2DnodeTF\xa6r\x1b^\xda\xf0\xea\x04\xb7\x9a\\\xb3!\x88T\xa4\xd2\xab\xa0Lrevisionsize\x19\x01$Y\x01$a\x000879345e39377229634b420c639454156726c6b6\n | |
|
344 | s> b\x00819e258d31a5e1606629f365bb902a1b21ee4216\n | |
|
345 | s> dir0/c\x00914445346a0ca0629bd47ceb5dfe07e4d4cf2501\n | |
|
346 | s> dir0/child0/e\x00bbba6c06b30f443d34ff841bc985c4d0827c6be4\n | |
|
347 | s> dir0/child1/f\x0012fc7dcd773b5a0a929ce195228083c6ddc9cec4\n | |
|
348 | s> dir0/d\x00538206dc971e521540d6843abfe6d16032f6d426\n | |
|
349 | s> \r\n | |
|
350 | received frame(size=351; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
|
351 | s> 8\r\n | |
|
352 | s> \x00\x00\x00\x01\x00\x02\x002 | |
|
353 | s> \r\n | |
|
354 | s> 0\r\n | |
|
355 | s> \r\n | |
|
356 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
|
357 | response: gen[ | |
|
358 | { | |
|
359 | b'totalitems': 1 | |
|
360 | }, | |
|
361 | { | |
|
362 | b'node': b'F\xa6r\x1b^\xda\xf0\xea\x04\xb7\x9a\\\xb3!\x88T\xa4\xd2\xab\xa0', | |
|
363 | b'revisionsize': 292 | |
|
364 | }, | |
|
365 | b'a\x000879345e39377229634b420c639454156726c6b6\nb\x00819e258d31a5e1606629f365bb902a1b21ee4216\ndir0/c\x00914445346a0ca0629bd47ceb5dfe07e4d4cf2501\ndir0/child0/e\x00bbba6c06b30f443d34ff841bc985c4d0827c6be4\ndir0/child1/f\x0012fc7dcd773b5a0a929ce195228083c6ddc9cec4\ndir0/d\x00538206dc971e521540d6843abfe6d16032f6d426\n' | |
|
366 | ] | |
|
367 | ||
|
368 | haveparents=True will emit delta | |
|
369 | ||
|
370 | $ sendhttpv2peer << EOF | |
|
371 | > command manifestdata | |
|
372 | > nodes eval:[b'\x46\xa6\x72\x1b\x5e\xda\xf0\xea\x04\xb7\x9a\x5c\xb3\x21\x88\x54\xa4\xd2\xab\xa0'] | |
|
373 | > tree eval:b'' | |
|
374 | > fields eval:[b'revision'] | |
|
375 | > haveparents eval:True | |
|
376 | > EOF | |
|
377 | creating http peer for wire protocol version 2 | |
|
378 | sending manifestdata command | |
|
379 | s> POST /api/exp-http-v2-0001/ro/manifestdata HTTP/1.1\r\n | |
|
380 | s> Accept-Encoding: identity\r\n | |
|
381 | s> accept: application/mercurial-exp-framing-0005\r\n | |
|
382 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
|
383 | s> content-length: 97\r\n | |
|
384 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
385 | s> user-agent: Mercurial debugwireproto\r\n | |
|
386 | s> \r\n | |
|
387 | s> Y\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa4Ffields\x81HrevisionKhaveparents\xf5Enodes\x81TF\xa6r\x1b^\xda\xf0\xea\x04\xb7\x9a\\\xb3!\x88T\xa4\xd2\xab\xa0Dtree@DnameLmanifestdata | |
|
388 | s> makefile('rb', None) | |
|
389 | s> HTTP/1.1 200 OK\r\n | |
|
390 | s> Server: testing stub value\r\n | |
|
391 | s> Date: $HTTP_DATE$\r\n | |
|
392 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
|
393 | s> Transfer-Encoding: chunked\r\n | |
|
394 | s> \r\n | |
|
395 | s> 13\r\n | |
|
396 | s> \x0b\x00\x00\x01\x00\x02\x011 | |
|
397 | s> \xa1FstatusBok | |
|
398 | s> \r\n | |
|
399 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
|
281 | 400 | s> 98\r\n |
|
282 | 401 | s> \x90\x00\x00\x01\x00\x02\x001 |
|
283 | 402 | s> \xa1Jtotalitems\x01\xa3MdeltabasenodeT\x1b\x17[Y_\x02,\xfa\xb5\xb8\t\xcc\x0e\xd5Q\xbd\x0b?\xf5\xe4Ideltasize\x187DnodeTF\xa6r\x1b^\xda\xf0\xea\x04\xb7\x9a\\\xb3!\x88T\xa4\xd2\xab\xa0X7\x00\x00\x00\x00\x00\x00\x00+\x00\x00\x00+a\x000879345e39377229634b420c639454156726c6b6\n |
@@ -302,6 +421,8 Requesting revision data works | |||
|
302 | 421 | ] |
|
303 | 422 | |
|
304 | 423 | Requesting multiple revisions works |
|
424 | (haveparents defaults to false, so fulltext is emitted unless a parent | |
|
425 | has been emitted) | |
|
305 | 426 | |
|
306 | 427 | $ sendhttpv2peer << EOF |
|
307 | 428 | > command manifestdata |
@@ -366,6 +487,72 Requesting multiple revisions works | |||
|
366 | 487 | b'\x00\x00\x00\x00\x00\x00\x00+\x00\x00\x00+a\x000879345e39377229634b420c639454156726c6b6\n' |
|
367 | 488 | ] |
|
368 | 489 | |
|
490 | With haveparents=True, first revision is a delta instead of fulltext | |
|
491 | ||
|
492 | $ sendhttpv2peer << EOF | |
|
493 | > command manifestdata | |
|
494 | > nodes eval:[b'\x1b\x17\x5b\x59\x5f\x02\x2c\xfa\xb5\xb8\x09\xcc\x0e\xd5\x51\xbd\x0b\x3f\xf5\xe4', b'\x46\xa6\x72\x1b\x5e\xda\xf0\xea\x04\xb7\x9a\x5c\xb3\x21\x88\x54\xa4\xd2\xab\xa0'] | |
|
495 | > tree eval:b'' | |
|
496 | > fields eval:[b'revision'] | |
|
497 | > haveparents eval:True | |
|
498 | > EOF | |
|
499 | creating http peer for wire protocol version 2 | |
|
500 | sending manifestdata command | |
|
501 | s> POST /api/exp-http-v2-0001/ro/manifestdata HTTP/1.1\r\n | |
|
502 | s> Accept-Encoding: identity\r\n | |
|
503 | s> accept: application/mercurial-exp-framing-0005\r\n | |
|
504 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
|
505 | s> content-length: 118\r\n | |
|
506 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
507 | s> user-agent: Mercurial debugwireproto\r\n | |
|
508 | s> \r\n | |
|
509 | s> n\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa4Ffields\x81HrevisionKhaveparents\xf5Enodes\x82T\x1b\x17[Y_\x02,\xfa\xb5\xb8\t\xcc\x0e\xd5Q\xbd\x0b?\xf5\xe4TF\xa6r\x1b^\xda\xf0\xea\x04\xb7\x9a\\\xb3!\x88T\xa4\xd2\xab\xa0Dtree@DnameLmanifestdata | |
|
510 | s> makefile('rb', None) | |
|
511 | s> HTTP/1.1 200 OK\r\n | |
|
512 | s> Server: testing stub value\r\n | |
|
513 | s> Date: $HTTP_DATE$\r\n | |
|
514 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
|
515 | s> Transfer-Encoding: chunked\r\n | |
|
516 | s> \r\n | |
|
517 | s> 13\r\n | |
|
518 | s> \x0b\x00\x00\x01\x00\x02\x011 | |
|
519 | s> \xa1FstatusBok | |
|
520 | s> \r\n | |
|
521 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
|
522 | s> 1ea\r\n | |
|
523 | s> \xe2\x01\x00\x01\x00\x02\x001 | |
|
524 | s> \xa1Jtotalitems\x02\xa2DnodeT\x1b\x17[Y_\x02,\xfa\xb5\xb8\t\xcc\x0e\xd5Q\xbd\x0b?\xf5\xe4Lrevisionsize\x19\x01$Y\x01$a\x002b4eb07319bfa077a40a2f04913659aef0da42da\n | |
|
525 | s> b\x00819e258d31a5e1606629f365bb902a1b21ee4216\n | |
|
526 | s> dir0/c\x00914445346a0ca0629bd47ceb5dfe07e4d4cf2501\n | |
|
527 | s> dir0/child0/e\x00bbba6c06b30f443d34ff841bc985c4d0827c6be4\n | |
|
528 | s> dir0/child1/f\x0012fc7dcd773b5a0a929ce195228083c6ddc9cec4\n | |
|
529 | s> dir0/d\x00538206dc971e521540d6843abfe6d16032f6d426\n | |
|
530 | s> \xa3MdeltabasenodeT\x1b\x17[Y_\x02,\xfa\xb5\xb8\t\xcc\x0e\xd5Q\xbd\x0b?\xf5\xe4Ideltasize\x187DnodeTF\xa6r\x1b^\xda\xf0\xea\x04\xb7\x9a\\\xb3!\x88T\xa4\xd2\xab\xa0X7\x00\x00\x00\x00\x00\x00\x00+\x00\x00\x00+a\x000879345e39377229634b420c639454156726c6b6\n | |
|
531 | s> \r\n | |
|
532 | received frame(size=482; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
|
533 | s> 8\r\n | |
|
534 | s> \x00\x00\x00\x01\x00\x02\x002 | |
|
535 | s> \r\n | |
|
536 | s> 0\r\n | |
|
537 | s> \r\n | |
|
538 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
|
539 | response: gen[ | |
|
540 | { | |
|
541 | b'totalitems': 2 | |
|
542 | }, | |
|
543 | { | |
|
544 | b'node': b'\x1b\x17[Y_\x02,\xfa\xb5\xb8\t\xcc\x0e\xd5Q\xbd\x0b?\xf5\xe4', | |
|
545 | b'revisionsize': 292 | |
|
546 | }, | |
|
547 | b'a\x002b4eb07319bfa077a40a2f04913659aef0da42da\nb\x00819e258d31a5e1606629f365bb902a1b21ee4216\ndir0/c\x00914445346a0ca0629bd47ceb5dfe07e4d4cf2501\ndir0/child0/e\x00bbba6c06b30f443d34ff841bc985c4d0827c6be4\ndir0/child1/f\x0012fc7dcd773b5a0a929ce195228083c6ddc9cec4\ndir0/d\x00538206dc971e521540d6843abfe6d16032f6d426\n', | |
|
548 | { | |
|
549 | b'deltabasenode': b'\x1b\x17[Y_\x02,\xfa\xb5\xb8\t\xcc\x0e\xd5Q\xbd\x0b?\xf5\xe4', | |
|
550 | b'deltasize': 55, | |
|
551 | b'node': b'F\xa6r\x1b^\xda\xf0\xea\x04\xb7\x9a\\\xb3!\x88T\xa4\xd2\xab\xa0' | |
|
552 | }, | |
|
553 | b'\x00\x00\x00\x00\x00\x00\x00+\x00\x00\x00+a\x000879345e39377229634b420c639454156726c6b6\n' | |
|
554 | ] | |
|
555 | ||
|
369 | 556 | Revisions are sorted by DAG order, parents first |
|
370 | 557 | |
|
371 | 558 | $ sendhttpv2peer << EOF |
@@ -82,6 +82,7 Test basic clone | |||
|
82 | 82 | 'parents', |
|
83 | 83 | 'revision' |
|
84 | 84 | ]), |
|
85 | 'haveparents': True, | |
|
85 | 86 | 'nodes': [ |
|
86 | 87 | '\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', |
|
87 | 88 | '\xa9\x88\xfbCX>\x87\x1d\x1e\xd5u\x0e\xe0t\xc6\xd8@\xbb\xbf\xc8', |
@@ -100,6 +101,7 Test basic clone | |||
|
100 | 101 | 'parents', |
|
101 | 102 | 'revision' |
|
102 | 103 | ]), |
|
104 | 'haveparents': True, | |
|
103 | 105 | 'nodes': [ |
|
104 | 106 | '+N\xb0s\x19\xbf\xa0w\xa4\n/\x04\x916Y\xae\xf0\xdaB\xda', |
|
105 | 107 | '\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xcc', |
@@ -112,6 +114,7 Test basic clone | |||
|
112 | 114 | 'parents', |
|
113 | 115 | 'revision' |
|
114 | 116 | ]), |
|
117 | 'haveparents': True, | |
|
115 | 118 | 'nodes': [ |
|
116 | 119 | '\x81\x9e%\x8d1\xa5\xe1`f)\xf3e\xbb\x90*\x1b!\xeeB\x16', |
|
117 | 120 | '\xb1zk\xd3g=\x9a\xb8\xce\xd5\x81\xa2\t\xf6/=\xa5\xccEx', |
@@ -211,6 +214,7 Cloning only a specific revision works | |||
|
211 | 214 | 'parents', |
|
212 | 215 | 'revision' |
|
213 | 216 | ]), |
|
217 | 'haveparents': True, | |
|
214 | 218 | 'nodes': [ |
|
215 | 219 | '\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', |
|
216 | 220 | '\xa9\x88\xfbCX>\x87\x1d\x1e\xd5u\x0e\xe0t\xc6\xd8@\xbb\xbf\xc8' |
@@ -226,6 +230,7 Cloning only a specific revision works | |||
|
226 | 230 | 'parents', |
|
227 | 231 | 'revision' |
|
228 | 232 | ]), |
|
233 | 'haveparents': True, | |
|
229 | 234 | 'nodes': [ |
|
230 | 235 | '+N\xb0s\x19\xbf\xa0w\xa4\n/\x04\x916Y\xae\xf0\xdaB\xda', |
|
231 | 236 | '\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xcc' |
@@ -237,6 +242,7 Cloning only a specific revision works | |||
|
237 | 242 | 'parents', |
|
238 | 243 | 'revision' |
|
239 | 244 | ]), |
|
245 | 'haveparents': True, | |
|
240 | 246 | 'nodes': [ |
|
241 | 247 | '\x81\x9e%\x8d1\xa5\xe1`f)\xf3e\xbb\x90*\x1b!\xeeB\x16' |
|
242 | 248 | ], |
@@ -317,6 +323,7 Incremental pull works | |||
|
317 | 323 | 'parents', |
|
318 | 324 | 'revision' |
|
319 | 325 | ]), |
|
326 | 'haveparents': True, | |
|
320 | 327 | 'nodes': [ |
|
321 | 328 | '\xec\x80NH\x8c \x88\xc25\t\x9a\x10 u\x13\xbe\xcd\xc3\xdd\xa5', |
|
322 | 329 | '\x04\\\x7f9\'\xda\x13\xe7Z\xf8\xf0\xe4\xf0HI\xe4a\xa9x\x0f', |
@@ -333,6 +340,7 Incremental pull works | |||
|
333 | 340 | 'parents', |
|
334 | 341 | 'revision' |
|
335 | 342 | ]), |
|
343 | 'haveparents': True, | |
|
336 | 344 | 'nodes': [ |
|
337 | 345 | '+N\xb0s\x19\xbf\xa0w\xa4\n/\x04\x916Y\xae\xf0\xdaB\xda', |
|
338 | 346 | '\xc2\xa2\x05\xc8\xb2\xad\xe2J\xf2`b\xe5<\xd5\xbc8\x01\xd6`\xda' |
@@ -344,6 +352,7 Incremental pull works | |||
|
344 | 352 | 'parents', |
|
345 | 353 | 'revision' |
|
346 | 354 | ]), |
|
355 | 'haveparents': True, | |
|
347 | 356 | 'nodes': [ |
|
348 | 357 | '\x81\x9e%\x8d1\xa5\xe1`f)\xf3e\xbb\x90*\x1b!\xeeB\x16', |
|
349 | 358 | '\xb1zk\xd3g=\x9a\xb8\xce\xd5\x81\xa2\t\xf6/=\xa5\xccEx', |
@@ -498,6 +507,7 Bookmarks are transferred on clone | |||
|
498 | 507 | 'parents', |
|
499 | 508 | 'revision' |
|
500 | 509 | ]), |
|
510 | 'haveparents': True, | |
|
501 | 511 | 'nodes': [ |
|
502 | 512 | '\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', |
|
503 | 513 | '\xa9\x88\xfbCX>\x87\x1d\x1e\xd5u\x0e\xe0t\xc6\xd8@\xbb\xbf\xc8', |
@@ -516,6 +526,7 Bookmarks are transferred on clone | |||
|
516 | 526 | 'parents', |
|
517 | 527 | 'revision' |
|
518 | 528 | ]), |
|
529 | 'haveparents': True, | |
|
519 | 530 | 'nodes': [ |
|
520 | 531 | '+N\xb0s\x19\xbf\xa0w\xa4\n/\x04\x916Y\xae\xf0\xdaB\xda', |
|
521 | 532 | '\x9a8\x12)\x97\xb3\xac\x97\xbe*\x9a\xa2\xe5V\x83\x83A\xfd\xf2\xcc', |
@@ -528,6 +539,7 Bookmarks are transferred on clone | |||
|
528 | 539 | 'parents', |
|
529 | 540 | 'revision' |
|
530 | 541 | ]), |
|
542 | 'haveparents': True, | |
|
531 | 543 | 'nodes': [ |
|
532 | 544 | '\x81\x9e%\x8d1\xa5\xe1`f)\xf3e\xbb\x90*\x1b!\xeeB\x16', |
|
533 | 545 | '\xb1zk\xd3g=\x9a\xb8\xce\xd5\x81\xa2\t\xf6/=\xa5\xccEx', |
General Comments 0
You need to be logged in to leave comments.
Login now