##// END OF EJS Templates
upgrade: add a test to show the repository config being ignored...
Boris Feld -
r35342:cb7a0ae0 default
parent child Browse files
Show More
@@ -1,469 +1,561 b''
1 $ cat >> $HGRCPATH << EOF
1 $ cat >> $HGRCPATH << EOF
2 > [extensions]
2 > [extensions]
3 > share =
3 > share =
4 > EOF
4 > EOF
5
5
6 store and revlogv1 are required in source
6 store and revlogv1 are required in source
7
7
8 $ hg --config format.usestore=false init no-store
8 $ hg --config format.usestore=false init no-store
9 $ hg -R no-store debugupgraderepo
9 $ hg -R no-store debugupgraderepo
10 abort: cannot upgrade repository; requirement missing: store
10 abort: cannot upgrade repository; requirement missing: store
11 [255]
11 [255]
12
12
13 $ hg init no-revlogv1
13 $ hg init no-revlogv1
14 $ cat > no-revlogv1/.hg/requires << EOF
14 $ cat > no-revlogv1/.hg/requires << EOF
15 > dotencode
15 > dotencode
16 > fncache
16 > fncache
17 > generaldelta
17 > generaldelta
18 > store
18 > store
19 > EOF
19 > EOF
20
20
21 $ hg -R no-revlogv1 debugupgraderepo
21 $ hg -R no-revlogv1 debugupgraderepo
22 abort: cannot upgrade repository; requirement missing: revlogv1
22 abort: cannot upgrade repository; requirement missing: revlogv1
23 [255]
23 [255]
24
24
25 Cannot upgrade shared repositories
25 Cannot upgrade shared repositories
26
26
27 $ hg init share-parent
27 $ hg init share-parent
28 $ hg -q share share-parent share-child
28 $ hg -q share share-parent share-child
29
29
30 $ hg -R share-child debugupgraderepo
30 $ hg -R share-child debugupgraderepo
31 abort: cannot upgrade repository; unsupported source requirement: shared
31 abort: cannot upgrade repository; unsupported source requirement: shared
32 [255]
32 [255]
33
33
34 Do not yet support upgrading manifestv2 and treemanifest repos
34 Do not yet support upgrading manifestv2 and treemanifest repos
35
35
36 $ hg --config experimental.manifestv2=true init manifestv2
36 $ hg --config experimental.manifestv2=true init manifestv2
37 $ hg -R manifestv2 debugupgraderepo
37 $ hg -R manifestv2 debugupgraderepo
38 abort: cannot upgrade repository; unsupported source requirement: manifestv2
38 abort: cannot upgrade repository; unsupported source requirement: manifestv2
39 [255]
39 [255]
40
40
41 $ hg --config experimental.treemanifest=true init treemanifest
41 $ hg --config experimental.treemanifest=true init treemanifest
42 $ hg -R treemanifest debugupgraderepo
42 $ hg -R treemanifest debugupgraderepo
43 abort: cannot upgrade repository; unsupported source requirement: treemanifest
43 abort: cannot upgrade repository; unsupported source requirement: treemanifest
44 [255]
44 [255]
45
45
46 Cannot add manifestv2 or treemanifest requirement during upgrade
46 Cannot add manifestv2 or treemanifest requirement during upgrade
47
47
48 $ hg init disallowaddedreq
48 $ hg init disallowaddedreq
49 $ hg -R disallowaddedreq --config experimental.manifestv2=true --config experimental.treemanifest=true debugupgraderepo
49 $ hg -R disallowaddedreq --config experimental.manifestv2=true --config experimental.treemanifest=true debugupgraderepo
50 abort: cannot upgrade repository; do not support adding requirement: manifestv2, treemanifest
50 abort: cannot upgrade repository; do not support adding requirement: manifestv2, treemanifest
51 [255]
51 [255]
52
52
53 An upgrade of a repository created with recommended settings only suggests optimizations
53 An upgrade of a repository created with recommended settings only suggests optimizations
54
54
55 $ hg init empty
55 $ hg init empty
56 $ cd empty
56 $ cd empty
57 $ hg debugformat
57 $ hg debugformat
58 format-variant repo
58 format-variant repo
59 fncache: yes
59 fncache: yes
60 dotencode: yes
60 dotencode: yes
61 generaldelta: yes
61 generaldelta: yes
62 plain-cl-delta: yes
62 plain-cl-delta: yes
63 compression: zlib
63 compression: zlib
64 $ hg debugformat --verbose
64 $ hg debugformat --verbose
65 format-variant repo config default
65 format-variant repo config default
66 fncache: yes yes yes
66 fncache: yes yes yes
67 dotencode: yes yes yes
67 dotencode: yes yes yes
68 generaldelta: yes yes yes
68 generaldelta: yes yes yes
69 plain-cl-delta: yes yes yes
69 plain-cl-delta: yes yes yes
70 compression: zlib zlib zlib
70 compression: zlib zlib zlib
71 $ hg debugformat --verbose --config format.usegfncache=no
71 $ hg debugformat --verbose --config format.usegfncache=no
72 format-variant repo config default
72 format-variant repo config default
73 fncache: yes yes yes
73 fncache: yes yes yes
74 dotencode: yes yes yes
74 dotencode: yes yes yes
75 generaldelta: yes yes yes
75 generaldelta: yes yes yes
76 plain-cl-delta: yes yes yes
76 plain-cl-delta: yes yes yes
77 compression: zlib zlib zlib
77 compression: zlib zlib zlib
78 $ hg debugformat --verbose --config format.usegfncache=no --color=debug
78 $ hg debugformat --verbose --config format.usegfncache=no --color=debug
79 format-variant repo config default
79 format-variant repo config default
80 [formatvariant.name.uptodate|fncache: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
80 [formatvariant.name.uptodate|fncache: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
81 [formatvariant.name.uptodate|dotencode: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
81 [formatvariant.name.uptodate|dotencode: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
82 [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
82 [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
83 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
83 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
84 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
84 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
85 $ hg debugupgraderepo
85 $ hg debugupgraderepo
86 (no feature deficiencies found in existing repository)
86 (no feature deficiencies found in existing repository)
87 performing an upgrade with "--run" will make the following changes:
87 performing an upgrade with "--run" will make the following changes:
88
88
89 requirements
89 requirements
90 preserved: dotencode, fncache, generaldelta, revlogv1, store
90 preserved: dotencode, fncache, generaldelta, revlogv1, store
91
91
92 additional optimizations are available by specifying "--optimize <name>":
92 additional optimizations are available by specifying "--optimize <name>":
93
93
94 redeltaparent
94 redeltaparent
95 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
95 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
96
96
97 redeltamultibase
97 redeltamultibase
98 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
98 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
99
99
100 redeltaall
100 redeltaall
101 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
101 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
102
102
103
103
104 --optimize can be used to add optimizations
104 --optimize can be used to add optimizations
105
105
106 $ hg debugupgrade --optimize redeltaparent
106 $ hg debugupgrade --optimize redeltaparent
107 (no feature deficiencies found in existing repository)
107 (no feature deficiencies found in existing repository)
108 performing an upgrade with "--run" will make the following changes:
108 performing an upgrade with "--run" will make the following changes:
109
109
110 requirements
110 requirements
111 preserved: dotencode, fncache, generaldelta, revlogv1, store
111 preserved: dotencode, fncache, generaldelta, revlogv1, store
112
112
113 redeltaparent
113 redeltaparent
114 deltas within internal storage will choose a new base revision if needed
114 deltas within internal storage will choose a new base revision if needed
115
115
116 additional optimizations are available by specifying "--optimize <name>":
116 additional optimizations are available by specifying "--optimize <name>":
117
117
118 redeltamultibase
118 redeltamultibase
119 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
119 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
120
120
121 redeltaall
121 redeltaall
122 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
122 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
123
123
124
124
125 Various sub-optimal detections work
125 Various sub-optimal detections work
126
126
127 $ cat > .hg/requires << EOF
127 $ cat > .hg/requires << EOF
128 > revlogv1
128 > revlogv1
129 > store
129 > store
130 > EOF
130 > EOF
131
131
132 $ hg debugformat
132 $ hg debugformat
133 format-variant repo
133 format-variant repo
134 fncache: no
134 fncache: no
135 dotencode: no
135 dotencode: no
136 generaldelta: no
136 generaldelta: no
137 plain-cl-delta: yes
137 plain-cl-delta: yes
138 compression: zlib
138 compression: zlib
139 $ hg debugformat --verbose
139 $ hg debugformat --verbose
140 format-variant repo config default
140 format-variant repo config default
141 fncache: no yes yes
141 fncache: no yes yes
142 dotencode: no yes yes
142 dotencode: no yes yes
143 generaldelta: no yes yes
143 generaldelta: no yes yes
144 plain-cl-delta: yes yes yes
144 plain-cl-delta: yes yes yes
145 compression: zlib zlib zlib
145 compression: zlib zlib zlib
146 $ hg debugformat --verbose --config format.usegeneraldelta=no
146 $ hg debugformat --verbose --config format.usegeneraldelta=no
147 format-variant repo config default
147 format-variant repo config default
148 fncache: no yes yes
148 fncache: no yes yes
149 dotencode: no yes yes
149 dotencode: no yes yes
150 generaldelta: no no yes
150 generaldelta: no no yes
151 plain-cl-delta: yes yes yes
151 plain-cl-delta: yes yes yes
152 compression: zlib zlib zlib
152 compression: zlib zlib zlib
153 $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug
153 $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug
154 format-variant repo config default
154 format-variant repo config default
155 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
155 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
156 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
156 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
157 [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
157 [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
158 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
158 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
159 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
159 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
160 $ hg debugupgraderepo
160 $ hg debugupgraderepo
161 repository lacks features recommended by current config options:
161 repository lacks features recommended by current config options:
162
162
163 fncache
163 fncache
164 long and reserved filenames may not work correctly; repository performance is sub-optimal
164 long and reserved filenames may not work correctly; repository performance is sub-optimal
165
165
166 dotencode
166 dotencode
167 storage of filenames beginning with a period or space may not work correctly
167 storage of filenames beginning with a period or space may not work correctly
168
168
169 generaldelta
169 generaldelta
170 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
170 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
171
171
172
172
173 performing an upgrade with "--run" will make the following changes:
173 performing an upgrade with "--run" will make the following changes:
174
174
175 requirements
175 requirements
176 preserved: revlogv1, store
176 preserved: revlogv1, store
177 added: dotencode, fncache, generaldelta
177 added: dotencode, fncache, generaldelta
178
178
179 fncache
179 fncache
180 repository will be more resilient to storing certain paths and performance of certain operations should be improved
180 repository will be more resilient to storing certain paths and performance of certain operations should be improved
181
181
182 dotencode
182 dotencode
183 repository will be better able to store files beginning with a space or period
183 repository will be better able to store files beginning with a space or period
184
184
185 generaldelta
185 generaldelta
186 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
186 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
187
187
188 additional optimizations are available by specifying "--optimize <name>":
188 additional optimizations are available by specifying "--optimize <name>":
189
189
190 redeltaparent
190 redeltaparent
191 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
191 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
192
192
193 redeltamultibase
193 redeltamultibase
194 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
194 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
195
195
196 redeltaall
196 redeltaall
197 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
197 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
198
198
199
199
200 $ hg --config format.dotencode=false debugupgraderepo
200 $ hg --config format.dotencode=false debugupgraderepo
201 repository lacks features recommended by current config options:
201 repository lacks features recommended by current config options:
202
202
203 fncache
203 fncache
204 long and reserved filenames may not work correctly; repository performance is sub-optimal
204 long and reserved filenames may not work correctly; repository performance is sub-optimal
205
205
206 generaldelta
206 generaldelta
207 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
207 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
208
208
209 repository lacks features used by the default config options:
209 repository lacks features used by the default config options:
210
210
211 dotencode
211 dotencode
212 storage of filenames beginning with a period or space may not work correctly
212 storage of filenames beginning with a period or space may not work correctly
213
213
214
214
215 performing an upgrade with "--run" will make the following changes:
215 performing an upgrade with "--run" will make the following changes:
216
216
217 requirements
217 requirements
218 preserved: revlogv1, store
218 preserved: revlogv1, store
219 added: fncache, generaldelta
219 added: fncache, generaldelta
220
220
221 fncache
221 fncache
222 repository will be more resilient to storing certain paths and performance of certain operations should be improved
222 repository will be more resilient to storing certain paths and performance of certain operations should be improved
223
223
224 generaldelta
224 generaldelta
225 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
225 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
226
226
227 additional optimizations are available by specifying "--optimize <name>":
227 additional optimizations are available by specifying "--optimize <name>":
228
228
229 redeltaparent
229 redeltaparent
230 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
230 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
231
231
232 redeltamultibase
232 redeltamultibase
233 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
233 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
234
234
235 redeltaall
235 redeltaall
236 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
236 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
237
237
238
238
239 $ cd ..
239 $ cd ..
240
240
241 Upgrading a repository that is already modern essentially no-ops
241 Upgrading a repository that is already modern essentially no-ops
242
242
243 $ hg init modern
243 $ hg init modern
244 $ hg -R modern debugupgraderepo --run
244 $ hg -R modern debugupgraderepo --run
245 upgrade will perform the following actions:
245 upgrade will perform the following actions:
246
246
247 requirements
247 requirements
248 preserved: dotencode, fncache, generaldelta, revlogv1, store
248 preserved: dotencode, fncache, generaldelta, revlogv1, store
249
249
250 beginning upgrade...
250 beginning upgrade...
251 repository locked and read-only
251 repository locked and read-only
252 creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob)
252 creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob)
253 (it is safe to interrupt this process any time before data migration completes)
253 (it is safe to interrupt this process any time before data migration completes)
254 data fully migrated to temporary repository
254 data fully migrated to temporary repository
255 marking source repository as being upgraded; clients will be unable to read from repository
255 marking source repository as being upgraded; clients will be unable to read from repository
256 starting in-place swap of repository data
256 starting in-place swap of repository data
257 replaced files will be backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob)
257 replaced files will be backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob)
258 replacing store...
258 replacing store...
259 store replacement complete; repository was inconsistent for *s (glob)
259 store replacement complete; repository was inconsistent for *s (glob)
260 finalizing requirements file and making repository readable again
260 finalizing requirements file and making repository readable again
261 removing temporary repository $TESTTMP/modern/.hg/upgrade.* (glob)
261 removing temporary repository $TESTTMP/modern/.hg/upgrade.* (glob)
262 copy of old repository backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob)
262 copy of old repository backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob)
263 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
263 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
264
264
265 Upgrading a repository to generaldelta works
265 Upgrading a repository to generaldelta works
266
266
267 $ hg --config format.usegeneraldelta=false init upgradegd
267 $ hg --config format.usegeneraldelta=false init upgradegd
268 $ cd upgradegd
268 $ cd upgradegd
269 $ touch f0
269 $ touch f0
270 $ hg -q commit -A -m initial
270 $ hg -q commit -A -m initial
271 $ touch f1
271 $ touch f1
272 $ hg -q commit -A -m 'add f1'
272 $ hg -q commit -A -m 'add f1'
273 $ hg -q up -r 0
273 $ hg -q up -r 0
274 $ touch f2
274 $ touch f2
275 $ hg -q commit -A -m 'add f2'
275 $ hg -q commit -A -m 'add f2'
276
276
277 $ hg debugupgraderepo --run
277 $ hg debugupgraderepo --run
278 upgrade will perform the following actions:
278 upgrade will perform the following actions:
279
279
280 requirements
280 requirements
281 preserved: dotencode, fncache, revlogv1, store
281 preserved: dotencode, fncache, revlogv1, store
282 added: generaldelta
282 added: generaldelta
283
283
284 generaldelta
284 generaldelta
285 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
285 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
286
286
287 beginning upgrade...
287 beginning upgrade...
288 repository locked and read-only
288 repository locked and read-only
289 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
289 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
290 (it is safe to interrupt this process any time before data migration completes)
290 (it is safe to interrupt this process any time before data migration completes)
291 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
291 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
292 migrating 341 bytes in store; 401 bytes tracked data
292 migrating 341 bytes in store; 401 bytes tracked data
293 migrating 3 filelogs containing 3 revisions (0 bytes in store; 0 bytes tracked data)
293 migrating 3 filelogs containing 3 revisions (0 bytes in store; 0 bytes tracked data)
294 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
294 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
295 migrating 1 manifests containing 3 revisions (157 bytes in store; 220 bytes tracked data)
295 migrating 1 manifests containing 3 revisions (157 bytes in store; 220 bytes tracked data)
296 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
296 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
297 migrating changelog containing 3 revisions (184 bytes in store; 181 bytes tracked data)
297 migrating changelog containing 3 revisions (184 bytes in store; 181 bytes tracked data)
298 finished migrating 3 changelog revisions; change in size: 0 bytes
298 finished migrating 3 changelog revisions; change in size: 0 bytes
299 finished migrating 9 total revisions; total change in store size: 0 bytes
299 finished migrating 9 total revisions; total change in store size: 0 bytes
300 copying phaseroots
300 copying phaseroots
301 data fully migrated to temporary repository
301 data fully migrated to temporary repository
302 marking source repository as being upgraded; clients will be unable to read from repository
302 marking source repository as being upgraded; clients will be unable to read from repository
303 starting in-place swap of repository data
303 starting in-place swap of repository data
304 replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
304 replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
305 replacing store...
305 replacing store...
306 store replacement complete; repository was inconsistent for *s (glob)
306 store replacement complete; repository was inconsistent for *s (glob)
307 finalizing requirements file and making repository readable again
307 finalizing requirements file and making repository readable again
308 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
308 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
309 copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
309 copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
310 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
310 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
311
311
312 Original requirements backed up
312 Original requirements backed up
313
313
314 $ cat .hg/upgradebackup.*/requires
314 $ cat .hg/upgradebackup.*/requires
315 dotencode
315 dotencode
316 fncache
316 fncache
317 revlogv1
317 revlogv1
318 store
318 store
319
319
320 generaldelta added to original requirements files
320 generaldelta added to original requirements files
321
321
322 $ cat .hg/requires
322 $ cat .hg/requires
323 dotencode
323 dotencode
324 fncache
324 fncache
325 generaldelta
325 generaldelta
326 revlogv1
326 revlogv1
327 store
327 store
328
328
329 store directory has files we expect
329 store directory has files we expect
330
330
331 $ ls .hg/store
331 $ ls .hg/store
332 00changelog.i
332 00changelog.i
333 00manifest.i
333 00manifest.i
334 data
334 data
335 fncache
335 fncache
336 phaseroots
336 phaseroots
337 undo
337 undo
338 undo.backupfiles
338 undo.backupfiles
339 undo.phaseroots
339 undo.phaseroots
340
340
341 manifest should be generaldelta
341 manifest should be generaldelta
342
342
343 $ hg debugrevlog -m | grep flags
343 $ hg debugrevlog -m | grep flags
344 flags : inline, generaldelta
344 flags : inline, generaldelta
345
345
346 verify should be happy
346 verify should be happy
347
347
348 $ hg verify
348 $ hg verify
349 checking changesets
349 checking changesets
350 checking manifests
350 checking manifests
351 crosschecking files in changesets and manifests
351 crosschecking files in changesets and manifests
352 checking files
352 checking files
353 3 files, 3 changesets, 3 total revisions
353 3 files, 3 changesets, 3 total revisions
354
354
355 old store should be backed up
355 old store should be backed up
356
356
357 $ ls .hg/upgradebackup.*/store
357 $ ls .hg/upgradebackup.*/store
358 00changelog.i
358 00changelog.i
359 00manifest.i
359 00manifest.i
360 data
360 data
361 fncache
361 fncache
362 phaseroots
362 phaseroots
363 undo
363 undo
364 undo.backup.fncache
364 undo.backup.fncache
365 undo.backupfiles
365 undo.backupfiles
366 undo.phaseroots
366 undo.phaseroots
367
367
368 $ cd ..
368 $ cd ..
369
369
370 store files with special filenames aren't encoded during copy
370 store files with special filenames aren't encoded during copy
371
371
372 $ hg init store-filenames
372 $ hg init store-filenames
373 $ cd store-filenames
373 $ cd store-filenames
374 $ touch foo
374 $ touch foo
375 $ hg -q commit -A -m initial
375 $ hg -q commit -A -m initial
376 $ touch .hg/store/.XX_special_filename
376 $ touch .hg/store/.XX_special_filename
377
377
378 $ hg debugupgraderepo --run
378 $ hg debugupgraderepo --run
379 upgrade will perform the following actions:
379 upgrade will perform the following actions:
380
380
381 requirements
381 requirements
382 preserved: dotencode, fncache, generaldelta, revlogv1, store
382 preserved: dotencode, fncache, generaldelta, revlogv1, store
383
383
384 beginning upgrade...
384 beginning upgrade...
385 repository locked and read-only
385 repository locked and read-only
386 creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
386 creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
387 (it is safe to interrupt this process any time before data migration completes)
387 (it is safe to interrupt this process any time before data migration completes)
388 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
388 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
389 migrating 109 bytes in store; 107 bytes tracked data
389 migrating 109 bytes in store; 107 bytes tracked data
390 migrating 1 filelogs containing 1 revisions (0 bytes in store; 0 bytes tracked data)
390 migrating 1 filelogs containing 1 revisions (0 bytes in store; 0 bytes tracked data)
391 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
391 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
392 migrating 1 manifests containing 1 revisions (46 bytes in store; 45 bytes tracked data)
392 migrating 1 manifests containing 1 revisions (46 bytes in store; 45 bytes tracked data)
393 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
393 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
394 migrating changelog containing 1 revisions (63 bytes in store; 62 bytes tracked data)
394 migrating changelog containing 1 revisions (63 bytes in store; 62 bytes tracked data)
395 finished migrating 1 changelog revisions; change in size: 0 bytes
395 finished migrating 1 changelog revisions; change in size: 0 bytes
396 finished migrating 3 total revisions; total change in store size: 0 bytes
396 finished migrating 3 total revisions; total change in store size: 0 bytes
397 copying .XX_special_filename
397 copying .XX_special_filename
398 copying phaseroots
398 copying phaseroots
399 data fully migrated to temporary repository
399 data fully migrated to temporary repository
400 marking source repository as being upgraded; clients will be unable to read from repository
400 marking source repository as being upgraded; clients will be unable to read from repository
401 starting in-place swap of repository data
401 starting in-place swap of repository data
402 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
402 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
403 replacing store...
403 replacing store...
404 store replacement complete; repository was inconsistent for *s (glob)
404 store replacement complete; repository was inconsistent for *s (glob)
405 finalizing requirements file and making repository readable again
405 finalizing requirements file and making repository readable again
406 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
406 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
407 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
407 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
408 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
408 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
409
409
410 $ cd ..
410 $ cd ..
411
411
412 Check upgrading a large file repository
412 Check upgrading a large file repository
413 ---------------------------------------
413 ---------------------------------------
414
414
415 $ hg init largefilesrepo
415 $ hg init largefilesrepo
416 $ cat << EOF >> largefilesrepo/.hg/hgrc
416 $ cat << EOF >> largefilesrepo/.hg/hgrc
417 > [extensions]
417 > [extensions]
418 > largefiles =
418 > largefiles =
419 > EOF
419 > EOF
420
420
421 $ cd largefilesrepo
421 $ cd largefilesrepo
422 $ touch foo
422 $ touch foo
423 $ hg add --large foo
423 $ hg add --large foo
424 $ hg -q commit -m initial
424 $ hg -q commit -m initial
425 $ cat .hg/requires
425 $ cat .hg/requires
426 dotencode
426 dotencode
427 fncache
427 fncache
428 generaldelta
428 generaldelta
429 largefiles
429 largefiles
430 revlogv1
430 revlogv1
431 store
431 store
432
432
433 $ hg debugupgraderepo --run
433 $ hg debugupgraderepo --run
434 upgrade will perform the following actions:
434 upgrade will perform the following actions:
435
435
436 requirements
436 requirements
437 preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, store
437 preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, store
438
438
439 beginning upgrade...
439 beginning upgrade...
440 repository locked and read-only
440 repository locked and read-only
441 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
441 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
442 (it is safe to interrupt this process any time before data migration completes)
442 (it is safe to interrupt this process any time before data migration completes)
443 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
443 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
444 migrating 163 bytes in store; 160 bytes tracked data
444 migrating 163 bytes in store; 160 bytes tracked data
445 migrating 1 filelogs containing 1 revisions (42 bytes in store; 41 bytes tracked data)
445 migrating 1 filelogs containing 1 revisions (42 bytes in store; 41 bytes tracked data)
446 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
446 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
447 migrating 1 manifests containing 1 revisions (52 bytes in store; 51 bytes tracked data)
447 migrating 1 manifests containing 1 revisions (52 bytes in store; 51 bytes tracked data)
448 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
448 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
449 migrating changelog containing 1 revisions (69 bytes in store; 68 bytes tracked data)
449 migrating changelog containing 1 revisions (69 bytes in store; 68 bytes tracked data)
450 finished migrating 1 changelog revisions; change in size: 0 bytes
450 finished migrating 1 changelog revisions; change in size: 0 bytes
451 finished migrating 3 total revisions; total change in store size: 0 bytes
451 finished migrating 3 total revisions; total change in store size: 0 bytes
452 copying phaseroots
452 copying phaseroots
453 data fully migrated to temporary repository
453 data fully migrated to temporary repository
454 marking source repository as being upgraded; clients will be unable to read from repository
454 marking source repository as being upgraded; clients will be unable to read from repository
455 starting in-place swap of repository data
455 starting in-place swap of repository data
456 replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
456 replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
457 replacing store...
457 replacing store...
458 store replacement complete; repository was inconsistent for 0.0s
458 store replacement complete; repository was inconsistent for 0.0s
459 finalizing requirements file and making repository readable again
459 finalizing requirements file and making repository readable again
460 removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
460 removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
461 copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
461 copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
462 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
462 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
463 $ cat .hg/requires
463 $ cat .hg/requires
464 dotencode
464 dotencode
465 fncache
465 fncache
466 generaldelta
466 generaldelta
467 largefiles
467 largefiles
468 revlogv1
468 revlogv1
469 store
469 store
470
471 $ cd ..
472
473 repository config is taken in account
474 -------------------------------------
475
476 $ cat << EOF >> $HGRCPATH
477 > [format]
478 > maxchainlen = 1
479 > EOF
480
481 $ hg init localconfig
482 $ cd localconfig
483 $ cat << EOF > file
484 > some content
485 > with some length
486 > to make sure we get a delta
487 > after changes
488 > very long
489 > very long
490 > very long
491 > very long
492 > very long
493 > very long
494 > very long
495 > very long
496 > very long
497 > very long
498 > very long
499 > EOF
500 $ hg -q commit -A -m A
501 $ echo "new line" >> file
502 $ hg -q commit -m B
503 $ echo "new line" >> file
504 $ hg -q commit -m C
505
506 $ cat << EOF >> .hg/hgrc
507 > [format]
508 > maxchainlen = 9001
509 > EOF
510 $ hg config format
511 format.maxchainlen=9001
512 $ hg debugindex file
513 rev offset length delta linkrev nodeid p1 p2
514 0 0 77 -1 0 bcc1d3df78b2 000000000000 000000000000
515 1 77 21 0 1 af3e29f7a72e bcc1d3df78b2 000000000000
516 2 98 84 -1 2 8daf79c5522b af3e29f7a72e 000000000000
517
518 $ hg debugupgraderepo --run --optimize redeltaall
519 upgrade will perform the following actions:
520
521 requirements
522 preserved: dotencode, fncache, generaldelta, revlogv1, store
523
524 redeltaall
525 deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time
526
527 beginning upgrade...
528 repository locked and read-only
529 creating temporary repository to stage migrated data: $TESTTMP/localconfig/.hg/upgrade.* (glob)
530 (it is safe to interrupt this process any time before data migration completes)
531 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
532 migrating 497 bytes in store; 882 bytes tracked data
533 migrating 1 filelogs containing 3 revisions (182 bytes in store; 573 bytes tracked data)
534 finished migrating 3 filelog revisions across 1 filelogs; change in size: 0 bytes
535 migrating 1 manifests containing 3 revisions (141 bytes in store; 138 bytes tracked data)
536 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
537 migrating changelog containing 3 revisions (174 bytes in store; 171 bytes tracked data)
538 finished migrating 3 changelog revisions; change in size: 0 bytes
539 finished migrating 9 total revisions; total change in store size: 0 bytes
540 copying phaseroots
541 data fully migrated to temporary repository
542 marking source repository as being upgraded; clients will be unable to read from repository
543 starting in-place swap of repository data
544 replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
545 replacing store...
546 store replacement complete; repository was inconsistent for 0.0s
547 finalizing requirements file and making repository readable again
548 removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob)
549 copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
550 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
551 $ hg debugindex file
552 rev offset length delta linkrev nodeid p1 p2
553 0 0 77 -1 0 bcc1d3df78b2 000000000000 000000000000
554 1 77 21 0 1 af3e29f7a72e bcc1d3df78b2 000000000000
555 2 98 84 -1 2 8daf79c5522b af3e29f7a72e 000000000000
556 $ cd ..
557
558 $ cat << EOF >> $HGRCPATH
559 > [format]
560 > maxchainlen = 9001
561 > EOF
General Comments 0
You need to be logged in to leave comments. Login now