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