##// END OF EJS Templates
auto-upgrade: add a test case with no permission to lock the repository...
marmoute -
r50091:1c233af9 default
parent child Browse files
Show More
@@ -1,2063 +1,2078
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 > [storage]
9 > [storage]
10 > dirstate-v2.slow-path=allow
10 > dirstate-v2.slow-path=allow
11 > EOF
11 > EOF
12
12
13 store and revlogv1 are required in source
13 store and revlogv1 are required in source
14
14
15 $ hg --config format.usestore=false init no-store
15 $ hg --config format.usestore=false init no-store
16 $ hg -R no-store debugupgraderepo
16 $ hg -R no-store debugupgraderepo
17 abort: cannot upgrade repository; requirement missing: store
17 abort: cannot upgrade repository; requirement missing: store
18 [255]
18 [255]
19
19
20 $ hg init no-revlogv1
20 $ hg init no-revlogv1
21 $ cat > no-revlogv1/.hg/requires << EOF
21 $ cat > no-revlogv1/.hg/requires << EOF
22 > dotencode
22 > dotencode
23 > fncache
23 > fncache
24 > generaldelta
24 > generaldelta
25 > store
25 > store
26 > EOF
26 > EOF
27
27
28 $ hg -R no-revlogv1 debugupgraderepo
28 $ hg -R no-revlogv1 debugupgraderepo
29 abort: cannot upgrade repository; missing a revlog version
29 abort: cannot upgrade repository; missing a revlog version
30 [255]
30 [255]
31
31
32 Cannot upgrade shared repositories
32 Cannot upgrade shared repositories
33
33
34 $ hg init share-parent
34 $ hg init share-parent
35 $ hg -R share-parent debugbuilddag -n .+9
35 $ hg -R share-parent debugbuilddag -n .+9
36 $ hg -R share-parent up tip
36 $ hg -R share-parent up tip
37 10 files updated, 0 files merged, 0 files removed, 0 files unresolved
37 10 files updated, 0 files merged, 0 files removed, 0 files unresolved
38 $ hg -q share share-parent share-child
38 $ hg -q share share-parent share-child
39
39
40 $ hg -R share-child debugupgraderepo --config format.sparse-revlog=no
40 $ hg -R share-child debugupgraderepo --config format.sparse-revlog=no
41 abort: cannot use these actions on a share repository: sparserevlog
41 abort: cannot use these actions on a share repository: sparserevlog
42 (upgrade the main repository directly)
42 (upgrade the main repository directly)
43 [255]
43 [255]
44
44
45 Unless the action is compatible with share
45 Unless the action is compatible with share
46
46
47 $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=yes --quiet
47 $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=yes --quiet
48 requirements
48 requirements
49 preserved: * (glob)
49 preserved: * (glob)
50 added: dirstate-v2
50 added: dirstate-v2
51
51
52 no revlogs to process
52 no revlogs to process
53
53
54
54
55 $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=yes --quiet --run
55 $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=yes --quiet --run
56 upgrade will perform the following actions:
56 upgrade will perform the following actions:
57
57
58 requirements
58 requirements
59 preserved: * (glob)
59 preserved: * (glob)
60 added: dirstate-v2
60 added: dirstate-v2
61
61
62 no revlogs to process
62 no revlogs to process
63
63
64 $ hg debugformat -R share-child | grep dirstate-v2
64 $ hg debugformat -R share-child | grep dirstate-v2
65 dirstate-v2: yes
65 dirstate-v2: yes
66 $ hg debugformat -R share-parent | grep dirstate-v2
66 $ hg debugformat -R share-parent | grep dirstate-v2
67 dirstate-v2: no
67 dirstate-v2: no
68 $ hg status --all -R share-child
68 $ hg status --all -R share-child
69 C nf0
69 C nf0
70 C nf1
70 C nf1
71 C nf2
71 C nf2
72 C nf3
72 C nf3
73 C nf4
73 C nf4
74 C nf5
74 C nf5
75 C nf6
75 C nf6
76 C nf7
76 C nf7
77 C nf8
77 C nf8
78 C nf9
78 C nf9
79 $ hg log -l 3 -R share-child
79 $ hg log -l 3 -R share-child
80 changeset: 9:0059eb38e4a4
80 changeset: 9:0059eb38e4a4
81 tag: tip
81 tag: tip
82 user: debugbuilddag
82 user: debugbuilddag
83 date: Thu Jan 01 00:00:09 1970 +0000
83 date: Thu Jan 01 00:00:09 1970 +0000
84 summary: r9
84 summary: r9
85
85
86 changeset: 8:4d5be70c8130
86 changeset: 8:4d5be70c8130
87 user: debugbuilddag
87 user: debugbuilddag
88 date: Thu Jan 01 00:00:08 1970 +0000
88 date: Thu Jan 01 00:00:08 1970 +0000
89 summary: r8
89 summary: r8
90
90
91 changeset: 7:e60bfe72517e
91 changeset: 7:e60bfe72517e
92 user: debugbuilddag
92 user: debugbuilddag
93 date: Thu Jan 01 00:00:07 1970 +0000
93 date: Thu Jan 01 00:00:07 1970 +0000
94 summary: r7
94 summary: r7
95
95
96 $ hg status --all -R share-parent
96 $ hg status --all -R share-parent
97 C nf0
97 C nf0
98 C nf1
98 C nf1
99 C nf2
99 C nf2
100 C nf3
100 C nf3
101 C nf4
101 C nf4
102 C nf5
102 C nf5
103 C nf6
103 C nf6
104 C nf7
104 C nf7
105 C nf8
105 C nf8
106 C nf9
106 C nf9
107 $ hg log -l 3 -R share-parent
107 $ hg log -l 3 -R share-parent
108 changeset: 9:0059eb38e4a4
108 changeset: 9:0059eb38e4a4
109 tag: tip
109 tag: tip
110 user: debugbuilddag
110 user: debugbuilddag
111 date: Thu Jan 01 00:00:09 1970 +0000
111 date: Thu Jan 01 00:00:09 1970 +0000
112 summary: r9
112 summary: r9
113
113
114 changeset: 8:4d5be70c8130
114 changeset: 8:4d5be70c8130
115 user: debugbuilddag
115 user: debugbuilddag
116 date: Thu Jan 01 00:00:08 1970 +0000
116 date: Thu Jan 01 00:00:08 1970 +0000
117 summary: r8
117 summary: r8
118
118
119 changeset: 7:e60bfe72517e
119 changeset: 7:e60bfe72517e
120 user: debugbuilddag
120 user: debugbuilddag
121 date: Thu Jan 01 00:00:07 1970 +0000
121 date: Thu Jan 01 00:00:07 1970 +0000
122 summary: r7
122 summary: r7
123
123
124
124
125 $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=no --quiet --run
125 $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=no --quiet --run
126 upgrade will perform the following actions:
126 upgrade will perform the following actions:
127
127
128 requirements
128 requirements
129 preserved: * (glob)
129 preserved: * (glob)
130 removed: dirstate-v2
130 removed: dirstate-v2
131
131
132 no revlogs to process
132 no revlogs to process
133
133
134 $ hg debugformat -R share-child | grep dirstate-v2
134 $ hg debugformat -R share-child | grep dirstate-v2
135 dirstate-v2: no
135 dirstate-v2: no
136 $ hg debugformat -R share-parent | grep dirstate-v2
136 $ hg debugformat -R share-parent | grep dirstate-v2
137 dirstate-v2: no
137 dirstate-v2: no
138 $ hg status --all -R share-child
138 $ hg status --all -R share-child
139 C nf0
139 C nf0
140 C nf1
140 C nf1
141 C nf2
141 C nf2
142 C nf3
142 C nf3
143 C nf4
143 C nf4
144 C nf5
144 C nf5
145 C nf6
145 C nf6
146 C nf7
146 C nf7
147 C nf8
147 C nf8
148 C nf9
148 C nf9
149 $ hg log -l 3 -R share-child
149 $ hg log -l 3 -R share-child
150 changeset: 9:0059eb38e4a4
150 changeset: 9:0059eb38e4a4
151 tag: tip
151 tag: tip
152 user: debugbuilddag
152 user: debugbuilddag
153 date: Thu Jan 01 00:00:09 1970 +0000
153 date: Thu Jan 01 00:00:09 1970 +0000
154 summary: r9
154 summary: r9
155
155
156 changeset: 8:4d5be70c8130
156 changeset: 8:4d5be70c8130
157 user: debugbuilddag
157 user: debugbuilddag
158 date: Thu Jan 01 00:00:08 1970 +0000
158 date: Thu Jan 01 00:00:08 1970 +0000
159 summary: r8
159 summary: r8
160
160
161 changeset: 7:e60bfe72517e
161 changeset: 7:e60bfe72517e
162 user: debugbuilddag
162 user: debugbuilddag
163 date: Thu Jan 01 00:00:07 1970 +0000
163 date: Thu Jan 01 00:00:07 1970 +0000
164 summary: r7
164 summary: r7
165
165
166 $ hg status --all -R share-parent
166 $ hg status --all -R share-parent
167 C nf0
167 C nf0
168 C nf1
168 C nf1
169 C nf2
169 C nf2
170 C nf3
170 C nf3
171 C nf4
171 C nf4
172 C nf5
172 C nf5
173 C nf6
173 C nf6
174 C nf7
174 C nf7
175 C nf8
175 C nf8
176 C nf9
176 C nf9
177 $ hg log -l 3 -R share-parent
177 $ hg log -l 3 -R share-parent
178 changeset: 9:0059eb38e4a4
178 changeset: 9:0059eb38e4a4
179 tag: tip
179 tag: tip
180 user: debugbuilddag
180 user: debugbuilddag
181 date: Thu Jan 01 00:00:09 1970 +0000
181 date: Thu Jan 01 00:00:09 1970 +0000
182 summary: r9
182 summary: r9
183
183
184 changeset: 8:4d5be70c8130
184 changeset: 8:4d5be70c8130
185 user: debugbuilddag
185 user: debugbuilddag
186 date: Thu Jan 01 00:00:08 1970 +0000
186 date: Thu Jan 01 00:00:08 1970 +0000
187 summary: r8
187 summary: r8
188
188
189 changeset: 7:e60bfe72517e
189 changeset: 7:e60bfe72517e
190 user: debugbuilddag
190 user: debugbuilddag
191 date: Thu Jan 01 00:00:07 1970 +0000
191 date: Thu Jan 01 00:00:07 1970 +0000
192 summary: r7
192 summary: r7
193
193
194
194
195 Do not yet support upgrading treemanifest repos
195 Do not yet support upgrading treemanifest repos
196
196
197 $ hg --config experimental.treemanifest=true init treemanifest
197 $ hg --config experimental.treemanifest=true init treemanifest
198 $ hg -R treemanifest debugupgraderepo
198 $ hg -R treemanifest debugupgraderepo
199 abort: cannot upgrade repository; unsupported source requirement: treemanifest
199 abort: cannot upgrade repository; unsupported source requirement: treemanifest
200 [255]
200 [255]
201
201
202 Cannot add treemanifest requirement during upgrade
202 Cannot add treemanifest requirement during upgrade
203
203
204 $ hg init disallowaddedreq
204 $ hg init disallowaddedreq
205 $ hg -R disallowaddedreq --config experimental.treemanifest=true debugupgraderepo
205 $ hg -R disallowaddedreq --config experimental.treemanifest=true debugupgraderepo
206 abort: cannot upgrade repository; do not support adding requirement: treemanifest
206 abort: cannot upgrade repository; do not support adding requirement: treemanifest
207 [255]
207 [255]
208
208
209 An upgrade of a repository created with recommended settings only suggests optimizations
209 An upgrade of a repository created with recommended settings only suggests optimizations
210
210
211 $ hg init empty
211 $ hg init empty
212 $ cd empty
212 $ cd empty
213 $ hg debugformat
213 $ hg debugformat
214 format-variant repo
214 format-variant repo
215 fncache: yes
215 fncache: yes
216 dirstate-v2: no
216 dirstate-v2: no
217 tracked-hint: no
217 tracked-hint: no
218 dotencode: yes
218 dotencode: yes
219 generaldelta: yes
219 generaldelta: yes
220 share-safe: yes
220 share-safe: yes
221 sparserevlog: yes
221 sparserevlog: yes
222 persistent-nodemap: no (no-rust !)
222 persistent-nodemap: no (no-rust !)
223 persistent-nodemap: yes (rust !)
223 persistent-nodemap: yes (rust !)
224 copies-sdc: no
224 copies-sdc: no
225 revlog-v2: no
225 revlog-v2: no
226 changelog-v2: no
226 changelog-v2: no
227 plain-cl-delta: yes
227 plain-cl-delta: yes
228 compression: zlib
228 compression: zlib
229 compression-level: default
229 compression-level: default
230 $ hg debugformat --verbose
230 $ hg debugformat --verbose
231 format-variant repo config default
231 format-variant repo config default
232 fncache: yes yes yes
232 fncache: yes yes yes
233 dirstate-v2: no no no
233 dirstate-v2: no no no
234 tracked-hint: no no no
234 tracked-hint: no no no
235 dotencode: yes yes yes
235 dotencode: yes yes yes
236 generaldelta: yes yes yes
236 generaldelta: yes yes yes
237 share-safe: yes yes yes
237 share-safe: yes yes yes
238 sparserevlog: yes yes yes
238 sparserevlog: yes yes yes
239 persistent-nodemap: no no no (no-rust !)
239 persistent-nodemap: no no no (no-rust !)
240 persistent-nodemap: yes yes no (rust !)
240 persistent-nodemap: yes yes no (rust !)
241 copies-sdc: no no no
241 copies-sdc: no no no
242 revlog-v2: no no no
242 revlog-v2: no no no
243 changelog-v2: no no no
243 changelog-v2: no no no
244 plain-cl-delta: yes yes yes
244 plain-cl-delta: yes yes yes
245 compression: zlib zlib zlib (no-zstd !)
245 compression: zlib zlib zlib (no-zstd !)
246 compression: zlib zlib zstd (zstd !)
246 compression: zlib zlib zstd (zstd !)
247 compression-level: default default default
247 compression-level: default default default
248 $ hg debugformat --verbose --config format.usefncache=no
248 $ hg debugformat --verbose --config format.usefncache=no
249 format-variant repo config default
249 format-variant repo config default
250 fncache: yes no yes
250 fncache: yes no yes
251 dirstate-v2: no no no
251 dirstate-v2: no no no
252 tracked-hint: no no no
252 tracked-hint: no no no
253 dotencode: yes no yes
253 dotencode: yes no yes
254 generaldelta: yes yes yes
254 generaldelta: yes yes yes
255 share-safe: yes yes yes
255 share-safe: yes yes yes
256 sparserevlog: yes yes yes
256 sparserevlog: yes yes yes
257 persistent-nodemap: no no no (no-rust !)
257 persistent-nodemap: no no no (no-rust !)
258 persistent-nodemap: yes yes no (rust !)
258 persistent-nodemap: yes yes no (rust !)
259 copies-sdc: no no no
259 copies-sdc: no no no
260 revlog-v2: no no no
260 revlog-v2: no no no
261 changelog-v2: no no no
261 changelog-v2: no no no
262 plain-cl-delta: yes yes yes
262 plain-cl-delta: yes yes yes
263 compression: zlib zlib zlib (no-zstd !)
263 compression: zlib zlib zlib (no-zstd !)
264 compression: zlib zlib zstd (zstd !)
264 compression: zlib zlib zstd (zstd !)
265 compression-level: default default default
265 compression-level: default default default
266 $ hg debugformat --verbose --config format.usefncache=no --color=debug
266 $ hg debugformat --verbose --config format.usefncache=no --color=debug
267 format-variant repo config default
267 format-variant repo config default
268 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
268 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
269 [formatvariant.name.uptodate|dirstate-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
269 [formatvariant.name.uptodate|dirstate-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
270 [formatvariant.name.uptodate|tracked-hint: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
270 [formatvariant.name.uptodate|tracked-hint: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
271 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
271 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
272 [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
272 [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
273 [formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
273 [formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
274 [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
274 [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
275 [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !)
275 [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !)
276 [formatvariant.name.mismatchdefault|persistent-nodemap:][formatvariant.repo.mismatchdefault| yes][formatvariant.config.special| yes][formatvariant.default| no] (rust !)
276 [formatvariant.name.mismatchdefault|persistent-nodemap:][formatvariant.repo.mismatchdefault| yes][formatvariant.config.special| yes][formatvariant.default| no] (rust !)
277 [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
277 [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
278 [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
278 [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
279 [formatvariant.name.uptodate|changelog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
279 [formatvariant.name.uptodate|changelog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
280 [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
280 [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
281 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !)
281 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !)
282 [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !)
282 [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !)
283 [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default]
283 [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default]
284 $ hg debugformat -Tjson
284 $ hg debugformat -Tjson
285 [
285 [
286 {
286 {
287 "config": true,
287 "config": true,
288 "default": true,
288 "default": true,
289 "name": "fncache",
289 "name": "fncache",
290 "repo": true
290 "repo": true
291 },
291 },
292 {
292 {
293 "config": false,
293 "config": false,
294 "default": false,
294 "default": false,
295 "name": "dirstate-v2",
295 "name": "dirstate-v2",
296 "repo": false
296 "repo": false
297 },
297 },
298 {
298 {
299 "config": false,
299 "config": false,
300 "default": false,
300 "default": false,
301 "name": "tracked-hint",
301 "name": "tracked-hint",
302 "repo": false
302 "repo": false
303 },
303 },
304 {
304 {
305 "config": true,
305 "config": true,
306 "default": true,
306 "default": true,
307 "name": "dotencode",
307 "name": "dotencode",
308 "repo": true
308 "repo": true
309 },
309 },
310 {
310 {
311 "config": true,
311 "config": true,
312 "default": true,
312 "default": true,
313 "name": "generaldelta",
313 "name": "generaldelta",
314 "repo": true
314 "repo": true
315 },
315 },
316 {
316 {
317 "config": true,
317 "config": true,
318 "default": true,
318 "default": true,
319 "name": "share-safe",
319 "name": "share-safe",
320 "repo": true
320 "repo": true
321 },
321 },
322 {
322 {
323 "config": true,
323 "config": true,
324 "default": true,
324 "default": true,
325 "name": "sparserevlog",
325 "name": "sparserevlog",
326 "repo": true
326 "repo": true
327 },
327 },
328 {
328 {
329 "config": false, (no-rust !)
329 "config": false, (no-rust !)
330 "config": true, (rust !)
330 "config": true, (rust !)
331 "default": false,
331 "default": false,
332 "name": "persistent-nodemap",
332 "name": "persistent-nodemap",
333 "repo": false (no-rust !)
333 "repo": false (no-rust !)
334 "repo": true (rust !)
334 "repo": true (rust !)
335 },
335 },
336 {
336 {
337 "config": false,
337 "config": false,
338 "default": false,
338 "default": false,
339 "name": "copies-sdc",
339 "name": "copies-sdc",
340 "repo": false
340 "repo": false
341 },
341 },
342 {
342 {
343 "config": false,
343 "config": false,
344 "default": false,
344 "default": false,
345 "name": "revlog-v2",
345 "name": "revlog-v2",
346 "repo": false
346 "repo": false
347 },
347 },
348 {
348 {
349 "config": false,
349 "config": false,
350 "default": false,
350 "default": false,
351 "name": "changelog-v2",
351 "name": "changelog-v2",
352 "repo": false
352 "repo": false
353 },
353 },
354 {
354 {
355 "config": true,
355 "config": true,
356 "default": true,
356 "default": true,
357 "name": "plain-cl-delta",
357 "name": "plain-cl-delta",
358 "repo": true
358 "repo": true
359 },
359 },
360 {
360 {
361 "config": "zlib",
361 "config": "zlib",
362 "default": "zlib", (no-zstd !)
362 "default": "zlib", (no-zstd !)
363 "default": "zstd", (zstd !)
363 "default": "zstd", (zstd !)
364 "name": "compression",
364 "name": "compression",
365 "repo": "zlib"
365 "repo": "zlib"
366 },
366 },
367 {
367 {
368 "config": "default",
368 "config": "default",
369 "default": "default",
369 "default": "default",
370 "name": "compression-level",
370 "name": "compression-level",
371 "repo": "default"
371 "repo": "default"
372 }
372 }
373 ]
373 ]
374 $ hg debugupgraderepo
374 $ hg debugupgraderepo
375 (no format upgrades found in existing repository)
375 (no format upgrades found in existing repository)
376 performing an upgrade with "--run" will make the following changes:
376 performing an upgrade with "--run" will make the following changes:
377
377
378 requirements
378 requirements
379 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
379 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
380 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
380 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
381
381
382 no revlogs to process
382 no revlogs to process
383
383
384 additional optimizations are available by specifying "--optimize <name>":
384 additional optimizations are available by specifying "--optimize <name>":
385
385
386 re-delta-parent
386 re-delta-parent
387 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
387 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
388
388
389 re-delta-multibase
389 re-delta-multibase
390 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
390 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
391
391
392 re-delta-all
392 re-delta-all
393 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
393 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
394
394
395 re-delta-fulladd
395 re-delta-fulladd
396 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.
396 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.
397
397
398
398
399 $ hg debugupgraderepo --quiet
399 $ hg debugupgraderepo --quiet
400 requirements
400 requirements
401 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
401 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
402 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
402 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
403
403
404 no revlogs to process
404 no revlogs to process
405
405
406
406
407 --optimize can be used to add optimizations
407 --optimize can be used to add optimizations
408
408
409 $ hg debugupgrade --optimize 're-delta-parent'
409 $ hg debugupgrade --optimize 're-delta-parent'
410 (no format upgrades found in existing repository)
410 (no format upgrades found in existing repository)
411 performing an upgrade with "--run" will make the following changes:
411 performing an upgrade with "--run" will make the following changes:
412
412
413 requirements
413 requirements
414 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
414 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
415 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
415 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
416
416
417 optimisations: re-delta-parent
417 optimisations: re-delta-parent
418
418
419 re-delta-parent
419 re-delta-parent
420 deltas within internal storage will choose a new base revision if needed
420 deltas within internal storage will choose a new base revision if needed
421
421
422 processed revlogs:
422 processed revlogs:
423 - all-filelogs
423 - all-filelogs
424 - changelog
424 - changelog
425 - manifest
425 - manifest
426
426
427 additional optimizations are available by specifying "--optimize <name>":
427 additional optimizations are available by specifying "--optimize <name>":
428
428
429 re-delta-multibase
429 re-delta-multibase
430 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
430 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
431
431
432 re-delta-all
432 re-delta-all
433 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
433 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
434
434
435 re-delta-fulladd
435 re-delta-fulladd
436 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.
436 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.
437
437
438
438
439 modern form of the option
439 modern form of the option
440
440
441 $ hg debugupgrade --optimize re-delta-parent
441 $ hg debugupgrade --optimize re-delta-parent
442 (no format upgrades found in existing repository)
442 (no format upgrades found in existing repository)
443 performing an upgrade with "--run" will make the following changes:
443 performing an upgrade with "--run" will make the following changes:
444
444
445 requirements
445 requirements
446 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
446 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
447 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
447 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
448
448
449 optimisations: re-delta-parent
449 optimisations: re-delta-parent
450
450
451 re-delta-parent
451 re-delta-parent
452 deltas within internal storage will choose a new base revision if needed
452 deltas within internal storage will choose a new base revision if needed
453
453
454 processed revlogs:
454 processed revlogs:
455 - all-filelogs
455 - all-filelogs
456 - changelog
456 - changelog
457 - manifest
457 - manifest
458
458
459 additional optimizations are available by specifying "--optimize <name>":
459 additional optimizations are available by specifying "--optimize <name>":
460
460
461 re-delta-multibase
461 re-delta-multibase
462 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
462 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
463
463
464 re-delta-all
464 re-delta-all
465 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
465 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
466
466
467 re-delta-fulladd
467 re-delta-fulladd
468 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
468 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
469
469
470 $ hg debugupgrade --optimize re-delta-parent --quiet
470 $ hg debugupgrade --optimize re-delta-parent --quiet
471 requirements
471 requirements
472 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
472 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
473 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
473 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
474
474
475 optimisations: re-delta-parent
475 optimisations: re-delta-parent
476
476
477 processed revlogs:
477 processed revlogs:
478 - all-filelogs
478 - all-filelogs
479 - changelog
479 - changelog
480 - manifest
480 - manifest
481
481
482
482
483 unknown optimization:
483 unknown optimization:
484
484
485 $ hg debugupgrade --optimize foobar
485 $ hg debugupgrade --optimize foobar
486 abort: unknown optimization action requested: foobar
486 abort: unknown optimization action requested: foobar
487 (run without arguments to see valid optimizations)
487 (run without arguments to see valid optimizations)
488 [255]
488 [255]
489
489
490 Various sub-optimal detections work
490 Various sub-optimal detections work
491
491
492 $ cat > .hg/requires << EOF
492 $ cat > .hg/requires << EOF
493 > revlogv1
493 > revlogv1
494 > store
494 > store
495 > EOF
495 > EOF
496
496
497 $ hg debugformat
497 $ hg debugformat
498 format-variant repo
498 format-variant repo
499 fncache: no
499 fncache: no
500 dirstate-v2: no
500 dirstate-v2: no
501 tracked-hint: no
501 tracked-hint: no
502 dotencode: no
502 dotencode: no
503 generaldelta: no
503 generaldelta: no
504 share-safe: no
504 share-safe: no
505 sparserevlog: no
505 sparserevlog: no
506 persistent-nodemap: no
506 persistent-nodemap: no
507 copies-sdc: no
507 copies-sdc: no
508 revlog-v2: no
508 revlog-v2: no
509 changelog-v2: no
509 changelog-v2: no
510 plain-cl-delta: yes
510 plain-cl-delta: yes
511 compression: zlib
511 compression: zlib
512 compression-level: default
512 compression-level: default
513 $ hg debugformat --verbose
513 $ hg debugformat --verbose
514 format-variant repo config default
514 format-variant repo config default
515 fncache: no yes yes
515 fncache: no yes yes
516 dirstate-v2: no no no
516 dirstate-v2: no no no
517 tracked-hint: no no no
517 tracked-hint: no no no
518 dotencode: no yes yes
518 dotencode: no yes yes
519 generaldelta: no yes yes
519 generaldelta: no yes yes
520 share-safe: no yes yes
520 share-safe: no yes yes
521 sparserevlog: no yes yes
521 sparserevlog: no yes yes
522 persistent-nodemap: no no no (no-rust !)
522 persistent-nodemap: no no no (no-rust !)
523 persistent-nodemap: no yes no (rust !)
523 persistent-nodemap: no yes no (rust !)
524 copies-sdc: no no no
524 copies-sdc: no no no
525 revlog-v2: no no no
525 revlog-v2: no no no
526 changelog-v2: no no no
526 changelog-v2: no no no
527 plain-cl-delta: yes yes yes
527 plain-cl-delta: yes yes yes
528 compression: zlib zlib zlib (no-zstd !)
528 compression: zlib zlib zlib (no-zstd !)
529 compression: zlib zlib zstd (zstd !)
529 compression: zlib zlib zstd (zstd !)
530 compression-level: default default default
530 compression-level: default default default
531 $ hg debugformat --verbose --config format.usegeneraldelta=no
531 $ hg debugformat --verbose --config format.usegeneraldelta=no
532 format-variant repo config default
532 format-variant repo config default
533 fncache: no yes yes
533 fncache: no yes yes
534 dirstate-v2: no no no
534 dirstate-v2: no no no
535 tracked-hint: no no no
535 tracked-hint: no no no
536 dotencode: no yes yes
536 dotencode: no yes yes
537 generaldelta: no no yes
537 generaldelta: no no yes
538 share-safe: no yes yes
538 share-safe: no yes yes
539 sparserevlog: no no yes
539 sparserevlog: no no yes
540 persistent-nodemap: no no no (no-rust !)
540 persistent-nodemap: no no no (no-rust !)
541 persistent-nodemap: no yes no (rust !)
541 persistent-nodemap: no yes no (rust !)
542 copies-sdc: no no no
542 copies-sdc: no no no
543 revlog-v2: no no no
543 revlog-v2: no no no
544 changelog-v2: no no no
544 changelog-v2: no no no
545 plain-cl-delta: yes yes yes
545 plain-cl-delta: yes yes yes
546 compression: zlib zlib zlib (no-zstd !)
546 compression: zlib zlib zlib (no-zstd !)
547 compression: zlib zlib zstd (zstd !)
547 compression: zlib zlib zstd (zstd !)
548 compression-level: default default default
548 compression-level: default default default
549 $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug
549 $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug
550 format-variant repo config default
550 format-variant repo config default
551 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
551 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
552 [formatvariant.name.uptodate|dirstate-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
552 [formatvariant.name.uptodate|dirstate-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
553 [formatvariant.name.uptodate|tracked-hint: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
553 [formatvariant.name.uptodate|tracked-hint: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
554 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
554 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
555 [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
555 [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
556 [formatvariant.name.mismatchconfig|share-safe: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
556 [formatvariant.name.mismatchconfig|share-safe: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
557 [formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
557 [formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
558 [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !)
558 [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !)
559 [formatvariant.name.mismatchconfig|persistent-nodemap:][formatvariant.repo.mismatchconfig| no][formatvariant.config.special| yes][formatvariant.default| no] (rust !)
559 [formatvariant.name.mismatchconfig|persistent-nodemap:][formatvariant.repo.mismatchconfig| no][formatvariant.config.special| yes][formatvariant.default| no] (rust !)
560 [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
560 [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
561 [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
561 [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
562 [formatvariant.name.uptodate|changelog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
562 [formatvariant.name.uptodate|changelog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
563 [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
563 [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
564 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !)
564 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !)
565 [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !)
565 [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !)
566 [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default]
566 [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default]
567 $ hg debugupgraderepo
567 $ hg debugupgraderepo
568 note: selecting all-filelogs for processing to change: dotencode
568 note: selecting all-filelogs for processing to change: dotencode
569 note: selecting all-manifestlogs for processing to change: dotencode
569 note: selecting all-manifestlogs for processing to change: dotencode
570 note: selecting changelog for processing to change: dotencode
570 note: selecting changelog for processing to change: dotencode
571
571
572 repository lacks features recommended by current config options:
572 repository lacks features recommended by current config options:
573
573
574 fncache
574 fncache
575 long and reserved filenames may not work correctly; repository performance is sub-optimal
575 long and reserved filenames may not work correctly; repository performance is sub-optimal
576
576
577 dotencode
577 dotencode
578 storage of filenames beginning with a period or space may not work correctly
578 storage of filenames beginning with a period or space may not work correctly
579
579
580 generaldelta
580 generaldelta
581 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
581 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
582
582
583 share-safe
583 share-safe
584 old shared repositories do not share source repository requirements and config. This leads to various problems when the source repository format is upgraded or some new extensions are enabled.
584 old shared repositories do not share source repository requirements and config. This leads to various problems when the source repository format is upgraded or some new extensions are enabled.
585
585
586 sparserevlog
586 sparserevlog
587 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.
587 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.
588
588
589 persistent-nodemap (rust !)
589 persistent-nodemap (rust !)
590 persist the node -> rev mapping on disk to speedup lookup (rust !)
590 persist the node -> rev mapping on disk to speedup lookup (rust !)
591 (rust !)
591 (rust !)
592
592
593 performing an upgrade with "--run" will make the following changes:
593 performing an upgrade with "--run" will make the following changes:
594
594
595 requirements
595 requirements
596 preserved: revlogv1, store
596 preserved: revlogv1, store
597 added: dotencode, fncache, generaldelta, share-safe, sparserevlog (no-rust !)
597 added: dotencode, fncache, generaldelta, share-safe, sparserevlog (no-rust !)
598 added: dotencode, fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !)
598 added: dotencode, fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !)
599
599
600 fncache
600 fncache
601 repository will be more resilient to storing certain paths and performance of certain operations should be improved
601 repository will be more resilient to storing certain paths and performance of certain operations should be improved
602
602
603 dotencode
603 dotencode
604 repository will be better able to store files beginning with a space or period
604 repository will be better able to store files beginning with a space or period
605
605
606 generaldelta
606 generaldelta
607 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
607 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
608
608
609 share-safe
609 share-safe
610 Upgrades a repository to share-safe format so that future shares of this repository share its requirements and configs.
610 Upgrades a repository to share-safe format so that future shares of this repository share its requirements and configs.
611
611
612 sparserevlog
612 sparserevlog
613 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.
613 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
614
614
615 persistent-nodemap (rust !)
615 persistent-nodemap (rust !)
616 Speedup revision lookup by node id. (rust !)
616 Speedup revision lookup by node id. (rust !)
617 (rust !)
617 (rust !)
618 processed revlogs:
618 processed revlogs:
619 - all-filelogs
619 - all-filelogs
620 - changelog
620 - changelog
621 - manifest
621 - manifest
622
622
623 additional optimizations are available by specifying "--optimize <name>":
623 additional optimizations are available by specifying "--optimize <name>":
624
624
625 re-delta-parent
625 re-delta-parent
626 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
626 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
627
627
628 re-delta-multibase
628 re-delta-multibase
629 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
629 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
630
630
631 re-delta-all
631 re-delta-all
632 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
632 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
633
633
634 re-delta-fulladd
634 re-delta-fulladd
635 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.
635 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.
636
636
637 $ hg debugupgraderepo --quiet
637 $ hg debugupgraderepo --quiet
638 requirements
638 requirements
639 preserved: revlogv1, store
639 preserved: revlogv1, store
640 added: dotencode, fncache, generaldelta, share-safe, sparserevlog (no-rust !)
640 added: dotencode, fncache, generaldelta, share-safe, sparserevlog (no-rust !)
641 added: dotencode, fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !)
641 added: dotencode, fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !)
642
642
643 processed revlogs:
643 processed revlogs:
644 - all-filelogs
644 - all-filelogs
645 - changelog
645 - changelog
646 - manifest
646 - manifest
647
647
648
648
649 $ hg --config format.dotencode=false debugupgraderepo
649 $ hg --config format.dotencode=false debugupgraderepo
650 note: selecting all-filelogs for processing to change: fncache
650 note: selecting all-filelogs for processing to change: fncache
651 note: selecting all-manifestlogs for processing to change: fncache
651 note: selecting all-manifestlogs for processing to change: fncache
652 note: selecting changelog for processing to change: fncache
652 note: selecting changelog for processing to change: fncache
653
653
654 repository lacks features recommended by current config options:
654 repository lacks features recommended by current config options:
655
655
656 fncache
656 fncache
657 long and reserved filenames may not work correctly; repository performance is sub-optimal
657 long and reserved filenames may not work correctly; repository performance is sub-optimal
658
658
659 generaldelta
659 generaldelta
660 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
660 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
661
661
662 share-safe
662 share-safe
663 old shared repositories do not share source repository requirements and config. This leads to various problems when the source repository format is upgraded or some new extensions are enabled.
663 old shared repositories do not share source repository requirements and config. This leads to various problems when the source repository format is upgraded or some new extensions are enabled.
664
664
665 sparserevlog
665 sparserevlog
666 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.
666 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.
667
667
668 persistent-nodemap (rust !)
668 persistent-nodemap (rust !)
669 persist the node -> rev mapping on disk to speedup lookup (rust !)
669 persist the node -> rev mapping on disk to speedup lookup (rust !)
670 (rust !)
670 (rust !)
671 repository lacks features used by the default config options:
671 repository lacks features used by the default config options:
672
672
673 dotencode
673 dotencode
674 storage of filenames beginning with a period or space may not work correctly
674 storage of filenames beginning with a period or space may not work correctly
675
675
676
676
677 performing an upgrade with "--run" will make the following changes:
677 performing an upgrade with "--run" will make the following changes:
678
678
679 requirements
679 requirements
680 preserved: revlogv1, store
680 preserved: revlogv1, store
681 added: fncache, generaldelta, share-safe, sparserevlog (no-rust !)
681 added: fncache, generaldelta, share-safe, sparserevlog (no-rust !)
682 added: fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !)
682 added: fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !)
683
683
684 fncache
684 fncache
685 repository will be more resilient to storing certain paths and performance of certain operations should be improved
685 repository will be more resilient to storing certain paths and performance of certain operations should be improved
686
686
687 generaldelta
687 generaldelta
688 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
688 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
689
689
690 share-safe
690 share-safe
691 Upgrades a repository to share-safe format so that future shares of this repository share its requirements and configs.
691 Upgrades a repository to share-safe format so that future shares of this repository share its requirements and configs.
692
692
693 sparserevlog
693 sparserevlog
694 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.
694 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.
695
695
696 persistent-nodemap (rust !)
696 persistent-nodemap (rust !)
697 Speedup revision lookup by node id. (rust !)
697 Speedup revision lookup by node id. (rust !)
698 (rust !)
698 (rust !)
699 processed revlogs:
699 processed revlogs:
700 - all-filelogs
700 - all-filelogs
701 - changelog
701 - changelog
702 - manifest
702 - manifest
703
703
704 additional optimizations are available by specifying "--optimize <name>":
704 additional optimizations are available by specifying "--optimize <name>":
705
705
706 re-delta-parent
706 re-delta-parent
707 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
707 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
708
708
709 re-delta-multibase
709 re-delta-multibase
710 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
710 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
711
711
712 re-delta-all
712 re-delta-all
713 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
713 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
714
714
715 re-delta-fulladd
715 re-delta-fulladd
716 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.
716 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.
717
717
718
718
719 $ cd ..
719 $ cd ..
720
720
721 Upgrading a repository that is already modern essentially no-ops
721 Upgrading a repository that is already modern essentially no-ops
722
722
723 $ hg init modern
723 $ hg init modern
724 $ hg -R modern debugupgraderepo --run
724 $ hg -R modern debugupgraderepo --run
725 nothing to do
725 nothing to do
726
726
727 Upgrading a repository to generaldelta works
727 Upgrading a repository to generaldelta works
728
728
729 $ hg --config format.usegeneraldelta=false init upgradegd
729 $ hg --config format.usegeneraldelta=false init upgradegd
730 $ cd upgradegd
730 $ cd upgradegd
731 $ touch f0
731 $ touch f0
732 $ hg -q commit -A -m initial
732 $ hg -q commit -A -m initial
733 $ mkdir FooBarDirectory.d
733 $ mkdir FooBarDirectory.d
734 $ touch FooBarDirectory.d/f1
734 $ touch FooBarDirectory.d/f1
735 $ hg -q commit -A -m 'add f1'
735 $ hg -q commit -A -m 'add f1'
736 $ hg -q up -r 0
736 $ hg -q up -r 0
737 >>> import random
737 >>> import random
738 >>> random.seed(0) # have a reproducible content
738 >>> random.seed(0) # have a reproducible content
739 >>> with open("f2", "wb") as f:
739 >>> with open("f2", "wb") as f:
740 ... for i in range(100000):
740 ... for i in range(100000):
741 ... f.write(b"%d\n" % random.randint(1000000000, 9999999999)) and None
741 ... f.write(b"%d\n" % random.randint(1000000000, 9999999999)) and None
742 $ hg -q commit -A -m 'add f2'
742 $ hg -q commit -A -m 'add f2'
743
743
744 make sure we have a .d file
744 make sure we have a .d file
745
745
746 $ ls -d .hg/store/data/*
746 $ ls -d .hg/store/data/*
747 .hg/store/data/_foo_bar_directory.d.hg
747 .hg/store/data/_foo_bar_directory.d.hg
748 .hg/store/data/f0.i
748 .hg/store/data/f0.i
749 .hg/store/data/f2.d
749 .hg/store/data/f2.d
750 .hg/store/data/f2.i
750 .hg/store/data/f2.i
751
751
752 $ hg debugupgraderepo --run --config format.sparse-revlog=false
752 $ hg debugupgraderepo --run --config format.sparse-revlog=false
753 note: selecting all-filelogs for processing to change: generaldelta
753 note: selecting all-filelogs for processing to change: generaldelta
754 note: selecting all-manifestlogs for processing to change: generaldelta
754 note: selecting all-manifestlogs for processing to change: generaldelta
755 note: selecting changelog for processing to change: generaldelta
755 note: selecting changelog for processing to change: generaldelta
756
756
757 upgrade will perform the following actions:
757 upgrade will perform the following actions:
758
758
759 requirements
759 requirements
760 preserved: dotencode, fncache, revlogv1, share-safe, store (no-rust !)
760 preserved: dotencode, fncache, revlogv1, share-safe, store (no-rust !)
761 preserved: dotencode, fncache, persistent-nodemap, revlogv1, share-safe, store (rust !)
761 preserved: dotencode, fncache, persistent-nodemap, revlogv1, share-safe, store (rust !)
762 added: generaldelta
762 added: generaldelta
763
763
764 generaldelta
764 generaldelta
765 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
765 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
766
766
767 processed revlogs:
767 processed revlogs:
768 - all-filelogs
768 - all-filelogs
769 - changelog
769 - changelog
770 - manifest
770 - manifest
771
771
772 beginning upgrade...
772 beginning upgrade...
773 repository locked and read-only
773 repository locked and read-only
774 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
774 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
775 (it is safe to interrupt this process any time before data migration completes)
775 (it is safe to interrupt this process any time before data migration completes)
776 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
776 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
777 migrating 519 KB in store; 1.05 MB tracked data
777 migrating 519 KB in store; 1.05 MB tracked data
778 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
778 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
779 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
779 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
780 migrating 1 manifests containing 3 revisions (384 bytes in store; 238 bytes tracked data)
780 migrating 1 manifests containing 3 revisions (384 bytes in store; 238 bytes tracked data)
781 finished migrating 3 manifest revisions across 1 manifests; change in size: -17 bytes
781 finished migrating 3 manifest revisions across 1 manifests; change in size: -17 bytes
782 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
782 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
783 finished migrating 3 changelog revisions; change in size: 0 bytes
783 finished migrating 3 changelog revisions; change in size: 0 bytes
784 finished migrating 9 total revisions; total change in store size: -17 bytes
784 finished migrating 9 total revisions; total change in store size: -17 bytes
785 copying phaseroots
785 copying phaseroots
786 copying requires
786 copying requires
787 data fully upgraded in a temporary repository
787 data fully upgraded in a temporary repository
788 marking source repository as being upgraded; clients will be unable to read from repository
788 marking source repository as being upgraded; clients will be unable to read from repository
789 starting in-place swap of repository data
789 starting in-place swap of repository data
790 replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
790 replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
791 replacing store...
791 replacing store...
792 store replacement complete; repository was inconsistent for *s (glob)
792 store replacement complete; repository was inconsistent for *s (glob)
793 finalizing requirements file and making repository readable again
793 finalizing requirements file and making repository readable again
794 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
794 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
795 copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
795 copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
796 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
796 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
797
797
798 Original requirements backed up
798 Original requirements backed up
799
799
800 $ cat .hg/upgradebackup.*/requires
800 $ cat .hg/upgradebackup.*/requires
801 share-safe
801 share-safe
802 $ cat .hg/upgradebackup.*/store/requires
802 $ cat .hg/upgradebackup.*/store/requires
803 dotencode
803 dotencode
804 fncache
804 fncache
805 persistent-nodemap (rust !)
805 persistent-nodemap (rust !)
806 revlogv1
806 revlogv1
807 store
807 store
808 upgradeinprogress
808 upgradeinprogress
809
809
810 generaldelta added to original requirements files
810 generaldelta added to original requirements files
811
811
812 $ hg debugrequires
812 $ hg debugrequires
813 dotencode
813 dotencode
814 fncache
814 fncache
815 generaldelta
815 generaldelta
816 persistent-nodemap (rust !)
816 persistent-nodemap (rust !)
817 revlogv1
817 revlogv1
818 share-safe
818 share-safe
819 store
819 store
820
820
821 store directory has files we expect
821 store directory has files we expect
822
822
823 $ ls .hg/store
823 $ ls .hg/store
824 00changelog.i
824 00changelog.i
825 00manifest.i
825 00manifest.i
826 data
826 data
827 fncache
827 fncache
828 phaseroots
828 phaseroots
829 requires
829 requires
830 undo
830 undo
831 undo.backupfiles
831 undo.backupfiles
832 undo.phaseroots
832 undo.phaseroots
833
833
834 manifest should be generaldelta
834 manifest should be generaldelta
835
835
836 $ hg debugrevlog -m | grep flags
836 $ hg debugrevlog -m | grep flags
837 flags : inline, generaldelta
837 flags : inline, generaldelta
838
838
839 verify should be happy
839 verify should be happy
840
840
841 $ hg verify
841 $ hg verify
842 checking changesets
842 checking changesets
843 checking manifests
843 checking manifests
844 crosschecking files in changesets and manifests
844 crosschecking files in changesets and manifests
845 checking files
845 checking files
846 checked 3 changesets with 3 changes to 3 files
846 checked 3 changesets with 3 changes to 3 files
847
847
848 old store should be backed up
848 old store should be backed up
849
849
850 $ ls -d .hg/upgradebackup.*/
850 $ ls -d .hg/upgradebackup.*/
851 .hg/upgradebackup.*/ (glob)
851 .hg/upgradebackup.*/ (glob)
852 $ ls .hg/upgradebackup.*/store
852 $ ls .hg/upgradebackup.*/store
853 00changelog.i
853 00changelog.i
854 00manifest.i
854 00manifest.i
855 data
855 data
856 fncache
856 fncache
857 phaseroots
857 phaseroots
858 requires
858 requires
859 undo
859 undo
860 undo.backup.fncache
860 undo.backup.fncache
861 undo.backupfiles
861 undo.backupfiles
862 undo.phaseroots
862 undo.phaseroots
863
863
864 unless --no-backup is passed
864 unless --no-backup is passed
865
865
866 $ rm -rf .hg/upgradebackup.*/
866 $ rm -rf .hg/upgradebackup.*/
867 $ hg debugupgraderepo --run --no-backup
867 $ hg debugupgraderepo --run --no-backup
868 note: selecting all-filelogs for processing to change: sparserevlog
868 note: selecting all-filelogs for processing to change: sparserevlog
869 note: selecting all-manifestlogs for processing to change: sparserevlog
869 note: selecting all-manifestlogs for processing to change: sparserevlog
870 note: selecting changelog for processing to change: sparserevlog
870 note: selecting changelog for processing to change: sparserevlog
871
871
872 upgrade will perform the following actions:
872 upgrade will perform the following actions:
873
873
874 requirements
874 requirements
875 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
875 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
876 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
876 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
877 added: sparserevlog
877 added: sparserevlog
878
878
879 sparserevlog
879 sparserevlog
880 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.
880 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.
881
881
882 processed revlogs:
882 processed revlogs:
883 - all-filelogs
883 - all-filelogs
884 - changelog
884 - changelog
885 - manifest
885 - manifest
886
886
887 beginning upgrade...
887 beginning upgrade...
888 repository locked and read-only
888 repository locked and read-only
889 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
889 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
890 (it is safe to interrupt this process any time before data migration completes)
890 (it is safe to interrupt this process any time before data migration completes)
891 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
891 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
892 migrating 519 KB in store; 1.05 MB tracked data
892 migrating 519 KB in store; 1.05 MB tracked data
893 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
893 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
894 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
894 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
895 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
895 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
896 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
896 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
897 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
897 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
898 finished migrating 3 changelog revisions; change in size: 0 bytes
898 finished migrating 3 changelog revisions; change in size: 0 bytes
899 finished migrating 9 total revisions; total change in store size: 0 bytes
899 finished migrating 9 total revisions; total change in store size: 0 bytes
900 copying phaseroots
900 copying phaseroots
901 copying requires
901 copying requires
902 data fully upgraded in a temporary repository
902 data fully upgraded in a temporary repository
903 marking source repository as being upgraded; clients will be unable to read from repository
903 marking source repository as being upgraded; clients will be unable to read from repository
904 starting in-place swap of repository data
904 starting in-place swap of repository data
905 replacing store...
905 replacing store...
906 store replacement complete; repository was inconsistent for * (glob)
906 store replacement complete; repository was inconsistent for * (glob)
907 finalizing requirements file and making repository readable again
907 finalizing requirements file and making repository readable again
908 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
908 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
909 $ ls -1 .hg/ | grep upgradebackup
909 $ ls -1 .hg/ | grep upgradebackup
910 [1]
910 [1]
911
911
912 We can restrict optimization to some revlog:
912 We can restrict optimization to some revlog:
913
913
914 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
914 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
915 upgrade will perform the following actions:
915 upgrade will perform the following actions:
916
916
917 requirements
917 requirements
918 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
918 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
919 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
919 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
920
920
921 optimisations: re-delta-parent
921 optimisations: re-delta-parent
922
922
923 re-delta-parent
923 re-delta-parent
924 deltas within internal storage will choose a new base revision if needed
924 deltas within internal storage will choose a new base revision if needed
925
925
926 processed revlogs:
926 processed revlogs:
927 - manifest
927 - manifest
928
928
929 beginning upgrade...
929 beginning upgrade...
930 repository locked and read-only
930 repository locked and read-only
931 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
931 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
932 (it is safe to interrupt this process any time before data migration completes)
932 (it is safe to interrupt this process any time before data migration completes)
933 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
933 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
934 migrating 519 KB in store; 1.05 MB tracked data
934 migrating 519 KB in store; 1.05 MB tracked data
935 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
935 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
936 blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions
936 blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions
937 blindly copying data/f0.i containing 1 revisions
937 blindly copying data/f0.i containing 1 revisions
938 blindly copying data/f2.i containing 1 revisions
938 blindly copying data/f2.i containing 1 revisions
939 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
939 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
940 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
940 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
941 cloning 3 revisions from 00manifest.i
941 cloning 3 revisions from 00manifest.i
942 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
942 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
943 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
943 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
944 blindly copying 00changelog.i containing 3 revisions
944 blindly copying 00changelog.i containing 3 revisions
945 finished migrating 3 changelog revisions; change in size: 0 bytes
945 finished migrating 3 changelog revisions; change in size: 0 bytes
946 finished migrating 9 total revisions; total change in store size: 0 bytes
946 finished migrating 9 total revisions; total change in store size: 0 bytes
947 copying phaseroots
947 copying phaseroots
948 copying requires
948 copying requires
949 data fully upgraded in a temporary repository
949 data fully upgraded in a temporary repository
950 marking source repository as being upgraded; clients will be unable to read from repository
950 marking source repository as being upgraded; clients will be unable to read from repository
951 starting in-place swap of repository data
951 starting in-place swap of repository data
952 replacing store...
952 replacing store...
953 store replacement complete; repository was inconsistent for *s (glob)
953 store replacement complete; repository was inconsistent for *s (glob)
954 finalizing requirements file and making repository readable again
954 finalizing requirements file and making repository readable again
955 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
955 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
956
956
957 Check that the repo still works fine
957 Check that the repo still works fine
958
958
959 $ hg log -G --stat
959 $ hg log -G --stat
960 @ changeset: 2:fca376863211 (py3 !)
960 @ changeset: 2:fca376863211 (py3 !)
961 | tag: tip
961 | tag: tip
962 | parent: 0:ba592bf28da2
962 | parent: 0:ba592bf28da2
963 | user: test
963 | user: test
964 | date: Thu Jan 01 00:00:00 1970 +0000
964 | date: Thu Jan 01 00:00:00 1970 +0000
965 | summary: add f2
965 | summary: add f2
966 |
966 |
967 | f2 | 100000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
967 | f2 | 100000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
968 | 1 files changed, 100000 insertions(+), 0 deletions(-)
968 | 1 files changed, 100000 insertions(+), 0 deletions(-)
969 |
969 |
970 | o changeset: 1:2029ce2354e2
970 | o changeset: 1:2029ce2354e2
971 |/ user: test
971 |/ user: test
972 | date: Thu Jan 01 00:00:00 1970 +0000
972 | date: Thu Jan 01 00:00:00 1970 +0000
973 | summary: add f1
973 | summary: add f1
974 |
974 |
975 |
975 |
976 o changeset: 0:ba592bf28da2
976 o changeset: 0:ba592bf28da2
977 user: test
977 user: test
978 date: Thu Jan 01 00:00:00 1970 +0000
978 date: Thu Jan 01 00:00:00 1970 +0000
979 summary: initial
979 summary: initial
980
980
981
981
982
982
983 $ hg verify
983 $ hg verify
984 checking changesets
984 checking changesets
985 checking manifests
985 checking manifests
986 crosschecking files in changesets and manifests
986 crosschecking files in changesets and manifests
987 checking files
987 checking files
988 checked 3 changesets with 3 changes to 3 files
988 checked 3 changesets with 3 changes to 3 files
989
989
990 Check we can select negatively
990 Check we can select negatively
991
991
992 $ hg debugupgrade --optimize re-delta-parent --run --no-manifest --no-backup --debug --traceback
992 $ hg debugupgrade --optimize re-delta-parent --run --no-manifest --no-backup --debug --traceback
993 upgrade will perform the following actions:
993 upgrade will perform the following actions:
994
994
995 requirements
995 requirements
996 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
996 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
997 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
997 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
998
998
999 optimisations: re-delta-parent
999 optimisations: re-delta-parent
1000
1000
1001 re-delta-parent
1001 re-delta-parent
1002 deltas within internal storage will choose a new base revision if needed
1002 deltas within internal storage will choose a new base revision if needed
1003
1003
1004 processed revlogs:
1004 processed revlogs:
1005 - all-filelogs
1005 - all-filelogs
1006 - changelog
1006 - changelog
1007
1007
1008 beginning upgrade...
1008 beginning upgrade...
1009 repository locked and read-only
1009 repository locked and read-only
1010 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1010 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1011 (it is safe to interrupt this process any time before data migration completes)
1011 (it is safe to interrupt this process any time before data migration completes)
1012 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1012 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1013 migrating 519 KB in store; 1.05 MB tracked data
1013 migrating 519 KB in store; 1.05 MB tracked data
1014 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
1014 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
1015 cloning 1 revisions from data/FooBarDirectory.d/f1.i
1015 cloning 1 revisions from data/FooBarDirectory.d/f1.i
1016 cloning 1 revisions from data/f0.i
1016 cloning 1 revisions from data/f0.i
1017 cloning 1 revisions from data/f2.i
1017 cloning 1 revisions from data/f2.i
1018 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
1018 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
1019 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
1019 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
1020 blindly copying 00manifest.i containing 3 revisions
1020 blindly copying 00manifest.i containing 3 revisions
1021 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1021 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1022 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
1022 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
1023 cloning 3 revisions from 00changelog.i
1023 cloning 3 revisions from 00changelog.i
1024 finished migrating 3 changelog revisions; change in size: 0 bytes
1024 finished migrating 3 changelog revisions; change in size: 0 bytes
1025 finished migrating 9 total revisions; total change in store size: 0 bytes
1025 finished migrating 9 total revisions; total change in store size: 0 bytes
1026 copying phaseroots
1026 copying phaseroots
1027 copying requires
1027 copying requires
1028 data fully upgraded in a temporary repository
1028 data fully upgraded in a temporary repository
1029 marking source repository as being upgraded; clients will be unable to read from repository
1029 marking source repository as being upgraded; clients will be unable to read from repository
1030 starting in-place swap of repository data
1030 starting in-place swap of repository data
1031 replacing store...
1031 replacing store...
1032 store replacement complete; repository was inconsistent for *s (glob)
1032 store replacement complete; repository was inconsistent for *s (glob)
1033 finalizing requirements file and making repository readable again
1033 finalizing requirements file and making repository readable again
1034 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1034 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1035 $ hg verify
1035 $ hg verify
1036 checking changesets
1036 checking changesets
1037 checking manifests
1037 checking manifests
1038 crosschecking files in changesets and manifests
1038 crosschecking files in changesets and manifests
1039 checking files
1039 checking files
1040 checked 3 changesets with 3 changes to 3 files
1040 checked 3 changesets with 3 changes to 3 files
1041
1041
1042 Check that we can select changelog only
1042 Check that we can select changelog only
1043
1043
1044 $ hg debugupgrade --optimize re-delta-parent --run --changelog --no-backup --debug --traceback
1044 $ hg debugupgrade --optimize re-delta-parent --run --changelog --no-backup --debug --traceback
1045 upgrade will perform the following actions:
1045 upgrade will perform the following actions:
1046
1046
1047 requirements
1047 requirements
1048 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
1048 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
1049 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
1049 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
1050
1050
1051 optimisations: re-delta-parent
1051 optimisations: re-delta-parent
1052
1052
1053 re-delta-parent
1053 re-delta-parent
1054 deltas within internal storage will choose a new base revision if needed
1054 deltas within internal storage will choose a new base revision if needed
1055
1055
1056 processed revlogs:
1056 processed revlogs:
1057 - changelog
1057 - changelog
1058
1058
1059 beginning upgrade...
1059 beginning upgrade...
1060 repository locked and read-only
1060 repository locked and read-only
1061 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1061 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1062 (it is safe to interrupt this process any time before data migration completes)
1062 (it is safe to interrupt this process any time before data migration completes)
1063 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1063 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1064 migrating 519 KB in store; 1.05 MB tracked data
1064 migrating 519 KB in store; 1.05 MB tracked data
1065 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
1065 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
1066 blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions
1066 blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions
1067 blindly copying data/f0.i containing 1 revisions
1067 blindly copying data/f0.i containing 1 revisions
1068 blindly copying data/f2.i containing 1 revisions
1068 blindly copying data/f2.i containing 1 revisions
1069 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
1069 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
1070 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
1070 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
1071 blindly copying 00manifest.i containing 3 revisions
1071 blindly copying 00manifest.i containing 3 revisions
1072 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1072 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1073 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
1073 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
1074 cloning 3 revisions from 00changelog.i
1074 cloning 3 revisions from 00changelog.i
1075 finished migrating 3 changelog revisions; change in size: 0 bytes
1075 finished migrating 3 changelog revisions; change in size: 0 bytes
1076 finished migrating 9 total revisions; total change in store size: 0 bytes
1076 finished migrating 9 total revisions; total change in store size: 0 bytes
1077 copying phaseroots
1077 copying phaseroots
1078 copying requires
1078 copying requires
1079 data fully upgraded in a temporary repository
1079 data fully upgraded in a temporary repository
1080 marking source repository as being upgraded; clients will be unable to read from repository
1080 marking source repository as being upgraded; clients will be unable to read from repository
1081 starting in-place swap of repository data
1081 starting in-place swap of repository data
1082 replacing store...
1082 replacing store...
1083 store replacement complete; repository was inconsistent for *s (glob)
1083 store replacement complete; repository was inconsistent for *s (glob)
1084 finalizing requirements file and making repository readable again
1084 finalizing requirements file and making repository readable again
1085 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1085 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1086 $ hg verify
1086 $ hg verify
1087 checking changesets
1087 checking changesets
1088 checking manifests
1088 checking manifests
1089 crosschecking files in changesets and manifests
1089 crosschecking files in changesets and manifests
1090 checking files
1090 checking files
1091 checked 3 changesets with 3 changes to 3 files
1091 checked 3 changesets with 3 changes to 3 files
1092
1092
1093 Check that we can select filelog only
1093 Check that we can select filelog only
1094
1094
1095 $ hg debugupgrade --optimize re-delta-parent --run --no-changelog --no-manifest --no-backup --debug --traceback
1095 $ hg debugupgrade --optimize re-delta-parent --run --no-changelog --no-manifest --no-backup --debug --traceback
1096 upgrade will perform the following actions:
1096 upgrade will perform the following actions:
1097
1097
1098 requirements
1098 requirements
1099 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
1099 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
1100 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
1100 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
1101
1101
1102 optimisations: re-delta-parent
1102 optimisations: re-delta-parent
1103
1103
1104 re-delta-parent
1104 re-delta-parent
1105 deltas within internal storage will choose a new base revision if needed
1105 deltas within internal storage will choose a new base revision if needed
1106
1106
1107 processed revlogs:
1107 processed revlogs:
1108 - all-filelogs
1108 - all-filelogs
1109
1109
1110 beginning upgrade...
1110 beginning upgrade...
1111 repository locked and read-only
1111 repository locked and read-only
1112 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1112 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1113 (it is safe to interrupt this process any time before data migration completes)
1113 (it is safe to interrupt this process any time before data migration completes)
1114 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1114 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1115 migrating 519 KB in store; 1.05 MB tracked data
1115 migrating 519 KB in store; 1.05 MB tracked data
1116 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
1116 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
1117 cloning 1 revisions from data/FooBarDirectory.d/f1.i
1117 cloning 1 revisions from data/FooBarDirectory.d/f1.i
1118 cloning 1 revisions from data/f0.i
1118 cloning 1 revisions from data/f0.i
1119 cloning 1 revisions from data/f2.i
1119 cloning 1 revisions from data/f2.i
1120 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
1120 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
1121 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
1121 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
1122 blindly copying 00manifest.i containing 3 revisions
1122 blindly copying 00manifest.i containing 3 revisions
1123 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1123 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1124 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
1124 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
1125 blindly copying 00changelog.i containing 3 revisions
1125 blindly copying 00changelog.i containing 3 revisions
1126 finished migrating 3 changelog revisions; change in size: 0 bytes
1126 finished migrating 3 changelog revisions; change in size: 0 bytes
1127 finished migrating 9 total revisions; total change in store size: 0 bytes
1127 finished migrating 9 total revisions; total change in store size: 0 bytes
1128 copying phaseroots
1128 copying phaseroots
1129 copying requires
1129 copying requires
1130 data fully upgraded in a temporary repository
1130 data fully upgraded in a temporary repository
1131 marking source repository as being upgraded; clients will be unable to read from repository
1131 marking source repository as being upgraded; clients will be unable to read from repository
1132 starting in-place swap of repository data
1132 starting in-place swap of repository data
1133 replacing store...
1133 replacing store...
1134 store replacement complete; repository was inconsistent for *s (glob)
1134 store replacement complete; repository was inconsistent for *s (glob)
1135 finalizing requirements file and making repository readable again
1135 finalizing requirements file and making repository readable again
1136 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1136 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1137 $ hg verify
1137 $ hg verify
1138 checking changesets
1138 checking changesets
1139 checking manifests
1139 checking manifests
1140 crosschecking files in changesets and manifests
1140 crosschecking files in changesets and manifests
1141 checking files
1141 checking files
1142 checked 3 changesets with 3 changes to 3 files
1142 checked 3 changesets with 3 changes to 3 files
1143
1143
1144
1144
1145 Check you can't skip revlog clone during important format downgrade
1145 Check you can't skip revlog clone during important format downgrade
1146
1146
1147 $ echo "[format]" > .hg/hgrc
1147 $ echo "[format]" > .hg/hgrc
1148 $ echo "sparse-revlog=no" >> .hg/hgrc
1148 $ echo "sparse-revlog=no" >> .hg/hgrc
1149 $ hg debugupgrade --optimize re-delta-parent --no-manifest --no-backup --quiet
1149 $ hg debugupgrade --optimize re-delta-parent --no-manifest --no-backup --quiet
1150 warning: ignoring --no-manifest, as upgrade is changing: sparserevlog
1150 warning: ignoring --no-manifest, as upgrade is changing: sparserevlog
1151
1151
1152 requirements
1152 requirements
1153 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
1153 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
1154 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
1154 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
1155 removed: sparserevlog
1155 removed: sparserevlog
1156
1156
1157 optimisations: re-delta-parent
1157 optimisations: re-delta-parent
1158
1158
1159 processed revlogs:
1159 processed revlogs:
1160 - all-filelogs
1160 - all-filelogs
1161 - changelog
1161 - changelog
1162 - manifest
1162 - manifest
1163
1163
1164 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
1164 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
1165 note: selecting all-filelogs for processing to change: sparserevlog
1165 note: selecting all-filelogs for processing to change: sparserevlog
1166 note: selecting changelog for processing to change: sparserevlog
1166 note: selecting changelog for processing to change: sparserevlog
1167
1167
1168 upgrade will perform the following actions:
1168 upgrade will perform the following actions:
1169
1169
1170 requirements
1170 requirements
1171 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
1171 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
1172 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
1172 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
1173 removed: sparserevlog
1173 removed: sparserevlog
1174
1174
1175 optimisations: re-delta-parent
1175 optimisations: re-delta-parent
1176
1176
1177 re-delta-parent
1177 re-delta-parent
1178 deltas within internal storage will choose a new base revision if needed
1178 deltas within internal storage will choose a new base revision if needed
1179
1179
1180 processed revlogs:
1180 processed revlogs:
1181 - all-filelogs
1181 - all-filelogs
1182 - changelog
1182 - changelog
1183 - manifest
1183 - manifest
1184
1184
1185 beginning upgrade...
1185 beginning upgrade...
1186 repository locked and read-only
1186 repository locked and read-only
1187 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1187 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1188 (it is safe to interrupt this process any time before data migration completes)
1188 (it is safe to interrupt this process any time before data migration completes)
1189 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1189 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1190 migrating 519 KB in store; 1.05 MB tracked data
1190 migrating 519 KB in store; 1.05 MB tracked data
1191 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
1191 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
1192 cloning 1 revisions from data/FooBarDirectory.d/f1.i
1192 cloning 1 revisions from data/FooBarDirectory.d/f1.i
1193 cloning 1 revisions from data/f0.i
1193 cloning 1 revisions from data/f0.i
1194 cloning 1 revisions from data/f2.i
1194 cloning 1 revisions from data/f2.i
1195 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
1195 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
1196 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
1196 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
1197 cloning 3 revisions from 00manifest.i
1197 cloning 3 revisions from 00manifest.i
1198 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1198 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1199 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
1199 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
1200 cloning 3 revisions from 00changelog.i
1200 cloning 3 revisions from 00changelog.i
1201 finished migrating 3 changelog revisions; change in size: 0 bytes
1201 finished migrating 3 changelog revisions; change in size: 0 bytes
1202 finished migrating 9 total revisions; total change in store size: 0 bytes
1202 finished migrating 9 total revisions; total change in store size: 0 bytes
1203 copying phaseroots
1203 copying phaseroots
1204 copying requires
1204 copying requires
1205 data fully upgraded in a temporary repository
1205 data fully upgraded in a temporary repository
1206 marking source repository as being upgraded; clients will be unable to read from repository
1206 marking source repository as being upgraded; clients will be unable to read from repository
1207 starting in-place swap of repository data
1207 starting in-place swap of repository data
1208 replacing store...
1208 replacing store...
1209 store replacement complete; repository was inconsistent for *s (glob)
1209 store replacement complete; repository was inconsistent for *s (glob)
1210 finalizing requirements file and making repository readable again
1210 finalizing requirements file and making repository readable again
1211 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1211 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1212 $ hg verify
1212 $ hg verify
1213 checking changesets
1213 checking changesets
1214 checking manifests
1214 checking manifests
1215 crosschecking files in changesets and manifests
1215 crosschecking files in changesets and manifests
1216 checking files
1216 checking files
1217 checked 3 changesets with 3 changes to 3 files
1217 checked 3 changesets with 3 changes to 3 files
1218
1218
1219 Check you can't skip revlog clone during important format upgrade
1219 Check you can't skip revlog clone during important format upgrade
1220
1220
1221 $ echo "sparse-revlog=yes" >> .hg/hgrc
1221 $ echo "sparse-revlog=yes" >> .hg/hgrc
1222 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
1222 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
1223 note: selecting all-filelogs for processing to change: sparserevlog
1223 note: selecting all-filelogs for processing to change: sparserevlog
1224 note: selecting changelog for processing to change: sparserevlog
1224 note: selecting changelog for processing to change: sparserevlog
1225
1225
1226 upgrade will perform the following actions:
1226 upgrade will perform the following actions:
1227
1227
1228 requirements
1228 requirements
1229 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
1229 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
1230 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
1230 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
1231 added: sparserevlog
1231 added: sparserevlog
1232
1232
1233 optimisations: re-delta-parent
1233 optimisations: re-delta-parent
1234
1234
1235 sparserevlog
1235 sparserevlog
1236 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.
1236 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.
1237
1237
1238 re-delta-parent
1238 re-delta-parent
1239 deltas within internal storage will choose a new base revision if needed
1239 deltas within internal storage will choose a new base revision if needed
1240
1240
1241 processed revlogs:
1241 processed revlogs:
1242 - all-filelogs
1242 - all-filelogs
1243 - changelog
1243 - changelog
1244 - manifest
1244 - manifest
1245
1245
1246 beginning upgrade...
1246 beginning upgrade...
1247 repository locked and read-only
1247 repository locked and read-only
1248 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1248 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1249 (it is safe to interrupt this process any time before data migration completes)
1249 (it is safe to interrupt this process any time before data migration completes)
1250 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1250 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1251 migrating 519 KB in store; 1.05 MB tracked data
1251 migrating 519 KB in store; 1.05 MB tracked data
1252 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
1252 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
1253 cloning 1 revisions from data/FooBarDirectory.d/f1.i
1253 cloning 1 revisions from data/FooBarDirectory.d/f1.i
1254 cloning 1 revisions from data/f0.i
1254 cloning 1 revisions from data/f0.i
1255 cloning 1 revisions from data/f2.i
1255 cloning 1 revisions from data/f2.i
1256 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
1256 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
1257 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
1257 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
1258 cloning 3 revisions from 00manifest.i
1258 cloning 3 revisions from 00manifest.i
1259 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1259 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1260 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
1260 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
1261 cloning 3 revisions from 00changelog.i
1261 cloning 3 revisions from 00changelog.i
1262 finished migrating 3 changelog revisions; change in size: 0 bytes
1262 finished migrating 3 changelog revisions; change in size: 0 bytes
1263 finished migrating 9 total revisions; total change in store size: 0 bytes
1263 finished migrating 9 total revisions; total change in store size: 0 bytes
1264 copying phaseroots
1264 copying phaseroots
1265 copying requires
1265 copying requires
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 replacing store...
1269 replacing store...
1270 store replacement complete; repository was inconsistent for *s (glob)
1270 store replacement complete; repository was inconsistent for *s (glob)
1271 finalizing requirements file and making repository readable again
1271 finalizing requirements file and making repository readable again
1272 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1272 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1273 $ hg verify
1273 $ hg verify
1274 checking changesets
1274 checking changesets
1275 checking manifests
1275 checking manifests
1276 crosschecking files in changesets and manifests
1276 crosschecking files in changesets and manifests
1277 checking files
1277 checking files
1278 checked 3 changesets with 3 changes to 3 files
1278 checked 3 changesets with 3 changes to 3 files
1279
1279
1280 $ cd ..
1280 $ cd ..
1281
1281
1282 store files with special filenames aren't encoded during copy
1282 store files with special filenames aren't encoded during copy
1283
1283
1284 $ hg init store-filenames
1284 $ hg init store-filenames
1285 $ cd store-filenames
1285 $ cd store-filenames
1286 $ touch foo
1286 $ touch foo
1287 $ hg -q commit -A -m initial
1287 $ hg -q commit -A -m initial
1288 $ touch .hg/store/.XX_special_filename
1288 $ touch .hg/store/.XX_special_filename
1289
1289
1290 $ hg debugupgraderepo --run
1290 $ hg debugupgraderepo --run
1291 nothing to do
1291 nothing to do
1292 $ hg debugupgraderepo --run --optimize 're-delta-fulladd'
1292 $ hg debugupgraderepo --run --optimize 're-delta-fulladd'
1293 upgrade will perform the following actions:
1293 upgrade will perform the following actions:
1294
1294
1295 requirements
1295 requirements
1296 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
1296 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
1297 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
1297 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
1298
1298
1299 optimisations: re-delta-fulladd
1299 optimisations: re-delta-fulladd
1300
1300
1301 re-delta-fulladd
1301 re-delta-fulladd
1302 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
1302 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
1303
1303
1304 processed revlogs:
1304 processed revlogs:
1305 - all-filelogs
1305 - all-filelogs
1306 - changelog
1306 - changelog
1307 - manifest
1307 - manifest
1308
1308
1309 beginning upgrade...
1309 beginning upgrade...
1310 repository locked and read-only
1310 repository locked and read-only
1311 creating temporary repository to stage upgraded data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
1311 creating temporary repository to stage upgraded data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
1312 (it is safe to interrupt this process any time before data migration completes)
1312 (it is safe to interrupt this process any time before data migration completes)
1313 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
1313 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
1314 migrating 301 bytes in store; 107 bytes tracked data
1314 migrating 301 bytes in store; 107 bytes tracked data
1315 migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data)
1315 migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data)
1316 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
1316 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
1317 migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data)
1317 migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data)
1318 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
1318 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
1319 migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data)
1319 migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data)
1320 finished migrating 1 changelog revisions; change in size: 0 bytes
1320 finished migrating 1 changelog revisions; change in size: 0 bytes
1321 finished migrating 3 total revisions; total change in store size: 0 bytes
1321 finished migrating 3 total revisions; total change in store size: 0 bytes
1322 copying .XX_special_filename
1322 copying .XX_special_filename
1323 copying phaseroots
1323 copying phaseroots
1324 copying requires
1324 copying requires
1325 data fully upgraded in a temporary repository
1325 data fully upgraded in a temporary repository
1326 marking source repository as being upgraded; clients will be unable to read from repository
1326 marking source repository as being upgraded; clients will be unable to read from repository
1327 starting in-place swap of repository data
1327 starting in-place swap of repository data
1328 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
1328 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
1329 replacing store...
1329 replacing store...
1330 store replacement complete; repository was inconsistent for *s (glob)
1330 store replacement complete; repository was inconsistent for *s (glob)
1331 finalizing requirements file and making repository readable again
1331 finalizing requirements file and making repository readable again
1332 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
1332 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
1333 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
1333 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
1334 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
1334 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
1335
1335
1336 fncache is valid after upgrade
1336 fncache is valid after upgrade
1337
1337
1338 $ hg debugrebuildfncache
1338 $ hg debugrebuildfncache
1339 fncache already up to date
1339 fncache already up to date
1340
1340
1341 $ cd ..
1341 $ cd ..
1342
1342
1343 Check upgrading a large file repository
1343 Check upgrading a large file repository
1344 ---------------------------------------
1344 ---------------------------------------
1345
1345
1346 $ hg init largefilesrepo
1346 $ hg init largefilesrepo
1347 $ cat << EOF >> largefilesrepo/.hg/hgrc
1347 $ cat << EOF >> largefilesrepo/.hg/hgrc
1348 > [extensions]
1348 > [extensions]
1349 > largefiles =
1349 > largefiles =
1350 > EOF
1350 > EOF
1351
1351
1352 $ cd largefilesrepo
1352 $ cd largefilesrepo
1353 $ touch foo
1353 $ touch foo
1354 $ hg add --large foo
1354 $ hg add --large foo
1355 $ hg -q commit -m initial
1355 $ hg -q commit -m initial
1356 $ hg debugrequires
1356 $ hg debugrequires
1357 dotencode
1357 dotencode
1358 fncache
1358 fncache
1359 generaldelta
1359 generaldelta
1360 largefiles
1360 largefiles
1361 persistent-nodemap (rust !)
1361 persistent-nodemap (rust !)
1362 revlogv1
1362 revlogv1
1363 share-safe
1363 share-safe
1364 sparserevlog
1364 sparserevlog
1365 store
1365 store
1366
1366
1367 $ hg debugupgraderepo --run
1367 $ hg debugupgraderepo --run
1368 nothing to do
1368 nothing to do
1369 $ hg debugrequires
1369 $ hg debugrequires
1370 dotencode
1370 dotencode
1371 fncache
1371 fncache
1372 generaldelta
1372 generaldelta
1373 largefiles
1373 largefiles
1374 persistent-nodemap (rust !)
1374 persistent-nodemap (rust !)
1375 revlogv1
1375 revlogv1
1376 share-safe
1376 share-safe
1377 sparserevlog
1377 sparserevlog
1378 store
1378 store
1379
1379
1380 $ cat << EOF >> .hg/hgrc
1380 $ cat << EOF >> .hg/hgrc
1381 > [extensions]
1381 > [extensions]
1382 > lfs =
1382 > lfs =
1383 > [lfs]
1383 > [lfs]
1384 > threshold = 10
1384 > threshold = 10
1385 > EOF
1385 > EOF
1386 $ echo '123456789012345' > lfs.bin
1386 $ echo '123456789012345' > lfs.bin
1387 $ hg ci -Am 'lfs.bin'
1387 $ hg ci -Am 'lfs.bin'
1388 adding lfs.bin
1388 adding lfs.bin
1389 $ hg debugrequires | grep lfs
1389 $ hg debugrequires | grep lfs
1390 lfs
1390 lfs
1391 $ find .hg/store/lfs -type f
1391 $ find .hg/store/lfs -type f
1392 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1392 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1393
1393
1394 $ hg debugupgraderepo --run
1394 $ hg debugupgraderepo --run
1395 nothing to do
1395 nothing to do
1396
1396
1397 $ hg debugrequires | grep lfs
1397 $ hg debugrequires | grep lfs
1398 lfs
1398 lfs
1399 $ find .hg/store/lfs -type f
1399 $ find .hg/store/lfs -type f
1400 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1400 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1401 $ hg verify
1401 $ hg verify
1402 checking changesets
1402 checking changesets
1403 checking manifests
1403 checking manifests
1404 crosschecking files in changesets and manifests
1404 crosschecking files in changesets and manifests
1405 checking files
1405 checking files
1406 checked 2 changesets with 2 changes to 2 files
1406 checked 2 changesets with 2 changes to 2 files
1407 $ hg debugdata lfs.bin 0
1407 $ hg debugdata lfs.bin 0
1408 version https://git-lfs.github.com/spec/v1
1408 version https://git-lfs.github.com/spec/v1
1409 oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1409 oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1410 size 16
1410 size 16
1411 x-is-binary 0
1411 x-is-binary 0
1412
1412
1413 $ cd ..
1413 $ cd ..
1414
1414
1415 repository config is taken in account
1415 repository config is taken in account
1416 -------------------------------------
1416 -------------------------------------
1417
1417
1418 $ cat << EOF >> $HGRCPATH
1418 $ cat << EOF >> $HGRCPATH
1419 > [format]
1419 > [format]
1420 > maxchainlen = 1
1420 > maxchainlen = 1
1421 > EOF
1421 > EOF
1422
1422
1423 $ hg init localconfig
1423 $ hg init localconfig
1424 $ cd localconfig
1424 $ cd localconfig
1425 $ cat << EOF > file
1425 $ cat << EOF > file
1426 > some content
1426 > some content
1427 > with some length
1427 > with some length
1428 > to make sure we get a delta
1428 > to make sure we get a delta
1429 > after changes
1429 > after changes
1430 > very long
1430 > very long
1431 > very long
1431 > very long
1432 > very long
1432 > very long
1433 > very long
1433 > very long
1434 > very long
1434 > very long
1435 > very long
1435 > very long
1436 > very long
1436 > very long
1437 > very long
1437 > very long
1438 > very long
1438 > very long
1439 > very long
1439 > very long
1440 > very long
1440 > very long
1441 > EOF
1441 > EOF
1442 $ hg -q commit -A -m A
1442 $ hg -q commit -A -m A
1443 $ echo "new line" >> file
1443 $ echo "new line" >> file
1444 $ hg -q commit -m B
1444 $ hg -q commit -m B
1445 $ echo "new line" >> file
1445 $ echo "new line" >> file
1446 $ hg -q commit -m C
1446 $ hg -q commit -m C
1447
1447
1448 $ cat << EOF >> .hg/hgrc
1448 $ cat << EOF >> .hg/hgrc
1449 > [format]
1449 > [format]
1450 > maxchainlen = 9001
1450 > maxchainlen = 9001
1451 > EOF
1451 > EOF
1452 $ hg config format
1452 $ hg config format
1453 format.revlog-compression=$BUNDLE2_COMPRESSIONS$
1453 format.revlog-compression=$BUNDLE2_COMPRESSIONS$
1454 format.maxchainlen=9001
1454 format.maxchainlen=9001
1455 $ hg debugdeltachain file
1455 $ hg debugdeltachain file
1456 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
1456 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
1457 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
1457 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
1458 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
1458 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
1459 2 1 2 0 other 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1
1459 2 1 2 0 other 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1
1460
1460
1461 $ hg debugupgraderepo --run --optimize 're-delta-all'
1461 $ hg debugupgraderepo --run --optimize 're-delta-all'
1462 upgrade will perform the following actions:
1462 upgrade will perform the following actions:
1463
1463
1464 requirements
1464 requirements
1465 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
1465 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
1466 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
1466 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
1467
1467
1468 optimisations: re-delta-all
1468 optimisations: re-delta-all
1469
1469
1470 re-delta-all
1470 re-delta-all
1471 deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time
1471 deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time
1472
1472
1473 processed revlogs:
1473 processed revlogs:
1474 - all-filelogs
1474 - all-filelogs
1475 - changelog
1475 - changelog
1476 - manifest
1476 - manifest
1477
1477
1478 beginning upgrade...
1478 beginning upgrade...
1479 repository locked and read-only
1479 repository locked and read-only
1480 creating temporary repository to stage upgraded data: $TESTTMP/localconfig/.hg/upgrade.* (glob)
1480 creating temporary repository to stage upgraded data: $TESTTMP/localconfig/.hg/upgrade.* (glob)
1481 (it is safe to interrupt this process any time before data migration completes)
1481 (it is safe to interrupt this process any time before data migration completes)
1482 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1482 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1483 migrating 1019 bytes in store; 882 bytes tracked data
1483 migrating 1019 bytes in store; 882 bytes tracked data
1484 migrating 1 filelogs containing 3 revisions (320 bytes in store; 573 bytes tracked data)
1484 migrating 1 filelogs containing 3 revisions (320 bytes in store; 573 bytes tracked data)
1485 finished migrating 3 filelog revisions across 1 filelogs; change in size: -9 bytes
1485 finished migrating 3 filelog revisions across 1 filelogs; change in size: -9 bytes
1486 migrating 1 manifests containing 3 revisions (333 bytes in store; 138 bytes tracked data)
1486 migrating 1 manifests containing 3 revisions (333 bytes in store; 138 bytes tracked data)
1487 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1487 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1488 migrating changelog containing 3 revisions (366 bytes in store; 171 bytes tracked data)
1488 migrating changelog containing 3 revisions (366 bytes in store; 171 bytes tracked data)
1489 finished migrating 3 changelog revisions; change in size: 0 bytes
1489 finished migrating 3 changelog revisions; change in size: 0 bytes
1490 finished migrating 9 total revisions; total change in store size: -9 bytes
1490 finished migrating 9 total revisions; total change in store size: -9 bytes
1491 copying phaseroots
1491 copying phaseroots
1492 copying requires
1492 copying requires
1493 data fully upgraded in a temporary repository
1493 data fully upgraded in a temporary repository
1494 marking source repository as being upgraded; clients will be unable to read from repository
1494 marking source repository as being upgraded; clients will be unable to read from repository
1495 starting in-place swap of repository data
1495 starting in-place swap of repository data
1496 replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
1496 replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
1497 replacing store...
1497 replacing store...
1498 store replacement complete; repository was inconsistent for *s (glob)
1498 store replacement complete; repository was inconsistent for *s (glob)
1499 finalizing requirements file and making repository readable again
1499 finalizing requirements file and making repository readable again
1500 removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob)
1500 removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob)
1501 copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
1501 copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
1502 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
1502 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
1503 $ hg debugdeltachain file
1503 $ hg debugdeltachain file
1504 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
1504 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
1505 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
1505 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
1506 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
1506 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
1507 2 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 119 119 1.00000 1
1507 2 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 119 119 1.00000 1
1508 $ cd ..
1508 $ cd ..
1509
1509
1510 $ cat << EOF >> $HGRCPATH
1510 $ cat << EOF >> $HGRCPATH
1511 > [format]
1511 > [format]
1512 > maxchainlen = 9001
1512 > maxchainlen = 9001
1513 > EOF
1513 > EOF
1514
1514
1515 Check upgrading a sparse-revlog repository
1515 Check upgrading a sparse-revlog repository
1516 ---------------------------------------
1516 ---------------------------------------
1517
1517
1518 $ hg init sparserevlogrepo --config format.sparse-revlog=no
1518 $ hg init sparserevlogrepo --config format.sparse-revlog=no
1519 $ cd sparserevlogrepo
1519 $ cd sparserevlogrepo
1520 $ touch foo
1520 $ touch foo
1521 $ hg add foo
1521 $ hg add foo
1522 $ hg -q commit -m "foo"
1522 $ hg -q commit -m "foo"
1523 $ hg debugrequires
1523 $ hg debugrequires
1524 dotencode
1524 dotencode
1525 fncache
1525 fncache
1526 generaldelta
1526 generaldelta
1527 persistent-nodemap (rust !)
1527 persistent-nodemap (rust !)
1528 revlogv1
1528 revlogv1
1529 share-safe
1529 share-safe
1530 store
1530 store
1531
1531
1532 Check that we can add the sparse-revlog format requirement
1532 Check that we can add the sparse-revlog format requirement
1533 $ hg --config format.sparse-revlog=yes debugupgraderepo --run --quiet
1533 $ hg --config format.sparse-revlog=yes debugupgraderepo --run --quiet
1534 upgrade will perform the following actions:
1534 upgrade will perform the following actions:
1535
1535
1536 requirements
1536 requirements
1537 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
1537 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
1538 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
1538 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
1539 added: sparserevlog
1539 added: sparserevlog
1540
1540
1541 processed revlogs:
1541 processed revlogs:
1542 - all-filelogs
1542 - all-filelogs
1543 - changelog
1543 - changelog
1544 - manifest
1544 - manifest
1545
1545
1546 $ hg debugrequires
1546 $ hg debugrequires
1547 dotencode
1547 dotencode
1548 fncache
1548 fncache
1549 generaldelta
1549 generaldelta
1550 persistent-nodemap (rust !)
1550 persistent-nodemap (rust !)
1551 revlogv1
1551 revlogv1
1552 share-safe
1552 share-safe
1553 sparserevlog
1553 sparserevlog
1554 store
1554 store
1555
1555
1556 Check that we can remove the sparse-revlog format requirement
1556 Check that we can remove the sparse-revlog format requirement
1557 $ hg --config format.sparse-revlog=no debugupgraderepo --run --quiet
1557 $ hg --config format.sparse-revlog=no debugupgraderepo --run --quiet
1558 upgrade will perform the following actions:
1558 upgrade will perform the following actions:
1559
1559
1560 requirements
1560 requirements
1561 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
1561 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
1562 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
1562 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
1563 removed: sparserevlog
1563 removed: sparserevlog
1564
1564
1565 processed revlogs:
1565 processed revlogs:
1566 - all-filelogs
1566 - all-filelogs
1567 - changelog
1567 - changelog
1568 - manifest
1568 - manifest
1569
1569
1570 $ hg debugrequires
1570 $ hg debugrequires
1571 dotencode
1571 dotencode
1572 fncache
1572 fncache
1573 generaldelta
1573 generaldelta
1574 persistent-nodemap (rust !)
1574 persistent-nodemap (rust !)
1575 revlogv1
1575 revlogv1
1576 share-safe
1576 share-safe
1577 store
1577 store
1578
1578
1579 #if zstd
1579 #if zstd
1580
1580
1581 Check upgrading to a zstd revlog
1581 Check upgrading to a zstd revlog
1582 --------------------------------
1582 --------------------------------
1583
1583
1584 upgrade
1584 upgrade
1585
1585
1586 $ hg --config format.revlog-compression=zstd debugupgraderepo --run --no-backup --quiet
1586 $ hg --config format.revlog-compression=zstd debugupgraderepo --run --no-backup --quiet
1587 upgrade will perform the following actions:
1587 upgrade will perform the following actions:
1588
1588
1589 requirements
1589 requirements
1590 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
1590 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
1591 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
1591 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
1592 added: revlog-compression-zstd, sparserevlog
1592 added: revlog-compression-zstd, sparserevlog
1593
1593
1594 processed revlogs:
1594 processed revlogs:
1595 - all-filelogs
1595 - all-filelogs
1596 - changelog
1596 - changelog
1597 - manifest
1597 - manifest
1598
1598
1599 $ hg debugformat -v
1599 $ hg debugformat -v
1600 format-variant repo config default
1600 format-variant repo config default
1601 fncache: yes yes yes
1601 fncache: yes yes yes
1602 dirstate-v2: no no no
1602 dirstate-v2: no no no
1603 tracked-hint: no no no
1603 tracked-hint: no no no
1604 dotencode: yes yes yes
1604 dotencode: yes yes yes
1605 generaldelta: yes yes yes
1605 generaldelta: yes yes yes
1606 share-safe: yes yes yes
1606 share-safe: yes yes yes
1607 sparserevlog: yes yes yes
1607 sparserevlog: yes yes yes
1608 persistent-nodemap: no no no (no-rust !)
1608 persistent-nodemap: no no no (no-rust !)
1609 persistent-nodemap: yes yes no (rust !)
1609 persistent-nodemap: yes yes no (rust !)
1610 copies-sdc: no no no
1610 copies-sdc: no no no
1611 revlog-v2: no no no
1611 revlog-v2: no no no
1612 changelog-v2: no no no
1612 changelog-v2: no no no
1613 plain-cl-delta: yes yes yes
1613 plain-cl-delta: yes yes yes
1614 compression: zlib zlib zlib (no-zstd !)
1614 compression: zlib zlib zlib (no-zstd !)
1615 compression: zstd zlib zstd (zstd !)
1615 compression: zstd zlib zstd (zstd !)
1616 compression-level: default default default
1616 compression-level: default default default
1617 $ hg debugrequires
1617 $ hg debugrequires
1618 dotencode
1618 dotencode
1619 fncache
1619 fncache
1620 generaldelta
1620 generaldelta
1621 persistent-nodemap (rust !)
1621 persistent-nodemap (rust !)
1622 revlog-compression-zstd
1622 revlog-compression-zstd
1623 revlogv1
1623 revlogv1
1624 share-safe
1624 share-safe
1625 sparserevlog
1625 sparserevlog
1626 store
1626 store
1627
1627
1628 downgrade
1628 downgrade
1629
1629
1630 $ hg debugupgraderepo --run --no-backup --quiet
1630 $ hg debugupgraderepo --run --no-backup --quiet
1631 upgrade will perform the following actions:
1631 upgrade will perform the following actions:
1632
1632
1633 requirements
1633 requirements
1634 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
1634 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
1635 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
1635 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
1636 removed: revlog-compression-zstd
1636 removed: revlog-compression-zstd
1637
1637
1638 processed revlogs:
1638 processed revlogs:
1639 - all-filelogs
1639 - all-filelogs
1640 - changelog
1640 - changelog
1641 - manifest
1641 - manifest
1642
1642
1643 $ hg debugformat -v
1643 $ hg debugformat -v
1644 format-variant repo config default
1644 format-variant repo config default
1645 fncache: yes yes yes
1645 fncache: yes yes yes
1646 dirstate-v2: no no no
1646 dirstate-v2: no no no
1647 tracked-hint: no no no
1647 tracked-hint: no no no
1648 dotencode: yes yes yes
1648 dotencode: yes yes yes
1649 generaldelta: yes yes yes
1649 generaldelta: yes yes yes
1650 share-safe: yes yes yes
1650 share-safe: yes yes yes
1651 sparserevlog: yes yes yes
1651 sparserevlog: yes yes yes
1652 persistent-nodemap: no no no (no-rust !)
1652 persistent-nodemap: no no no (no-rust !)
1653 persistent-nodemap: yes yes no (rust !)
1653 persistent-nodemap: yes yes no (rust !)
1654 copies-sdc: no no no
1654 copies-sdc: no no no
1655 revlog-v2: no no no
1655 revlog-v2: no no no
1656 changelog-v2: no no no
1656 changelog-v2: no no no
1657 plain-cl-delta: yes yes yes
1657 plain-cl-delta: yes yes yes
1658 compression: zlib zlib zlib (no-zstd !)
1658 compression: zlib zlib zlib (no-zstd !)
1659 compression: zlib zlib zstd (zstd !)
1659 compression: zlib zlib zstd (zstd !)
1660 compression-level: default default default
1660 compression-level: default default default
1661 $ hg debugrequires
1661 $ hg debugrequires
1662 dotencode
1662 dotencode
1663 fncache
1663 fncache
1664 generaldelta
1664 generaldelta
1665 persistent-nodemap (rust !)
1665 persistent-nodemap (rust !)
1666 revlogv1
1666 revlogv1
1667 share-safe
1667 share-safe
1668 sparserevlog
1668 sparserevlog
1669 store
1669 store
1670
1670
1671 upgrade from hgrc
1671 upgrade from hgrc
1672
1672
1673 $ cat >> .hg/hgrc << EOF
1673 $ cat >> .hg/hgrc << EOF
1674 > [format]
1674 > [format]
1675 > revlog-compression=zstd
1675 > revlog-compression=zstd
1676 > EOF
1676 > EOF
1677 $ hg debugupgraderepo --run --no-backup --quiet
1677 $ hg debugupgraderepo --run --no-backup --quiet
1678 upgrade will perform the following actions:
1678 upgrade will perform the following actions:
1679
1679
1680 requirements
1680 requirements
1681 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
1681 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
1682 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
1682 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
1683 added: revlog-compression-zstd
1683 added: revlog-compression-zstd
1684
1684
1685 processed revlogs:
1685 processed revlogs:
1686 - all-filelogs
1686 - all-filelogs
1687 - changelog
1687 - changelog
1688 - manifest
1688 - manifest
1689
1689
1690 $ hg debugformat -v
1690 $ hg debugformat -v
1691 format-variant repo config default
1691 format-variant repo config default
1692 fncache: yes yes yes
1692 fncache: yes yes yes
1693 dirstate-v2: no no no
1693 dirstate-v2: no no no
1694 tracked-hint: no no no
1694 tracked-hint: no no no
1695 dotencode: yes yes yes
1695 dotencode: yes yes yes
1696 generaldelta: yes yes yes
1696 generaldelta: yes yes yes
1697 share-safe: yes yes yes
1697 share-safe: yes yes yes
1698 sparserevlog: yes yes yes
1698 sparserevlog: yes yes yes
1699 persistent-nodemap: no no no (no-rust !)
1699 persistent-nodemap: no no no (no-rust !)
1700 persistent-nodemap: yes yes no (rust !)
1700 persistent-nodemap: yes yes no (rust !)
1701 copies-sdc: no no no
1701 copies-sdc: no no no
1702 revlog-v2: no no no
1702 revlog-v2: no no no
1703 changelog-v2: no no no
1703 changelog-v2: no no no
1704 plain-cl-delta: yes yes yes
1704 plain-cl-delta: yes yes yes
1705 compression: zlib zlib zlib (no-zstd !)
1705 compression: zlib zlib zlib (no-zstd !)
1706 compression: zstd zstd zstd (zstd !)
1706 compression: zstd zstd zstd (zstd !)
1707 compression-level: default default default
1707 compression-level: default default default
1708 $ hg debugrequires
1708 $ hg debugrequires
1709 dotencode
1709 dotencode
1710 fncache
1710 fncache
1711 generaldelta
1711 generaldelta
1712 persistent-nodemap (rust !)
1712 persistent-nodemap (rust !)
1713 revlog-compression-zstd
1713 revlog-compression-zstd
1714 revlogv1
1714 revlogv1
1715 share-safe
1715 share-safe
1716 sparserevlog
1716 sparserevlog
1717 store
1717 store
1718
1718
1719 #endif
1719 #endif
1720
1720
1721 Check upgrading to a revlog format supporting sidedata
1721 Check upgrading to a revlog format supporting sidedata
1722 ------------------------------------------------------
1722 ------------------------------------------------------
1723
1723
1724 upgrade
1724 upgrade
1725
1725
1726 $ hg debugsidedata -c 0
1726 $ hg debugsidedata -c 0
1727 $ hg --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data debugupgraderepo --run --no-backup --config "extensions.sidedata=$TESTDIR/testlib/ext-sidedata.py" --quiet
1727 $ hg --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data debugupgraderepo --run --no-backup --config "extensions.sidedata=$TESTDIR/testlib/ext-sidedata.py" --quiet
1728 upgrade will perform the following actions:
1728 upgrade will perform the following actions:
1729
1729
1730 requirements
1730 requirements
1731 preserved: dotencode, fncache, generaldelta, share-safe, store (no-zstd !)
1731 preserved: dotencode, fncache, generaldelta, share-safe, store (no-zstd !)
1732 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !)
1732 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !)
1733 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !)
1733 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !)
1734 removed: revlogv1
1734 removed: revlogv1
1735 added: exp-revlogv2.2 (zstd !)
1735 added: exp-revlogv2.2 (zstd !)
1736 added: exp-revlogv2.2, sparserevlog (no-zstd !)
1736 added: exp-revlogv2.2, sparserevlog (no-zstd !)
1737
1737
1738 processed revlogs:
1738 processed revlogs:
1739 - all-filelogs
1739 - all-filelogs
1740 - changelog
1740 - changelog
1741 - manifest
1741 - manifest
1742
1742
1743 $ hg debugformat -v
1743 $ hg debugformat -v
1744 format-variant repo config default
1744 format-variant repo config default
1745 fncache: yes yes yes
1745 fncache: yes yes yes
1746 dirstate-v2: no no no
1746 dirstate-v2: no no no
1747 tracked-hint: no no no
1747 tracked-hint: no no no
1748 dotencode: yes yes yes
1748 dotencode: yes yes yes
1749 generaldelta: yes yes yes
1749 generaldelta: yes yes yes
1750 share-safe: yes yes yes
1750 share-safe: yes yes yes
1751 sparserevlog: yes yes yes
1751 sparserevlog: yes yes yes
1752 persistent-nodemap: no no no (no-rust !)
1752 persistent-nodemap: no no no (no-rust !)
1753 persistent-nodemap: yes yes no (rust !)
1753 persistent-nodemap: yes yes no (rust !)
1754 copies-sdc: no no no
1754 copies-sdc: no no no
1755 revlog-v2: yes no no
1755 revlog-v2: yes no no
1756 changelog-v2: no no no
1756 changelog-v2: no no no
1757 plain-cl-delta: yes yes yes
1757 plain-cl-delta: yes yes yes
1758 compression: zlib zlib zlib (no-zstd !)
1758 compression: zlib zlib zlib (no-zstd !)
1759 compression: zstd zstd zstd (zstd !)
1759 compression: zstd zstd zstd (zstd !)
1760 compression-level: default default default
1760 compression-level: default default default
1761 $ hg debugrequires
1761 $ hg debugrequires
1762 dotencode
1762 dotencode
1763 exp-revlogv2.2
1763 exp-revlogv2.2
1764 fncache
1764 fncache
1765 generaldelta
1765 generaldelta
1766 persistent-nodemap (rust !)
1766 persistent-nodemap (rust !)
1767 revlog-compression-zstd (zstd !)
1767 revlog-compression-zstd (zstd !)
1768 share-safe
1768 share-safe
1769 sparserevlog
1769 sparserevlog
1770 store
1770 store
1771 $ hg debugsidedata -c 0
1771 $ hg debugsidedata -c 0
1772 2 sidedata entries
1772 2 sidedata entries
1773 entry-0001 size 4
1773 entry-0001 size 4
1774 entry-0002 size 32
1774 entry-0002 size 32
1775
1775
1776 downgrade
1776 downgrade
1777
1777
1778 $ hg debugupgraderepo --config experimental.revlogv2=no --run --no-backup --quiet
1778 $ hg debugupgraderepo --config experimental.revlogv2=no --run --no-backup --quiet
1779 upgrade will perform the following actions:
1779 upgrade will perform the following actions:
1780
1780
1781 requirements
1781 requirements
1782 preserved: dotencode, fncache, generaldelta, share-safe, sparserevlog, store (no-zstd !)
1782 preserved: dotencode, fncache, generaldelta, share-safe, sparserevlog, store (no-zstd !)
1783 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !)
1783 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !)
1784 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !)
1784 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !)
1785 removed: exp-revlogv2.2
1785 removed: exp-revlogv2.2
1786 added: revlogv1
1786 added: revlogv1
1787
1787
1788 processed revlogs:
1788 processed revlogs:
1789 - all-filelogs
1789 - all-filelogs
1790 - changelog
1790 - changelog
1791 - manifest
1791 - manifest
1792
1792
1793 $ hg debugformat -v
1793 $ hg debugformat -v
1794 format-variant repo config default
1794 format-variant repo config default
1795 fncache: yes yes yes
1795 fncache: yes yes yes
1796 dirstate-v2: no no no
1796 dirstate-v2: no no no
1797 tracked-hint: no no no
1797 tracked-hint: no no no
1798 dotencode: yes yes yes
1798 dotencode: yes yes yes
1799 generaldelta: yes yes yes
1799 generaldelta: yes yes yes
1800 share-safe: yes yes yes
1800 share-safe: yes yes yes
1801 sparserevlog: yes yes yes
1801 sparserevlog: yes yes yes
1802 persistent-nodemap: no no no (no-rust !)
1802 persistent-nodemap: no no no (no-rust !)
1803 persistent-nodemap: yes yes no (rust !)
1803 persistent-nodemap: yes yes no (rust !)
1804 copies-sdc: no no no
1804 copies-sdc: no no no
1805 revlog-v2: no no no
1805 revlog-v2: no no no
1806 changelog-v2: no no no
1806 changelog-v2: no no no
1807 plain-cl-delta: yes yes yes
1807 plain-cl-delta: yes yes yes
1808 compression: zlib zlib zlib (no-zstd !)
1808 compression: zlib zlib zlib (no-zstd !)
1809 compression: zstd zstd zstd (zstd !)
1809 compression: zstd zstd zstd (zstd !)
1810 compression-level: default default default
1810 compression-level: default default default
1811 $ hg debugrequires
1811 $ hg debugrequires
1812 dotencode
1812 dotencode
1813 fncache
1813 fncache
1814 generaldelta
1814 generaldelta
1815 persistent-nodemap (rust !)
1815 persistent-nodemap (rust !)
1816 revlog-compression-zstd (zstd !)
1816 revlog-compression-zstd (zstd !)
1817 revlogv1
1817 revlogv1
1818 share-safe
1818 share-safe
1819 sparserevlog
1819 sparserevlog
1820 store
1820 store
1821 $ hg debugsidedata -c 0
1821 $ hg debugsidedata -c 0
1822
1822
1823 upgrade from hgrc
1823 upgrade from hgrc
1824
1824
1825 $ cat >> .hg/hgrc << EOF
1825 $ cat >> .hg/hgrc << EOF
1826 > [experimental]
1826 > [experimental]
1827 > revlogv2=enable-unstable-format-and-corrupt-my-data
1827 > revlogv2=enable-unstable-format-and-corrupt-my-data
1828 > EOF
1828 > EOF
1829 $ hg debugupgraderepo --run --no-backup --quiet
1829 $ hg debugupgraderepo --run --no-backup --quiet
1830 upgrade will perform the following actions:
1830 upgrade will perform the following actions:
1831
1831
1832 requirements
1832 requirements
1833 preserved: dotencode, fncache, generaldelta, share-safe, sparserevlog, store (no-zstd !)
1833 preserved: dotencode, fncache, generaldelta, share-safe, sparserevlog, store (no-zstd !)
1834 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !)
1834 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !)
1835 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !)
1835 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !)
1836 removed: revlogv1
1836 removed: revlogv1
1837 added: exp-revlogv2.2
1837 added: exp-revlogv2.2
1838
1838
1839 processed revlogs:
1839 processed revlogs:
1840 - all-filelogs
1840 - all-filelogs
1841 - changelog
1841 - changelog
1842 - manifest
1842 - manifest
1843
1843
1844 $ hg debugformat -v
1844 $ hg debugformat -v
1845 format-variant repo config default
1845 format-variant repo config default
1846 fncache: yes yes yes
1846 fncache: yes yes yes
1847 dirstate-v2: no no no
1847 dirstate-v2: no no no
1848 tracked-hint: no no no
1848 tracked-hint: no no no
1849 dotencode: yes yes yes
1849 dotencode: yes yes yes
1850 generaldelta: yes yes yes
1850 generaldelta: yes yes yes
1851 share-safe: yes yes yes
1851 share-safe: yes yes yes
1852 sparserevlog: yes yes yes
1852 sparserevlog: yes yes yes
1853 persistent-nodemap: no no no (no-rust !)
1853 persistent-nodemap: no no no (no-rust !)
1854 persistent-nodemap: yes yes no (rust !)
1854 persistent-nodemap: yes yes no (rust !)
1855 copies-sdc: no no no
1855 copies-sdc: no no no
1856 revlog-v2: yes yes no
1856 revlog-v2: yes yes no
1857 changelog-v2: no no no
1857 changelog-v2: no no no
1858 plain-cl-delta: yes yes yes
1858 plain-cl-delta: yes yes yes
1859 compression: zlib zlib zlib (no-zstd !)
1859 compression: zlib zlib zlib (no-zstd !)
1860 compression: zstd zstd zstd (zstd !)
1860 compression: zstd zstd zstd (zstd !)
1861 compression-level: default default default
1861 compression-level: default default default
1862 $ hg debugrequires
1862 $ hg debugrequires
1863 dotencode
1863 dotencode
1864 exp-revlogv2.2
1864 exp-revlogv2.2
1865 fncache
1865 fncache
1866 generaldelta
1866 generaldelta
1867 persistent-nodemap (rust !)
1867 persistent-nodemap (rust !)
1868 revlog-compression-zstd (zstd !)
1868 revlog-compression-zstd (zstd !)
1869 share-safe
1869 share-safe
1870 sparserevlog
1870 sparserevlog
1871 store
1871 store
1872 $ hg debugsidedata -c 0
1872 $ hg debugsidedata -c 0
1873
1873
1874 Demonstrate that nothing to perform upgrade will still run all the way through
1874 Demonstrate that nothing to perform upgrade will still run all the way through
1875
1875
1876 $ hg debugupgraderepo --run
1876 $ hg debugupgraderepo --run
1877 nothing to do
1877 nothing to do
1878
1878
1879 #if no-rust
1879 #if no-rust
1880
1880
1881 $ cat << EOF >> $HGRCPATH
1881 $ cat << EOF >> $HGRCPATH
1882 > [storage]
1882 > [storage]
1883 > dirstate-v2.slow-path = allow
1883 > dirstate-v2.slow-path = allow
1884 > EOF
1884 > EOF
1885
1885
1886 #endif
1886 #endif
1887
1887
1888 Upgrade to dirstate-v2
1888 Upgrade to dirstate-v2
1889
1889
1890 $ hg debugformat -v --config format.use-dirstate-v2=1 | grep dirstate-v2
1890 $ hg debugformat -v --config format.use-dirstate-v2=1 | grep dirstate-v2
1891 dirstate-v2: no yes no
1891 dirstate-v2: no yes no
1892 $ hg debugupgraderepo --config format.use-dirstate-v2=1 --run
1892 $ hg debugupgraderepo --config format.use-dirstate-v2=1 --run
1893 upgrade will perform the following actions:
1893 upgrade will perform the following actions:
1894
1894
1895 requirements
1895 requirements
1896 preserved: * (glob)
1896 preserved: * (glob)
1897 added: dirstate-v2
1897 added: dirstate-v2
1898
1898
1899 dirstate-v2
1899 dirstate-v2
1900 "hg status" will be faster
1900 "hg status" will be faster
1901
1901
1902 no revlogs to process
1902 no revlogs to process
1903
1903
1904 beginning upgrade...
1904 beginning upgrade...
1905 repository locked and read-only
1905 repository locked and read-only
1906 creating temporary repository to stage upgraded data: $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob)
1906 creating temporary repository to stage upgraded data: $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob)
1907 (it is safe to interrupt this process any time before data migration completes)
1907 (it is safe to interrupt this process any time before data migration completes)
1908 upgrading to dirstate-v2 from v1
1908 upgrading to dirstate-v2 from v1
1909 replaced files will be backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob)
1909 replaced files will be backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob)
1910 removing temporary repository $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob)
1910 removing temporary repository $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob)
1911 $ ls .hg/upgradebackup.*/dirstate
1911 $ ls .hg/upgradebackup.*/dirstate
1912 .hg/upgradebackup.*/dirstate (glob)
1912 .hg/upgradebackup.*/dirstate (glob)
1913 $ hg debugformat -v | grep dirstate-v2
1913 $ hg debugformat -v | grep dirstate-v2
1914 dirstate-v2: yes no no
1914 dirstate-v2: yes no no
1915 $ hg status
1915 $ hg status
1916 $ dd bs=12 count=1 if=.hg/dirstate 2> /dev/null
1916 $ dd bs=12 count=1 if=.hg/dirstate 2> /dev/null
1917 dirstate-v2
1917 dirstate-v2
1918
1918
1919 Downgrade from dirstate-v2
1919 Downgrade from dirstate-v2
1920
1920
1921 $ hg debugupgraderepo --run
1921 $ hg debugupgraderepo --run
1922 upgrade will perform the following actions:
1922 upgrade will perform the following actions:
1923
1923
1924 requirements
1924 requirements
1925 preserved: * (glob)
1925 preserved: * (glob)
1926 removed: dirstate-v2
1926 removed: dirstate-v2
1927
1927
1928 no revlogs to process
1928 no revlogs to process
1929
1929
1930 beginning upgrade...
1930 beginning upgrade...
1931 repository locked and read-only
1931 repository locked and read-only
1932 creating temporary repository to stage upgraded data: $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob)
1932 creating temporary repository to stage upgraded data: $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob)
1933 (it is safe to interrupt this process any time before data migration completes)
1933 (it is safe to interrupt this process any time before data migration completes)
1934 downgrading from dirstate-v2 to v1
1934 downgrading from dirstate-v2 to v1
1935 replaced files will be backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob)
1935 replaced files will be backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob)
1936 removing temporary repository $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob)
1936 removing temporary repository $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob)
1937 $ hg debugformat -v | grep dirstate-v2
1937 $ hg debugformat -v | grep dirstate-v2
1938 dirstate-v2: no no no
1938 dirstate-v2: no no no
1939 $ hg status
1939 $ hg status
1940
1940
1941 $ cd ..
1941 $ cd ..
1942
1942
1943 dirstate-v2: upgrade and downgrade from and empty repository:
1943 dirstate-v2: upgrade and downgrade from and empty repository:
1944 -------------------------------------------------------------
1944 -------------------------------------------------------------
1945
1945
1946 $ hg init --config format.use-dirstate-v2=no dirstate-v2-empty
1946 $ hg init --config format.use-dirstate-v2=no dirstate-v2-empty
1947 $ cd dirstate-v2-empty
1947 $ cd dirstate-v2-empty
1948 $ hg debugformat | grep dirstate-v2
1948 $ hg debugformat | grep dirstate-v2
1949 dirstate-v2: no
1949 dirstate-v2: no
1950
1950
1951 upgrade
1951 upgrade
1952
1952
1953 $ hg debugupgraderepo --run --config format.use-dirstate-v2=yes
1953 $ hg debugupgraderepo --run --config format.use-dirstate-v2=yes
1954 upgrade will perform the following actions:
1954 upgrade will perform the following actions:
1955
1955
1956 requirements
1956 requirements
1957 preserved: * (glob)
1957 preserved: * (glob)
1958 added: dirstate-v2
1958 added: dirstate-v2
1959
1959
1960 dirstate-v2
1960 dirstate-v2
1961 "hg status" will be faster
1961 "hg status" will be faster
1962
1962
1963 no revlogs to process
1963 no revlogs to process
1964
1964
1965 beginning upgrade...
1965 beginning upgrade...
1966 repository locked and read-only
1966 repository locked and read-only
1967 creating temporary repository to stage upgraded data: $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob)
1967 creating temporary repository to stage upgraded data: $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob)
1968 (it is safe to interrupt this process any time before data migration completes)
1968 (it is safe to interrupt this process any time before data migration completes)
1969 upgrading to dirstate-v2 from v1
1969 upgrading to dirstate-v2 from v1
1970 replaced files will be backed up at $TESTTMP/dirstate-v2-empty/.hg/upgradebackup.* (glob)
1970 replaced files will be backed up at $TESTTMP/dirstate-v2-empty/.hg/upgradebackup.* (glob)
1971 removing temporary repository $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob)
1971 removing temporary repository $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob)
1972 $ hg debugformat | grep dirstate-v2
1972 $ hg debugformat | grep dirstate-v2
1973 dirstate-v2: yes
1973 dirstate-v2: yes
1974
1974
1975 downgrade
1975 downgrade
1976
1976
1977 $ hg debugupgraderepo --run --config format.use-dirstate-v2=no
1977 $ hg debugupgraderepo --run --config format.use-dirstate-v2=no
1978 upgrade will perform the following actions:
1978 upgrade will perform the following actions:
1979
1979
1980 requirements
1980 requirements
1981 preserved: * (glob)
1981 preserved: * (glob)
1982 removed: dirstate-v2
1982 removed: dirstate-v2
1983
1983
1984 no revlogs to process
1984 no revlogs to process
1985
1985
1986 beginning upgrade...
1986 beginning upgrade...
1987 repository locked and read-only
1987 repository locked and read-only
1988 creating temporary repository to stage upgraded data: $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob)
1988 creating temporary repository to stage upgraded data: $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob)
1989 (it is safe to interrupt this process any time before data migration completes)
1989 (it is safe to interrupt this process any time before data migration completes)
1990 downgrading from dirstate-v2 to v1
1990 downgrading from dirstate-v2 to v1
1991 replaced files will be backed up at $TESTTMP/dirstate-v2-empty/.hg/upgradebackup.* (glob)
1991 replaced files will be backed up at $TESTTMP/dirstate-v2-empty/.hg/upgradebackup.* (glob)
1992 removing temporary repository $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob)
1992 removing temporary repository $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob)
1993 $ hg debugformat | grep dirstate-v2
1993 $ hg debugformat | grep dirstate-v2
1994 dirstate-v2: no
1994 dirstate-v2: no
1995
1995
1996 $ cd ..
1996 $ cd ..
1997
1997
1998 Test automatic upgrade/downgrade
1998 Test automatic upgrade/downgrade
1999 ================================
1999 ================================
2000
2000
2001
2001
2002 For dirstate v2
2002 For dirstate v2
2003 ---------------
2003 ---------------
2004
2004
2005 create an initial repository
2005 create an initial repository
2006
2006
2007 $ hg init auto-upgrade \
2007 $ hg init auto-upgrade \
2008 > --config format.use-dirstate-v2=no \
2008 > --config format.use-dirstate-v2=no \
2009 > --config format.use-dirstate-tracked-hint=yes \
2009 > --config format.use-dirstate-tracked-hint=yes \
2010 > --config format.use-share-safe=no
2010 > --config format.use-share-safe=no
2011 $ hg debugbuilddag -R auto-upgrade --new-file .+5
2011 $ hg debugbuilddag -R auto-upgrade --new-file .+5
2012 $ hg -R auto-upgrade update
2012 $ hg -R auto-upgrade update
2013 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
2013 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
2014 $ hg debugformat -R auto-upgrade | grep dirstate-v2
2014 $ hg debugformat -R auto-upgrade | grep dirstate-v2
2015 dirstate-v2: no
2015 dirstate-v2: no
2016
2016
2017 upgrade it to dirstate-v2 automatically
2017 upgrade it to dirstate-v2 automatically
2018
2018
2019 $ hg status -R auto-upgrade \
2019 $ hg status -R auto-upgrade \
2020 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
2020 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
2021 > --config format.use-dirstate-v2=yes
2021 > --config format.use-dirstate-v2=yes
2022 automatically upgrading repository to the `dirstate-v2` feature
2022 automatically upgrading repository to the `dirstate-v2` feature
2023 (see `hg help config.format.use-dirstate-v2` for details)
2023 (see `hg help config.format.use-dirstate-v2` for details)
2024 $ hg debugformat -R auto-upgrade | grep dirstate-v2
2024 $ hg debugformat -R auto-upgrade | grep dirstate-v2
2025 dirstate-v2: yes
2025 dirstate-v2: yes
2026
2026
2027 downgrade it from dirstate-v2 automatically
2027 downgrade it from dirstate-v2 automatically
2028
2028
2029 $ hg status -R auto-upgrade \
2029 $ hg status -R auto-upgrade \
2030 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
2030 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
2031 > --config format.use-dirstate-v2=no
2031 > --config format.use-dirstate-v2=no
2032 automatically downgrading repository from the `dirstate-v2` feature
2032 automatically downgrading repository from the `dirstate-v2` feature
2033 (see `hg help config.format.use-dirstate-v2` for details)
2033 (see `hg help config.format.use-dirstate-v2` for details)
2034 $ hg debugformat -R auto-upgrade | grep dirstate-v2
2034 $ hg debugformat -R auto-upgrade | grep dirstate-v2
2035 dirstate-v2: no
2035 dirstate-v2: no
2036
2036
2037
2037
2038 For multiple change at the same time
2038 For multiple change at the same time
2039 ------------------------------------
2039 ------------------------------------
2040
2040
2041 $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)'
2041 $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)'
2042 dirstate-v2: no
2042 dirstate-v2: no
2043 tracked-hint: yes
2043 tracked-hint: yes
2044 share-safe: no
2044 share-safe: no
2045
2045
2046 $ hg status -R auto-upgrade \
2046 $ hg status -R auto-upgrade \
2047 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
2047 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
2048 > --config format.use-dirstate-v2=yes \
2048 > --config format.use-dirstate-v2=yes \
2049 > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \
2049 > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \
2050 > --config format.use-dirstate-tracked-hint=no\
2050 > --config format.use-dirstate-tracked-hint=no\
2051 > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \
2051 > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \
2052 > --config format.use-share-safe=yes
2052 > --config format.use-share-safe=yes
2053 automatically upgrading repository to the `dirstate-v2` feature
2053 automatically upgrading repository to the `dirstate-v2` feature
2054 (see `hg help config.format.use-dirstate-v2` for details)
2054 (see `hg help config.format.use-dirstate-v2` for details)
2055 automatically upgrading repository to the `share-safe` feature
2055 automatically upgrading repository to the `share-safe` feature
2056 (see `hg help config.format.use-share-safe` for details)
2056 (see `hg help config.format.use-share-safe` for details)
2057 automatically downgrading repository from the `tracked-hint` feature
2057 automatically downgrading repository from the `tracked-hint` feature
2058 (see `hg help config.format.use-dirstate-tracked-hint` for details)
2058 (see `hg help config.format.use-dirstate-tracked-hint` for details)
2059 $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)'
2059 $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)'
2060 dirstate-v2: yes
2060 dirstate-v2: yes
2061 tracked-hint: no
2061 tracked-hint: no
2062 share-safe: yes
2062 share-safe: yes
2063
2063
2064 Attempting Auto-upgrade on a read-only repository
2065 -------------------------------------------------
2066
2067 $ chmod -R a-w auto-upgrade
2068
2069 $ hg status -R auto-upgrade \
2070 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
2071 > --config format.use-dirstate-v2=no
2072 abort: could not lock working directory of auto-upgrade: Permission denied
2073 [20]
2074 $ hg debugformat -R auto-upgrade | grep dirstate-v2
2075 dirstate-v2: yes
2076
2077 $ chmod -R u+w auto-upgrade
2078
General Comments 0
You need to be logged in to leave comments. Login now