##// END OF EJS Templates
test: explicitly use zlib compression in tests/test-upgrade-repo.t...
marmoute -
r47608:1a17c35f default
parent child Browse files
Show More
@@ -1,1516 +1,1520 b''
1 #require no-reposimplestore
1 #require no-reposimplestore
2
2
3 $ cat >> $HGRCPATH << EOF
3 $ cat >> $HGRCPATH << EOF
4 > [extensions]
4 > [extensions]
5 > share =
5 > share =
6 > [format]
7 > # stabilize test accross variant
8 > revlog-compression=zlib
6 > EOF
9 > EOF
7
10
8 store and revlogv1 are required in source
11 store and revlogv1 are required in source
9
12
10 $ hg --config format.usestore=false init no-store
13 $ hg --config format.usestore=false init no-store
11 $ hg -R no-store debugupgraderepo
14 $ hg -R no-store debugupgraderepo
12 abort: cannot upgrade repository; requirement missing: store
15 abort: cannot upgrade repository; requirement missing: store
13 [255]
16 [255]
14
17
15 $ hg init no-revlogv1
18 $ hg init no-revlogv1
16 $ cat > no-revlogv1/.hg/requires << EOF
19 $ cat > no-revlogv1/.hg/requires << EOF
17 > dotencode
20 > dotencode
18 > fncache
21 > fncache
19 > generaldelta
22 > generaldelta
20 > store
23 > store
21 > EOF
24 > EOF
22
25
23 $ hg -R no-revlogv1 debugupgraderepo
26 $ hg -R no-revlogv1 debugupgraderepo
24 abort: cannot upgrade repository; missing a revlog version
27 abort: cannot upgrade repository; missing a revlog version
25 [255]
28 [255]
26
29
27 Cannot upgrade shared repositories
30 Cannot upgrade shared repositories
28
31
29 $ hg init share-parent
32 $ hg init share-parent
30 $ hg -q share share-parent share-child
33 $ hg -q share share-parent share-child
31
34
32 $ hg -R share-child debugupgraderepo
35 $ hg -R share-child debugupgraderepo
33 abort: cannot upgrade repository; unsupported source requirement: shared
36 abort: cannot upgrade repository; unsupported source requirement: shared
34 [255]
37 [255]
35
38
36 Do not yet support upgrading treemanifest repos
39 Do not yet support upgrading treemanifest repos
37
40
38 $ hg --config experimental.treemanifest=true init treemanifest
41 $ hg --config experimental.treemanifest=true init treemanifest
39 $ hg -R treemanifest debugupgraderepo
42 $ hg -R treemanifest debugupgraderepo
40 abort: cannot upgrade repository; unsupported source requirement: treemanifest
43 abort: cannot upgrade repository; unsupported source requirement: treemanifest
41 [255]
44 [255]
42
45
43 Cannot add treemanifest requirement during upgrade
46 Cannot add treemanifest requirement during upgrade
44
47
45 $ hg init disallowaddedreq
48 $ hg init disallowaddedreq
46 $ hg -R disallowaddedreq --config experimental.treemanifest=true debugupgraderepo
49 $ hg -R disallowaddedreq --config experimental.treemanifest=true debugupgraderepo
47 abort: cannot upgrade repository; do not support adding requirement: treemanifest
50 abort: cannot upgrade repository; do not support adding requirement: treemanifest
48 [255]
51 [255]
49
52
50 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
51
54
52 $ hg init empty
55 $ hg init empty
53 $ cd empty
56 $ cd empty
54 $ hg debugformat
57 $ hg debugformat
55 format-variant repo
58 format-variant repo
56 fncache: yes
59 fncache: yes
57 dotencode: yes
60 dotencode: yes
58 generaldelta: yes
61 generaldelta: yes
59 share-safe: no
62 share-safe: no
60 sparserevlog: yes
63 sparserevlog: yes
61 persistent-nodemap: no
64 persistent-nodemap: no
62 copies-sdc: no
65 copies-sdc: no
63 revlog-v2: no
66 revlog-v2: no
64 plain-cl-delta: yes
67 plain-cl-delta: yes
65 compression: zlib
68 compression: zlib
66 compression-level: default
69 compression-level: default
67 $ hg debugformat --verbose
70 $ hg debugformat --verbose
68 format-variant repo config default
71 format-variant repo config default
69 fncache: yes yes yes
72 fncache: yes yes yes
70 dotencode: yes yes yes
73 dotencode: yes yes yes
71 generaldelta: yes yes yes
74 generaldelta: yes yes yes
72 share-safe: no no no
75 share-safe: no no no
73 sparserevlog: yes yes yes
76 sparserevlog: yes yes yes
74 persistent-nodemap: no no no
77 persistent-nodemap: no no no
75 copies-sdc: no no no
78 copies-sdc: no no no
76 revlog-v2: no no no
79 revlog-v2: no no no
77 plain-cl-delta: yes yes yes
80 plain-cl-delta: yes yes yes
78 compression: zlib zlib zlib
81 compression: zlib zlib zlib
79 compression-level: default default default
82 compression-level: default default default
80 $ hg debugformat --verbose --config format.usefncache=no
83 $ hg debugformat --verbose --config format.usefncache=no
81 format-variant repo config default
84 format-variant repo config default
82 fncache: yes no yes
85 fncache: yes no yes
83 dotencode: yes no yes
86 dotencode: yes no yes
84 generaldelta: yes yes yes
87 generaldelta: yes yes yes
85 share-safe: no no no
88 share-safe: no no no
86 sparserevlog: yes yes yes
89 sparserevlog: yes yes yes
87 persistent-nodemap: no no no
90 persistent-nodemap: no no no
88 copies-sdc: no no no
91 copies-sdc: no no no
89 revlog-v2: no no no
92 revlog-v2: no no no
90 plain-cl-delta: yes yes yes
93 plain-cl-delta: yes yes yes
91 compression: zlib zlib zlib
94 compression: zlib zlib zlib
92 compression-level: default default default
95 compression-level: default default default
93 $ hg debugformat --verbose --config format.usefncache=no --color=debug
96 $ hg debugformat --verbose --config format.usefncache=no --color=debug
94 format-variant repo config default
97 format-variant repo config default
95 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
98 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
96 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
99 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
97 [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
100 [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
98 [formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
101 [formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
99 [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
102 [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
100 [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
103 [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
101 [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
104 [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
102 [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
105 [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
103 [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
106 [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
104 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
107 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
105 [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default]
108 [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default]
106 $ hg debugformat -Tjson
109 $ hg debugformat -Tjson
107 [
110 [
108 {
111 {
109 "config": true,
112 "config": true,
110 "default": true,
113 "default": true,
111 "name": "fncache",
114 "name": "fncache",
112 "repo": true
115 "repo": true
113 },
116 },
114 {
117 {
115 "config": true,
118 "config": true,
116 "default": true,
119 "default": true,
117 "name": "dotencode",
120 "name": "dotencode",
118 "repo": true
121 "repo": true
119 },
122 },
120 {
123 {
121 "config": true,
124 "config": true,
122 "default": true,
125 "default": true,
123 "name": "generaldelta",
126 "name": "generaldelta",
124 "repo": true
127 "repo": true
125 },
128 },
126 {
129 {
127 "config": false,
130 "config": false,
128 "default": false,
131 "default": false,
129 "name": "share-safe",
132 "name": "share-safe",
130 "repo": false
133 "repo": false
131 },
134 },
132 {
135 {
133 "config": true,
136 "config": true,
134 "default": true,
137 "default": true,
135 "name": "sparserevlog",
138 "name": "sparserevlog",
136 "repo": true
139 "repo": true
137 },
140 },
138 {
141 {
139 "config": false,
142 "config": false,
140 "default": false,
143 "default": false,
141 "name": "persistent-nodemap",
144 "name": "persistent-nodemap",
142 "repo": false
145 "repo": false
143 },
146 },
144 {
147 {
145 "config": false,
148 "config": false,
146 "default": false,
149 "default": false,
147 "name": "copies-sdc",
150 "name": "copies-sdc",
148 "repo": false
151 "repo": false
149 },
152 },
150 {
153 {
151 "config": false,
154 "config": false,
152 "default": false,
155 "default": false,
153 "name": "revlog-v2",
156 "name": "revlog-v2",
154 "repo": false
157 "repo": false
155 },
158 },
156 {
159 {
157 "config": true,
160 "config": true,
158 "default": true,
161 "default": true,
159 "name": "plain-cl-delta",
162 "name": "plain-cl-delta",
160 "repo": true
163 "repo": true
161 },
164 },
162 {
165 {
163 "config": "zlib",
166 "config": "zlib",
164 "default": "zlib",
167 "default": "zlib",
165 "name": "compression",
168 "name": "compression",
166 "repo": "zlib"
169 "repo": "zlib"
167 },
170 },
168 {
171 {
169 "config": "default",
172 "config": "default",
170 "default": "default",
173 "default": "default",
171 "name": "compression-level",
174 "name": "compression-level",
172 "repo": "default"
175 "repo": "default"
173 }
176 }
174 ]
177 ]
175 $ hg debugupgraderepo
178 $ hg debugupgraderepo
176 (no format upgrades found in existing repository)
179 (no format upgrades found in existing repository)
177 performing an upgrade with "--run" will make the following changes:
180 performing an upgrade with "--run" will make the following changes:
178
181
179 requirements
182 requirements
180 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
183 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
181
184
182 processed revlogs:
185 processed revlogs:
183 - all-filelogs
186 - all-filelogs
184 - changelog
187 - changelog
185 - manifest
188 - manifest
186
189
187 additional optimizations are available by specifying "--optimize <name>":
190 additional optimizations are available by specifying "--optimize <name>":
188
191
189 re-delta-parent
192 re-delta-parent
190 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
193 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
194
192 re-delta-multibase
195 re-delta-multibase
193 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
196 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
197
195 re-delta-all
198 re-delta-all
196 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
199 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
200
198 re-delta-fulladd
201 re-delta-fulladd
199 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
202 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
200
203
201
204
202 $ hg debugupgraderepo --quiet
205 $ hg debugupgraderepo --quiet
203 requirements
206 requirements
204 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
207 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
205
208
206 processed revlogs:
209 processed revlogs:
207 - all-filelogs
210 - all-filelogs
208 - changelog
211 - changelog
209 - manifest
212 - manifest
210
213
211
214
212 --optimize can be used to add optimizations
215 --optimize can be used to add optimizations
213
216
214 $ hg debugupgrade --optimize 're-delta-parent'
217 $ hg debugupgrade --optimize 're-delta-parent'
215 (no format upgrades found in existing repository)
218 (no format upgrades found in existing repository)
216 performing an upgrade with "--run" will make the following changes:
219 performing an upgrade with "--run" will make the following changes:
217
220
218 requirements
221 requirements
219 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
222 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
220
223
221 optimisations: re-delta-parent
224 optimisations: re-delta-parent
222
225
223 re-delta-parent
226 re-delta-parent
224 deltas within internal storage will choose a new base revision if needed
227 deltas within internal storage will choose a new base revision if needed
225
228
226 processed revlogs:
229 processed revlogs:
227 - all-filelogs
230 - all-filelogs
228 - changelog
231 - changelog
229 - manifest
232 - manifest
230
233
231 additional optimizations are available by specifying "--optimize <name>":
234 additional optimizations are available by specifying "--optimize <name>":
232
235
233 re-delta-multibase
236 re-delta-multibase
234 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
237 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
235
238
236 re-delta-all
239 re-delta-all
237 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
240 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
238
241
239 re-delta-fulladd
242 re-delta-fulladd
240 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
243 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
241
244
242
245
243 modern form of the option
246 modern form of the option
244
247
245 $ hg debugupgrade --optimize re-delta-parent
248 $ hg debugupgrade --optimize re-delta-parent
246 (no format upgrades found in existing repository)
249 (no format upgrades found in existing repository)
247 performing an upgrade with "--run" will make the following changes:
250 performing an upgrade with "--run" will make the following changes:
248
251
249 requirements
252 requirements
250 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
253 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
251
254
252 optimisations: re-delta-parent
255 optimisations: re-delta-parent
253
256
254 re-delta-parent
257 re-delta-parent
255 deltas within internal storage will choose a new base revision if needed
258 deltas within internal storage will choose a new base revision if needed
256
259
257 processed revlogs:
260 processed revlogs:
258 - all-filelogs
261 - all-filelogs
259 - changelog
262 - changelog
260 - manifest
263 - manifest
261
264
262 additional optimizations are available by specifying "--optimize <name>":
265 additional optimizations are available by specifying "--optimize <name>":
263
266
264 re-delta-multibase
267 re-delta-multibase
265 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
268 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
266
269
267 re-delta-all
270 re-delta-all
268 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
271 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
269
272
270 re-delta-fulladd
273 re-delta-fulladd
271 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
274 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
272
275
273 $ hg debugupgrade --optimize re-delta-parent --quiet
276 $ hg debugupgrade --optimize re-delta-parent --quiet
274 requirements
277 requirements
275 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
278 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
276
279
277 optimisations: re-delta-parent
280 optimisations: re-delta-parent
278
281
279 processed revlogs:
282 processed revlogs:
280 - all-filelogs
283 - all-filelogs
281 - changelog
284 - changelog
282 - manifest
285 - manifest
283
286
284
287
285 unknown optimization:
288 unknown optimization:
286
289
287 $ hg debugupgrade --optimize foobar
290 $ hg debugupgrade --optimize foobar
288 abort: unknown optimization action requested: foobar
291 abort: unknown optimization action requested: foobar
289 (run without arguments to see valid optimizations)
292 (run without arguments to see valid optimizations)
290 [255]
293 [255]
291
294
292 Various sub-optimal detections work
295 Various sub-optimal detections work
293
296
294 $ cat > .hg/requires << EOF
297 $ cat > .hg/requires << EOF
295 > revlogv1
298 > revlogv1
296 > store
299 > store
297 > EOF
300 > EOF
298
301
299 $ hg debugformat
302 $ hg debugformat
300 format-variant repo
303 format-variant repo
301 fncache: no
304 fncache: no
302 dotencode: no
305 dotencode: no
303 generaldelta: no
306 generaldelta: no
304 share-safe: no
307 share-safe: no
305 sparserevlog: no
308 sparserevlog: no
306 persistent-nodemap: no
309 persistent-nodemap: no
307 copies-sdc: no
310 copies-sdc: no
308 revlog-v2: no
311 revlog-v2: no
309 plain-cl-delta: yes
312 plain-cl-delta: yes
310 compression: zlib
313 compression: zlib
311 compression-level: default
314 compression-level: default
312 $ hg debugformat --verbose
315 $ hg debugformat --verbose
313 format-variant repo config default
316 format-variant repo config default
314 fncache: no yes yes
317 fncache: no yes yes
315 dotencode: no yes yes
318 dotencode: no yes yes
316 generaldelta: no yes yes
319 generaldelta: no yes yes
317 share-safe: no no no
320 share-safe: no no no
318 sparserevlog: no yes yes
321 sparserevlog: no yes yes
319 persistent-nodemap: no no no
322 persistent-nodemap: no no no
320 copies-sdc: no no no
323 copies-sdc: no no no
321 revlog-v2: no no no
324 revlog-v2: no no no
322 plain-cl-delta: yes yes yes
325 plain-cl-delta: yes yes yes
323 compression: zlib zlib zlib
326 compression: zlib zlib zlib
324 compression-level: default default default
327 compression-level: default default default
325 $ hg debugformat --verbose --config format.usegeneraldelta=no
328 $ hg debugformat --verbose --config format.usegeneraldelta=no
326 format-variant repo config default
329 format-variant repo config default
327 fncache: no yes yes
330 fncache: no yes yes
328 dotencode: no yes yes
331 dotencode: no yes yes
329 generaldelta: no no yes
332 generaldelta: no no yes
330 share-safe: no no no
333 share-safe: no no no
331 sparserevlog: no no yes
334 sparserevlog: no no yes
332 persistent-nodemap: no no no
335 persistent-nodemap: no no no
333 copies-sdc: no no no
336 copies-sdc: no no no
334 revlog-v2: no no no
337 revlog-v2: no no no
335 plain-cl-delta: yes yes yes
338 plain-cl-delta: yes yes yes
336 compression: zlib zlib zlib
339 compression: zlib zlib zlib
337 compression-level: default default default
340 compression-level: default default default
338 $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug
341 $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug
339 format-variant repo config default
342 format-variant repo config default
340 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
343 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
341 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
344 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
342 [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
345 [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
343 [formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
346 [formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
344 [formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
347 [formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
345 [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
348 [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
346 [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
349 [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
347 [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
350 [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
348 [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
351 [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
349 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
352 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
350 [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default]
353 [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default]
351 $ hg debugupgraderepo
354 $ hg debugupgraderepo
352 repository lacks features recommended by current config options:
355 repository lacks features recommended by current config options:
353
356
354 fncache
357 fncache
355 long and reserved filenames may not work correctly; repository performance is sub-optimal
358 long and reserved filenames may not work correctly; repository performance is sub-optimal
356
359
357 dotencode
360 dotencode
358 storage of filenames beginning with a period or space may not work correctly
361 storage of filenames beginning with a period or space may not work correctly
359
362
360 generaldelta
363 generaldelta
361 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
364 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
362
365
363 sparserevlog
366 sparserevlog
364 in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange.
367 in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange.
365
368
366
369
367 performing an upgrade with "--run" will make the following changes:
370 performing an upgrade with "--run" will make the following changes:
368
371
369 requirements
372 requirements
370 preserved: revlogv1, store
373 preserved: revlogv1, store
371 added: dotencode, fncache, generaldelta, sparserevlog
374 added: dotencode, fncache, generaldelta, sparserevlog
372
375
373 fncache
376 fncache
374 repository will be more resilient to storing certain paths and performance of certain operations should be improved
377 repository will be more resilient to storing certain paths and performance of certain operations should be improved
375
378
376 dotencode
379 dotencode
377 repository will be better able to store files beginning with a space or period
380 repository will be better able to store files beginning with a space or period
378
381
379 generaldelta
382 generaldelta
380 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
383 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
381
384
382 sparserevlog
385 sparserevlog
383 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
386 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
384
387
385 processed revlogs:
388 processed revlogs:
386 - all-filelogs
389 - all-filelogs
387 - changelog
390 - changelog
388 - manifest
391 - manifest
389
392
390 additional optimizations are available by specifying "--optimize <name>":
393 additional optimizations are available by specifying "--optimize <name>":
391
394
392 re-delta-parent
395 re-delta-parent
393 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
396 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
394
397
395 re-delta-multibase
398 re-delta-multibase
396 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
399 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
397
400
398 re-delta-all
401 re-delta-all
399 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
402 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
400
403
401 re-delta-fulladd
404 re-delta-fulladd
402 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
405 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
403
406
404 $ hg debugupgraderepo --quiet
407 $ hg debugupgraderepo --quiet
405 requirements
408 requirements
406 preserved: revlogv1, store
409 preserved: revlogv1, store
407 added: dotencode, fncache, generaldelta, sparserevlog
410 added: dotencode, fncache, generaldelta, sparserevlog
408
411
409 processed revlogs:
412 processed revlogs:
410 - all-filelogs
413 - all-filelogs
411 - changelog
414 - changelog
412 - manifest
415 - manifest
413
416
414
417
415 $ hg --config format.dotencode=false debugupgraderepo
418 $ hg --config format.dotencode=false debugupgraderepo
416 repository lacks features recommended by current config options:
419 repository lacks features recommended by current config options:
417
420
418 fncache
421 fncache
419 long and reserved filenames may not work correctly; repository performance is sub-optimal
422 long and reserved filenames may not work correctly; repository performance is sub-optimal
420
423
421 generaldelta
424 generaldelta
422 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
425 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
423
426
424 sparserevlog
427 sparserevlog
425 in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange.
428 in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange.
426
429
427 repository lacks features used by the default config options:
430 repository lacks features used by the default config options:
428
431
429 dotencode
432 dotencode
430 storage of filenames beginning with a period or space may not work correctly
433 storage of filenames beginning with a period or space may not work correctly
431
434
432
435
433 performing an upgrade with "--run" will make the following changes:
436 performing an upgrade with "--run" will make the following changes:
434
437
435 requirements
438 requirements
436 preserved: revlogv1, store
439 preserved: revlogv1, store
437 added: fncache, generaldelta, sparserevlog
440 added: fncache, generaldelta, sparserevlog
438
441
439 fncache
442 fncache
440 repository will be more resilient to storing certain paths and performance of certain operations should be improved
443 repository will be more resilient to storing certain paths and performance of certain operations should be improved
441
444
442 generaldelta
445 generaldelta
443 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
446 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
444
447
445 sparserevlog
448 sparserevlog
446 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
449 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
447
450
448 processed revlogs:
451 processed revlogs:
449 - all-filelogs
452 - all-filelogs
450 - changelog
453 - changelog
451 - manifest
454 - manifest
452
455
453 additional optimizations are available by specifying "--optimize <name>":
456 additional optimizations are available by specifying "--optimize <name>":
454
457
455 re-delta-parent
458 re-delta-parent
456 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
459 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
457
460
458 re-delta-multibase
461 re-delta-multibase
459 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
462 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
460
463
461 re-delta-all
464 re-delta-all
462 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
465 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
463
466
464 re-delta-fulladd
467 re-delta-fulladd
465 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
468 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
466
469
467
470
468 $ cd ..
471 $ cd ..
469
472
470 Upgrading a repository that is already modern essentially no-ops
473 Upgrading a repository that is already modern essentially no-ops
471
474
472 $ hg init modern
475 $ hg init modern
473 $ hg -R modern debugupgraderepo --run
476 $ hg -R modern debugupgraderepo --run
474 nothing to do
477 nothing to do
475
478
476 Upgrading a repository to generaldelta works
479 Upgrading a repository to generaldelta works
477
480
478 $ hg --config format.usegeneraldelta=false init upgradegd
481 $ hg --config format.usegeneraldelta=false init upgradegd
479 $ cd upgradegd
482 $ cd upgradegd
480 $ touch f0
483 $ touch f0
481 $ hg -q commit -A -m initial
484 $ hg -q commit -A -m initial
482 $ mkdir FooBarDirectory.d
485 $ mkdir FooBarDirectory.d
483 $ touch FooBarDirectory.d/f1
486 $ touch FooBarDirectory.d/f1
484 $ hg -q commit -A -m 'add f1'
487 $ hg -q commit -A -m 'add f1'
485 $ hg -q up -r 0
488 $ hg -q up -r 0
486 >>> from __future__ import absolute_import, print_function
489 >>> from __future__ import absolute_import, print_function
487 >>> import random
490 >>> import random
488 >>> random.seed(0) # have a reproducible content
491 >>> random.seed(0) # have a reproducible content
489 >>> with open("f2", "wb") as f:
492 >>> with open("f2", "wb") as f:
490 ... for i in range(100000):
493 ... for i in range(100000):
491 ... f.write(b"%d\n" % random.randint(1000000000, 9999999999)) and None
494 ... f.write(b"%d\n" % random.randint(1000000000, 9999999999)) and None
492 $ hg -q commit -A -m 'add f2'
495 $ hg -q commit -A -m 'add f2'
493
496
494 make sure we have a .d file
497 make sure we have a .d file
495
498
496 $ ls -d .hg/store/data/*
499 $ ls -d .hg/store/data/*
497 .hg/store/data/_foo_bar_directory.d.hg
500 .hg/store/data/_foo_bar_directory.d.hg
498 .hg/store/data/f0.i
501 .hg/store/data/f0.i
499 .hg/store/data/f2.d
502 .hg/store/data/f2.d
500 .hg/store/data/f2.i
503 .hg/store/data/f2.i
501
504
502 $ hg debugupgraderepo --run --config format.sparse-revlog=false
505 $ hg debugupgraderepo --run --config format.sparse-revlog=false
503 upgrade will perform the following actions:
506 upgrade will perform the following actions:
504
507
505 requirements
508 requirements
506 preserved: dotencode, fncache, revlogv1, store
509 preserved: dotencode, fncache, revlogv1, store
507 added: generaldelta
510 added: generaldelta
508
511
509 generaldelta
512 generaldelta
510 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
513 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
511
514
512 processed revlogs:
515 processed revlogs:
513 - all-filelogs
516 - all-filelogs
514 - changelog
517 - changelog
515 - manifest
518 - manifest
516
519
517 beginning upgrade...
520 beginning upgrade...
518 repository locked and read-only
521 repository locked and read-only
519 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
522 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
520 (it is safe to interrupt this process any time before data migration completes)
523 (it is safe to interrupt this process any time before data migration completes)
521 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
524 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
522 migrating 519 KB in store; 1.05 MB tracked data
525 migrating 519 KB in store; 1.05 MB tracked data
523 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
526 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
524 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
527 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
525 migrating 1 manifests containing 3 revisions (384 bytes in store; 238 bytes tracked data)
528 migrating 1 manifests containing 3 revisions (384 bytes in store; 238 bytes tracked data)
526 finished migrating 3 manifest revisions across 1 manifests; change in size: -17 bytes
529 finished migrating 3 manifest revisions across 1 manifests; change in size: -17 bytes
527 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
530 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
528 finished migrating 3 changelog revisions; change in size: 0 bytes
531 finished migrating 3 changelog revisions; change in size: 0 bytes
529 finished migrating 9 total revisions; total change in store size: -17 bytes
532 finished migrating 9 total revisions; total change in store size: -17 bytes
530 copying phaseroots
533 copying phaseroots
531 data fully upgraded in a temporary repository
534 data fully upgraded in a temporary repository
532 marking source repository as being upgraded; clients will be unable to read from repository
535 marking source repository as being upgraded; clients will be unable to read from repository
533 starting in-place swap of repository data
536 starting in-place swap of repository data
534 replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
537 replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
535 replacing store...
538 replacing store...
536 store replacement complete; repository was inconsistent for *s (glob)
539 store replacement complete; repository was inconsistent for *s (glob)
537 finalizing requirements file and making repository readable again
540 finalizing requirements file and making repository readable again
538 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
541 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
539 copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
542 copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
540 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
543 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
541
544
542 Original requirements backed up
545 Original requirements backed up
543
546
544 $ cat .hg/upgradebackup.*/requires
547 $ cat .hg/upgradebackup.*/requires
545 dotencode
548 dotencode
546 fncache
549 fncache
547 revlogv1
550 revlogv1
548 store
551 store
549
552
550 generaldelta added to original requirements files
553 generaldelta added to original requirements files
551
554
552 $ cat .hg/requires
555 $ cat .hg/requires
553 dotencode
556 dotencode
554 fncache
557 fncache
555 generaldelta
558 generaldelta
556 revlogv1
559 revlogv1
557 store
560 store
558
561
559 store directory has files we expect
562 store directory has files we expect
560
563
561 $ ls .hg/store
564 $ ls .hg/store
562 00changelog.i
565 00changelog.i
563 00manifest.i
566 00manifest.i
564 data
567 data
565 fncache
568 fncache
566 phaseroots
569 phaseroots
567 undo
570 undo
568 undo.backupfiles
571 undo.backupfiles
569 undo.phaseroots
572 undo.phaseroots
570
573
571 manifest should be generaldelta
574 manifest should be generaldelta
572
575
573 $ hg debugrevlog -m | grep flags
576 $ hg debugrevlog -m | grep flags
574 flags : inline, generaldelta
577 flags : inline, generaldelta
575
578
576 verify should be happy
579 verify should be happy
577
580
578 $ hg verify
581 $ hg verify
579 checking changesets
582 checking changesets
580 checking manifests
583 checking manifests
581 crosschecking files in changesets and manifests
584 crosschecking files in changesets and manifests
582 checking files
585 checking files
583 checked 3 changesets with 3 changes to 3 files
586 checked 3 changesets with 3 changes to 3 files
584
587
585 old store should be backed up
588 old store should be backed up
586
589
587 $ ls -d .hg/upgradebackup.*/
590 $ ls -d .hg/upgradebackup.*/
588 .hg/upgradebackup.*/ (glob)
591 .hg/upgradebackup.*/ (glob)
589 $ ls .hg/upgradebackup.*/store
592 $ ls .hg/upgradebackup.*/store
590 00changelog.i
593 00changelog.i
591 00manifest.i
594 00manifest.i
592 data
595 data
593 fncache
596 fncache
594 phaseroots
597 phaseroots
595 undo
598 undo
596 undo.backup.fncache
599 undo.backup.fncache
597 undo.backupfiles
600 undo.backupfiles
598 undo.phaseroots
601 undo.phaseroots
599
602
600 unless --no-backup is passed
603 unless --no-backup is passed
601
604
602 $ rm -rf .hg/upgradebackup.*/
605 $ rm -rf .hg/upgradebackup.*/
603 $ hg debugupgraderepo --run --no-backup
606 $ hg debugupgraderepo --run --no-backup
604 upgrade will perform the following actions:
607 upgrade will perform the following actions:
605
608
606 requirements
609 requirements
607 preserved: dotencode, fncache, generaldelta, revlogv1, store
610 preserved: dotencode, fncache, generaldelta, revlogv1, store
608 added: sparserevlog
611 added: sparserevlog
609
612
610 sparserevlog
613 sparserevlog
611 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
614 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
612
615
613 processed revlogs:
616 processed revlogs:
614 - all-filelogs
617 - all-filelogs
615 - changelog
618 - changelog
616 - manifest
619 - manifest
617
620
618 beginning upgrade...
621 beginning upgrade...
619 repository locked and read-only
622 repository locked and read-only
620 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
623 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
621 (it is safe to interrupt this process any time before data migration completes)
624 (it is safe to interrupt this process any time before data migration completes)
622 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
625 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
623 migrating 519 KB in store; 1.05 MB tracked data
626 migrating 519 KB in store; 1.05 MB tracked data
624 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
627 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
625 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
628 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
626 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
629 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
627 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
630 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
628 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
631 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
629 finished migrating 3 changelog revisions; change in size: 0 bytes
632 finished migrating 3 changelog revisions; change in size: 0 bytes
630 finished migrating 9 total revisions; total change in store size: 0 bytes
633 finished migrating 9 total revisions; total change in store size: 0 bytes
631 copying phaseroots
634 copying phaseroots
632 data fully upgraded in a temporary repository
635 data fully upgraded in a temporary repository
633 marking source repository as being upgraded; clients will be unable to read from repository
636 marking source repository as being upgraded; clients will be unable to read from repository
634 starting in-place swap of repository data
637 starting in-place swap of repository data
635 replacing store...
638 replacing store...
636 store replacement complete; repository was inconsistent for * (glob)
639 store replacement complete; repository was inconsistent for * (glob)
637 finalizing requirements file and making repository readable again
640 finalizing requirements file and making repository readable again
638 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
641 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
639 $ ls -1 .hg/ | grep upgradebackup
642 $ ls -1 .hg/ | grep upgradebackup
640 [1]
643 [1]
641
644
642 We can restrict optimization to some revlog:
645 We can restrict optimization to some revlog:
643
646
644 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
647 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
645 upgrade will perform the following actions:
648 upgrade will perform the following actions:
646
649
647 requirements
650 requirements
648 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
651 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
649
652
650 optimisations: re-delta-parent
653 optimisations: re-delta-parent
651
654
652 re-delta-parent
655 re-delta-parent
653 deltas within internal storage will choose a new base revision if needed
656 deltas within internal storage will choose a new base revision if needed
654
657
655 processed revlogs:
658 processed revlogs:
656 - manifest
659 - manifest
657
660
658 beginning upgrade...
661 beginning upgrade...
659 repository locked and read-only
662 repository locked and read-only
660 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
663 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
661 (it is safe to interrupt this process any time before data migration completes)
664 (it is safe to interrupt this process any time before data migration completes)
662 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
665 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
663 migrating 519 KB in store; 1.05 MB tracked data
666 migrating 519 KB in store; 1.05 MB tracked data
664 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
667 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
665 blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions
668 blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions
666 blindly copying data/f0.i containing 1 revisions
669 blindly copying data/f0.i containing 1 revisions
667 blindly copying data/f2.i containing 1 revisions
670 blindly copying data/f2.i containing 1 revisions
668 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
671 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
669 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
672 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
670 cloning 3 revisions from 00manifest.i
673 cloning 3 revisions from 00manifest.i
671 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
674 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
672 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
675 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
673 blindly copying 00changelog.i containing 3 revisions
676 blindly copying 00changelog.i containing 3 revisions
674 finished migrating 3 changelog revisions; change in size: 0 bytes
677 finished migrating 3 changelog revisions; change in size: 0 bytes
675 finished migrating 9 total revisions; total change in store size: 0 bytes
678 finished migrating 9 total revisions; total change in store size: 0 bytes
676 copying phaseroots
679 copying phaseroots
677 data fully upgraded in a temporary repository
680 data fully upgraded in a temporary repository
678 marking source repository as being upgraded; clients will be unable to read from repository
681 marking source repository as being upgraded; clients will be unable to read from repository
679 starting in-place swap of repository data
682 starting in-place swap of repository data
680 replacing store...
683 replacing store...
681 store replacement complete; repository was inconsistent for *s (glob)
684 store replacement complete; repository was inconsistent for *s (glob)
682 finalizing requirements file and making repository readable again
685 finalizing requirements file and making repository readable again
683 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
686 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
684
687
685 Check that the repo still works fine
688 Check that the repo still works fine
686
689
687 $ hg log -G --stat
690 $ hg log -G --stat
688 @ changeset: 2:76d4395f5413 (no-py3 !)
691 @ changeset: 2:76d4395f5413 (no-py3 !)
689 @ changeset: 2:fca376863211 (py3 !)
692 @ changeset: 2:fca376863211 (py3 !)
690 | tag: tip
693 | tag: tip
691 | parent: 0:ba592bf28da2
694 | parent: 0:ba592bf28da2
692 | user: test
695 | user: test
693 | date: Thu Jan 01 00:00:00 1970 +0000
696 | date: Thu Jan 01 00:00:00 1970 +0000
694 | summary: add f2
697 | summary: add f2
695 |
698 |
696 | f2 | 100000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
699 | f2 | 100000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
697 | 1 files changed, 100000 insertions(+), 0 deletions(-)
700 | 1 files changed, 100000 insertions(+), 0 deletions(-)
698 |
701 |
699 | o changeset: 1:2029ce2354e2
702 | o changeset: 1:2029ce2354e2
700 |/ user: test
703 |/ user: test
701 | date: Thu Jan 01 00:00:00 1970 +0000
704 | date: Thu Jan 01 00:00:00 1970 +0000
702 | summary: add f1
705 | summary: add f1
703 |
706 |
704 |
707 |
705 o changeset: 0:ba592bf28da2
708 o changeset: 0:ba592bf28da2
706 user: test
709 user: test
707 date: Thu Jan 01 00:00:00 1970 +0000
710 date: Thu Jan 01 00:00:00 1970 +0000
708 summary: initial
711 summary: initial
709
712
710
713
711
714
712 $ hg verify
715 $ hg verify
713 checking changesets
716 checking changesets
714 checking manifests
717 checking manifests
715 crosschecking files in changesets and manifests
718 crosschecking files in changesets and manifests
716 checking files
719 checking files
717 checked 3 changesets with 3 changes to 3 files
720 checked 3 changesets with 3 changes to 3 files
718
721
719 Check we can select negatively
722 Check we can select negatively
720
723
721 $ hg debugupgrade --optimize re-delta-parent --run --no-manifest --no-backup --debug --traceback
724 $ hg debugupgrade --optimize re-delta-parent --run --no-manifest --no-backup --debug --traceback
722 upgrade will perform the following actions:
725 upgrade will perform the following actions:
723
726
724 requirements
727 requirements
725 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
728 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
726
729
727 optimisations: re-delta-parent
730 optimisations: re-delta-parent
728
731
729 re-delta-parent
732 re-delta-parent
730 deltas within internal storage will choose a new base revision if needed
733 deltas within internal storage will choose a new base revision if needed
731
734
732 processed revlogs:
735 processed revlogs:
733 - all-filelogs
736 - all-filelogs
734 - changelog
737 - changelog
735
738
736 beginning upgrade...
739 beginning upgrade...
737 repository locked and read-only
740 repository locked and read-only
738 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
741 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
739 (it is safe to interrupt this process any time before data migration completes)
742 (it is safe to interrupt this process any time before data migration completes)
740 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
743 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
741 migrating 519 KB in store; 1.05 MB tracked data
744 migrating 519 KB in store; 1.05 MB tracked data
742 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
745 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
743 cloning 1 revisions from data/FooBarDirectory.d/f1.i
746 cloning 1 revisions from data/FooBarDirectory.d/f1.i
744 cloning 1 revisions from data/f0.i
747 cloning 1 revisions from data/f0.i
745 cloning 1 revisions from data/f2.i
748 cloning 1 revisions from data/f2.i
746 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
749 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
747 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
750 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
748 blindly copying 00manifest.i containing 3 revisions
751 blindly copying 00manifest.i containing 3 revisions
749 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
752 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
750 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
753 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
751 cloning 3 revisions from 00changelog.i
754 cloning 3 revisions from 00changelog.i
752 finished migrating 3 changelog revisions; change in size: 0 bytes
755 finished migrating 3 changelog revisions; change in size: 0 bytes
753 finished migrating 9 total revisions; total change in store size: 0 bytes
756 finished migrating 9 total revisions; total change in store size: 0 bytes
754 copying phaseroots
757 copying phaseroots
755 data fully upgraded in a temporary repository
758 data fully upgraded in a temporary repository
756 marking source repository as being upgraded; clients will be unable to read from repository
759 marking source repository as being upgraded; clients will be unable to read from repository
757 starting in-place swap of repository data
760 starting in-place swap of repository data
758 replacing store...
761 replacing store...
759 store replacement complete; repository was inconsistent for *s (glob)
762 store replacement complete; repository was inconsistent for *s (glob)
760 finalizing requirements file and making repository readable again
763 finalizing requirements file and making repository readable again
761 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
764 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
762 $ hg verify
765 $ hg verify
763 checking changesets
766 checking changesets
764 checking manifests
767 checking manifests
765 crosschecking files in changesets and manifests
768 crosschecking files in changesets and manifests
766 checking files
769 checking files
767 checked 3 changesets with 3 changes to 3 files
770 checked 3 changesets with 3 changes to 3 files
768
771
769 Check that we can select changelog only
772 Check that we can select changelog only
770
773
771 $ hg debugupgrade --optimize re-delta-parent --run --changelog --no-backup --debug --traceback
774 $ hg debugupgrade --optimize re-delta-parent --run --changelog --no-backup --debug --traceback
772 upgrade will perform the following actions:
775 upgrade will perform the following actions:
773
776
774 requirements
777 requirements
775 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
778 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
776
779
777 optimisations: re-delta-parent
780 optimisations: re-delta-parent
778
781
779 re-delta-parent
782 re-delta-parent
780 deltas within internal storage will choose a new base revision if needed
783 deltas within internal storage will choose a new base revision if needed
781
784
782 processed revlogs:
785 processed revlogs:
783 - changelog
786 - changelog
784
787
785 beginning upgrade...
788 beginning upgrade...
786 repository locked and read-only
789 repository locked and read-only
787 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
790 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
788 (it is safe to interrupt this process any time before data migration completes)
791 (it is safe to interrupt this process any time before data migration completes)
789 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
792 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
790 migrating 519 KB in store; 1.05 MB tracked data
793 migrating 519 KB in store; 1.05 MB tracked data
791 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
794 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
792 blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions
795 blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions
793 blindly copying data/f0.i containing 1 revisions
796 blindly copying data/f0.i containing 1 revisions
794 blindly copying data/f2.i containing 1 revisions
797 blindly copying data/f2.i containing 1 revisions
795 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
798 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
796 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
799 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
797 blindly copying 00manifest.i containing 3 revisions
800 blindly copying 00manifest.i containing 3 revisions
798 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
801 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
799 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
802 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
800 cloning 3 revisions from 00changelog.i
803 cloning 3 revisions from 00changelog.i
801 finished migrating 3 changelog revisions; change in size: 0 bytes
804 finished migrating 3 changelog revisions; change in size: 0 bytes
802 finished migrating 9 total revisions; total change in store size: 0 bytes
805 finished migrating 9 total revisions; total change in store size: 0 bytes
803 copying phaseroots
806 copying phaseroots
804 data fully upgraded in a temporary repository
807 data fully upgraded in a temporary repository
805 marking source repository as being upgraded; clients will be unable to read from repository
808 marking source repository as being upgraded; clients will be unable to read from repository
806 starting in-place swap of repository data
809 starting in-place swap of repository data
807 replacing store...
810 replacing store...
808 store replacement complete; repository was inconsistent for *s (glob)
811 store replacement complete; repository was inconsistent for *s (glob)
809 finalizing requirements file and making repository readable again
812 finalizing requirements file and making repository readable again
810 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
813 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
811 $ hg verify
814 $ hg verify
812 checking changesets
815 checking changesets
813 checking manifests
816 checking manifests
814 crosschecking files in changesets and manifests
817 crosschecking files in changesets and manifests
815 checking files
818 checking files
816 checked 3 changesets with 3 changes to 3 files
819 checked 3 changesets with 3 changes to 3 files
817
820
818 Check that we can select filelog only
821 Check that we can select filelog only
819
822
820 $ hg debugupgrade --optimize re-delta-parent --run --no-changelog --no-manifest --no-backup --debug --traceback
823 $ hg debugupgrade --optimize re-delta-parent --run --no-changelog --no-manifest --no-backup --debug --traceback
821 upgrade will perform the following actions:
824 upgrade will perform the following actions:
822
825
823 requirements
826 requirements
824 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
827 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
825
828
826 optimisations: re-delta-parent
829 optimisations: re-delta-parent
827
830
828 re-delta-parent
831 re-delta-parent
829 deltas within internal storage will choose a new base revision if needed
832 deltas within internal storage will choose a new base revision if needed
830
833
831 processed revlogs:
834 processed revlogs:
832 - all-filelogs
835 - all-filelogs
833
836
834 beginning upgrade...
837 beginning upgrade...
835 repository locked and read-only
838 repository locked and read-only
836 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
839 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
837 (it is safe to interrupt this process any time before data migration completes)
840 (it is safe to interrupt this process any time before data migration completes)
838 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
841 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
839 migrating 519 KB in store; 1.05 MB tracked data
842 migrating 519 KB in store; 1.05 MB tracked data
840 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
843 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
841 cloning 1 revisions from data/FooBarDirectory.d/f1.i
844 cloning 1 revisions from data/FooBarDirectory.d/f1.i
842 cloning 1 revisions from data/f0.i
845 cloning 1 revisions from data/f0.i
843 cloning 1 revisions from data/f2.i
846 cloning 1 revisions from data/f2.i
844 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
847 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
845 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
848 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
846 blindly copying 00manifest.i containing 3 revisions
849 blindly copying 00manifest.i containing 3 revisions
847 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
850 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
848 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
851 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
849 blindly copying 00changelog.i containing 3 revisions
852 blindly copying 00changelog.i containing 3 revisions
850 finished migrating 3 changelog revisions; change in size: 0 bytes
853 finished migrating 3 changelog revisions; change in size: 0 bytes
851 finished migrating 9 total revisions; total change in store size: 0 bytes
854 finished migrating 9 total revisions; total change in store size: 0 bytes
852 copying phaseroots
855 copying phaseroots
853 data fully upgraded in a temporary repository
856 data fully upgraded in a temporary repository
854 marking source repository as being upgraded; clients will be unable to read from repository
857 marking source repository as being upgraded; clients will be unable to read from repository
855 starting in-place swap of repository data
858 starting in-place swap of repository data
856 replacing store...
859 replacing store...
857 store replacement complete; repository was inconsistent for *s (glob)
860 store replacement complete; repository was inconsistent for *s (glob)
858 finalizing requirements file and making repository readable again
861 finalizing requirements file and making repository readable again
859 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
862 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
860 $ hg verify
863 $ hg verify
861 checking changesets
864 checking changesets
862 checking manifests
865 checking manifests
863 crosschecking files in changesets and manifests
866 crosschecking files in changesets and manifests
864 checking files
867 checking files
865 checked 3 changesets with 3 changes to 3 files
868 checked 3 changesets with 3 changes to 3 files
866
869
867
870
868 Check you can't skip revlog clone during important format downgrade
871 Check you can't skip revlog clone during important format downgrade
869
872
870 $ echo "[format]" > .hg/hgrc
873 $ echo "[format]" > .hg/hgrc
871 $ echo "sparse-revlog=no" >> .hg/hgrc
874 $ echo "sparse-revlog=no" >> .hg/hgrc
872 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
875 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
873 ignoring revlogs selection flags, format requirements change: sparserevlog
876 ignoring revlogs selection flags, format requirements change: sparserevlog
874 upgrade will perform the following actions:
877 upgrade will perform the following actions:
875
878
876 requirements
879 requirements
877 preserved: dotencode, fncache, generaldelta, revlogv1, store
880 preserved: dotencode, fncache, generaldelta, revlogv1, store
878 removed: sparserevlog
881 removed: sparserevlog
879
882
880 optimisations: re-delta-parent
883 optimisations: re-delta-parent
881
884
882 re-delta-parent
885 re-delta-parent
883 deltas within internal storage will choose a new base revision if needed
886 deltas within internal storage will choose a new base revision if needed
884
887
885 processed revlogs:
888 processed revlogs:
886 - all-filelogs
889 - all-filelogs
887 - changelog
890 - changelog
888 - manifest
891 - manifest
889
892
890 beginning upgrade...
893 beginning upgrade...
891 repository locked and read-only
894 repository locked and read-only
892 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
895 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
893 (it is safe to interrupt this process any time before data migration completes)
896 (it is safe to interrupt this process any time before data migration completes)
894 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
897 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
895 migrating 519 KB in store; 1.05 MB tracked data
898 migrating 519 KB in store; 1.05 MB tracked data
896 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
899 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
897 cloning 1 revisions from data/FooBarDirectory.d/f1.i
900 cloning 1 revisions from data/FooBarDirectory.d/f1.i
898 cloning 1 revisions from data/f0.i
901 cloning 1 revisions from data/f0.i
899 cloning 1 revisions from data/f2.i
902 cloning 1 revisions from data/f2.i
900 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
903 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
901 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
904 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
902 cloning 3 revisions from 00manifest.i
905 cloning 3 revisions from 00manifest.i
903 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
906 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
904 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
907 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
905 cloning 3 revisions from 00changelog.i
908 cloning 3 revisions from 00changelog.i
906 finished migrating 3 changelog revisions; change in size: 0 bytes
909 finished migrating 3 changelog revisions; change in size: 0 bytes
907 finished migrating 9 total revisions; total change in store size: 0 bytes
910 finished migrating 9 total revisions; total change in store size: 0 bytes
908 copying phaseroots
911 copying phaseroots
909 data fully upgraded in a temporary repository
912 data fully upgraded in a temporary repository
910 marking source repository as being upgraded; clients will be unable to read from repository
913 marking source repository as being upgraded; clients will be unable to read from repository
911 starting in-place swap of repository data
914 starting in-place swap of repository data
912 replacing store...
915 replacing store...
913 store replacement complete; repository was inconsistent for *s (glob)
916 store replacement complete; repository was inconsistent for *s (glob)
914 finalizing requirements file and making repository readable again
917 finalizing requirements file and making repository readable again
915 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
918 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
916 $ hg verify
919 $ hg verify
917 checking changesets
920 checking changesets
918 checking manifests
921 checking manifests
919 crosschecking files in changesets and manifests
922 crosschecking files in changesets and manifests
920 checking files
923 checking files
921 checked 3 changesets with 3 changes to 3 files
924 checked 3 changesets with 3 changes to 3 files
922
925
923 Check you can't skip revlog clone during important format upgrade
926 Check you can't skip revlog clone during important format upgrade
924
927
925 $ echo "sparse-revlog=yes" >> .hg/hgrc
928 $ echo "sparse-revlog=yes" >> .hg/hgrc
926 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
929 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
927 ignoring revlogs selection flags, format requirements change: sparserevlog
930 ignoring revlogs selection flags, format requirements change: sparserevlog
928 upgrade will perform the following actions:
931 upgrade will perform the following actions:
929
932
930 requirements
933 requirements
931 preserved: dotencode, fncache, generaldelta, revlogv1, store
934 preserved: dotencode, fncache, generaldelta, revlogv1, store
932 added: sparserevlog
935 added: sparserevlog
933
936
934 optimisations: re-delta-parent
937 optimisations: re-delta-parent
935
938
936 sparserevlog
939 sparserevlog
937 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
940 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
938
941
939 re-delta-parent
942 re-delta-parent
940 deltas within internal storage will choose a new base revision if needed
943 deltas within internal storage will choose a new base revision if needed
941
944
942 processed revlogs:
945 processed revlogs:
943 - all-filelogs
946 - all-filelogs
944 - changelog
947 - changelog
945 - manifest
948 - manifest
946
949
947 beginning upgrade...
950 beginning upgrade...
948 repository locked and read-only
951 repository locked and read-only
949 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
952 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
950 (it is safe to interrupt this process any time before data migration completes)
953 (it is safe to interrupt this process any time before data migration completes)
951 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
954 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
952 migrating 519 KB in store; 1.05 MB tracked data
955 migrating 519 KB in store; 1.05 MB tracked data
953 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
956 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
954 cloning 1 revisions from data/FooBarDirectory.d/f1.i
957 cloning 1 revisions from data/FooBarDirectory.d/f1.i
955 cloning 1 revisions from data/f0.i
958 cloning 1 revisions from data/f0.i
956 cloning 1 revisions from data/f2.i
959 cloning 1 revisions from data/f2.i
957 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
960 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
958 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
961 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
959 cloning 3 revisions from 00manifest.i
962 cloning 3 revisions from 00manifest.i
960 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
963 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
961 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
964 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
962 cloning 3 revisions from 00changelog.i
965 cloning 3 revisions from 00changelog.i
963 finished migrating 3 changelog revisions; change in size: 0 bytes
966 finished migrating 3 changelog revisions; change in size: 0 bytes
964 finished migrating 9 total revisions; total change in store size: 0 bytes
967 finished migrating 9 total revisions; total change in store size: 0 bytes
965 copying phaseroots
968 copying phaseroots
966 data fully upgraded in a temporary repository
969 data fully upgraded in a temporary repository
967 marking source repository as being upgraded; clients will be unable to read from repository
970 marking source repository as being upgraded; clients will be unable to read from repository
968 starting in-place swap of repository data
971 starting in-place swap of repository data
969 replacing store...
972 replacing store...
970 store replacement complete; repository was inconsistent for *s (glob)
973 store replacement complete; repository was inconsistent for *s (glob)
971 finalizing requirements file and making repository readable again
974 finalizing requirements file and making repository readable again
972 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
975 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
973 $ hg verify
976 $ hg verify
974 checking changesets
977 checking changesets
975 checking manifests
978 checking manifests
976 crosschecking files in changesets and manifests
979 crosschecking files in changesets and manifests
977 checking files
980 checking files
978 checked 3 changesets with 3 changes to 3 files
981 checked 3 changesets with 3 changes to 3 files
979
982
980 $ cd ..
983 $ cd ..
981
984
982 store files with special filenames aren't encoded during copy
985 store files with special filenames aren't encoded during copy
983
986
984 $ hg init store-filenames
987 $ hg init store-filenames
985 $ cd store-filenames
988 $ cd store-filenames
986 $ touch foo
989 $ touch foo
987 $ hg -q commit -A -m initial
990 $ hg -q commit -A -m initial
988 $ touch .hg/store/.XX_special_filename
991 $ touch .hg/store/.XX_special_filename
989
992
990 $ hg debugupgraderepo --run
993 $ hg debugupgraderepo --run
991 nothing to do
994 nothing to do
992 $ hg debugupgraderepo --run --optimize 're-delta-fulladd'
995 $ hg debugupgraderepo --run --optimize 're-delta-fulladd'
993 upgrade will perform the following actions:
996 upgrade will perform the following actions:
994
997
995 requirements
998 requirements
996 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
999 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
997
1000
998 optimisations: re-delta-fulladd
1001 optimisations: re-delta-fulladd
999
1002
1000 re-delta-fulladd
1003 re-delta-fulladd
1001 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
1004 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
1002
1005
1003 processed revlogs:
1006 processed revlogs:
1004 - all-filelogs
1007 - all-filelogs
1005 - changelog
1008 - changelog
1006 - manifest
1009 - manifest
1007
1010
1008 beginning upgrade...
1011 beginning upgrade...
1009 repository locked and read-only
1012 repository locked and read-only
1010 creating temporary repository to stage upgraded data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
1013 creating temporary repository to stage upgraded data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
1011 (it is safe to interrupt this process any time before data migration completes)
1014 (it is safe to interrupt this process any time before data migration completes)
1012 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
1015 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
1013 migrating 301 bytes in store; 107 bytes tracked data
1016 migrating 301 bytes in store; 107 bytes tracked data
1014 migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data)
1017 migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data)
1015 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
1018 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
1016 migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data)
1019 migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data)
1017 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
1020 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
1018 migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data)
1021 migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data)
1019 finished migrating 1 changelog revisions; change in size: 0 bytes
1022 finished migrating 1 changelog revisions; change in size: 0 bytes
1020 finished migrating 3 total revisions; total change in store size: 0 bytes
1023 finished migrating 3 total revisions; total change in store size: 0 bytes
1021 copying .XX_special_filename
1024 copying .XX_special_filename
1022 copying phaseroots
1025 copying phaseroots
1023 data fully upgraded in a temporary repository
1026 data fully upgraded in a temporary repository
1024 marking source repository as being upgraded; clients will be unable to read from repository
1027 marking source repository as being upgraded; clients will be unable to read from repository
1025 starting in-place swap of repository data
1028 starting in-place swap of repository data
1026 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
1029 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
1027 replacing store...
1030 replacing store...
1028 store replacement complete; repository was inconsistent for *s (glob)
1031 store replacement complete; repository was inconsistent for *s (glob)
1029 finalizing requirements file and making repository readable again
1032 finalizing requirements file and making repository readable again
1030 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
1033 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
1031 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
1034 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
1032 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
1035 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
1033
1036
1034 fncache is valid after upgrade
1037 fncache is valid after upgrade
1035
1038
1036 $ hg debugrebuildfncache
1039 $ hg debugrebuildfncache
1037 fncache already up to date
1040 fncache already up to date
1038
1041
1039 $ cd ..
1042 $ cd ..
1040
1043
1041 Check upgrading a large file repository
1044 Check upgrading a large file repository
1042 ---------------------------------------
1045 ---------------------------------------
1043
1046
1044 $ hg init largefilesrepo
1047 $ hg init largefilesrepo
1045 $ cat << EOF >> largefilesrepo/.hg/hgrc
1048 $ cat << EOF >> largefilesrepo/.hg/hgrc
1046 > [extensions]
1049 > [extensions]
1047 > largefiles =
1050 > largefiles =
1048 > EOF
1051 > EOF
1049
1052
1050 $ cd largefilesrepo
1053 $ cd largefilesrepo
1051 $ touch foo
1054 $ touch foo
1052 $ hg add --large foo
1055 $ hg add --large foo
1053 $ hg -q commit -m initial
1056 $ hg -q commit -m initial
1054 $ cat .hg/requires
1057 $ cat .hg/requires
1055 dotencode
1058 dotencode
1056 fncache
1059 fncache
1057 generaldelta
1060 generaldelta
1058 largefiles
1061 largefiles
1059 revlogv1
1062 revlogv1
1060 sparserevlog
1063 sparserevlog
1061 store
1064 store
1062
1065
1063 $ hg debugupgraderepo --run
1066 $ hg debugupgraderepo --run
1064 nothing to do
1067 nothing to do
1065 $ cat .hg/requires
1068 $ cat .hg/requires
1066 dotencode
1069 dotencode
1067 fncache
1070 fncache
1068 generaldelta
1071 generaldelta
1069 largefiles
1072 largefiles
1070 revlogv1
1073 revlogv1
1071 sparserevlog
1074 sparserevlog
1072 store
1075 store
1073
1076
1074 $ cat << EOF >> .hg/hgrc
1077 $ cat << EOF >> .hg/hgrc
1075 > [extensions]
1078 > [extensions]
1076 > lfs =
1079 > lfs =
1077 > [lfs]
1080 > [lfs]
1078 > threshold = 10
1081 > threshold = 10
1079 > EOF
1082 > EOF
1080 $ echo '123456789012345' > lfs.bin
1083 $ echo '123456789012345' > lfs.bin
1081 $ hg ci -Am 'lfs.bin'
1084 $ hg ci -Am 'lfs.bin'
1082 adding lfs.bin
1085 adding lfs.bin
1083 $ grep lfs .hg/requires
1086 $ grep lfs .hg/requires
1084 lfs
1087 lfs
1085 $ find .hg/store/lfs -type f
1088 $ find .hg/store/lfs -type f
1086 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1089 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1087
1090
1088 $ hg debugupgraderepo --run
1091 $ hg debugupgraderepo --run
1089 nothing to do
1092 nothing to do
1090
1093
1091 $ grep lfs .hg/requires
1094 $ grep lfs .hg/requires
1092 lfs
1095 lfs
1093 $ find .hg/store/lfs -type f
1096 $ find .hg/store/lfs -type f
1094 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1097 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1095 $ hg verify
1098 $ hg verify
1096 checking changesets
1099 checking changesets
1097 checking manifests
1100 checking manifests
1098 crosschecking files in changesets and manifests
1101 crosschecking files in changesets and manifests
1099 checking files
1102 checking files
1100 checked 2 changesets with 2 changes to 2 files
1103 checked 2 changesets with 2 changes to 2 files
1101 $ hg debugdata lfs.bin 0
1104 $ hg debugdata lfs.bin 0
1102 version https://git-lfs.github.com/spec/v1
1105 version https://git-lfs.github.com/spec/v1
1103 oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1106 oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1104 size 16
1107 size 16
1105 x-is-binary 0
1108 x-is-binary 0
1106
1109
1107 $ cd ..
1110 $ cd ..
1108
1111
1109 repository config is taken in account
1112 repository config is taken in account
1110 -------------------------------------
1113 -------------------------------------
1111
1114
1112 $ cat << EOF >> $HGRCPATH
1115 $ cat << EOF >> $HGRCPATH
1113 > [format]
1116 > [format]
1114 > maxchainlen = 1
1117 > maxchainlen = 1
1115 > EOF
1118 > EOF
1116
1119
1117 $ hg init localconfig
1120 $ hg init localconfig
1118 $ cd localconfig
1121 $ cd localconfig
1119 $ cat << EOF > file
1122 $ cat << EOF > file
1120 > some content
1123 > some content
1121 > with some length
1124 > with some length
1122 > to make sure we get a delta
1125 > to make sure we get a delta
1123 > after changes
1126 > after changes
1124 > very long
1127 > very long
1125 > very long
1128 > very long
1126 > very long
1129 > very long
1127 > very long
1130 > very long
1128 > very long
1131 > very long
1129 > very long
1132 > very long
1130 > very long
1133 > very long
1131 > very long
1134 > very long
1132 > very long
1135 > very long
1133 > very long
1136 > very long
1134 > very long
1137 > very long
1135 > EOF
1138 > EOF
1136 $ hg -q commit -A -m A
1139 $ hg -q commit -A -m A
1137 $ echo "new line" >> file
1140 $ echo "new line" >> file
1138 $ hg -q commit -m B
1141 $ hg -q commit -m B
1139 $ echo "new line" >> file
1142 $ echo "new line" >> file
1140 $ hg -q commit -m C
1143 $ hg -q commit -m C
1141
1144
1142 $ cat << EOF >> .hg/hgrc
1145 $ cat << EOF >> .hg/hgrc
1143 > [format]
1146 > [format]
1144 > maxchainlen = 9001
1147 > maxchainlen = 9001
1145 > EOF
1148 > EOF
1146 $ hg config format
1149 $ hg config format
1150 format.revlog-compression=$BUNDLE2_COMPRESSIONS$
1147 format.maxchainlen=9001
1151 format.maxchainlen=9001
1148 $ hg debugdeltachain file
1152 $ hg debugdeltachain file
1149 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
1153 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
1150 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
1154 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
1151 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
1155 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
1152 2 1 2 0 other 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1
1156 2 1 2 0 other 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1
1153
1157
1154 $ hg debugupgraderepo --run --optimize 're-delta-all'
1158 $ hg debugupgraderepo --run --optimize 're-delta-all'
1155 upgrade will perform the following actions:
1159 upgrade will perform the following actions:
1156
1160
1157 requirements
1161 requirements
1158 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
1162 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
1159
1163
1160 optimisations: re-delta-all
1164 optimisations: re-delta-all
1161
1165
1162 re-delta-all
1166 re-delta-all
1163 deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time
1167 deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time
1164
1168
1165 processed revlogs:
1169 processed revlogs:
1166 - all-filelogs
1170 - all-filelogs
1167 - changelog
1171 - changelog
1168 - manifest
1172 - manifest
1169
1173
1170 beginning upgrade...
1174 beginning upgrade...
1171 repository locked and read-only
1175 repository locked and read-only
1172 creating temporary repository to stage upgraded data: $TESTTMP/localconfig/.hg/upgrade.* (glob)
1176 creating temporary repository to stage upgraded data: $TESTTMP/localconfig/.hg/upgrade.* (glob)
1173 (it is safe to interrupt this process any time before data migration completes)
1177 (it is safe to interrupt this process any time before data migration completes)
1174 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1178 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1175 migrating 1019 bytes in store; 882 bytes tracked data
1179 migrating 1019 bytes in store; 882 bytes tracked data
1176 migrating 1 filelogs containing 3 revisions (320 bytes in store; 573 bytes tracked data)
1180 migrating 1 filelogs containing 3 revisions (320 bytes in store; 573 bytes tracked data)
1177 finished migrating 3 filelog revisions across 1 filelogs; change in size: -9 bytes
1181 finished migrating 3 filelog revisions across 1 filelogs; change in size: -9 bytes
1178 migrating 1 manifests containing 3 revisions (333 bytes in store; 138 bytes tracked data)
1182 migrating 1 manifests containing 3 revisions (333 bytes in store; 138 bytes tracked data)
1179 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1183 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1180 migrating changelog containing 3 revisions (366 bytes in store; 171 bytes tracked data)
1184 migrating changelog containing 3 revisions (366 bytes in store; 171 bytes tracked data)
1181 finished migrating 3 changelog revisions; change in size: 0 bytes
1185 finished migrating 3 changelog revisions; change in size: 0 bytes
1182 finished migrating 9 total revisions; total change in store size: -9 bytes
1186 finished migrating 9 total revisions; total change in store size: -9 bytes
1183 copying phaseroots
1187 copying phaseroots
1184 data fully upgraded in a temporary repository
1188 data fully upgraded in a temporary repository
1185 marking source repository as being upgraded; clients will be unable to read from repository
1189 marking source repository as being upgraded; clients will be unable to read from repository
1186 starting in-place swap of repository data
1190 starting in-place swap of repository data
1187 replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
1191 replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
1188 replacing store...
1192 replacing store...
1189 store replacement complete; repository was inconsistent for *s (glob)
1193 store replacement complete; repository was inconsistent for *s (glob)
1190 finalizing requirements file and making repository readable again
1194 finalizing requirements file and making repository readable again
1191 removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob)
1195 removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob)
1192 copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
1196 copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
1193 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
1197 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
1194 $ hg debugdeltachain file
1198 $ hg debugdeltachain file
1195 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
1199 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
1196 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
1200 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
1197 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
1201 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
1198 2 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 119 119 1.00000 1
1202 2 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 119 119 1.00000 1
1199 $ cd ..
1203 $ cd ..
1200
1204
1201 $ cat << EOF >> $HGRCPATH
1205 $ cat << EOF >> $HGRCPATH
1202 > [format]
1206 > [format]
1203 > maxchainlen = 9001
1207 > maxchainlen = 9001
1204 > EOF
1208 > EOF
1205
1209
1206 Check upgrading a sparse-revlog repository
1210 Check upgrading a sparse-revlog repository
1207 ---------------------------------------
1211 ---------------------------------------
1208
1212
1209 $ hg init sparserevlogrepo --config format.sparse-revlog=no
1213 $ hg init sparserevlogrepo --config format.sparse-revlog=no
1210 $ cd sparserevlogrepo
1214 $ cd sparserevlogrepo
1211 $ touch foo
1215 $ touch foo
1212 $ hg add foo
1216 $ hg add foo
1213 $ hg -q commit -m "foo"
1217 $ hg -q commit -m "foo"
1214 $ cat .hg/requires
1218 $ cat .hg/requires
1215 dotencode
1219 dotencode
1216 fncache
1220 fncache
1217 generaldelta
1221 generaldelta
1218 revlogv1
1222 revlogv1
1219 store
1223 store
1220
1224
1221 Check that we can add the sparse-revlog format requirement
1225 Check that we can add the sparse-revlog format requirement
1222 $ hg --config format.sparse-revlog=yes debugupgraderepo --run --quiet
1226 $ hg --config format.sparse-revlog=yes debugupgraderepo --run --quiet
1223 upgrade will perform the following actions:
1227 upgrade will perform the following actions:
1224
1228
1225 requirements
1229 requirements
1226 preserved: dotencode, fncache, generaldelta, revlogv1, store
1230 preserved: dotencode, fncache, generaldelta, revlogv1, store
1227 added: sparserevlog
1231 added: sparserevlog
1228
1232
1229 processed revlogs:
1233 processed revlogs:
1230 - all-filelogs
1234 - all-filelogs
1231 - changelog
1235 - changelog
1232 - manifest
1236 - manifest
1233
1237
1234 $ cat .hg/requires
1238 $ cat .hg/requires
1235 dotencode
1239 dotencode
1236 fncache
1240 fncache
1237 generaldelta
1241 generaldelta
1238 revlogv1
1242 revlogv1
1239 sparserevlog
1243 sparserevlog
1240 store
1244 store
1241
1245
1242 Check that we can remove the sparse-revlog format requirement
1246 Check that we can remove the sparse-revlog format requirement
1243 $ hg --config format.sparse-revlog=no debugupgraderepo --run --quiet
1247 $ hg --config format.sparse-revlog=no debugupgraderepo --run --quiet
1244 upgrade will perform the following actions:
1248 upgrade will perform the following actions:
1245
1249
1246 requirements
1250 requirements
1247 preserved: dotencode, fncache, generaldelta, revlogv1, store
1251 preserved: dotencode, fncache, generaldelta, revlogv1, store
1248 removed: sparserevlog
1252 removed: sparserevlog
1249
1253
1250 processed revlogs:
1254 processed revlogs:
1251 - all-filelogs
1255 - all-filelogs
1252 - changelog
1256 - changelog
1253 - manifest
1257 - manifest
1254
1258
1255 $ cat .hg/requires
1259 $ cat .hg/requires
1256 dotencode
1260 dotencode
1257 fncache
1261 fncache
1258 generaldelta
1262 generaldelta
1259 revlogv1
1263 revlogv1
1260 store
1264 store
1261
1265
1262 #if zstd
1266 #if zstd
1263
1267
1264 Check upgrading to a zstd revlog
1268 Check upgrading to a zstd revlog
1265 --------------------------------
1269 --------------------------------
1266
1270
1267 upgrade
1271 upgrade
1268
1272
1269 $ hg --config format.revlog-compression=zstd debugupgraderepo --run --no-backup --quiet
1273 $ hg --config format.revlog-compression=zstd debugupgraderepo --run --no-backup --quiet
1270 upgrade will perform the following actions:
1274 upgrade will perform the following actions:
1271
1275
1272 requirements
1276 requirements
1273 preserved: dotencode, fncache, generaldelta, revlogv1, store
1277 preserved: dotencode, fncache, generaldelta, revlogv1, store
1274 added: revlog-compression-zstd, sparserevlog
1278 added: revlog-compression-zstd, sparserevlog
1275
1279
1276 processed revlogs:
1280 processed revlogs:
1277 - all-filelogs
1281 - all-filelogs
1278 - changelog
1282 - changelog
1279 - manifest
1283 - manifest
1280
1284
1281 $ hg debugformat -v
1285 $ hg debugformat -v
1282 format-variant repo config default
1286 format-variant repo config default
1283 fncache: yes yes yes
1287 fncache: yes yes yes
1284 dotencode: yes yes yes
1288 dotencode: yes yes yes
1285 generaldelta: yes yes yes
1289 generaldelta: yes yes yes
1286 share-safe: no no no
1290 share-safe: no no no
1287 sparserevlog: yes yes yes
1291 sparserevlog: yes yes yes
1288 persistent-nodemap: no no no
1292 persistent-nodemap: no no no
1289 copies-sdc: no no no
1293 copies-sdc: no no no
1290 revlog-v2: no no no
1294 revlog-v2: no no no
1291 plain-cl-delta: yes yes yes
1295 plain-cl-delta: yes yes yes
1292 compression: zstd zlib zlib
1296 compression: zstd zlib zlib
1293 compression-level: default default default
1297 compression-level: default default default
1294 $ cat .hg/requires
1298 $ cat .hg/requires
1295 dotencode
1299 dotencode
1296 fncache
1300 fncache
1297 generaldelta
1301 generaldelta
1298 revlog-compression-zstd
1302 revlog-compression-zstd
1299 revlogv1
1303 revlogv1
1300 sparserevlog
1304 sparserevlog
1301 store
1305 store
1302
1306
1303 downgrade
1307 downgrade
1304
1308
1305 $ hg debugupgraderepo --run --no-backup --quiet
1309 $ hg debugupgraderepo --run --no-backup --quiet
1306 upgrade will perform the following actions:
1310 upgrade will perform the following actions:
1307
1311
1308 requirements
1312 requirements
1309 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
1313 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
1310 removed: revlog-compression-zstd
1314 removed: revlog-compression-zstd
1311
1315
1312 processed revlogs:
1316 processed revlogs:
1313 - all-filelogs
1317 - all-filelogs
1314 - changelog
1318 - changelog
1315 - manifest
1319 - manifest
1316
1320
1317 $ hg debugformat -v
1321 $ hg debugformat -v
1318 format-variant repo config default
1322 format-variant repo config default
1319 fncache: yes yes yes
1323 fncache: yes yes yes
1320 dotencode: yes yes yes
1324 dotencode: yes yes yes
1321 generaldelta: yes yes yes
1325 generaldelta: yes yes yes
1322 share-safe: no no no
1326 share-safe: no no no
1323 sparserevlog: yes yes yes
1327 sparserevlog: yes yes yes
1324 persistent-nodemap: no no no
1328 persistent-nodemap: no no no
1325 copies-sdc: no no no
1329 copies-sdc: no no no
1326 revlog-v2: no no no
1330 revlog-v2: no no no
1327 plain-cl-delta: yes yes yes
1331 plain-cl-delta: yes yes yes
1328 compression: zlib zlib zlib
1332 compression: zlib zlib zlib
1329 compression-level: default default default
1333 compression-level: default default default
1330 $ cat .hg/requires
1334 $ cat .hg/requires
1331 dotencode
1335 dotencode
1332 fncache
1336 fncache
1333 generaldelta
1337 generaldelta
1334 revlogv1
1338 revlogv1
1335 sparserevlog
1339 sparserevlog
1336 store
1340 store
1337
1341
1338 upgrade from hgrc
1342 upgrade from hgrc
1339
1343
1340 $ cat >> .hg/hgrc << EOF
1344 $ cat >> .hg/hgrc << EOF
1341 > [format]
1345 > [format]
1342 > revlog-compression=zstd
1346 > revlog-compression=zstd
1343 > EOF
1347 > EOF
1344 $ hg debugupgraderepo --run --no-backup --quiet
1348 $ hg debugupgraderepo --run --no-backup --quiet
1345 upgrade will perform the following actions:
1349 upgrade will perform the following actions:
1346
1350
1347 requirements
1351 requirements
1348 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
1352 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
1349 added: revlog-compression-zstd
1353 added: revlog-compression-zstd
1350
1354
1351 processed revlogs:
1355 processed revlogs:
1352 - all-filelogs
1356 - all-filelogs
1353 - changelog
1357 - changelog
1354 - manifest
1358 - manifest
1355
1359
1356 $ hg debugformat -v
1360 $ hg debugformat -v
1357 format-variant repo config default
1361 format-variant repo config default
1358 fncache: yes yes yes
1362 fncache: yes yes yes
1359 dotencode: yes yes yes
1363 dotencode: yes yes yes
1360 generaldelta: yes yes yes
1364 generaldelta: yes yes yes
1361 share-safe: no no no
1365 share-safe: no no no
1362 sparserevlog: yes yes yes
1366 sparserevlog: yes yes yes
1363 persistent-nodemap: no no no
1367 persistent-nodemap: no no no
1364 copies-sdc: no no no
1368 copies-sdc: no no no
1365 revlog-v2: no no no
1369 revlog-v2: no no no
1366 plain-cl-delta: yes yes yes
1370 plain-cl-delta: yes yes yes
1367 compression: zstd zstd zlib
1371 compression: zstd zstd zlib
1368 compression-level: default default default
1372 compression-level: default default default
1369 $ cat .hg/requires
1373 $ cat .hg/requires
1370 dotencode
1374 dotencode
1371 fncache
1375 fncache
1372 generaldelta
1376 generaldelta
1373 revlog-compression-zstd
1377 revlog-compression-zstd
1374 revlogv1
1378 revlogv1
1375 sparserevlog
1379 sparserevlog
1376 store
1380 store
1377
1381
1378 #endif
1382 #endif
1379
1383
1380 Check upgrading to a side-data revlog
1384 Check upgrading to a side-data revlog
1381 -------------------------------------
1385 -------------------------------------
1382
1386
1383 upgrade
1387 upgrade
1384
1388
1385 $ hg --config format.exp-use-side-data=yes debugupgraderepo --run --no-backup --config "extensions.sidedata=$TESTDIR/testlib/ext-sidedata.py" --quiet
1389 $ hg --config format.exp-use-side-data=yes debugupgraderepo --run --no-backup --config "extensions.sidedata=$TESTDIR/testlib/ext-sidedata.py" --quiet
1386 upgrade will perform the following actions:
1390 upgrade will perform the following actions:
1387
1391
1388 requirements
1392 requirements
1389 preserved: dotencode, fncache, generaldelta, store (no-zstd !)
1393 preserved: dotencode, fncache, generaldelta, store (no-zstd !)
1390 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd !)
1394 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd !)
1391 removed: revlogv1
1395 removed: revlogv1
1392 added: exp-revlogv2.2, exp-sidedata-flag (zstd !)
1396 added: exp-revlogv2.2, exp-sidedata-flag (zstd !)
1393 added: exp-revlogv2.2, exp-sidedata-flag, sparserevlog (no-zstd !)
1397 added: exp-revlogv2.2, exp-sidedata-flag, sparserevlog (no-zstd !)
1394
1398
1395 processed revlogs:
1399 processed revlogs:
1396 - all-filelogs
1400 - all-filelogs
1397 - changelog
1401 - changelog
1398 - manifest
1402 - manifest
1399
1403
1400 $ hg debugformat -v
1404 $ hg debugformat -v
1401 format-variant repo config default
1405 format-variant repo config default
1402 fncache: yes yes yes
1406 fncache: yes yes yes
1403 dotencode: yes yes yes
1407 dotencode: yes yes yes
1404 generaldelta: yes yes yes
1408 generaldelta: yes yes yes
1405 share-safe: no no no
1409 share-safe: no no no
1406 sparserevlog: yes yes yes
1410 sparserevlog: yes yes yes
1407 persistent-nodemap: no no no
1411 persistent-nodemap: no no no
1408 copies-sdc: no no no
1412 copies-sdc: no no no
1409 revlog-v2: yes no no
1413 revlog-v2: yes no no
1410 plain-cl-delta: yes yes yes
1414 plain-cl-delta: yes yes yes
1411 compression: zlib zlib zlib (no-zstd !)
1415 compression: zlib zlib zlib (no-zstd !)
1412 compression: zstd zstd zlib (zstd !)
1416 compression: zstd zstd zlib (zstd !)
1413 compression-level: default default default
1417 compression-level: default default default
1414 $ cat .hg/requires
1418 $ cat .hg/requires
1415 dotencode
1419 dotencode
1416 exp-revlogv2.2
1420 exp-revlogv2.2
1417 exp-sidedata-flag
1421 exp-sidedata-flag
1418 fncache
1422 fncache
1419 generaldelta
1423 generaldelta
1420 revlog-compression-zstd (zstd !)
1424 revlog-compression-zstd (zstd !)
1421 sparserevlog
1425 sparserevlog
1422 store
1426 store
1423 $ hg debugsidedata -c 0
1427 $ hg debugsidedata -c 0
1424 2 sidedata entries
1428 2 sidedata entries
1425 entry-0001 size 4
1429 entry-0001 size 4
1426 entry-0002 size 32
1430 entry-0002 size 32
1427
1431
1428 downgrade
1432 downgrade
1429
1433
1430 $ hg debugupgraderepo --config format.exp-use-side-data=no --run --no-backup --quiet
1434 $ hg debugupgraderepo --config format.exp-use-side-data=no --run --no-backup --quiet
1431 upgrade will perform the following actions:
1435 upgrade will perform the following actions:
1432
1436
1433 requirements
1437 requirements
1434 preserved: dotencode, fncache, generaldelta, sparserevlog, store (no-zstd !)
1438 preserved: dotencode, fncache, generaldelta, sparserevlog, store (no-zstd !)
1435 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd !)
1439 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd !)
1436 removed: exp-revlogv2.2, exp-sidedata-flag
1440 removed: exp-revlogv2.2, exp-sidedata-flag
1437 added: revlogv1
1441 added: revlogv1
1438
1442
1439 processed revlogs:
1443 processed revlogs:
1440 - all-filelogs
1444 - all-filelogs
1441 - changelog
1445 - changelog
1442 - manifest
1446 - manifest
1443
1447
1444 $ hg debugformat -v
1448 $ hg debugformat -v
1445 format-variant repo config default
1449 format-variant repo config default
1446 fncache: yes yes yes
1450 fncache: yes yes yes
1447 dotencode: yes yes yes
1451 dotencode: yes yes yes
1448 generaldelta: yes yes yes
1452 generaldelta: yes yes yes
1449 share-safe: no no no
1453 share-safe: no no no
1450 sparserevlog: yes yes yes
1454 sparserevlog: yes yes yes
1451 persistent-nodemap: no no no
1455 persistent-nodemap: no no no
1452 copies-sdc: no no no
1456 copies-sdc: no no no
1453 revlog-v2: no no no
1457 revlog-v2: no no no
1454 plain-cl-delta: yes yes yes
1458 plain-cl-delta: yes yes yes
1455 compression: zlib zlib zlib (no-zstd !)
1459 compression: zlib zlib zlib (no-zstd !)
1456 compression: zstd zstd zlib (zstd !)
1460 compression: zstd zstd zlib (zstd !)
1457 compression-level: default default default
1461 compression-level: default default default
1458 $ cat .hg/requires
1462 $ cat .hg/requires
1459 dotencode
1463 dotencode
1460 fncache
1464 fncache
1461 generaldelta
1465 generaldelta
1462 revlog-compression-zstd (zstd !)
1466 revlog-compression-zstd (zstd !)
1463 revlogv1
1467 revlogv1
1464 sparserevlog
1468 sparserevlog
1465 store
1469 store
1466 $ hg debugsidedata -c 0
1470 $ hg debugsidedata -c 0
1467
1471
1468 upgrade from hgrc
1472 upgrade from hgrc
1469
1473
1470 $ cat >> .hg/hgrc << EOF
1474 $ cat >> .hg/hgrc << EOF
1471 > [format]
1475 > [format]
1472 > exp-use-side-data=yes
1476 > exp-use-side-data=yes
1473 > EOF
1477 > EOF
1474 $ hg debugupgraderepo --run --no-backup --quiet
1478 $ hg debugupgraderepo --run --no-backup --quiet
1475 upgrade will perform the following actions:
1479 upgrade will perform the following actions:
1476
1480
1477 requirements
1481 requirements
1478 preserved: dotencode, fncache, generaldelta, sparserevlog, store (no-zstd !)
1482 preserved: dotencode, fncache, generaldelta, sparserevlog, store (no-zstd !)
1479 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd !)
1483 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd !)
1480 removed: revlogv1
1484 removed: revlogv1
1481 added: exp-revlogv2.2, exp-sidedata-flag
1485 added: exp-revlogv2.2, exp-sidedata-flag
1482
1486
1483 processed revlogs:
1487 processed revlogs:
1484 - all-filelogs
1488 - all-filelogs
1485 - changelog
1489 - changelog
1486 - manifest
1490 - manifest
1487
1491
1488 $ hg debugformat -v
1492 $ hg debugformat -v
1489 format-variant repo config default
1493 format-variant repo config default
1490 fncache: yes yes yes
1494 fncache: yes yes yes
1491 dotencode: yes yes yes
1495 dotencode: yes yes yes
1492 generaldelta: yes yes yes
1496 generaldelta: yes yes yes
1493 share-safe: no no no
1497 share-safe: no no no
1494 sparserevlog: yes yes yes
1498 sparserevlog: yes yes yes
1495 persistent-nodemap: no no no
1499 persistent-nodemap: no no no
1496 copies-sdc: no no no
1500 copies-sdc: no no no
1497 revlog-v2: yes yes no
1501 revlog-v2: yes yes no
1498 plain-cl-delta: yes yes yes
1502 plain-cl-delta: yes yes yes
1499 compression: zlib zlib zlib (no-zstd !)
1503 compression: zlib zlib zlib (no-zstd !)
1500 compression: zstd zstd zlib (zstd !)
1504 compression: zstd zstd zlib (zstd !)
1501 compression-level: default default default
1505 compression-level: default default default
1502 $ cat .hg/requires
1506 $ cat .hg/requires
1503 dotencode
1507 dotencode
1504 exp-revlogv2.2
1508 exp-revlogv2.2
1505 exp-sidedata-flag
1509 exp-sidedata-flag
1506 fncache
1510 fncache
1507 generaldelta
1511 generaldelta
1508 revlog-compression-zstd (zstd !)
1512 revlog-compression-zstd (zstd !)
1509 sparserevlog
1513 sparserevlog
1510 store
1514 store
1511 $ hg debugsidedata -c 0
1515 $ hg debugsidedata -c 0
1512
1516
1513 Demonstrate that nothing to perform upgrade will still run all the way through
1517 Demonstrate that nothing to perform upgrade will still run all the way through
1514
1518
1515 $ hg debugupgraderepo --run
1519 $ hg debugupgraderepo --run
1516 nothing to do
1520 nothing to do
General Comments 0
You need to be logged in to leave comments. Login now