test-upgrade-repo.t
1493 lines
| 62.5 KiB
| text/troff
|
Tads3Lexer
/ tests / test-upgrade-repo.t
Gregory Szorc
|
r37356 | #require no-reposimplestore | ||
Gregory Szorc
|
r30775 | $ cat >> $HGRCPATH << EOF | ||
> [extensions] | ||||
> share = | ||||
> EOF | ||||
store and revlogv1 are required in source | ||||
$ hg --config format.usestore=false init no-store | ||||
$ hg -R no-store debugupgraderepo | ||||
abort: cannot upgrade repository; requirement missing: store | ||||
[255] | ||||
$ hg init no-revlogv1 | ||||
$ cat > no-revlogv1/.hg/requires << EOF | ||||
> dotencode | ||||
> fncache | ||||
> generaldelta | ||||
> store | ||||
> EOF | ||||
$ hg -R no-revlogv1 debugupgraderepo | ||||
abort: cannot upgrade repository; requirement missing: revlogv1 | ||||
Gregory Szorc
|
r30774 | [255] | ||
Gregory Szorc
|
r30775 | |||
Cannot upgrade shared repositories | ||||
$ hg init share-parent | ||||
$ hg -q share share-parent share-child | ||||
$ hg -R share-child debugupgraderepo | ||||
abort: cannot upgrade repository; unsupported source requirement: shared | ||||
[255] | ||||
Augie Fackler
|
r36391 | Do not yet support upgrading treemanifest repos | ||
Gregory Szorc
|
r30775 | |||
$ hg --config experimental.treemanifest=true init treemanifest | ||||
$ hg -R treemanifest debugupgraderepo | ||||
abort: cannot upgrade repository; unsupported source requirement: treemanifest | ||||
[255] | ||||
Augie Fackler
|
r36391 | Cannot add treemanifest requirement during upgrade | ||
Gregory Szorc
|
r30775 | |||
$ hg init disallowaddedreq | ||||
Augie Fackler
|
r36391 | $ hg -R disallowaddedreq --config experimental.treemanifest=true debugupgraderepo | ||
abort: cannot upgrade repository; do not support adding requirement: treemanifest | ||||
Gregory Szorc
|
r30775 | [255] | ||
Gregory Szorc
|
r30776 | |||
An upgrade of a repository created with recommended settings only suggests optimizations | ||||
$ hg init empty | ||||
$ cd empty | ||||
Boris Feld
|
r35337 | $ hg debugformat | ||
r42212 | format-variant repo | |||
fncache: yes | ||||
dotencode: yes | ||||
generaldelta: yes | ||||
sparserevlog: yes | ||||
r43299 | sidedata: no | |||
r43408 | copies-sdc: no | |||
r42212 | plain-cl-delta: yes | |||
compression: zlib | ||||
compression-level: default | ||||
Boris Feld
|
r35338 | $ hg debugformat --verbose | ||
r42212 | format-variant repo config default | |||
fncache: yes yes yes | ||||
dotencode: yes yes yes | ||||
generaldelta: yes yes yes | ||||
sparserevlog: yes yes yes | ||||
r43299 | sidedata: no no no | |||
r43408 | copies-sdc: no no no | |||
r42212 | plain-cl-delta: yes yes yes | |||
compression: zlib zlib zlib | ||||
compression-level: default default default | ||||
Boris Feld
|
r40919 | $ hg debugformat --verbose --config format.usefncache=no | ||
r42212 | format-variant repo config default | |||
fncache: yes no yes | ||||
dotencode: yes no yes | ||||
generaldelta: yes yes yes | ||||
sparserevlog: yes yes yes | ||||
r43299 | sidedata: no no no | |||
r43408 | copies-sdc: no no no | |||
r42212 | plain-cl-delta: yes yes yes | |||
compression: zlib zlib zlib | ||||
compression-level: default default default | ||||
Boris Feld
|
r40919 | $ hg debugformat --verbose --config format.usefncache=no --color=debug | ||
r42212 | format-variant repo config default | |||
[formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes] | ||||
[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] | ||||
r43299 | [formatvariant.name.uptodate|sidedata: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |||
r43408 | [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |||
r42212 | [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] | ||||
Yuya Nishihara
|
r35378 | $ hg debugformat -Tjson | ||
[ | ||||
{ | ||||
Yuya Nishihara
|
r35379 | "config": true, | ||
"default": true, | ||||
Yuya Nishihara
|
r35378 | "name": "fncache", | ||
Yuya Nishihara
|
r35379 | "repo": true | ||
Yuya Nishihara
|
r35378 | }, | ||
{ | ||||
Yuya Nishihara
|
r35379 | "config": true, | ||
"default": true, | ||||
Yuya Nishihara
|
r35378 | "name": "dotencode", | ||
Yuya Nishihara
|
r35379 | "repo": true | ||
Yuya Nishihara
|
r35378 | }, | ||
{ | ||||
Yuya Nishihara
|
r35379 | "config": true, | ||
"default": true, | ||||
Yuya Nishihara
|
r35378 | "name": "generaldelta", | ||
Yuya Nishihara
|
r35379 | "repo": true | ||
Yuya Nishihara
|
r35378 | }, | ||
{ | ||||
Boris Feld
|
r40954 | "config": true, | ||
"default": true, | ||||
Paul Morelle
|
r38741 | "name": "sparserevlog", | ||
Boris Feld
|
r40954 | "repo": true | ||
Paul Morelle
|
r38741 | }, | ||
{ | ||||
r43299 | "config": false, | |||
"default": false, | ||||
"name": "sidedata", | ||||
"repo": false | ||||
}, | ||||
{ | ||||
r43408 | "config": false, | |||
"default": false, | ||||
"name": "copies-sdc", | ||||
"repo": false | ||||
}, | ||||
{ | ||||
Yuya Nishihara
|
r35379 | "config": true, | ||
"default": true, | ||||
Yuya Nishihara
|
r35378 | "name": "plain-cl-delta", | ||
Yuya Nishihara
|
r35379 | "repo": true | ||
Yuya Nishihara
|
r35378 | }, | ||
{ | ||||
"config": "zlib", | ||||
"default": "zlib", | ||||
"name": "compression", | ||||
"repo": "zlib" | ||||
r42212 | }, | |||
{ | ||||
"config": "default", | ||||
"default": "default", | ||||
"name": "compression-level", | ||||
"repo": "default" | ||||
Yuya Nishihara
|
r35378 | } | ||
] | ||||
Gregory Szorc
|
r30776 | $ hg debugupgraderepo | ||
(no feature deficiencies found in existing repository) | ||||
performing an upgrade with "--run" will make the following changes: | ||||
requirements | ||||
Boris Feld
|
r40954 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | ||
Gregory Szorc
|
r30776 | |||
r43299 | sidedata | |||
Allows storage of extra data alongside a revision. | ||||
r43408 | copies-sdc | |||
Allows to use more efficient algorithm to deal with copy tracing. | ||||
Gregory Szorc
|
r30776 | additional optimizations are available by specifying "--optimize <name>": | ||
Boris Feld
|
r41120 | re-delta-parent | ||
Gregory Szorc
|
r30776 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower | ||
Boris Feld
|
r41120 | re-delta-multibase | ||
Gregory Szorc
|
r30776 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges | ||
Boris Feld
|
r41120 | re-delta-all | ||
Gregory Szorc
|
r30776 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed | ||
Boris Feld
|
r41120 | re-delta-fulladd | ||
every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. | ||||
Boris Feld
|
r35346 | |||
Gregory Szorc
|
r30776 | |||
--optimize can be used to add optimizations | ||||
$ hg debugupgrade --optimize redeltaparent | ||||
(no feature deficiencies found in existing repository) | ||||
performing an upgrade with "--run" will make the following changes: | ||||
requirements | ||||
Boris Feld
|
r40954 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | ||
Gregory Szorc
|
r30776 | |||
r43299 | sidedata | |||
Allows storage of extra data alongside a revision. | ||||
r43408 | copies-sdc | |||
Allows to use more efficient algorithm to deal with copy tracing. | ||||
Boris Feld
|
r41120 | re-delta-parent | ||
Gregory Szorc
|
r30776 | deltas within internal storage will choose a new base revision if needed | ||
additional optimizations are available by specifying "--optimize <name>": | ||||
Boris Feld
|
r41120 | re-delta-multibase | ||
Gregory Szorc
|
r30776 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges | ||
Boris Feld
|
r41120 | re-delta-all | ||
Gregory Szorc
|
r30776 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed | ||
Boris Feld
|
r41120 | re-delta-fulladd | ||
every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. | ||||
modern form of the option | ||||
$ hg debugupgrade --optimize re-delta-parent | ||||
(no feature deficiencies found in existing repository) | ||||
performing an upgrade with "--run" will make the following changes: | ||||
requirements | ||||
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | ||||
r43299 | sidedata | |||
Allows storage of extra data alongside a revision. | ||||
r43408 | copies-sdc | |||
Allows to use more efficient algorithm to deal with copy tracing. | ||||
Boris Feld
|
r41120 | re-delta-parent | ||
deltas within internal storage will choose a new base revision if needed | ||||
Boris Feld
|
r35346 | |||
Boris Feld
|
r41120 | additional optimizations are available by specifying "--optimize <name>": | ||
re-delta-multibase | ||||
deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges | ||||
re-delta-all | ||||
deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed | ||||
re-delta-fulladd | ||||
every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. | ||||
unknown optimization: | ||||
$ hg debugupgrade --optimize foobar | ||||
abort: unknown optimization action requested: foobar | ||||
(run without arguments to see valid optimizations) | ||||
[255] | ||||
Gregory Szorc
|
r30776 | |||
Various sub-optimal detections work | ||||
$ cat > .hg/requires << EOF | ||||
> revlogv1 | ||||
> store | ||||
> EOF | ||||
Boris Feld
|
r35337 | $ hg debugformat | ||
r42212 | format-variant repo | |||
fncache: no | ||||
dotencode: no | ||||
generaldelta: no | ||||
sparserevlog: no | ||||
r43299 | sidedata: no | |||
r43408 | copies-sdc: no | |||
r42212 | plain-cl-delta: yes | |||
compression: zlib | ||||
compression-level: default | ||||
Boris Feld
|
r35338 | $ hg debugformat --verbose | ||
r42212 | format-variant repo config default | |||
fncache: no yes yes | ||||
dotencode: no yes yes | ||||
generaldelta: no yes yes | ||||
sparserevlog: no yes yes | ||||
r43299 | sidedata: no no no | |||
r43408 | copies-sdc: no no no | |||
r42212 | plain-cl-delta: yes yes yes | |||
compression: zlib zlib zlib | ||||
compression-level: default default default | ||||
Boris Feld
|
r35338 | $ hg debugformat --verbose --config format.usegeneraldelta=no | ||
r42212 | format-variant repo config default | |||
fncache: no yes yes | ||||
dotencode: no yes yes | ||||
generaldelta: no no yes | ||||
sparserevlog: no no yes | ||||
r43299 | sidedata: no no no | |||
r43408 | copies-sdc: no no no | |||
r42212 | plain-cl-delta: yes yes yes | |||
compression: zlib zlib zlib | ||||
compression-level: default default default | ||||
Boris Feld
|
r35339 | $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug | ||
r42212 | format-variant repo config default | |||
[formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] | ||||
[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] | ||||
r43299 | [formatvariant.name.uptodate|sidedata: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |||
r43408 | [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |||
r42212 | [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] | ||||
Gregory Szorc
|
r30776 | $ hg debugupgraderepo | ||
repository lacks features recommended by current config options: | ||||
fncache | ||||
long and reserved filenames may not work correctly; repository performance is sub-optimal | ||||
dotencode | ||||
storage of filenames beginning with a period or space may not work correctly | ||||
generaldelta | ||||
deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower | ||||
Boris Feld
|
r40954 | sparserevlog | ||
in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange. | ||||
Gregory Szorc
|
r30776 | |||
performing an upgrade with "--run" will make the following changes: | ||||
requirements | ||||
preserved: revlogv1, store | ||||
Boris Feld
|
r40954 | added: dotencode, fncache, generaldelta, sparserevlog | ||
Gregory Szorc
|
r30776 | |||
fncache | ||||
repository will be more resilient to storing certain paths and performance of certain operations should be improved | ||||
dotencode | ||||
repository will be better able to store files beginning with a space or period | ||||
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 | ||||
Boris Feld
|
r40954 | 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. | ||||
r43299 | sidedata | |||
Allows storage of extra data alongside a revision. | ||||
r43408 | copies-sdc | |||
Allows to use more efficient algorithm to deal with copy tracing. | ||||
Gregory Szorc
|
r30776 | additional optimizations are available by specifying "--optimize <name>": | ||
Boris Feld
|
r41120 | re-delta-parent | ||
Gregory Szorc
|
r30776 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower | ||
Boris Feld
|
r41120 | re-delta-multibase | ||
Gregory Szorc
|
r30776 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges | ||
Boris Feld
|
r41120 | re-delta-all | ||
Gregory Szorc
|
r30776 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed | ||
Boris Feld
|
r41120 | re-delta-fulladd | ||
every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. | ||||
Boris Feld
|
r35346 | |||
Gregory Szorc
|
r30776 | |||
$ hg --config format.dotencode=false debugupgraderepo | ||||
repository lacks features recommended by current config options: | ||||
fncache | ||||
long and reserved filenames may not work correctly; repository performance is sub-optimal | ||||
generaldelta | ||||
deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower | ||||
Boris Feld
|
r40954 | sparserevlog | ||
in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange. | ||||
Gregory Szorc
|
r30776 | repository lacks features used by the default config options: | ||
dotencode | ||||
storage of filenames beginning with a period or space may not work correctly | ||||
performing an upgrade with "--run" will make the following changes: | ||||
requirements | ||||
preserved: revlogv1, store | ||||
Boris Feld
|
r40954 | added: fncache, generaldelta, sparserevlog | ||
Gregory Szorc
|
r30776 | |||
fncache | ||||
repository will be more resilient to storing certain paths and performance of certain operations should be improved | ||||
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 | ||||
Boris Feld
|
r40954 | 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. | ||||
r43299 | sidedata | |||
Allows storage of extra data alongside a revision. | ||||
r43408 | copies-sdc | |||
Allows to use more efficient algorithm to deal with copy tracing. | ||||
Gregory Szorc
|
r30776 | additional optimizations are available by specifying "--optimize <name>": | ||
Boris Feld
|
r41120 | re-delta-parent | ||
Gregory Szorc
|
r30776 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower | ||
Boris Feld
|
r41120 | re-delta-multibase | ||
Gregory Szorc
|
r30776 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges | ||
Boris Feld
|
r41120 | re-delta-all | ||
Gregory Szorc
|
r30776 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed | ||
Boris Feld
|
r41120 | re-delta-fulladd | ||
every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. | ||||
Boris Feld
|
r35346 | |||
Gregory Szorc
|
r30776 | |||
Gregory Szorc
|
r30777 | $ cd .. | ||
Upgrading a repository that is already modern essentially no-ops | ||||
$ hg init modern | ||||
$ hg -R modern debugupgraderepo --run | ||||
upgrade will perform the following actions: | ||||
requirements | ||||
Boris Feld
|
r40954 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | ||
Gregory Szorc
|
r30777 | |||
r43299 | sidedata | |||
Allows storage of extra data alongside a revision. | ||||
r43408 | copies-sdc | |||
Allows to use more efficient algorithm to deal with copy tracing. | ||||
Gregory Szorc
|
r30777 | beginning upgrade... | ||
repository locked and read-only | ||||
creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob) | ||||
Gregory Szorc
|
r30779 | (it is safe to interrupt this process any time before data migration completes) | ||
data fully migrated to temporary repository | ||||
Gregory Szorc
|
r30777 | marking source repository as being upgraded; clients will be unable to read from repository | ||
starting in-place swap of repository data | ||||
replaced files will be backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob) | ||||
Gregory Szorc
|
r30779 | replacing store... | ||
store replacement complete; repository was inconsistent for *s (glob) | ||||
Gregory Szorc
|
r30777 | finalizing requirements file and making repository readable again | ||
removing temporary repository $TESTTMP/modern/.hg/upgrade.* (glob) | ||||
copy of old repository backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob) | ||||
the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | ||||
Upgrading a repository to generaldelta works | ||||
$ hg --config format.usegeneraldelta=false init upgradegd | ||||
$ cd upgradegd | ||||
$ touch f0 | ||||
$ hg -q commit -A -m initial | ||||
r43269 | $ mkdir FooBarDirectory.d | |||
$ touch FooBarDirectory.d/f1 | ||||
Gregory Szorc
|
r30777 | $ hg -q commit -A -m 'add f1' | ||
$ hg -q up -r 0 | ||||
r43271 | >>> from __future__ import absolute_import, print_function | |||
>>> import random | ||||
>>> random.seed(0) # have a reproducible content | ||||
>>> with open("f2", "w") as f: | ||||
... for i in range(100000): | ||||
Gregory Szorc
|
r43277 | ... f.write("%d\n" % random.randint(1000000000, 9999999999)) and None | ||
Gregory Szorc
|
r30777 | $ hg -q commit -A -m 'add f2' | ||
r43271 | make sure we have a .d file | |||
$ ls -d .hg/store/data/* | ||||
.hg/store/data/_foo_bar_directory.d.hg | ||||
.hg/store/data/f0.i | ||||
.hg/store/data/f2.d | ||||
.hg/store/data/f2.i | ||||
Boris Feld
|
r40953 | $ hg debugupgraderepo --run --config format.sparse-revlog=false | ||
Gregory Szorc
|
r30777 | upgrade will perform the following actions: | ||
requirements | ||||
preserved: dotencode, fncache, revlogv1, store | ||||
added: generaldelta | ||||
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 | ||||
r43299 | sidedata | |||
Allows storage of extra data alongside a revision. | ||||
r43408 | copies-sdc | |||
Allows to use more efficient algorithm to deal with copy tracing. | ||||
Gregory Szorc
|
r30777 | beginning upgrade... | ||
repository locked and read-only | ||||
creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | ||||
Gregory Szorc
|
r30779 | (it is safe to interrupt this process any time before data migration completes) | ||
migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | ||||
r43271 | migrating 519 KB in store; 1.05 MB tracked data | |||
migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | ||||
Gregory Szorc
|
r30779 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | ||
r43271 | migrating 1 manifests containing 3 revisions (384 bytes in store; 238 bytes tracked data) | |||
finished migrating 3 manifest revisions across 1 manifests; change in size: -17 bytes | ||||
r43269 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |||
Gregory Szorc
|
r30779 | finished migrating 3 changelog revisions; change in size: 0 bytes | ||
r43271 | finished migrating 9 total revisions; total change in store size: -17 bytes | |||
Gregory Szorc
|
r30780 | copying phaseroots | ||
Gregory Szorc
|
r30779 | data fully migrated to temporary repository | ||
Gregory Szorc
|
r30777 | marking source repository as being upgraded; clients will be unable to read from repository | ||
starting in-place swap of repository data | ||||
replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | ||||
Gregory Szorc
|
r30779 | replacing store... | ||
store replacement complete; repository was inconsistent for *s (glob) | ||||
Gregory Szorc
|
r30777 | finalizing requirements file and making repository readable again | ||
removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | ||||
copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | ||||
the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | ||||
Original requirements backed up | ||||
$ cat .hg/upgradebackup.*/requires | ||||
dotencode | ||||
fncache | ||||
revlogv1 | ||||
store | ||||
generaldelta added to original requirements files | ||||
$ cat .hg/requires | ||||
dotencode | ||||
fncache | ||||
generaldelta | ||||
revlogv1 | ||||
store | ||||
Gregory Szorc
|
r30779 | store directory has files we expect | ||
$ ls .hg/store | ||||
00changelog.i | ||||
00manifest.i | ||||
data | ||||
fncache | ||||
Gregory Szorc
|
r30780 | phaseroots | ||
Gregory Szorc
|
r30779 | undo | ||
undo.backupfiles | ||||
undo.phaseroots | ||||
manifest should be generaldelta | ||||
$ hg debugrevlog -m | grep flags | ||||
flags : inline, generaldelta | ||||
verify should be happy | ||||
$ hg verify | ||||
checking changesets | ||||
checking manifests | ||||
crosschecking files in changesets and manifests | ||||
checking files | ||||
Meirambek Omyrzak
|
r39525 | checked 3 changesets with 3 changes to 3 files | ||
Gregory Szorc
|
r30779 | |||
old store should be backed up | ||||
Boris Feld
|
r41121 | $ ls -d .hg/upgradebackup.*/ | ||
.hg/upgradebackup.*/ (glob) | ||||
Gregory Szorc
|
r30779 | $ ls .hg/upgradebackup.*/store | ||
00changelog.i | ||||
00manifest.i | ||||
data | ||||
fncache | ||||
phaseroots | ||||
undo | ||||
undo.backup.fncache | ||||
undo.backupfiles | ||||
undo.phaseroots | ||||
Boris Feld
|
r41121 | unless --no-backup is passed | ||
$ rm -rf .hg/upgradebackup.*/ | ||||
$ hg debugupgraderepo --run --no-backup | ||||
upgrade will perform the following actions: | ||||
requirements | ||||
preserved: dotencode, fncache, generaldelta, revlogv1, store | ||||
added: sparserevlog | ||||
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. | ||||
r43299 | sidedata | |||
Allows storage of extra data alongside a revision. | ||||
r43408 | copies-sdc | |||
Allows to use more efficient algorithm to deal with copy tracing. | ||||
Boris Feld
|
r41121 | beginning upgrade... | ||
repository locked and read-only | ||||
creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | ||||
(it is safe to interrupt this process any time before data migration completes) | ||||
migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | ||||
r43271 | migrating 519 KB in store; 1.05 MB tracked data | |||
migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | ||||
Boris Feld
|
r41121 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | ||
r43269 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |||
Boris Feld
|
r41121 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | ||
r43269 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |||
Boris Feld
|
r41121 | finished migrating 3 changelog revisions; change in size: 0 bytes | ||
finished migrating 9 total revisions; total change in store size: 0 bytes | ||||
copying phaseroots | ||||
data fully migrated to temporary repository | ||||
marking source repository as being upgraded; clients will be unable to read from repository | ||||
starting in-place swap of repository data | ||||
replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | ||||
replacing store... | ||||
Pulkit Goyal
|
r42157 | store replacement complete; repository was inconsistent for * (glob) | ||
Boris Feld
|
r41121 | finalizing requirements file and making repository readable again | ||
removing old repository content$TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | ||||
removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | ||||
$ ls -1 .hg/ | grep upgradebackup | ||||
[1] | ||||
r43098 | ||||
We can restrict optimization to some revlog: | ||||
$ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback | ||||
upgrade will perform the following actions: | ||||
requirements | ||||
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | ||||
r43299 | sidedata | |||
Allows storage of extra data alongside a revision. | ||||
r43408 | copies-sdc | |||
Allows to use more efficient algorithm to deal with copy tracing. | ||||
r43098 | re-delta-parent | |||
deltas within internal storage will choose a new base revision if needed | ||||
beginning upgrade... | ||||
repository locked and read-only | ||||
creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | ||||
(it is safe to interrupt this process any time before data migration completes) | ||||
migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | ||||
r43271 | migrating 519 KB in store; 1.05 MB tracked data | |||
migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | ||||
r43269 | blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions | |||
r43098 | blindly copying data/f0.i containing 1 revisions | |||
blindly copying data/f2.i containing 1 revisions | ||||
finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | ||||
r43269 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |||
r43098 | cloning 3 revisions from 00manifest.i | |||
finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | ||||
r43269 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |||
r43098 | blindly copying 00changelog.i containing 3 revisions | |||
finished migrating 3 changelog revisions; change in size: 0 bytes | ||||
finished migrating 9 total revisions; total change in store size: 0 bytes | ||||
copying phaseroots | ||||
data fully migrated to temporary repository | ||||
marking source repository as being upgraded; clients will be unable to read from repository | ||||
starting in-place swap of repository data | ||||
replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | ||||
replacing store... | ||||
store replacement complete; repository was inconsistent for *s (glob) | ||||
finalizing requirements file and making repository readable again | ||||
removing old repository content$TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | ||||
removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | ||||
Check that the repo still works fine | ||||
r43271 | $ hg log -G --stat | |||
Gregory Szorc
|
r43344 | @ changeset: 2:76d4395f5413 (no-py3 !) | ||
@ changeset: 2:fca376863211 (py3 !) | ||||
r43098 | | tag: tip | |||
| parent: 0:ba592bf28da2 | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: add f2 | ||||
| | ||||
r43271 | | f2 | 100000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |||
| 1 files changed, 100000 insertions(+), 0 deletions(-) | ||||
r43098 | | | |||
r43269 | | o changeset: 1:2029ce2354e2 | |||
r43098 | |/ user: test | |||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: add f1 | ||||
| | ||||
| | ||||
o changeset: 0:ba592bf28da2 | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: initial | ||||
$ hg verify | ||||
checking changesets | ||||
checking manifests | ||||
crosschecking files in changesets and manifests | ||||
checking files | ||||
checked 3 changesets with 3 changes to 3 files | ||||
Check we can select negatively | ||||
$ hg debugupgrade --optimize re-delta-parent --run --no-manifest --no-backup --debug --traceback | ||||
upgrade will perform the following actions: | ||||
requirements | ||||
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | ||||
r43299 | sidedata | |||
Allows storage of extra data alongside a revision. | ||||
r43408 | copies-sdc | |||
Allows to use more efficient algorithm to deal with copy tracing. | ||||
r43098 | re-delta-parent | |||
deltas within internal storage will choose a new base revision if needed | ||||
beginning upgrade... | ||||
repository locked and read-only | ||||
creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | ||||
(it is safe to interrupt this process any time before data migration completes) | ||||
migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | ||||
r43271 | migrating 519 KB in store; 1.05 MB tracked data | |||
migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | ||||
r43269 | cloning 1 revisions from data/FooBarDirectory.d/f1.i | |||
r43098 | cloning 1 revisions from data/f0.i | |||
cloning 1 revisions from data/f2.i | ||||
finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | ||||
r43269 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |||
r43098 | blindly copying 00manifest.i containing 3 revisions | |||
finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | ||||
r43269 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |||
r43098 | cloning 3 revisions from 00changelog.i | |||
finished migrating 3 changelog revisions; change in size: 0 bytes | ||||
finished migrating 9 total revisions; total change in store size: 0 bytes | ||||
copying phaseroots | ||||
data fully migrated to temporary repository | ||||
marking source repository as being upgraded; clients will be unable to read from repository | ||||
starting in-place swap of repository data | ||||
replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | ||||
replacing store... | ||||
store replacement complete; repository was inconsistent for *s (glob) | ||||
finalizing requirements file and making repository readable again | ||||
removing old repository content$TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | ||||
removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | ||||
$ hg verify | ||||
checking changesets | ||||
checking manifests | ||||
crosschecking files in changesets and manifests | ||||
checking files | ||||
checked 3 changesets with 3 changes to 3 files | ||||
r43099 | Check that we can select changelog only | |||
$ hg debugupgrade --optimize re-delta-parent --run --changelog --no-backup --debug --traceback | ||||
upgrade will perform the following actions: | ||||
requirements | ||||
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | ||||
r43299 | sidedata | |||
Allows storage of extra data alongside a revision. | ||||
r43408 | copies-sdc | |||
Allows to use more efficient algorithm to deal with copy tracing. | ||||
r43099 | re-delta-parent | |||
deltas within internal storage will choose a new base revision if needed | ||||
beginning upgrade... | ||||
repository locked and read-only | ||||
creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | ||||
(it is safe to interrupt this process any time before data migration completes) | ||||
migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | ||||
r43271 | migrating 519 KB in store; 1.05 MB tracked data | |||
migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | ||||
r43269 | blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions | |||
r43099 | blindly copying data/f0.i containing 1 revisions | |||
blindly copying data/f2.i containing 1 revisions | ||||
finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | ||||
r43269 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |||
r43099 | blindly copying 00manifest.i containing 3 revisions | |||
finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | ||||
r43269 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |||
r43099 | cloning 3 revisions from 00changelog.i | |||
finished migrating 3 changelog revisions; change in size: 0 bytes | ||||
finished migrating 9 total revisions; total change in store size: 0 bytes | ||||
copying phaseroots | ||||
data fully migrated to temporary repository | ||||
marking source repository as being upgraded; clients will be unable to read from repository | ||||
starting in-place swap of repository data | ||||
replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | ||||
replacing store... | ||||
store replacement complete; repository was inconsistent for *s (glob) | ||||
finalizing requirements file and making repository readable again | ||||
removing old repository content$TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | ||||
removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | ||||
$ hg verify | ||||
checking changesets | ||||
checking manifests | ||||
crosschecking files in changesets and manifests | ||||
checking files | ||||
checked 3 changesets with 3 changes to 3 files | ||||
Check that we can select filelog only | ||||
$ hg debugupgrade --optimize re-delta-parent --run --no-changelog --no-manifest --no-backup --debug --traceback | ||||
upgrade will perform the following actions: | ||||
requirements | ||||
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | ||||
r43299 | sidedata | |||
Allows storage of extra data alongside a revision. | ||||
r43408 | copies-sdc | |||
Allows to use more efficient algorithm to deal with copy tracing. | ||||
r43099 | re-delta-parent | |||
deltas within internal storage will choose a new base revision if needed | ||||
beginning upgrade... | ||||
repository locked and read-only | ||||
creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | ||||
(it is safe to interrupt this process any time before data migration completes) | ||||
migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | ||||
r43271 | migrating 519 KB in store; 1.05 MB tracked data | |||
migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | ||||
r43269 | cloning 1 revisions from data/FooBarDirectory.d/f1.i | |||
r43099 | cloning 1 revisions from data/f0.i | |||
cloning 1 revisions from data/f2.i | ||||
finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | ||||
r43269 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |||
r43099 | blindly copying 00manifest.i containing 3 revisions | |||
finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | ||||
r43269 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |||
r43099 | blindly copying 00changelog.i containing 3 revisions | |||
finished migrating 3 changelog revisions; change in size: 0 bytes | ||||
finished migrating 9 total revisions; total change in store size: 0 bytes | ||||
copying phaseroots | ||||
data fully migrated to temporary repository | ||||
marking source repository as being upgraded; clients will be unable to read from repository | ||||
starting in-place swap of repository data | ||||
replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | ||||
replacing store... | ||||
store replacement complete; repository was inconsistent for *s (glob) | ||||
finalizing requirements file and making repository readable again | ||||
removing old repository content$TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | ||||
removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | ||||
$ hg verify | ||||
checking changesets | ||||
checking manifests | ||||
crosschecking files in changesets and manifests | ||||
checking files | ||||
checked 3 changesets with 3 changes to 3 files | ||||
r43100 | ||||
Check you can't skip revlog clone during important format downgrade | ||||
$ echo "[format]" > .hg/hgrc | ||||
$ echo "sparse-revlog=no" >> .hg/hgrc | ||||
$ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback | ||||
ignoring revlogs selection flags, format requirements change: sparserevlog | ||||
upgrade will perform the following actions: | ||||
requirements | ||||
preserved: dotencode, fncache, generaldelta, revlogv1, store | ||||
removed: sparserevlog | ||||
r43299 | sidedata | |||
Allows storage of extra data alongside a revision. | ||||
r43408 | copies-sdc | |||
Allows to use more efficient algorithm to deal with copy tracing. | ||||
r43100 | re-delta-parent | |||
deltas within internal storage will choose a new base revision if needed | ||||
beginning upgrade... | ||||
repository locked and read-only | ||||
creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | ||||
(it is safe to interrupt this process any time before data migration completes) | ||||
migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | ||||
r43271 | migrating 519 KB in store; 1.05 MB tracked data | |||
migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | ||||
r43269 | cloning 1 revisions from data/FooBarDirectory.d/f1.i | |||
r43100 | cloning 1 revisions from data/f0.i | |||
cloning 1 revisions from data/f2.i | ||||
finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | ||||
r43269 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |||
r43100 | cloning 3 revisions from 00manifest.i | |||
finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | ||||
r43269 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |||
r43100 | cloning 3 revisions from 00changelog.i | |||
finished migrating 3 changelog revisions; change in size: 0 bytes | ||||
finished migrating 9 total revisions; total change in store size: 0 bytes | ||||
copying phaseroots | ||||
data fully migrated to temporary repository | ||||
marking source repository as being upgraded; clients will be unable to read from repository | ||||
starting in-place swap of repository data | ||||
replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | ||||
replacing store... | ||||
store replacement complete; repository was inconsistent for *s (glob) | ||||
finalizing requirements file and making repository readable again | ||||
removing old repository content$TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | ||||
removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | ||||
$ hg verify | ||||
checking changesets | ||||
checking manifests | ||||
crosschecking files in changesets and manifests | ||||
checking files | ||||
checked 3 changesets with 3 changes to 3 files | ||||
Check you can't skip revlog clone during important format upgrade | ||||
$ echo "sparse-revlog=yes" >> .hg/hgrc | ||||
$ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback | ||||
ignoring revlogs selection flags, format requirements change: sparserevlog | ||||
upgrade will perform the following actions: | ||||
requirements | ||||
preserved: dotencode, fncache, generaldelta, revlogv1, store | ||||
added: sparserevlog | ||||
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. | ||||
r43299 | sidedata | |||
Allows storage of extra data alongside a revision. | ||||
r43408 | copies-sdc | |||
Allows to use more efficient algorithm to deal with copy tracing. | ||||
r43100 | re-delta-parent | |||
deltas within internal storage will choose a new base revision if needed | ||||
beginning upgrade... | ||||
repository locked and read-only | ||||
creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | ||||
(it is safe to interrupt this process any time before data migration completes) | ||||
migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | ||||
r43271 | migrating 519 KB in store; 1.05 MB tracked data | |||
migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | ||||
r43269 | cloning 1 revisions from data/FooBarDirectory.d/f1.i | |||
r43100 | cloning 1 revisions from data/f0.i | |||
cloning 1 revisions from data/f2.i | ||||
finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | ||||
r43269 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |||
r43100 | cloning 3 revisions from 00manifest.i | |||
finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | ||||
r43269 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |||
r43100 | cloning 3 revisions from 00changelog.i | |||
finished migrating 3 changelog revisions; change in size: 0 bytes | ||||
finished migrating 9 total revisions; total change in store size: 0 bytes | ||||
copying phaseroots | ||||
data fully migrated to temporary repository | ||||
marking source repository as being upgraded; clients will be unable to read from repository | ||||
starting in-place swap of repository data | ||||
replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | ||||
replacing store... | ||||
store replacement complete; repository was inconsistent for *s (glob) | ||||
finalizing requirements file and making repository readable again | ||||
removing old repository content$TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | ||||
removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | ||||
$ hg verify | ||||
checking changesets | ||||
checking manifests | ||||
crosschecking files in changesets and manifests | ||||
checking files | ||||
checked 3 changesets with 3 changes to 3 files | ||||
Gregory Szorc
|
r30777 | $ cd .. | ||
Gregory Szorc
|
r31798 | |||
store files with special filenames aren't encoded during copy | ||||
$ hg init store-filenames | ||||
$ cd store-filenames | ||||
$ touch foo | ||||
$ hg -q commit -A -m initial | ||||
$ touch .hg/store/.XX_special_filename | ||||
$ hg debugupgraderepo --run | ||||
upgrade will perform the following actions: | ||||
requirements | ||||
Boris Feld
|
r40954 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | ||
Gregory Szorc
|
r31798 | |||
r43299 | sidedata | |||
Allows storage of extra data alongside a revision. | ||||
r43408 | copies-sdc | |||
Allows to use more efficient algorithm to deal with copy tracing. | ||||
Gregory Szorc
|
r31798 | beginning upgrade... | ||
repository locked and read-only | ||||
creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob) | ||||
(it is safe to interrupt this process any time before data migration completes) | ||||
migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) | ||||
Gregory Szorc
|
r39893 | migrating 301 bytes in store; 107 bytes tracked data | ||
migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data) | ||||
Gregory Szorc
|
r31798 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes | ||
Gregory Szorc
|
r39893 | migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data) | ||
Gregory Szorc
|
r31798 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes | ||
Gregory Szorc
|
r39893 | migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data) | ||
Gregory Szorc
|
r31798 | finished migrating 1 changelog revisions; change in size: 0 bytes | ||
finished migrating 3 total revisions; total change in store size: 0 bytes | ||||
copying .XX_special_filename | ||||
Gregory Szorc
|
r31799 | copying phaseroots | ||
data fully migrated to temporary repository | ||||
marking source repository as being upgraded; clients will be unable to read from repository | ||||
starting in-place swap of repository data | ||||
replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) | ||||
replacing store... | ||||
store replacement complete; repository was inconsistent for *s (glob) | ||||
finalizing requirements file and making repository readable again | ||||
Gregory Szorc
|
r31798 | removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob) | ||
Gregory Szorc
|
r31799 | copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) | ||
the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | ||||
Boris Feld
|
r35346 | $ hg debugupgraderepo --run --optimize redeltafulladd | ||
upgrade will perform the following actions: | ||||
requirements | ||||
Boris Feld
|
r40954 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | ||
Boris Feld
|
r35346 | |||
r43299 | sidedata | |||
Allows storage of extra data alongside a revision. | ||||
r43408 | copies-sdc | |||
Allows to use more efficient algorithm to deal with copy tracing. | ||||
Boris Feld
|
r41120 | re-delta-fulladd | ||
Boris Feld
|
r35346 | 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 | ||
beginning upgrade... | ||||
repository locked and read-only | ||||
creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob) | ||||
(it is safe to interrupt this process any time before data migration completes) | ||||
migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) | ||||
Gregory Szorc
|
r39893 | migrating 301 bytes in store; 107 bytes tracked data | ||
migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data) | ||||
Boris Feld
|
r35346 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes | ||
Gregory Szorc
|
r39893 | migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data) | ||
Boris Feld
|
r35346 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes | ||
Gregory Szorc
|
r39893 | migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data) | ||
Boris Feld
|
r35346 | finished migrating 1 changelog revisions; change in size: 0 bytes | ||
finished migrating 3 total revisions; total change in store size: 0 bytes | ||||
copying .XX_special_filename | ||||
copying phaseroots | ||||
data fully migrated to temporary repository | ||||
marking source repository as being upgraded; clients will be unable to read from repository | ||||
starting in-place swap of repository data | ||||
replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) | ||||
replacing store... | ||||
Matt Harbison
|
r35361 | store replacement complete; repository was inconsistent for *s (glob) | ||
Boris Feld
|
r35346 | finalizing requirements file and making repository readable again | ||
removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob) | ||||
copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) | ||||
the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | ||||
Gregory Szorc
|
r31798 | |||
Boris Feld
|
r40871 | fncache is valid after upgrade | ||
$ hg debugrebuildfncache | ||||
fncache already up to date | ||||
Gregory Szorc
|
r31798 | $ cd .. | ||
Boris Feld
|
r35304 | |||
Check upgrading a large file repository | ||||
--------------------------------------- | ||||
$ hg init largefilesrepo | ||||
$ cat << EOF >> largefilesrepo/.hg/hgrc | ||||
> [extensions] | ||||
> largefiles = | ||||
> EOF | ||||
$ cd largefilesrepo | ||||
$ touch foo | ||||
$ hg add --large foo | ||||
$ hg -q commit -m initial | ||||
$ cat .hg/requires | ||||
dotencode | ||||
fncache | ||||
generaldelta | ||||
largefiles | ||||
revlogv1 | ||||
Boris Feld
|
r40954 | sparserevlog | ||
Boris Feld
|
r35304 | store | ||
$ hg debugupgraderepo --run | ||||
upgrade will perform the following actions: | ||||
requirements | ||||
Boris Feld
|
r40954 | preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, sparserevlog, store | ||
Boris Feld
|
r35304 | |||
r43299 | sidedata | |||
Allows storage of extra data alongside a revision. | ||||
r43408 | copies-sdc | |||
Allows to use more efficient algorithm to deal with copy tracing. | ||||
Boris Feld
|
r35304 | beginning upgrade... | ||
repository locked and read-only | ||||
creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) | ||||
(it is safe to interrupt this process any time before data migration completes) | ||||
migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) | ||||
Gregory Szorc
|
r39893 | migrating 355 bytes in store; 160 bytes tracked data | ||
migrating 1 filelogs containing 1 revisions (106 bytes in store; 41 bytes tracked data) | ||||
Boris Feld
|
r35304 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes | ||
Gregory Szorc
|
r39893 | migrating 1 manifests containing 1 revisions (116 bytes in store; 51 bytes tracked data) | ||
Boris Feld
|
r35304 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes | ||
Gregory Szorc
|
r39893 | migrating changelog containing 1 revisions (133 bytes in store; 68 bytes tracked data) | ||
Boris Feld
|
r35304 | finished migrating 1 changelog revisions; change in size: 0 bytes | ||
finished migrating 3 total revisions; total change in store size: 0 bytes | ||||
copying phaseroots | ||||
data fully migrated to temporary repository | ||||
marking source repository as being upgraded; clients will be unable to read from repository | ||||
starting in-place swap of repository data | ||||
replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob) | ||||
replacing store... | ||||
Matt Harbison
|
r35361 | store replacement complete; repository was inconsistent for *s (glob) | ||
Boris Feld
|
r35304 | finalizing requirements file and making repository readable again | ||
removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) | ||||
copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob) | ||||
the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | ||||
$ cat .hg/requires | ||||
dotencode | ||||
fncache | ||||
generaldelta | ||||
largefiles | ||||
revlogv1 | ||||
Boris Feld
|
r40954 | sparserevlog | ||
Boris Feld
|
r35304 | store | ||
Boris Feld
|
r35342 | |||
Matt Harbison
|
r35362 | $ cat << EOF >> .hg/hgrc | ||
> [extensions] | ||||
> lfs = | ||||
> [lfs] | ||||
> threshold = 10 | ||||
> EOF | ||||
$ echo '123456789012345' > lfs.bin | ||||
$ hg ci -Am 'lfs.bin' | ||||
adding lfs.bin | ||||
$ grep lfs .hg/requires | ||||
lfs | ||||
$ find .hg/store/lfs -type f | ||||
.hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f | ||||
$ hg debugupgraderepo --run | ||||
upgrade will perform the following actions: | ||||
requirements | ||||
Boris Feld
|
r40954 | preserved: dotencode, fncache, generaldelta, largefiles, lfs, revlogv1, sparserevlog, store | ||
Matt Harbison
|
r35362 | |||
r43299 | sidedata | |||
Allows storage of extra data alongside a revision. | ||||
r43408 | copies-sdc | |||
Allows to use more efficient algorithm to deal with copy tracing. | ||||
Matt Harbison
|
r35362 | beginning upgrade... | ||
repository locked and read-only | ||||
creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) | ||||
(it is safe to interrupt this process any time before data migration completes) | ||||
migrating 6 total revisions (2 in filelogs, 2 in manifests, 2 in changelog) | ||||
Gregory Szorc
|
r39893 | migrating 801 bytes in store; 467 bytes tracked data | ||
migrating 2 filelogs containing 2 revisions (296 bytes in store; 182 bytes tracked data) | ||||
Matt Harbison
|
r35362 | finished migrating 2 filelog revisions across 2 filelogs; change in size: 0 bytes | ||
Gregory Szorc
|
r39893 | migrating 1 manifests containing 2 revisions (241 bytes in store; 151 bytes tracked data) | ||
Matt Harbison
|
r35362 | finished migrating 2 manifest revisions across 1 manifests; change in size: 0 bytes | ||
Gregory Szorc
|
r39893 | migrating changelog containing 2 revisions (264 bytes in store; 134 bytes tracked data) | ||
Matt Harbison
|
r35362 | finished migrating 2 changelog revisions; change in size: 0 bytes | ||
finished migrating 6 total revisions; total change in store size: 0 bytes | ||||
copying phaseroots | ||||
Matt Harbison
|
r35364 | copying lfs blob d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f | ||
Matt Harbison
|
r35362 | data fully migrated to temporary repository | ||
marking source repository as being upgraded; clients will be unable to read from repository | ||||
starting in-place swap of repository data | ||||
replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob) | ||||
replacing store... | ||||
store replacement complete; repository was inconsistent for *s (glob) | ||||
finalizing requirements file and making repository readable again | ||||
removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) | ||||
copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob) | ||||
the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | ||||
$ grep lfs .hg/requires | ||||
lfs | ||||
$ find .hg/store/lfs -type f | ||||
Matt Harbison
|
r35364 | .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f | ||
Matt Harbison
|
r35362 | $ hg verify | ||
checking changesets | ||||
checking manifests | ||||
crosschecking files in changesets and manifests | ||||
checking files | ||||
Meirambek Omyrzak
|
r39525 | checked 2 changesets with 2 changes to 2 files | ||
Matt Harbison
|
r35362 | $ hg debugdata lfs.bin 0 | ||
version https://git-lfs.github.com/spec/v1 | ||||
oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f | ||||
size 16 | ||||
x-is-binary 0 | ||||
Boris Feld
|
r35342 | $ cd .. | ||
repository config is taken in account | ||||
------------------------------------- | ||||
$ cat << EOF >> $HGRCPATH | ||||
> [format] | ||||
> maxchainlen = 1 | ||||
> EOF | ||||
$ hg init localconfig | ||||
$ cd localconfig | ||||
$ cat << EOF > file | ||||
> some content | ||||
> with some length | ||||
> to make sure we get a delta | ||||
> after changes | ||||
> very long | ||||
> very long | ||||
> very long | ||||
> very long | ||||
> very long | ||||
> very long | ||||
> very long | ||||
> very long | ||||
> very long | ||||
> very long | ||||
> very long | ||||
> EOF | ||||
$ hg -q commit -A -m A | ||||
$ echo "new line" >> file | ||||
$ hg -q commit -m B | ||||
$ echo "new line" >> file | ||||
$ hg -q commit -m C | ||||
$ cat << EOF >> .hg/hgrc | ||||
> [format] | ||||
> maxchainlen = 9001 | ||||
> EOF | ||||
$ hg config format | ||||
format.maxchainlen=9001 | ||||
Gregory Szorc
|
r37299 | $ hg debugdeltachain file | ||
Boris Feld
|
r40954 | rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks | ||
0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1 | ||||
1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1 | ||||
2 1 2 0 other 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1 | ||||
Boris Feld
|
r35342 | |||
$ hg debugupgraderepo --run --optimize redeltaall | ||||
upgrade will perform the following actions: | ||||
requirements | ||||
Boris Feld
|
r40954 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | ||
Boris Feld
|
r35342 | |||
r43299 | sidedata | |||
Allows storage of extra data alongside a revision. | ||||
r43408 | copies-sdc | |||
Allows to use more efficient algorithm to deal with copy tracing. | ||||
Boris Feld
|
r41120 | re-delta-all | ||
Boris Feld
|
r35342 | deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time | ||
beginning upgrade... | ||||
repository locked and read-only | ||||
creating temporary repository to stage migrated data: $TESTTMP/localconfig/.hg/upgrade.* (glob) | ||||
(it is safe to interrupt this process any time before data migration completes) | ||||
migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | ||||
Boris Feld
|
r40954 | migrating 1019 bytes in store; 882 bytes tracked data | ||
migrating 1 filelogs containing 3 revisions (320 bytes in store; 573 bytes tracked data) | ||||
finished migrating 3 filelog revisions across 1 filelogs; change in size: -9 bytes | ||||
Gregory Szorc
|
r39893 | migrating 1 manifests containing 3 revisions (333 bytes in store; 138 bytes tracked data) | ||
Boris Feld
|
r35342 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | ||
Gregory Szorc
|
r39893 | migrating changelog containing 3 revisions (366 bytes in store; 171 bytes tracked data) | ||
Boris Feld
|
r35342 | finished migrating 3 changelog revisions; change in size: 0 bytes | ||
Boris Feld
|
r40954 | finished migrating 9 total revisions; total change in store size: -9 bytes | ||
Boris Feld
|
r35342 | copying phaseroots | ||
data fully migrated to temporary repository | ||||
marking source repository as being upgraded; clients will be unable to read from repository | ||||
starting in-place swap of repository data | ||||
replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) | ||||
replacing store... | ||||
Matt Harbison
|
r35361 | store replacement complete; repository was inconsistent for *s (glob) | ||
Boris Feld
|
r35342 | finalizing requirements file and making repository readable again | ||
removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob) | ||||
copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) | ||||
the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | ||||
Gregory Szorc
|
r37299 | $ hg debugdeltachain file | ||
Boris Feld
|
r40954 | rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks | ||
0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1 | ||||
1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1 | ||||
2 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 119 119 1.00000 1 | ||||
Boris Feld
|
r35342 | $ cd .. | ||
$ cat << EOF >> $HGRCPATH | ||||
> [format] | ||||
> maxchainlen = 9001 | ||||
> EOF | ||||
Paul Morelle
|
r38742 | |||
Check upgrading a sparse-revlog repository | ||||
--------------------------------------- | ||||
Boris Feld
|
r40953 | $ hg init sparserevlogrepo --config format.sparse-revlog=no | ||
Paul Morelle
|
r38742 | $ cd sparserevlogrepo | ||
$ touch foo | ||||
$ hg add foo | ||||
$ hg -q commit -m "foo" | ||||
$ cat .hg/requires | ||||
dotencode | ||||
fncache | ||||
generaldelta | ||||
revlogv1 | ||||
store | ||||
Check that we can add the sparse-revlog format requirement | ||||
$ hg --config format.sparse-revlog=yes debugupgraderepo --run >/dev/null | ||||
copy of old repository backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob) | ||||
the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | ||||
$ cat .hg/requires | ||||
dotencode | ||||
fncache | ||||
generaldelta | ||||
revlogv1 | ||||
sparserevlog | ||||
store | ||||
Check that we can remove the sparse-revlog format requirement | ||||
$ hg --config format.sparse-revlog=no debugupgraderepo --run >/dev/null | ||||
copy of old repository backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob) | ||||
the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | ||||
$ cat .hg/requires | ||||
dotencode | ||||
fncache | ||||
generaldelta | ||||
revlogv1 | ||||
store | ||||
r42306 | ||||
#if zstd | ||||
Check upgrading to a zstd revlog | ||||
-------------------------------- | ||||
upgrade | ||||
$ hg --config format.revlog-compression=zstd debugupgraderepo --run --no-backup >/dev/null | ||||
$ hg debugformat -v | ||||
format-variant repo config default | ||||
fncache: yes yes yes | ||||
dotencode: yes yes yes | ||||
generaldelta: yes yes yes | ||||
sparserevlog: yes yes yes | ||||
r43299 | sidedata: no no no | |||
r43408 | copies-sdc: no no no | |||
r42306 | plain-cl-delta: yes yes yes | |||
compression: zstd zlib zlib | ||||
compression-level: default default default | ||||
$ cat .hg/requires | ||||
dotencode | ||||
fncache | ||||
generaldelta | ||||
revlog-compression-zstd | ||||
revlogv1 | ||||
sparserevlog | ||||
store | ||||
downgrade | ||||
$ hg debugupgraderepo --run --no-backup > /dev/null | ||||
$ hg debugformat -v | ||||
format-variant repo config default | ||||
fncache: yes yes yes | ||||
dotencode: yes yes yes | ||||
generaldelta: yes yes yes | ||||
sparserevlog: yes yes yes | ||||
r43299 | sidedata: no no no | |||
r43408 | copies-sdc: no no no | |||
r42306 | plain-cl-delta: yes yes yes | |||
compression: zlib zlib zlib | ||||
compression-level: default default default | ||||
$ cat .hg/requires | ||||
dotencode | ||||
fncache | ||||
generaldelta | ||||
revlogv1 | ||||
sparserevlog | ||||
store | ||||
upgrade from hgrc | ||||
$ cat >> .hg/hgrc << EOF | ||||
> [format] | ||||
> revlog-compression=zstd | ||||
> EOF | ||||
$ hg debugupgraderepo --run --no-backup > /dev/null | ||||
$ hg debugformat -v | ||||
format-variant repo config default | ||||
fncache: yes yes yes | ||||
dotencode: yes yes yes | ||||
generaldelta: yes yes yes | ||||
sparserevlog: yes yes yes | ||||
r43299 | sidedata: no no no | |||
r43408 | copies-sdc: no no no | |||
r42306 | plain-cl-delta: yes yes yes | |||
compression: zstd zstd zlib | ||||
compression-level: default default default | ||||
$ cat .hg/requires | ||||
dotencode | ||||
fncache | ||||
generaldelta | ||||
revlog-compression-zstd | ||||
revlogv1 | ||||
sparserevlog | ||||
store | ||||
r43404 | #endif | |||
Check upgrading to a side-data revlog | ||||
------------------------------------- | ||||
upgrade | ||||
r42306 | ||||
r43404 | $ hg --config format.use-side-data=yes debugupgraderepo --run --no-backup --config "extensions.sidedata=$TESTDIR/testlib/ext-sidedata.py" >/dev/null | |||
$ hg debugformat -v | ||||
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 | ||||
r43408 | copies-sdc: no no no | |||
r43404 | plain-cl-delta: yes yes yes | |||
r43414 | compression: zstd zstd zlib (zstd !) | |||
compression: zlib zlib zlib (no-zstd !) | ||||
r43404 | compression-level: default default default | |||
$ cat .hg/requires | ||||
dotencode | ||||
exp-sidedata-flag | ||||
fncache | ||||
generaldelta | ||||
r43414 | revlog-compression-zstd (zstd !) | |||
r43404 | revlogv1 | |||
sparserevlog | ||||
store | ||||
$ hg debugsidedata -c 0 | ||||
2 sidedata entries | ||||
entry-0001 size 4 | ||||
entry-0002 size 32 | ||||
r43405 | downgrade | |||
$ hg debugupgraderepo --config format.use-side-data=no --run --no-backup > /dev/null | ||||
$ hg debugformat -v | ||||
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 | ||||
r43408 | copies-sdc: no no no | |||
r43405 | plain-cl-delta: yes yes yes | |||
r43414 | compression: zstd zstd zlib (zstd !) | |||
compression: zlib zlib zlib (no-zstd !) | ||||
r43405 | compression-level: default default default | |||
$ cat .hg/requires | ||||
dotencode | ||||
fncache | ||||
generaldelta | ||||
r43414 | revlog-compression-zstd (zstd !) | |||
r43405 | revlogv1 | |||
sparserevlog | ||||
store | ||||
$ hg debugsidedata -c 0 | ||||
upgrade from hgrc | ||||
$ cat >> .hg/hgrc << EOF | ||||
> [format] | ||||
> use-side-data=yes | ||||
> EOF | ||||
$ hg debugupgraderepo --run --no-backup > /dev/null | ||||
$ hg debugformat -v | ||||
format-variant repo config default | ||||
fncache: yes yes yes | ||||
dotencode: yes yes yes | ||||
generaldelta: yes yes yes | ||||
sparserevlog: yes yes yes | ||||
sidedata: yes yes no | ||||
r43408 | copies-sdc: no no no | |||
r43405 | plain-cl-delta: yes yes yes | |||
r43414 | compression: zstd zstd zlib (zstd !) | |||
compression: zlib zlib zlib (no-zstd !) | ||||
r43405 | compression-level: default default default | |||
$ cat .hg/requires | ||||
dotencode | ||||
exp-sidedata-flag | ||||
fncache | ||||
generaldelta | ||||
r43414 | revlog-compression-zstd (zstd !) | |||
r43405 | revlogv1 | |||
sparserevlog | ||||
store | ||||
$ hg debugsidedata -c 0 | ||||