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