annotate tests/test-upgrade-repo.t @ 38555:f2f9bacf0587

manifest: define and implement rev() on manifestlog Various code is accessing repo.manifestlog._revlog - a private attribute. This bypasses our interface and makes it difficult to implement non-revlog manifest storage. This commit adds a rev() method to the manifestlog interface and class and teaches callers to use it. Ideally this method wouldn't exist, as very few consumers should need to resolve the revision number of a manifest. Again, the primary goal of interface work is to establish and use interfaces first and to improve them later. Differential Revision: https://phab.mercurial-scm.org/D3882
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 04 Jul 2018 12:12:49 -0700
parents cbc4425e81b5
children 4ad2a1ff0404
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
37338
cbc4425e81b5 tests: conditionalize tests based on presence of revlogs for files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37281
diff changeset
1 #require no-reposimplestore
cbc4425e81b5 tests: conditionalize tests based on presence of revlogs for files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37281
diff changeset
2
30775
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
3 $ cat >> $HGRCPATH << EOF
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
4 > [extensions]
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
5 > share =
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
6 > EOF
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
7
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
8 store and revlogv1 are required in source
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
9
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
10 $ hg --config format.usestore=false init no-store
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
11 $ hg -R no-store debugupgraderepo
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
12 abort: cannot upgrade repository; requirement missing: store
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
13 [255]
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
14
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
15 $ hg init no-revlogv1
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
16 $ cat > no-revlogv1/.hg/requires << EOF
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
17 > dotencode
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
18 > fncache
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
19 > generaldelta
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
20 > store
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
21 > EOF
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
22
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
23 $ hg -R no-revlogv1 debugupgraderepo
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
24 abort: cannot upgrade repository; requirement missing: revlogv1
30774
eaa5607132a2 debugcommands: stub for debugupgraderepo command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
25 [255]
30775
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
26
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
27 Cannot upgrade shared repositories
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
28
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
29 $ hg init share-parent
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
30 $ hg -q share share-parent share-child
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
31
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
32 $ hg -R share-child debugupgraderepo
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
33 abort: cannot upgrade repository; unsupported source requirement: shared
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
34 [255]
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
35
36373
0147a4730420 cleanup: say goodbye to manifestv2 format
Augie Fackler <augie@google.com>
parents: 35378
diff changeset
36 Do not yet support upgrading treemanifest repos
30775
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
37
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
38 $ hg --config experimental.treemanifest=true init treemanifest
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
39 $ hg -R treemanifest debugupgraderepo
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
40 abort: cannot upgrade repository; unsupported source requirement: treemanifest
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
41 [255]
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
42
36373
0147a4730420 cleanup: say goodbye to manifestv2 format
Augie Fackler <augie@google.com>
parents: 35378
diff changeset
43 Cannot add treemanifest requirement during upgrade
30775
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
44
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
45 $ hg init disallowaddedreq
36373
0147a4730420 cleanup: say goodbye to manifestv2 format
Augie Fackler <augie@google.com>
parents: 35378
diff changeset
46 $ hg -R disallowaddedreq --config experimental.treemanifest=true debugupgraderepo
0147a4730420 cleanup: say goodbye to manifestv2 format
Augie Fackler <augie@google.com>
parents: 35378
diff changeset
47 abort: cannot upgrade repository; do not support adding requirement: treemanifest
30775
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
48 [255]
30776
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
49
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
50 An upgrade of a repository created with recommended settings only suggests optimizations
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
51
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
52 $ hg init empty
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
53 $ cd empty
35336
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
54 $ hg debugformat
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
55 format-variant repo
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
56 fncache: yes
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
57 dotencode: yes
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
58 generaldelta: yes
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
59 plain-cl-delta: yes
35340
ead01b74be04 upgrade: register compression as a format variants
Boris Feld <boris.feld@octobus.net>
parents: 35338
diff changeset
60 compression: zlib
35337
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
61 $ hg debugformat --verbose
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
62 format-variant repo config default
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
63 fncache: yes yes yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
64 dotencode: yes yes yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
65 generaldelta: yes yes yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
66 plain-cl-delta: yes yes yes
35340
ead01b74be04 upgrade: register compression as a format variants
Boris Feld <boris.feld@octobus.net>
parents: 35338
diff changeset
67 compression: zlib zlib zlib
35337
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
68 $ hg debugformat --verbose --config format.usegfncache=no
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
69 format-variant repo config default
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
70 fncache: yes yes yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
71 dotencode: yes yes yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
72 generaldelta: yes yes yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
73 plain-cl-delta: yes yes yes
35340
ead01b74be04 upgrade: register compression as a format variants
Boris Feld <boris.feld@octobus.net>
parents: 35338
diff changeset
74 compression: zlib zlib zlib
35338
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
75 $ hg debugformat --verbose --config format.usegfncache=no --color=debug
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
76 format-variant repo config default
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
77 [formatvariant.name.uptodate|fncache: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
78 [formatvariant.name.uptodate|dotencode: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
79 [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
80 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
35340
ead01b74be04 upgrade: register compression as a format variants
Boris Feld <boris.feld@octobus.net>
parents: 35338
diff changeset
81 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
35377
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
82 $ hg debugformat -Tjson
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
83 [
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
84 {
35378
9144e898cad5 debugformat: embed raw values in JSON and template output
Yuya Nishihara <yuya@tcha.org>
parents: 35377
diff changeset
85 "config": true,
9144e898cad5 debugformat: embed raw values in JSON and template output
Yuya Nishihara <yuya@tcha.org>
parents: 35377
diff changeset
86 "default": true,
35377
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
87 "name": "fncache",
35378
9144e898cad5 debugformat: embed raw values in JSON and template output
Yuya Nishihara <yuya@tcha.org>
parents: 35377
diff changeset
88 "repo": true
35377
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
89 },
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
90 {
35378
9144e898cad5 debugformat: embed raw values in JSON and template output
Yuya Nishihara <yuya@tcha.org>
parents: 35377
diff changeset
91 "config": true,
9144e898cad5 debugformat: embed raw values in JSON and template output
Yuya Nishihara <yuya@tcha.org>
parents: 35377
diff changeset
92 "default": true,
35377
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
93 "name": "dotencode",
35378
9144e898cad5 debugformat: embed raw values in JSON and template output
Yuya Nishihara <yuya@tcha.org>
parents: 35377
diff changeset
94 "repo": true
35377
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
95 },
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
96 {
35378
9144e898cad5 debugformat: embed raw values in JSON and template output
Yuya Nishihara <yuya@tcha.org>
parents: 35377
diff changeset
97 "config": true,
9144e898cad5 debugformat: embed raw values in JSON and template output
Yuya Nishihara <yuya@tcha.org>
parents: 35377
diff changeset
98 "default": true,
35377
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
99 "name": "generaldelta",
35378
9144e898cad5 debugformat: embed raw values in JSON and template output
Yuya Nishihara <yuya@tcha.org>
parents: 35377
diff changeset
100 "repo": true
35377
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
101 },
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
102 {
35378
9144e898cad5 debugformat: embed raw values in JSON and template output
Yuya Nishihara <yuya@tcha.org>
parents: 35377
diff changeset
103 "config": true,
9144e898cad5 debugformat: embed raw values in JSON and template output
Yuya Nishihara <yuya@tcha.org>
parents: 35377
diff changeset
104 "default": true,
35377
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
105 "name": "plain-cl-delta",
35378
9144e898cad5 debugformat: embed raw values in JSON and template output
Yuya Nishihara <yuya@tcha.org>
parents: 35377
diff changeset
106 "repo": true
35377
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
107 },
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
108 {
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
109 "config": "zlib",
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
110 "default": "zlib",
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
111 "name": "compression",
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
112 "repo": "zlib"
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
113 }
c0b6fa74e007 debugformat: flush formatter output per item
Yuya Nishihara <yuya@tcha.org>
parents: 35363
diff changeset
114 ]
30776
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
115 $ hg debugupgraderepo
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
116 (no feature deficiencies found in existing repository)
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
117 performing an upgrade with "--run" will make the following changes:
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
118
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
119 requirements
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
120 preserved: dotencode, fncache, generaldelta, revlogv1, store
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
121
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
122 additional optimizations are available by specifying "--optimize <name>":
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
123
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
124 redeltaparent
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
125 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
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
126
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
127 redeltamultibase
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
128 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
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
129
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
130 redeltaall
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
131 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
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
132
35345
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
133 redeltafulladd
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
134 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 "redeltaall" but even slower since more logic is involved.
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
135
30776
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
136
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
137 --optimize can be used to add optimizations
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
138
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
139 $ hg debugupgrade --optimize redeltaparent
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
140 (no feature deficiencies found in existing repository)
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
141 performing an upgrade with "--run" will make the following changes:
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
142
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
143 requirements
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
144 preserved: dotencode, fncache, generaldelta, revlogv1, store
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
145
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
146 redeltaparent
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
147 deltas within internal storage will choose a new base revision if needed
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
148
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
149 additional optimizations are available by specifying "--optimize <name>":
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
150
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
151 redeltamultibase
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
152 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
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
153
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
154 redeltaall
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
155 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
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
156
35345
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
157 redeltafulladd
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
158 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 "redeltaall" but even slower since more logic is involved.
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
159
30776
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
160
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
161 Various sub-optimal detections work
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
162
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
163 $ cat > .hg/requires << EOF
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
164 > revlogv1
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
165 > store
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
166 > EOF
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
167
35336
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
168 $ hg debugformat
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
169 format-variant repo
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
170 fncache: no
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
171 dotencode: no
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
172 generaldelta: no
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
173 plain-cl-delta: yes
35340
ead01b74be04 upgrade: register compression as a format variants
Boris Feld <boris.feld@octobus.net>
parents: 35338
diff changeset
174 compression: zlib
35337
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
175 $ hg debugformat --verbose
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
176 format-variant repo config default
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
177 fncache: no yes yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
178 dotencode: no yes yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
179 generaldelta: no yes yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
180 plain-cl-delta: yes yes yes
35340
ead01b74be04 upgrade: register compression as a format variants
Boris Feld <boris.feld@octobus.net>
parents: 35338
diff changeset
181 compression: zlib zlib zlib
35337
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
182 $ hg debugformat --verbose --config format.usegeneraldelta=no
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
183 format-variant repo config default
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
184 fncache: no yes yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
185 dotencode: no yes yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
186 generaldelta: no no yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
187 plain-cl-delta: yes yes yes
35340
ead01b74be04 upgrade: register compression as a format variants
Boris Feld <boris.feld@octobus.net>
parents: 35338
diff changeset
188 compression: zlib zlib zlib
35338
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
189 $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
190 format-variant repo config default
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
191 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
192 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
193 [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
194 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
35340
ead01b74be04 upgrade: register compression as a format variants
Boris Feld <boris.feld@octobus.net>
parents: 35338
diff changeset
195 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
30776
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
196 $ hg debugupgraderepo
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
197 repository lacks features recommended by current config options:
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
198
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
199 fncache
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
200 long and reserved filenames may not work correctly; repository performance is sub-optimal
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
201
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
202 dotencode
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
203 storage of filenames beginning with a period or space may not work correctly
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
204
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
205 generaldelta
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
206 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
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
207
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
208
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
209 performing an upgrade with "--run" will make the following changes:
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
210
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
211 requirements
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
212 preserved: revlogv1, store
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
213 added: dotencode, fncache, generaldelta
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
214
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
215 fncache
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
216 repository will be more resilient to storing certain paths and performance of certain operations should be improved
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
217
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
218 dotencode
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
219 repository will be better able to store files beginning with a space or period
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
220
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
221 generaldelta
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
222 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
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
223
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
224 additional optimizations are available by specifying "--optimize <name>":
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
225
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
226 redeltaparent
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
227 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
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
228
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
229 redeltamultibase
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
230 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
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
231
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
232 redeltaall
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
233 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
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
234
35345
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
235 redeltafulladd
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
236 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 "redeltaall" but even slower since more logic is involved.
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
237
30776
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
238
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
239 $ hg --config format.dotencode=false debugupgraderepo
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
240 repository lacks features recommended by current config options:
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
241
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
242 fncache
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
243 long and reserved filenames may not work correctly; repository performance is sub-optimal
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
244
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
245 generaldelta
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
246 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
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
247
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
248 repository lacks features used by the default config options:
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
249
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
250 dotencode
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
251 storage of filenames beginning with a period or space may not work correctly
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
252
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
253
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
254 performing an upgrade with "--run" will make the following changes:
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
255
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
256 requirements
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
257 preserved: revlogv1, store
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
258 added: fncache, generaldelta
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
259
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
260 fncache
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
261 repository will be more resilient to storing certain paths and performance of certain operations should be improved
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
262
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
263 generaldelta
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
264 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
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
265
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
266 additional optimizations are available by specifying "--optimize <name>":
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
267
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
268 redeltaparent
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
269 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
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
270
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
271 redeltamultibase
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
272 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
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
273
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
274 redeltaall
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
275 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
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
276
35345
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
277 redeltafulladd
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
278 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 "redeltaall" but even slower since more logic is involved.
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
279
30776
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
280
30777
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
281 $ cd ..
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
282
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
283 Upgrading a repository that is already modern essentially no-ops
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
284
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
285 $ hg init modern
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
286 $ hg -R modern debugupgraderepo --run
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
287 upgrade will perform the following actions:
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
288
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
289 requirements
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
290 preserved: dotencode, fncache, generaldelta, revlogv1, store
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
291
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
292 beginning upgrade...
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
293 repository locked and read-only
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
294 creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob)
30779
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
295 (it is safe to interrupt this process any time before data migration completes)
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
296 data fully migrated to temporary repository
30777
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
297 marking source repository as being upgraded; clients will be unable to read from repository
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
298 starting in-place swap of repository data
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
299 replaced files will be backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob)
30779
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
300 replacing store...
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
301 store replacement complete; repository was inconsistent for *s (glob)
30777
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
302 finalizing requirements file and making repository readable again
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
303 removing temporary repository $TESTTMP/modern/.hg/upgrade.* (glob)
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
304 copy of old repository backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob)
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
305 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
306
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
307 Upgrading a repository to generaldelta works
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
308
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
309 $ hg --config format.usegeneraldelta=false init upgradegd
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
310 $ cd upgradegd
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
311 $ touch f0
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
312 $ hg -q commit -A -m initial
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
313 $ touch f1
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
314 $ hg -q commit -A -m 'add f1'
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
315 $ hg -q up -r 0
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
316 $ touch f2
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
317 $ hg -q commit -A -m 'add f2'
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
318
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
319 $ hg debugupgraderepo --run
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
320 upgrade will perform the following actions:
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
321
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
322 requirements
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
323 preserved: dotencode, fncache, revlogv1, store
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
324 added: generaldelta
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
325
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
326 generaldelta
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
327 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
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
328
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
329 beginning upgrade...
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
330 repository locked and read-only
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
331 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
30779
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
332 (it is safe to interrupt this process any time before data migration completes)
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
333 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
334 migrating 341 bytes in store; 401 bytes tracked data
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
335 migrating 3 filelogs containing 3 revisions (0 bytes in store; 0 bytes tracked data)
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
336 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
337 migrating 1 manifests containing 3 revisions (157 bytes in store; 220 bytes tracked data)
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
338 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
339 migrating changelog containing 3 revisions (184 bytes in store; 181 bytes tracked data)
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
340 finished migrating 3 changelog revisions; change in size: 0 bytes
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
341 finished migrating 9 total revisions; total change in store size: 0 bytes
30780
2603d04889e1 repair: copy non-revlog store files during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30779
diff changeset
342 copying phaseroots
30779
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
343 data fully migrated to temporary repository
30777
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
344 marking source repository as being upgraded; clients will be unable to read from repository
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
345 starting in-place swap of repository data
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
346 replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
30779
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
347 replacing store...
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
348 store replacement complete; repository was inconsistent for *s (glob)
30777
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
349 finalizing requirements file and making repository readable again
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
350 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
351 copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
352 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
353
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
354 Original requirements backed up
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
355
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
356 $ cat .hg/upgradebackup.*/requires
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
357 dotencode
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
358 fncache
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
359 revlogv1
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
360 store
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
361
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
362 generaldelta added to original requirements files
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
363
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
364 $ cat .hg/requires
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
365 dotencode
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
366 fncache
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
367 generaldelta
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
368 revlogv1
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
369 store
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
370
30779
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
371 store directory has files we expect
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
372
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
373 $ ls .hg/store
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
374 00changelog.i
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
375 00manifest.i
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
376 data
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
377 fncache
30780
2603d04889e1 repair: copy non-revlog store files during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30779
diff changeset
378 phaseroots
30779
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
379 undo
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
380 undo.backupfiles
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
381 undo.phaseroots
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
382
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
383 manifest should be generaldelta
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
384
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
385 $ hg debugrevlog -m | grep flags
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
386 flags : inline, generaldelta
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
387
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
388 verify should be happy
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
389
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
390 $ hg verify
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
391 checking changesets
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
392 checking manifests
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
393 crosschecking files in changesets and manifests
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
394 checking files
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
395 3 files, 3 changesets, 3 total revisions
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
396
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
397 old store should be backed up
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
398
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
399 $ ls .hg/upgradebackup.*/store
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
400 00changelog.i
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
401 00manifest.i
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
402 data
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
403 fncache
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
404 phaseroots
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
405 undo
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
406 undo.backup.fncache
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
407 undo.backupfiles
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
408 undo.phaseroots
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
409
30777
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
410 $ cd ..
31798
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
411
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
412 store files with special filenames aren't encoded during copy
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
413
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
414 $ hg init store-filenames
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
415 $ cd store-filenames
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
416 $ touch foo
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
417 $ hg -q commit -A -m initial
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
418 $ touch .hg/store/.XX_special_filename
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
419
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
420 $ hg debugupgraderepo --run
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
421 upgrade will perform the following actions:
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
422
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
423 requirements
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
424 preserved: dotencode, fncache, generaldelta, revlogv1, store
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
425
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
426 beginning upgrade...
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
427 repository locked and read-only
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
428 creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
429 (it is safe to interrupt this process any time before data migration completes)
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
430 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
431 migrating 109 bytes in store; 107 bytes tracked data
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
432 migrating 1 filelogs containing 1 revisions (0 bytes in store; 0 bytes tracked data)
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
433 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
434 migrating 1 manifests containing 1 revisions (46 bytes in store; 45 bytes tracked data)
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
435 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
436 migrating changelog containing 1 revisions (63 bytes in store; 62 bytes tracked data)
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
437 finished migrating 1 changelog revisions; change in size: 0 bytes
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
438 finished migrating 3 total revisions; total change in store size: 0 bytes
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
439 copying .XX_special_filename
31799
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
440 copying phaseroots
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
441 data fully migrated to temporary repository
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
442 marking source repository as being upgraded; clients will be unable to read from repository
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
443 starting in-place swap of repository data
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
444 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
445 replacing store...
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
446 store replacement complete; repository was inconsistent for *s (glob)
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
447 finalizing requirements file and making repository readable again
31798
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
448 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
31799
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
449 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
450 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
35345
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
451 $ hg debugupgraderepo --run --optimize redeltafulladd
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
452 upgrade will perform the following actions:
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
453
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
454 requirements
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
455 preserved: dotencode, fncache, generaldelta, revlogv1, store
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
456
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
457 redeltafulladd
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
458 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
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
459
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
460 beginning upgrade...
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
461 repository locked and read-only
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
462 creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
463 (it is safe to interrupt this process any time before data migration completes)
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
464 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
465 migrating 109 bytes in store; 107 bytes tracked data
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
466 migrating 1 filelogs containing 1 revisions (0 bytes in store; 0 bytes tracked data)
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
467 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
468 migrating 1 manifests containing 1 revisions (46 bytes in store; 45 bytes tracked data)
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
469 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
470 migrating changelog containing 1 revisions (63 bytes in store; 62 bytes tracked data)
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
471 finished migrating 1 changelog revisions; change in size: 0 bytes
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
472 finished migrating 3 total revisions; total change in store size: 0 bytes
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
473 copying .XX_special_filename
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
474 copying phaseroots
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
475 data fully migrated to temporary repository
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
476 marking source repository as being upgraded; clients will be unable to read from repository
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
477 starting in-place swap of repository data
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
478 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
479 replacing store...
35360
6699825f1242 test-upgrade-repo: glob away timing values
Matt Harbison <matt_harbison@yahoo.com>
parents: 35345
diff changeset
480 store replacement complete; repository was inconsistent for *s (glob)
35345
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
481 finalizing requirements file and making repository readable again
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
482 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
483 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
6226668a7169 upgrade: add a 'redeltafullall' mode
Boris Feld <boris.feld@octobus.net>
parents: 35342
diff changeset
484 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
31798
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
485
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
486 $ cd ..
35303
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
487
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
488 Check upgrading a large file repository
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
489 ---------------------------------------
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
490
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
491 $ hg init largefilesrepo
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
492 $ cat << EOF >> largefilesrepo/.hg/hgrc
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
493 > [extensions]
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
494 > largefiles =
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
495 > EOF
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
496
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
497 $ cd largefilesrepo
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
498 $ touch foo
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
499 $ hg add --large foo
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
500 $ hg -q commit -m initial
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
501 $ cat .hg/requires
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
502 dotencode
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
503 fncache
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
504 generaldelta
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
505 largefiles
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
506 revlogv1
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
507 store
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
508
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
509 $ hg debugupgraderepo --run
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
510 upgrade will perform the following actions:
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
511
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
512 requirements
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
513 preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, store
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
514
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
515 beginning upgrade...
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
516 repository locked and read-only
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
517 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
518 (it is safe to interrupt this process any time before data migration completes)
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
519 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
520 migrating 163 bytes in store; 160 bytes tracked data
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
521 migrating 1 filelogs containing 1 revisions (42 bytes in store; 41 bytes tracked data)
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
522 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
523 migrating 1 manifests containing 1 revisions (52 bytes in store; 51 bytes tracked data)
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
524 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
525 migrating changelog containing 1 revisions (69 bytes in store; 68 bytes tracked data)
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
526 finished migrating 1 changelog revisions; change in size: 0 bytes
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
527 finished migrating 3 total revisions; total change in store size: 0 bytes
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
528 copying phaseroots
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
529 data fully migrated to temporary repository
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
530 marking source repository as being upgraded; clients will be unable to read from repository
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
531 starting in-place swap of repository data
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
532 replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
533 replacing store...
35360
6699825f1242 test-upgrade-repo: glob away timing values
Matt Harbison <matt_harbison@yahoo.com>
parents: 35345
diff changeset
534 store replacement complete; repository was inconsistent for *s (glob)
35303
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
535 finalizing requirements file and making repository readable again
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
536 removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
537 copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
538 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
539 $ cat .hg/requires
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
540 dotencode
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
541 fncache
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
542 generaldelta
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
543 largefiles
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
544 revlogv1
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
545 store
35341
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
546
35361
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
547 $ cat << EOF >> .hg/hgrc
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
548 > [extensions]
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
549 > lfs =
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
550 > [lfs]
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
551 > threshold = 10
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
552 > EOF
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
553 $ echo '123456789012345' > lfs.bin
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
554 $ hg ci -Am 'lfs.bin'
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
555 adding lfs.bin
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
556 $ grep lfs .hg/requires
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
557 lfs
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
558 $ find .hg/store/lfs -type f
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
559 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
560
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
561 $ hg debugupgraderepo --run
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
562 upgrade will perform the following actions:
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
563
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
564 requirements
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
565 preserved: dotencode, fncache, generaldelta, largefiles, lfs, revlogv1, store
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
566
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
567 beginning upgrade...
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
568 repository locked and read-only
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
569 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
570 (it is safe to interrupt this process any time before data migration completes)
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
571 migrating 6 total revisions (2 in filelogs, 2 in manifests, 2 in changelog)
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
572 migrating 417 bytes in store; 467 bytes tracked data
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
573 migrating 2 filelogs containing 2 revisions (168 bytes in store; 182 bytes tracked data)
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
574 finished migrating 2 filelog revisions across 2 filelogs; change in size: 0 bytes
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
575 migrating 1 manifests containing 2 revisions (113 bytes in store; 151 bytes tracked data)
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
576 finished migrating 2 manifest revisions across 1 manifests; change in size: 0 bytes
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
577 migrating changelog containing 2 revisions (136 bytes in store; 134 bytes tracked data)
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
578 finished migrating 2 changelog revisions; change in size: 0 bytes
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
579 finished migrating 6 total revisions; total change in store size: 0 bytes
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
580 copying phaseroots
35363
b0ba1539af01 lfs: restore the local blob store after a repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35361
diff changeset
581 copying lfs blob d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
35361
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
582 data fully migrated to temporary repository
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
583 marking source repository as being upgraded; clients will be unable to read from repository
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
584 starting in-place swap of repository data
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
585 replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
586 replacing store...
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
587 store replacement complete; repository was inconsistent for *s (glob)
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
588 finalizing requirements file and making repository readable again
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
589 removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
590 copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
591 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
592
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
593 $ grep lfs .hg/requires
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
594 lfs
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
595 $ find .hg/store/lfs -type f
35363
b0ba1539af01 lfs: restore the local blob store after a repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35361
diff changeset
596 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
35361
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
597 $ hg verify
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
598 checking changesets
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
599 checking manifests
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
600 crosschecking files in changesets and manifests
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
601 checking files
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
602 2 files, 2 changesets, 2 total revisions
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
603 $ hg debugdata lfs.bin 0
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
604 version https://git-lfs.github.com/spec/v1
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
605 oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
606 size 16
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
607 x-is-binary 0
b2f628dd99c3 tests: add coverage for preserving 'lfs' requirement on repo upgrade
Matt Harbison <matt_harbison@yahoo.com>
parents: 35360
diff changeset
608
35341
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
609 $ cd ..
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
610
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
611 repository config is taken in account
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
612 -------------------------------------
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
613
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
614 $ cat << EOF >> $HGRCPATH
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
615 > [format]
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
616 > maxchainlen = 1
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
617 > EOF
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
618
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
619 $ hg init localconfig
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
620 $ cd localconfig
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
621 $ cat << EOF > file
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
622 > some content
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
623 > with some length
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
624 > to make sure we get a delta
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
625 > after changes
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
626 > very long
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
627 > very long
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
628 > very long
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
629 > very long
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
630 > very long
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
631 > very long
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
632 > very long
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
633 > very long
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
634 > very long
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
635 > very long
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
636 > very long
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
637 > EOF
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
638 $ hg -q commit -A -m A
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
639 $ echo "new line" >> file
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
640 $ hg -q commit -m B
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
641 $ echo "new line" >> file
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
642 $ hg -q commit -m C
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
643
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
644 $ cat << EOF >> .hg/hgrc
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
645 > [format]
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
646 > maxchainlen = 9001
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
647 > EOF
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
648 $ hg config format
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
649 format.maxchainlen=9001
37281
806b07d7c7d6 tests: use debugdeltachain where appropriate
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36373
diff changeset
650 $ hg debugdeltachain file
806b07d7c7d6 tests: use debugdeltachain where appropriate
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36373
diff changeset
651 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
806b07d7c7d6 tests: use debugdeltachain where appropriate
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36373
diff changeset
652 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000
806b07d7c7d6 tests: use debugdeltachain where appropriate
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36373
diff changeset
653 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000
806b07d7c7d6 tests: use debugdeltachain where appropriate
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36373
diff changeset
654 2 2 1 -1 base 84 200 84 0.42000 84 0 0.00000
35341
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
655
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
656 $ hg debugupgraderepo --run --optimize redeltaall
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
657 upgrade will perform the following actions:
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
658
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
659 requirements
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
660 preserved: dotencode, fncache, generaldelta, revlogv1, store
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
661
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
662 redeltaall
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
663 deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
664
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
665 beginning upgrade...
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
666 repository locked and read-only
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
667 creating temporary repository to stage migrated data: $TESTTMP/localconfig/.hg/upgrade.* (glob)
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
668 (it is safe to interrupt this process any time before data migration completes)
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
669 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
670 migrating 497 bytes in store; 882 bytes tracked data
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
671 migrating 1 filelogs containing 3 revisions (182 bytes in store; 573 bytes tracked data)
35342
75520786ad2f upgrade: use the repository 'ui' as the base for the new repository
Boris Feld <boris.feld@octobus.net>
parents: 35341
diff changeset
672 finished migrating 3 filelog revisions across 1 filelogs; change in size: -63 bytes
35341
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
673 migrating 1 manifests containing 3 revisions (141 bytes in store; 138 bytes tracked data)
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
674 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
675 migrating changelog containing 3 revisions (174 bytes in store; 171 bytes tracked data)
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
676 finished migrating 3 changelog revisions; change in size: 0 bytes
35342
75520786ad2f upgrade: use the repository 'ui' as the base for the new repository
Boris Feld <boris.feld@octobus.net>
parents: 35341
diff changeset
677 finished migrating 9 total revisions; total change in store size: -63 bytes
35341
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
678 copying phaseroots
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
679 data fully migrated to temporary repository
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
680 marking source repository as being upgraded; clients will be unable to read from repository
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
681 starting in-place swap of repository data
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
682 replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
683 replacing store...
35360
6699825f1242 test-upgrade-repo: glob away timing values
Matt Harbison <matt_harbison@yahoo.com>
parents: 35345
diff changeset
684 store replacement complete; repository was inconsistent for *s (glob)
35341
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
685 finalizing requirements file and making repository readable again
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
686 removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob)
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
687 copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
688 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
37281
806b07d7c7d6 tests: use debugdeltachain where appropriate
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36373
diff changeset
689 $ hg debugdeltachain file
806b07d7c7d6 tests: use debugdeltachain where appropriate
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36373
diff changeset
690 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
806b07d7c7d6 tests: use debugdeltachain where appropriate
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36373
diff changeset
691 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000
806b07d7c7d6 tests: use debugdeltachain where appropriate
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36373
diff changeset
692 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000
806b07d7c7d6 tests: use debugdeltachain where appropriate
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36373
diff changeset
693 2 1 3 1 p1 21 200 119 0.59500 119 0 0.00000
35341
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
694 $ cd ..
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
695
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
696 $ cat << EOF >> $HGRCPATH
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
697 > [format]
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
698 > maxchainlen = 9001
cb7a0ae053c6 upgrade: add a test to show the repository config being ignored
Boris Feld <boris.feld@octobus.net>
parents: 35340
diff changeset
699 > EOF