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