marmoute created this revision. marmoute added a reviewer: durin42. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers.
REVISION SUMMARY Note that for now we cannot upgrade/downgrade to it. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6887 AFFECTED FILES mercurial/upgrade.py tests/test-lfs-serve.t tests/test-sidedata.t tests/test-upgrade-repo.t CHANGE DETAILS diff --git a/tests/test-upgrade-repo.t b/tests/test-upgrade-repo.t --- a/tests/test-upgrade-repo.t +++ b/tests/test-upgrade-repo.t @@ -57,6 +57,7 @@ dotencode: yes generaldelta: yes sparserevlog: yes + sidedata: no plain-cl-delta: yes compression: zlib compression-level: default @@ -66,6 +67,7 @@ dotencode: yes yes yes generaldelta: yes yes yes sparserevlog: yes yes yes + sidedata: no no no plain-cl-delta: yes yes yes compression: zlib zlib zlib compression-level: default default default @@ -75,6 +77,7 @@ dotencode: yes no yes generaldelta: yes yes yes sparserevlog: yes yes yes + sidedata: no no no plain-cl-delta: yes yes yes compression: zlib zlib zlib compression-level: default default default @@ -84,6 +87,7 @@ [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes] [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] + [formatvariant.name.uptodate|sidedata: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] [formatvariant.name.uptodate|compression-level:][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default] @@ -114,6 +118,12 @@ "repo": true }, { + "config": false, + "default": false, + "name": "sidedata", + "repo": false + }, + { "config": true, "default": true, "name": "plain-cl-delta", @@ -139,6 +149,9 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store + sidedata + Unlock the ability to store extra data alongside a revision. + additional optimizations are available by specifying "--optimize <name>": re-delta-parent @@ -163,6 +176,9 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store + sidedata + Unlock the ability to store extra data alongside a revision. + re-delta-parent deltas within internal storage will choose a new base revision if needed @@ -187,6 +203,9 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store + sidedata + Unlock the ability to store extra data alongside a revision. + re-delta-parent deltas within internal storage will choose a new base revision if needed @@ -222,6 +241,7 @@ dotencode: no generaldelta: no sparserevlog: no + sidedata: no plain-cl-delta: yes compression: zlib compression-level: default @@ -231,6 +251,7 @@ dotencode: no yes yes generaldelta: no yes yes sparserevlog: no yes yes + sidedata: no no no plain-cl-delta: yes yes yes compression: zlib zlib zlib compression-level: default default default @@ -240,6 +261,7 @@ dotencode: no yes yes generaldelta: no no yes sparserevlog: no no yes + sidedata: no no no plain-cl-delta: yes yes yes compression: zlib zlib zlib compression-level: default default default @@ -249,6 +271,7 @@ [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] [formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] + [formatvariant.name.uptodate|sidedata: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] [formatvariant.name.uptodate|compression-level:][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default] @@ -286,6 +309,9 @@ sparserevlog Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. + sidedata + Unlock the ability to store extra data alongside a revision. + additional optimizations are available by specifying "--optimize <name>": re-delta-parent @@ -334,6 +360,9 @@ sparserevlog Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. + sidedata + Unlock the ability to store extra data alongside a revision. + additional optimizations are available by specifying "--optimize <name>": re-delta-parent @@ -360,6 +389,9 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store + sidedata + Unlock the ability to store extra data alongside a revision. + beginning upgrade... repository locked and read-only creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob) @@ -397,6 +429,9 @@ generaldelta repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster + sidedata + Unlock the ability to store extra data alongside a revision. + beginning upgrade... repository locked and read-only creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) @@ -493,6 +528,9 @@ sparserevlog Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. + sidedata + Unlock the ability to store extra data alongside a revision. + beginning upgrade... repository locked and read-only creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) @@ -527,6 +565,9 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store + sidedata + Unlock the ability to store extra data alongside a revision. + re-delta-parent deltas within internal storage will choose a new base revision if needed @@ -598,6 +639,9 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store + sidedata + Unlock the ability to store extra data alongside a revision. + re-delta-parent deltas within internal storage will choose a new base revision if needed @@ -644,6 +688,9 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store + sidedata + Unlock the ability to store extra data alongside a revision. + re-delta-parent deltas within internal storage will choose a new base revision if needed @@ -690,6 +737,9 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store + sidedata + Unlock the ability to store extra data alongside a revision. + re-delta-parent deltas within internal storage will choose a new base revision if needed @@ -741,6 +791,9 @@ preserved: dotencode, fncache, generaldelta, revlogv1, store removed: sparserevlog + sidedata + Unlock the ability to store extra data alongside a revision. + re-delta-parent deltas within internal storage will choose a new base revision if needed @@ -793,6 +846,9 @@ sparserevlog Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. + sidedata + Unlock the ability to store extra data alongside a revision. + re-delta-parent deltas within internal storage will choose a new base revision if needed @@ -847,6 +903,9 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store + sidedata + Unlock the ability to store extra data alongside a revision. + beginning upgrade... repository locked and read-only creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob) @@ -878,6 +937,9 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store + sidedata + Unlock the ability to store extra data alongside a revision. + re-delta-fulladd each revision will be added as new content to the internal storage; this will likely drastically slow down execution time, but some extensions might need it @@ -942,6 +1004,9 @@ requirements preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, sparserevlog, store + sidedata + Unlock the ability to store extra data alongside a revision. + beginning upgrade... repository locked and read-only creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) @@ -995,6 +1060,9 @@ requirements preserved: dotencode, fncache, generaldelta, largefiles, lfs, revlogv1, sparserevlog, store + sidedata + Unlock the ability to store extra data alongside a revision. + beginning upgrade... repository locked and read-only creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) @@ -1090,6 +1158,9 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store + sidedata + Unlock the ability to store extra data alongside a revision. + re-delta-all deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time @@ -1181,6 +1252,7 @@ dotencode: yes yes yes generaldelta: yes yes yes sparserevlog: yes yes yes + sidedata: no no no plain-cl-delta: yes yes yes compression: zstd zlib zlib compression-level: default default default @@ -1202,6 +1274,7 @@ dotencode: yes yes yes generaldelta: yes yes yes sparserevlog: yes yes yes + sidedata: no no no plain-cl-delta: yes yes yes compression: zlib zlib zlib compression-level: default default default @@ -1226,6 +1299,7 @@ dotencode: yes yes yes generaldelta: yes yes yes sparserevlog: yes yes yes + sidedata: no no no plain-cl-delta: yes yes yes compression: zstd zstd zlib compression-level: default default default diff --git a/tests/test-sidedata.t b/tests/test-sidedata.t new file mode 100644 --- /dev/null +++ b/tests/test-sidedata.t @@ -0,0 +1,65 @@ +========================================================== +Test file dedicated to checking side-data related behavior +========================================================== + + +Check upgrade behavior +====================== + +Right now, sidedata has not upgrade support + +Check that we cannot upgrade to sidedata +---------------------------------------- + + $ hg init up-no-side-data --config format.use-side-data=no + $ hg debugformat -v -R up-no-side-data + format-variant repo config default + fncache: yes yes yes + dotencode: yes yes yes + generaldelta: yes yes yes + sparserevlog: yes yes yes + sidedata: no no no + plain-cl-delta: yes yes yes + compression: zlib zlib zlib + compression-level: default default default + $ hg debugformat -v -R up-no-side-data --config format.use-side-data=yes + format-variant repo config default + fncache: yes yes yes + dotencode: yes yes yes + generaldelta: yes yes yes + sparserevlog: yes yes yes + sidedata: no yes no + plain-cl-delta: yes yes yes + compression: zlib zlib zlib + compression-level: default default default + $ hg debugupgraderepo -R up-no-side-data --config format.use-side-data=yes + abort: cannot upgrade repository; do not support adding requirement: exp-sidedata-flag + [255] + +Check that we cannot upgrade to sidedata +---------------------------------------- + + $ hg init up-side-data --config format.use-side-data=yes + $ hg debugformat -v -R up-side-data + format-variant repo config default + fncache: yes yes yes + dotencode: yes yes yes + generaldelta: yes yes yes + sparserevlog: yes yes yes + sidedata: yes no no + plain-cl-delta: yes yes yes + compression: zlib zlib zlib + compression-level: default default default + $ hg debugformat -v -R up-side-data --config format.use-side-data=no + format-variant repo config default + fncache: yes yes yes + dotencode: yes yes yes + generaldelta: yes yes yes + sparserevlog: yes yes yes + sidedata: yes no no + plain-cl-delta: yes yes yes + compression: zlib zlib zlib + compression-level: default default default + $ hg debugupgraderepo -R up-side-data --config format.use-side-data=no + abort: cannot upgrade repository; requirement would be removed: exp-sidedata-flag + [255] diff --git a/tests/test-lfs-serve.t b/tests/test-lfs-serve.t --- a/tests/test-lfs-serve.t +++ b/tests/test-lfs-serve.t @@ -132,6 +132,9 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store + sidedata + Unlock the ability to store extra data alongside a revision. + beginning upgrade... repository locked and read-only creating temporary repository to stage migrated data: * (glob) diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py --- a/mercurial/upgrade.py +++ b/mercurial/upgrade.py @@ -317,6 +317,20 @@ 'better compression and faster exchange with server.') @registerformatvariant +class sidedata(requirementformatvariant): + name = 'sidedata' + + _requirement = localrepo.SIDEDATA_REQUIREMENT + + default = False + + description = _('Allows to store extra data alongside a revision, unlocking' + ' various cacheing option.') + + upgrademessage = _('Unlock the ability to store extra data alongside a' + ' revision.') + +@registerformatvariant class removecldeltachain(formatvariant): name = 'plain-cl-delta' To: marmoute, durin42, #hg-reviewers Cc: mjpieters, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel