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