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