Show More
@@ -932,7 +932,7 b' def gathersupportedrequirements(ui):' | |||
|
932 | 932 | if engine.available() and engine.revlogheader(): |
|
933 | 933 | supported.add(b'exp-compression-%s' % name) |
|
934 | 934 | if engine.name() == b'zstd': |
|
935 | supported.add(b'revlog-compression-zstd') | |
|
935 | supported.add(requirementsmod.REVLOG_COMPRESSION_ZSTD) | |
|
936 | 936 | |
|
937 | 937 | return supported |
|
938 | 938 |
@@ -36,6 +36,9 b" TREEMANIFEST_REQUIREMENT = b'treemanifes" | |||
|
36 | 36 | |
|
37 | 37 | REVLOGV1_REQUIREMENT = b'revlogv1' |
|
38 | 38 | |
|
39 | # allow using ZSTD as compression engine for revlog content | |
|
40 | REVLOG_COMPRESSION_ZSTD = b'revlog-compression-zstd' | |
|
41 | ||
|
39 | 42 | # Increment the sub-version when the revlog v2 format changes to lock out old |
|
40 | 43 | # clients. |
|
41 | 44 | CHANGELOGV2_REQUIREMENT = b'exp-changelog-v2' |
@@ -109,6 +112,7 b' STREAM_FIXED_REQUIREMENTS = {' | |||
|
109 | 112 | DIRSTATE_V2_REQUIREMENT, |
|
110 | 113 | GENERALDELTA_REQUIREMENT, |
|
111 | 114 | NODEMAP_REQUIREMENT, |
|
115 | REVLOG_COMPRESSION_ZSTD, | |
|
112 | 116 | REVLOGV1_REQUIREMENT, |
|
113 | 117 | REVLOGV2_REQUIREMENT, |
|
114 | 118 | SHARESAFE_REQUIREMENT, |
@@ -297,32 +297,32 b' packed1 is produced properly' | |||
|
297 | 297 | |
|
298 | 298 | $ hg -R test debugcreatestreamclonebundle packed.hg |
|
299 | 299 | writing 2665 bytes for 6 files |
|
300 | bundle requirements: generaldelta, persistent-nodemap, revlogv1, sparserevlog | |
|
300 | bundle requirements: generaldelta, persistent-nodemap, revlog-compression-zstd, revlogv1, sparserevlog | |
|
301 | 301 | |
|
302 | 302 | $ f -B 64 --size --sha1 --hexdump packed.hg |
|
303 | packed.hg: size=2860, sha1=81d7a2e535892cda51e82c200f818de2cca828d3 | |
|
303 | packed.hg: size=2884, sha1=b0c868701f8a9fe44daf094b2f5bf661cf90c789 | |
|
304 | 304 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........| |
|
305 |
0010: 00 00 00 00 0a 69 00 |
|
|
305 | 0010: 00 00 00 00 0a 69 00 4e 67 65 6e 65 72 61 6c 64 |.....i.Ngenerald| | |
|
306 | 306 | 0020: 65 6c 74 61 2c 70 65 72 73 69 73 74 65 6e 74 2d |elta,persistent-| |
|
307 |
0030: 6e 6f 64 65 6d 61 70 2c 72 65 76 6c 6f 67 |
|
|
307 | 0030: 6e 6f 64 65 6d 61 70 2c 72 65 76 6c 6f 67 2d 63 |nodemap,revlog-c| | |
|
308 | 308 | $ hg debugbundle --spec packed.hg |
|
309 | none-packed1;requirements%3Dgeneraldelta%2Cpersistent-nodemap%2Crevlogv1%2Csparserevlog | |
|
309 | none-packed1;requirements%3Dgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog | |
|
310 | 310 | #endif |
|
311 | 311 | |
|
312 | 312 | #if reporevlogstore no-rust zstd |
|
313 | 313 | |
|
314 | 314 | $ hg -R test debugcreatestreamclonebundle packed.hg |
|
315 | 315 | writing 2665 bytes for 6 files |
|
316 | bundle requirements: generaldelta, revlogv1, sparserevlog | |
|
316 | bundle requirements: generaldelta, revlog-compression-zstd, revlogv1, sparserevlog | |
|
317 | 317 | |
|
318 | 318 | $ f -B 64 --size --sha1 --hexdump packed.hg |
|
319 | packed.hg: size=2841, sha1=8b645a65f49b0ae43042a9f3da56d4bfdf1c7f99 | |
|
319 | packed.hg: size=2865, sha1=353d10311f4befa195d9a1ca4b8e26518115c702 | |
|
320 | 320 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........| |
|
321 |
0010: 00 00 00 00 0a 69 00 |
|
|
322 |
0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 |
|
|
323 | 0030: 61 72 73 65 72 65 76 6c 6f 67 00 64 61 74 61 2f |arserevlog.data/| | |
|
321 | 0010: 00 00 00 00 0a 69 00 3b 67 65 6e 65 72 61 6c 64 |.....i.;generald| | |
|
322 | 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 2d 63 6f 6d 70 |elta,revlog-comp| | |
|
323 | 0030: 72 65 73 73 69 6f 6e 2d 7a 73 74 64 2c 72 65 76 |ression-zstd,rev| | |
|
324 | 324 | $ hg debugbundle --spec packed.hg |
|
325 | none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Csparserevlog | |
|
325 | none-packed1;requirements%3Dgeneraldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog | |
|
326 | 326 | #endif |
|
327 | 327 | |
|
328 | 328 | #if reporevlogstore no-rust no-zstd |
@@ -357,17 +357,17 b' generaldelta requirement is not listed i' | |||
|
357 | 357 | |
|
358 | 358 | $ hg -R testnongd debugcreatestreamclonebundle packednongd.hg |
|
359 | 359 | writing 301 bytes for 3 files |
|
360 | bundle requirements: persistent-nodemap, revlogv1 | |
|
360 | bundle requirements: persistent-nodemap, revlog-compression-zstd, revlogv1 | |
|
361 | 361 | |
|
362 | 362 | $ f -B 64 --size --sha1 --hexdump packednongd.hg |
|
363 | packednongd.hg: size=402, sha1=d3cc1417f0e8142cf9340aaaa520b660ad3ec3ea | |
|
363 | packednongd.hg: size=426, sha1=79563ccd6ef779bcfe62a4da64f89a1b308e92e0 | |
|
364 | 364 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 03 00 00 |HGS1UN..........| |
|
365 |
0010: 00 00 00 00 01 2d 00 |
|
|
365 | 0010: 00 00 00 00 01 2d 00 34 70 65 72 73 69 73 74 65 |.....-.4persiste| | |
|
366 | 366 | 0020: 6e 74 2d 6e 6f 64 65 6d 61 70 2c 72 65 76 6c 6f |nt-nodemap,revlo| |
|
367 | 0030: 67 76 31 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 |gv1.data/foo.i.6| | |
|
367 | 0030: 67 2d 63 6f 6d 70 72 65 73 73 69 6f 6e 2d 7a 73 |g-compression-zs| | |
|
368 | 368 | |
|
369 | 369 | $ hg debugbundle --spec packednongd.hg |
|
370 | none-packed1;requirements%3Dpersistent-nodemap%2Crevlogv1 | |
|
370 | none-packed1;requirements%3Dpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1 | |
|
371 | 371 | |
|
372 | 372 | #endif |
|
373 | 373 | |
@@ -375,17 +375,17 b' generaldelta requirement is not listed i' | |||
|
375 | 375 | |
|
376 | 376 | $ hg -R testnongd debugcreatestreamclonebundle packednongd.hg |
|
377 | 377 | writing 301 bytes for 3 files |
|
378 | bundle requirements: revlogv1 | |
|
378 | bundle requirements: revlog-compression-zstd, revlogv1 | |
|
379 | 379 | |
|
380 | 380 | $ f -B 64 --size --sha1 --hexdump packednongd.hg |
|
381 | packednongd.hg: size=383, sha1=1d9c230238edd5d38907100b729ba72b1831fe6f | |
|
381 | packednongd.hg: size=407, sha1=0b8714422b785ba8eb98c916b41ffd5fb994c9b5 | |
|
382 | 382 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 03 00 00 |HGS1UN..........| |
|
383 |
0010: 00 00 00 00 01 2d 00 |
|
|
384 | 0020: 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 34 0a 00 |.data/foo.i.64..| | |
|
385 | 0030: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| | |
|
383 | 0010: 00 00 00 00 01 2d 00 21 72 65 76 6c 6f 67 2d 63 |.....-.!revlog-c| | |
|
384 | 0020: 6f 6d 70 72 65 73 73 69 6f 6e 2d 7a 73 74 64 2c |ompression-zstd,| | |
|
385 | 0030: 72 65 76 6c 6f 67 76 31 00 64 61 74 61 2f 66 6f |revlogv1.data/fo| | |
|
386 | 386 | |
|
387 | 387 | $ hg debugbundle --spec packednongd.hg |
|
388 | none-packed1;requirements%3Drevlogv1 | |
|
388 | none-packed1;requirements%3Drevlog-compression-zstd%2Crevlogv1 | |
|
389 | 389 | |
|
390 | 390 | |
|
391 | 391 | #endif |
@@ -427,7 +427,7 b' Warning emitted when packed bundles cont' | |||
|
427 | 427 | $ hg -R testsecret debugcreatestreamclonebundle packedsecret.hg |
|
428 | 428 | (warning: stream clone bundle will contain secret revisions) |
|
429 | 429 | writing 301 bytes for 3 files |
|
430 | bundle requirements: generaldelta, persistent-nodemap, revlogv1, sparserevlog | |
|
430 | bundle requirements: generaldelta, persistent-nodemap, revlog-compression-zstd, revlogv1, sparserevlog | |
|
431 | 431 | |
|
432 | 432 | #endif |
|
433 | 433 | |
@@ -436,7 +436,7 b' Warning emitted when packed bundles cont' | |||
|
436 | 436 | $ hg -R testsecret debugcreatestreamclonebundle packedsecret.hg |
|
437 | 437 | (warning: stream clone bundle will contain secret revisions) |
|
438 | 438 | writing 301 bytes for 3 files |
|
439 | bundle requirements: generaldelta, revlogv1, sparserevlog | |
|
439 | bundle requirements: generaldelta, revlog-compression-zstd, revlogv1, sparserevlog | |
|
440 | 440 | |
|
441 | 441 | #endif |
|
442 | 442 |
@@ -279,8 +279,9 b' Stream clone bundles are supported' | |||
|
279 | 279 | |
|
280 | 280 | $ hg -R server debugcreatestreamclonebundle packed.hg |
|
281 | 281 | writing 613 bytes for 4 files |
|
282 | bundle requirements: generaldelta, revlogv1, sparserevlog (no-rust !) | |
|
283 |
bundle requirements: generaldelta, |
|
|
282 | bundle requirements: generaldelta, revlogv1, sparserevlog (no-rust no-zstd !) | |
|
283 | bundle requirements: generaldelta, revlog-compression-zstd, revlogv1, sparserevlog (no-rust zstd !) | |
|
284 | bundle requirements: generaldelta, persistent-nodemap, revlog-compression-zstd, revlogv1, sparserevlog (rust !) | |
|
284 | 285 | |
|
285 | 286 | No bundle spec should work |
|
286 | 287 |
@@ -657,8 +657,8 b' Test debugpeer' | |||
|
657 | 657 | devel-peer-request: pairs: 81 bytes |
|
658 | 658 | sending hello command |
|
659 | 659 | sending between command |
|
660 |
remote: 4 |
|
|
661 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,persistent-nodemap,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
|
660 | remote: 487 | |
|
661 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,persistent-nodemap,revlog-compression-zstd,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
|
662 | 662 | remote: 1 |
|
663 | 663 | devel-peer-request: protocaps |
|
664 | 664 | devel-peer-request: caps: * bytes (glob) |
@@ -677,8 +677,8 b' Test debugpeer' | |||
|
677 | 677 | devel-peer-request: pairs: 81 bytes |
|
678 | 678 | sending hello command |
|
679 | 679 | sending between command |
|
680 |
remote: 4 |
|
|
681 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
|
680 | remote: 468 | |
|
681 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlog-compression-zstd,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
|
682 | 682 | remote: 1 |
|
683 | 683 | devel-peer-request: protocaps |
|
684 | 684 | devel-peer-request: caps: * bytes (glob) |
General Comments 0
You need to be logged in to leave comments.
Login now