##// END OF EJS Templates
bundle: introduce a "v3" spec...
marmoute -
r51204:d6846273 default
parent child Browse files
Show More
@@ -60,6 +60,7 b' class bundlespec:'
60 _bundlespeccgversions = {
60 _bundlespeccgversions = {
61 b'v1': b'01',
61 b'v1': b'01',
62 b'v2': b'02',
62 b'v2': b'02',
63 b'v3': b'03',
63 b'packed1': b's1',
64 b'packed1': b's1',
64 b'bundle2': b'02', # legacy
65 b'bundle2': b'02', # legacy
65 }
66 }
@@ -82,6 +83,14 b' class bundlespec:'
82 b'tagsfnodescache': True,
83 b'tagsfnodescache': True,
83 b'revbranchcache': True,
84 b'revbranchcache': True,
84 },
85 },
86 b'v3': {
87 b'changegroup': True,
88 b'cg.version': b'03',
89 b'obsolescence': False,
90 b'phases': True,
91 b'tagsfnodescache': True,
92 b'revbranchcache': True,
93 },
85 b'streamv2': {
94 b'streamv2': {
86 b'changegroup': False,
95 b'changegroup': False,
87 b'cg.version': b'02',
96 b'cg.version': b'02',
@@ -1714,8 +1714,9 b' def bundle(ui, repo, fname, *dests, **op'
1714 bundlespec.set_param(
1714 bundlespec.set_param(
1715 b'obsolescence-mandatory', obs_mand_cfg, overwrite=False
1715 b'obsolescence-mandatory', obs_mand_cfg, overwrite=False
1716 )
1716 )
1717 phases_cfg = cfg(b'experimental', b'bundle-phases')
1717 if not bundlespec.params.get(b'phases', False):
1718 bundlespec.set_param(b'phases', phases_cfg, overwrite=False)
1718 phases_cfg = cfg(b'experimental', b'bundle-phases')
1719 bundlespec.set_param(b'phases', phases_cfg, overwrite=False)
1719
1720
1720 bundle2.writenewbundle(
1721 bundle2.writenewbundle(
1721 ui,
1722 ui,
@@ -109,7 +109,7 b' unfortunate that the phase information f'
109 > echo
109 > echo
110 > }
110 > }
111
111
112 $ for t in "None" "bzip2" "gzip" "none-v2" "v2" "v1" "gzip-v1"; do
112 $ for t in "None" "bzip2" "gzip" "none-v2" "v2" "v1" "gzip-v1" "v3"; do
113 > testbundle $t
113 > testbundle $t
114 > done
114 > done
115 % test bundle type None
115 % test bundle type None
@@ -365,6 +365,47 b' unfortunate that the phase information f'
365 o [draft] commit_root
365 o [draft] commit_root
366
366
367
367
368 % test bundle type v3
369 ===================================
370 7 changesets found
371 HG20\x00\x00 (esc)
372 Stream params: {Compression: BZ}
373 changegroup -- {nbchanges: 7, targetphase: 2, version: 03} (mandatory: True)
374 ac39af4a9f7d2aaa7d244720e57838be9bf63b03
375 901e97fadc587978ec52f2fa76af4aefc2d191e8
376 a8c3a1ed30eb71f03f476c5fa7ead831ef991a55
377 66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d
378 624e609639853fe22c88d42a8fd1f53a0e9b7ebe
379 2ea90778052ba7558fab36e3fd5d149512ff986b
380 b9f5f740a8cd76700020e3903ee55ecff78bd3e5
381 cache:rev-branch-cache -- {} (mandatory: False)
382 phase-heads -- {} (mandatory: True)
383 66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d public
384 a8c3a1ed30eb71f03f476c5fa7ead831ef991a55 draft
385 2ea90778052ba7558fab36e3fd5d149512ff986b draft
386 bzip2-v2;cg.version=03
387
388 adding changesets
389 adding manifests
390 adding file changes
391 added 7 changesets with 7 changes to 1 files (+1 heads)
392 new changesets ac39af4a9f7d:b9f5f740a8cd (4 drafts, 1 secrets)
393 (run 'hg heads' to see heads, 'hg merge' to merge)
394 o [secret] commit_6
395 |
396 o [draft] commit_5
397 |
398 o [draft] commit_4
399 |
400 o [public] commit_3
401 |
402 | o [draft] commit_2
403 | |
404 | o [draft] commit_1
405 |/
406 o [public] commit_root
407
408
368
409
369 Compression level can be adjusted for bundle2 bundles
410 Compression level can be adjusted for bundle2 bundles
370
411
General Comments 0
You need to be logged in to leave comments. Login now