##// END OF EJS Templates
tests: glob seconds in test-upgrade-repo.t...
Pulkit Goyal -
r42157:22ed6386 default
parent child Browse files
Show More
@@ -1,843 +1,843 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 $ hg debugformat --verbose
62 $ hg debugformat --verbose
63 format-variant repo config default
63 format-variant repo config default
64 fncache: yes yes yes
64 fncache: yes yes yes
65 dotencode: yes yes yes
65 dotencode: yes yes yes
66 generaldelta: yes yes yes
66 generaldelta: yes yes yes
67 sparserevlog: yes yes yes
67 sparserevlog: yes yes yes
68 plain-cl-delta: yes yes yes
68 plain-cl-delta: yes yes yes
69 compression: zlib zlib zlib
69 compression: zlib zlib zlib
70 $ hg debugformat --verbose --config format.usefncache=no
70 $ hg debugformat --verbose --config format.usefncache=no
71 format-variant repo config default
71 format-variant repo config default
72 fncache: yes no yes
72 fncache: yes no yes
73 dotencode: yes no yes
73 dotencode: yes no yes
74 generaldelta: yes yes yes
74 generaldelta: yes yes yes
75 sparserevlog: yes yes yes
75 sparserevlog: yes yes yes
76 plain-cl-delta: yes yes yes
76 plain-cl-delta: yes yes yes
77 compression: zlib zlib zlib
77 compression: zlib zlib zlib
78 $ hg debugformat --verbose --config format.usefncache=no --color=debug
78 $ hg debugformat --verbose --config format.usefncache=no --color=debug
79 format-variant repo config default
79 format-variant repo config default
80 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
80 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
81 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
81 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
82 [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
82 [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
83 [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
83 [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
84 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
84 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
85 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
85 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
86 $ hg debugformat -Tjson
86 $ hg debugformat -Tjson
87 [
87 [
88 {
88 {
89 "config": true,
89 "config": true,
90 "default": true,
90 "default": true,
91 "name": "fncache",
91 "name": "fncache",
92 "repo": true
92 "repo": true
93 },
93 },
94 {
94 {
95 "config": true,
95 "config": true,
96 "default": true,
96 "default": true,
97 "name": "dotencode",
97 "name": "dotencode",
98 "repo": true
98 "repo": true
99 },
99 },
100 {
100 {
101 "config": true,
101 "config": true,
102 "default": true,
102 "default": true,
103 "name": "generaldelta",
103 "name": "generaldelta",
104 "repo": true
104 "repo": true
105 },
105 },
106 {
106 {
107 "config": true,
107 "config": true,
108 "default": true,
108 "default": true,
109 "name": "sparserevlog",
109 "name": "sparserevlog",
110 "repo": true
110 "repo": true
111 },
111 },
112 {
112 {
113 "config": true,
113 "config": true,
114 "default": true,
114 "default": true,
115 "name": "plain-cl-delta",
115 "name": "plain-cl-delta",
116 "repo": true
116 "repo": true
117 },
117 },
118 {
118 {
119 "config": "zlib",
119 "config": "zlib",
120 "default": "zlib",
120 "default": "zlib",
121 "name": "compression",
121 "name": "compression",
122 "repo": "zlib"
122 "repo": "zlib"
123 }
123 }
124 ]
124 ]
125 $ hg debugupgraderepo
125 $ hg debugupgraderepo
126 (no feature deficiencies found in existing repository)
126 (no feature deficiencies found in existing repository)
127 performing an upgrade with "--run" will make the following changes:
127 performing an upgrade with "--run" will make the following changes:
128
128
129 requirements
129 requirements
130 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
130 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
131
131
132 additional optimizations are available by specifying "--optimize <name>":
132 additional optimizations are available by specifying "--optimize <name>":
133
133
134 re-delta-parent
134 re-delta-parent
135 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
135 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
136
136
137 re-delta-multibase
137 re-delta-multibase
138 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
138 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
139
139
140 re-delta-all
140 re-delta-all
141 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
141 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
142
142
143 re-delta-fulladd
143 re-delta-fulladd
144 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.
144 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.
145
145
146
146
147 --optimize can be used to add optimizations
147 --optimize can be used to add optimizations
148
148
149 $ hg debugupgrade --optimize redeltaparent
149 $ hg debugupgrade --optimize redeltaparent
150 (no feature deficiencies found in existing repository)
150 (no feature deficiencies found in existing repository)
151 performing an upgrade with "--run" will make the following changes:
151 performing an upgrade with "--run" will make the following changes:
152
152
153 requirements
153 requirements
154 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
154 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
155
155
156 re-delta-parent
156 re-delta-parent
157 deltas within internal storage will choose a new base revision if needed
157 deltas within internal storage will choose a new base revision if needed
158
158
159 additional optimizations are available by specifying "--optimize <name>":
159 additional optimizations are available by specifying "--optimize <name>":
160
160
161 re-delta-multibase
161 re-delta-multibase
162 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
162 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
163
163
164 re-delta-all
164 re-delta-all
165 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
165 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
166
166
167 re-delta-fulladd
167 re-delta-fulladd
168 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
168 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.
169
169
170
170
171 modern form of the option
171 modern form of the option
172
172
173 $ hg debugupgrade --optimize re-delta-parent
173 $ hg debugupgrade --optimize re-delta-parent
174 (no feature deficiencies found in existing repository)
174 (no feature deficiencies found in existing repository)
175 performing an upgrade with "--run" will make the following changes:
175 performing an upgrade with "--run" will make the following changes:
176
176
177 requirements
177 requirements
178 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
178 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
179
179
180 re-delta-parent
180 re-delta-parent
181 deltas within internal storage will choose a new base revision if needed
181 deltas within internal storage will choose a new base revision if needed
182
182
183 additional optimizations are available by specifying "--optimize <name>":
183 additional optimizations are available by specifying "--optimize <name>":
184
184
185 re-delta-multibase
185 re-delta-multibase
186 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
186 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
187
187
188 re-delta-all
188 re-delta-all
189 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
189 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
190
190
191 re-delta-fulladd
191 re-delta-fulladd
192 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.
192 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.
193
193
194
194
195 unknown optimization:
195 unknown optimization:
196
196
197 $ hg debugupgrade --optimize foobar
197 $ hg debugupgrade --optimize foobar
198 abort: unknown optimization action requested: foobar
198 abort: unknown optimization action requested: foobar
199 (run without arguments to see valid optimizations)
199 (run without arguments to see valid optimizations)
200 [255]
200 [255]
201
201
202 Various sub-optimal detections work
202 Various sub-optimal detections work
203
203
204 $ cat > .hg/requires << EOF
204 $ cat > .hg/requires << EOF
205 > revlogv1
205 > revlogv1
206 > store
206 > store
207 > EOF
207 > EOF
208
208
209 $ hg debugformat
209 $ hg debugformat
210 format-variant repo
210 format-variant repo
211 fncache: no
211 fncache: no
212 dotencode: no
212 dotencode: no
213 generaldelta: no
213 generaldelta: no
214 sparserevlog: no
214 sparserevlog: no
215 plain-cl-delta: yes
215 plain-cl-delta: yes
216 compression: zlib
216 compression: zlib
217 $ hg debugformat --verbose
217 $ hg debugformat --verbose
218 format-variant repo config default
218 format-variant repo config default
219 fncache: no yes yes
219 fncache: no yes yes
220 dotencode: no yes yes
220 dotencode: no yes yes
221 generaldelta: no yes yes
221 generaldelta: no yes yes
222 sparserevlog: no yes yes
222 sparserevlog: no yes yes
223 plain-cl-delta: yes yes yes
223 plain-cl-delta: yes yes yes
224 compression: zlib zlib zlib
224 compression: zlib zlib zlib
225 $ hg debugformat --verbose --config format.usegeneraldelta=no
225 $ hg debugformat --verbose --config format.usegeneraldelta=no
226 format-variant repo config default
226 format-variant repo config default
227 fncache: no yes yes
227 fncache: no yes yes
228 dotencode: no yes yes
228 dotencode: no yes yes
229 generaldelta: no no yes
229 generaldelta: no no yes
230 sparserevlog: no no yes
230 sparserevlog: no no yes
231 plain-cl-delta: yes yes yes
231 plain-cl-delta: yes yes yes
232 compression: zlib zlib zlib
232 compression: zlib zlib zlib
233 $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug
233 $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug
234 format-variant repo config default
234 format-variant repo config default
235 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
235 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
236 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
236 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
237 [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
237 [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
238 [formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
238 [formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
239 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
239 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
240 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
240 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
241 $ hg debugupgraderepo
241 $ hg debugupgraderepo
242 repository lacks features recommended by current config options:
242 repository lacks features recommended by current config options:
243
243
244 fncache
244 fncache
245 long and reserved filenames may not work correctly; repository performance is sub-optimal
245 long and reserved filenames may not work correctly; repository performance is sub-optimal
246
246
247 dotencode
247 dotencode
248 storage of filenames beginning with a period or space may not work correctly
248 storage of filenames beginning with a period or space may not work correctly
249
249
250 generaldelta
250 generaldelta
251 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
251 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
252
252
253 sparserevlog
253 sparserevlog
254 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.
254 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.
255
255
256
256
257 performing an upgrade with "--run" will make the following changes:
257 performing an upgrade with "--run" will make the following changes:
258
258
259 requirements
259 requirements
260 preserved: revlogv1, store
260 preserved: revlogv1, store
261 added: dotencode, fncache, generaldelta, sparserevlog
261 added: dotencode, fncache, generaldelta, sparserevlog
262
262
263 fncache
263 fncache
264 repository will be more resilient to storing certain paths and performance of certain operations should be improved
264 repository will be more resilient to storing certain paths and performance of certain operations should be improved
265
265
266 dotencode
266 dotencode
267 repository will be better able to store files beginning with a space or period
267 repository will be better able to store files beginning with a space or period
268
268
269 generaldelta
269 generaldelta
270 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
270 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
271
271
272 sparserevlog
272 sparserevlog
273 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.
273 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.
274
274
275 additional optimizations are available by specifying "--optimize <name>":
275 additional optimizations are available by specifying "--optimize <name>":
276
276
277 re-delta-parent
277 re-delta-parent
278 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
278 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
279
279
280 re-delta-multibase
280 re-delta-multibase
281 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
281 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
282
282
283 re-delta-all
283 re-delta-all
284 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
284 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
285
285
286 re-delta-fulladd
286 re-delta-fulladd
287 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.
287 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.
288
288
289
289
290 $ hg --config format.dotencode=false debugupgraderepo
290 $ hg --config format.dotencode=false debugupgraderepo
291 repository lacks features recommended by current config options:
291 repository lacks features recommended by current config options:
292
292
293 fncache
293 fncache
294 long and reserved filenames may not work correctly; repository performance is sub-optimal
294 long and reserved filenames may not work correctly; repository performance is sub-optimal
295
295
296 generaldelta
296 generaldelta
297 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
297 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
298
298
299 sparserevlog
299 sparserevlog
300 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.
300 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.
301
301
302 repository lacks features used by the default config options:
302 repository lacks features used by the default config options:
303
303
304 dotencode
304 dotencode
305 storage of filenames beginning with a period or space may not work correctly
305 storage of filenames beginning with a period or space may not work correctly
306
306
307
307
308 performing an upgrade with "--run" will make the following changes:
308 performing an upgrade with "--run" will make the following changes:
309
309
310 requirements
310 requirements
311 preserved: revlogv1, store
311 preserved: revlogv1, store
312 added: fncache, generaldelta, sparserevlog
312 added: fncache, generaldelta, sparserevlog
313
313
314 fncache
314 fncache
315 repository will be more resilient to storing certain paths and performance of certain operations should be improved
315 repository will be more resilient to storing certain paths and performance of certain operations should be improved
316
316
317 generaldelta
317 generaldelta
318 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
318 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
319
319
320 sparserevlog
320 sparserevlog
321 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.
321 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.
322
322
323 additional optimizations are available by specifying "--optimize <name>":
323 additional optimizations are available by specifying "--optimize <name>":
324
324
325 re-delta-parent
325 re-delta-parent
326 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
326 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
327
327
328 re-delta-multibase
328 re-delta-multibase
329 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
329 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
330
330
331 re-delta-all
331 re-delta-all
332 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
332 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
333
333
334 re-delta-fulladd
334 re-delta-fulladd
335 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.
335 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.
336
336
337
337
338 $ cd ..
338 $ cd ..
339
339
340 Upgrading a repository that is already modern essentially no-ops
340 Upgrading a repository that is already modern essentially no-ops
341
341
342 $ hg init modern
342 $ hg init modern
343 $ hg -R modern debugupgraderepo --run
343 $ hg -R modern debugupgraderepo --run
344 upgrade will perform the following actions:
344 upgrade will perform the following actions:
345
345
346 requirements
346 requirements
347 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
347 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
348
348
349 beginning upgrade...
349 beginning upgrade...
350 repository locked and read-only
350 repository locked and read-only
351 creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob)
351 creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob)
352 (it is safe to interrupt this process any time before data migration completes)
352 (it is safe to interrupt this process any time before data migration completes)
353 data fully migrated to temporary repository
353 data fully migrated to temporary repository
354 marking source repository as being upgraded; clients will be unable to read from repository
354 marking source repository as being upgraded; clients will be unable to read from repository
355 starting in-place swap of repository data
355 starting in-place swap of repository data
356 replaced files will be backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob)
356 replaced files will be backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob)
357 replacing store...
357 replacing store...
358 store replacement complete; repository was inconsistent for *s (glob)
358 store replacement complete; repository was inconsistent for *s (glob)
359 finalizing requirements file and making repository readable again
359 finalizing requirements file and making repository readable again
360 removing temporary repository $TESTTMP/modern/.hg/upgrade.* (glob)
360 removing temporary repository $TESTTMP/modern/.hg/upgrade.* (glob)
361 copy of old repository backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob)
361 copy of old repository backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob)
362 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
362 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
363
363
364 Upgrading a repository to generaldelta works
364 Upgrading a repository to generaldelta works
365
365
366 $ hg --config format.usegeneraldelta=false init upgradegd
366 $ hg --config format.usegeneraldelta=false init upgradegd
367 $ cd upgradegd
367 $ cd upgradegd
368 $ touch f0
368 $ touch f0
369 $ hg -q commit -A -m initial
369 $ hg -q commit -A -m initial
370 $ touch f1
370 $ touch f1
371 $ hg -q commit -A -m 'add f1'
371 $ hg -q commit -A -m 'add f1'
372 $ hg -q up -r 0
372 $ hg -q up -r 0
373 $ touch f2
373 $ touch f2
374 $ hg -q commit -A -m 'add f2'
374 $ hg -q commit -A -m 'add f2'
375
375
376 $ hg debugupgraderepo --run --config format.sparse-revlog=false
376 $ hg debugupgraderepo --run --config format.sparse-revlog=false
377 upgrade will perform the following actions:
377 upgrade will perform the following actions:
378
378
379 requirements
379 requirements
380 preserved: dotencode, fncache, revlogv1, store
380 preserved: dotencode, fncache, revlogv1, store
381 added: generaldelta
381 added: generaldelta
382
382
383 generaldelta
383 generaldelta
384 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
384 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
385
385
386 beginning upgrade...
386 beginning upgrade...
387 repository locked and read-only
387 repository locked and read-only
388 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
388 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
389 (it is safe to interrupt this process any time before data migration completes)
389 (it is safe to interrupt this process any time before data migration completes)
390 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
390 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
391 migrating 917 bytes in store; 401 bytes tracked data
391 migrating 917 bytes in store; 401 bytes tracked data
392 migrating 3 filelogs containing 3 revisions (192 bytes in store; 0 bytes tracked data)
392 migrating 3 filelogs containing 3 revisions (192 bytes in store; 0 bytes tracked data)
393 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
393 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
394 migrating 1 manifests containing 3 revisions (349 bytes in store; 220 bytes tracked data)
394 migrating 1 manifests containing 3 revisions (349 bytes in store; 220 bytes tracked data)
395 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
395 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
396 migrating changelog containing 3 revisions (376 bytes in store; 181 bytes tracked data)
396 migrating changelog containing 3 revisions (376 bytes in store; 181 bytes tracked data)
397 finished migrating 3 changelog revisions; change in size: 0 bytes
397 finished migrating 3 changelog revisions; change in size: 0 bytes
398 finished migrating 9 total revisions; total change in store size: 0 bytes
398 finished migrating 9 total revisions; total change in store size: 0 bytes
399 copying phaseroots
399 copying phaseroots
400 data fully migrated to temporary repository
400 data fully migrated to temporary repository
401 marking source repository as being upgraded; clients will be unable to read from repository
401 marking source repository as being upgraded; clients will be unable to read from repository
402 starting in-place swap of repository data
402 starting in-place swap of repository data
403 replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
403 replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
404 replacing store...
404 replacing store...
405 store replacement complete; repository was inconsistent for *s (glob)
405 store replacement complete; repository was inconsistent for *s (glob)
406 finalizing requirements file and making repository readable again
406 finalizing requirements file and making repository readable again
407 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
407 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
408 copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
408 copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
409 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
409 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
410
410
411 Original requirements backed up
411 Original requirements backed up
412
412
413 $ cat .hg/upgradebackup.*/requires
413 $ cat .hg/upgradebackup.*/requires
414 dotencode
414 dotencode
415 fncache
415 fncache
416 revlogv1
416 revlogv1
417 store
417 store
418
418
419 generaldelta added to original requirements files
419 generaldelta added to original requirements files
420
420
421 $ cat .hg/requires
421 $ cat .hg/requires
422 dotencode
422 dotencode
423 fncache
423 fncache
424 generaldelta
424 generaldelta
425 revlogv1
425 revlogv1
426 store
426 store
427
427
428 store directory has files we expect
428 store directory has files we expect
429
429
430 $ ls .hg/store
430 $ ls .hg/store
431 00changelog.i
431 00changelog.i
432 00manifest.i
432 00manifest.i
433 data
433 data
434 fncache
434 fncache
435 phaseroots
435 phaseroots
436 undo
436 undo
437 undo.backupfiles
437 undo.backupfiles
438 undo.phaseroots
438 undo.phaseroots
439
439
440 manifest should be generaldelta
440 manifest should be generaldelta
441
441
442 $ hg debugrevlog -m | grep flags
442 $ hg debugrevlog -m | grep flags
443 flags : inline, generaldelta
443 flags : inline, generaldelta
444
444
445 verify should be happy
445 verify should be happy
446
446
447 $ hg verify
447 $ hg verify
448 checking changesets
448 checking changesets
449 checking manifests
449 checking manifests
450 crosschecking files in changesets and manifests
450 crosschecking files in changesets and manifests
451 checking files
451 checking files
452 checked 3 changesets with 3 changes to 3 files
452 checked 3 changesets with 3 changes to 3 files
453
453
454 old store should be backed up
454 old store should be backed up
455
455
456 $ ls -d .hg/upgradebackup.*/
456 $ ls -d .hg/upgradebackup.*/
457 .hg/upgradebackup.*/ (glob)
457 .hg/upgradebackup.*/ (glob)
458 $ ls .hg/upgradebackup.*/store
458 $ ls .hg/upgradebackup.*/store
459 00changelog.i
459 00changelog.i
460 00manifest.i
460 00manifest.i
461 data
461 data
462 fncache
462 fncache
463 phaseroots
463 phaseroots
464 undo
464 undo
465 undo.backup.fncache
465 undo.backup.fncache
466 undo.backupfiles
466 undo.backupfiles
467 undo.phaseroots
467 undo.phaseroots
468
468
469 unless --no-backup is passed
469 unless --no-backup is passed
470
470
471 $ rm -rf .hg/upgradebackup.*/
471 $ rm -rf .hg/upgradebackup.*/
472 $ hg debugupgraderepo --run --no-backup
472 $ hg debugupgraderepo --run --no-backup
473 upgrade will perform the following actions:
473 upgrade will perform the following actions:
474
474
475 requirements
475 requirements
476 preserved: dotencode, fncache, generaldelta, revlogv1, store
476 preserved: dotencode, fncache, generaldelta, revlogv1, store
477 added: sparserevlog
477 added: sparserevlog
478
478
479 sparserevlog
479 sparserevlog
480 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.
480 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.
481
481
482 beginning upgrade...
482 beginning upgrade...
483 repository locked and read-only
483 repository locked and read-only
484 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
484 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
485 (it is safe to interrupt this process any time before data migration completes)
485 (it is safe to interrupt this process any time before data migration completes)
486 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
486 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
487 migrating 917 bytes in store; 401 bytes tracked data
487 migrating 917 bytes in store; 401 bytes tracked data
488 migrating 3 filelogs containing 3 revisions (192 bytes in store; 0 bytes tracked data)
488 migrating 3 filelogs containing 3 revisions (192 bytes in store; 0 bytes tracked data)
489 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
489 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
490 migrating 1 manifests containing 3 revisions (349 bytes in store; 220 bytes tracked data)
490 migrating 1 manifests containing 3 revisions (349 bytes in store; 220 bytes tracked data)
491 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
491 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
492 migrating changelog containing 3 revisions (376 bytes in store; 181 bytes tracked data)
492 migrating changelog containing 3 revisions (376 bytes in store; 181 bytes tracked data)
493 finished migrating 3 changelog revisions; change in size: 0 bytes
493 finished migrating 3 changelog revisions; change in size: 0 bytes
494 finished migrating 9 total revisions; total change in store size: 0 bytes
494 finished migrating 9 total revisions; total change in store size: 0 bytes
495 copying phaseroots
495 copying phaseroots
496 data fully migrated to temporary repository
496 data fully migrated to temporary repository
497 marking source repository as being upgraded; clients will be unable to read from repository
497 marking source repository as being upgraded; clients will be unable to read from repository
498 starting in-place swap of repository data
498 starting in-place swap of repository data
499 replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
499 replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
500 replacing store...
500 replacing store...
501 store replacement complete; repository was inconsistent for 0.0s
501 store replacement complete; repository was inconsistent for * (glob)
502 finalizing requirements file and making repository readable again
502 finalizing requirements file and making repository readable again
503 removing old repository content$TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
503 removing old repository content$TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
504 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
504 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
505 $ ls -1 .hg/ | grep upgradebackup
505 $ ls -1 .hg/ | grep upgradebackup
506 [1]
506 [1]
507 $ cd ..
507 $ cd ..
508
508
509
509
510 store files with special filenames aren't encoded during copy
510 store files with special filenames aren't encoded during copy
511
511
512 $ hg init store-filenames
512 $ hg init store-filenames
513 $ cd store-filenames
513 $ cd store-filenames
514 $ touch foo
514 $ touch foo
515 $ hg -q commit -A -m initial
515 $ hg -q commit -A -m initial
516 $ touch .hg/store/.XX_special_filename
516 $ touch .hg/store/.XX_special_filename
517
517
518 $ hg debugupgraderepo --run
518 $ hg debugupgraderepo --run
519 upgrade will perform the following actions:
519 upgrade will perform the following actions:
520
520
521 requirements
521 requirements
522 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
522 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
523
523
524 beginning upgrade...
524 beginning upgrade...
525 repository locked and read-only
525 repository locked and read-only
526 creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
526 creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
527 (it is safe to interrupt this process any time before data migration completes)
527 (it is safe to interrupt this process any time before data migration completes)
528 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
528 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
529 migrating 301 bytes in store; 107 bytes tracked data
529 migrating 301 bytes in store; 107 bytes tracked data
530 migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data)
530 migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data)
531 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
531 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
532 migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data)
532 migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data)
533 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
533 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
534 migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data)
534 migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data)
535 finished migrating 1 changelog revisions; change in size: 0 bytes
535 finished migrating 1 changelog revisions; change in size: 0 bytes
536 finished migrating 3 total revisions; total change in store size: 0 bytes
536 finished migrating 3 total revisions; total change in store size: 0 bytes
537 copying .XX_special_filename
537 copying .XX_special_filename
538 copying phaseroots
538 copying phaseroots
539 data fully migrated to temporary repository
539 data fully migrated to temporary repository
540 marking source repository as being upgraded; clients will be unable to read from repository
540 marking source repository as being upgraded; clients will be unable to read from repository
541 starting in-place swap of repository data
541 starting in-place swap of repository data
542 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
542 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
543 replacing store...
543 replacing store...
544 store replacement complete; repository was inconsistent for *s (glob)
544 store replacement complete; repository was inconsistent for *s (glob)
545 finalizing requirements file and making repository readable again
545 finalizing requirements file and making repository readable again
546 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
546 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
547 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
547 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
548 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
548 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
549 $ hg debugupgraderepo --run --optimize redeltafulladd
549 $ hg debugupgraderepo --run --optimize redeltafulladd
550 upgrade will perform the following actions:
550 upgrade will perform the following actions:
551
551
552 requirements
552 requirements
553 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
553 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
554
554
555 re-delta-fulladd
555 re-delta-fulladd
556 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
556 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
557
557
558 beginning upgrade...
558 beginning upgrade...
559 repository locked and read-only
559 repository locked and read-only
560 creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
560 creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
561 (it is safe to interrupt this process any time before data migration completes)
561 (it is safe to interrupt this process any time before data migration completes)
562 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
562 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
563 migrating 301 bytes in store; 107 bytes tracked data
563 migrating 301 bytes in store; 107 bytes tracked data
564 migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data)
564 migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data)
565 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
565 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
566 migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data)
566 migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data)
567 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
567 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
568 migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data)
568 migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data)
569 finished migrating 1 changelog revisions; change in size: 0 bytes
569 finished migrating 1 changelog revisions; change in size: 0 bytes
570 finished migrating 3 total revisions; total change in store size: 0 bytes
570 finished migrating 3 total revisions; total change in store size: 0 bytes
571 copying .XX_special_filename
571 copying .XX_special_filename
572 copying phaseroots
572 copying phaseroots
573 data fully migrated to temporary repository
573 data fully migrated to temporary repository
574 marking source repository as being upgraded; clients will be unable to read from repository
574 marking source repository as being upgraded; clients will be unable to read from repository
575 starting in-place swap of repository data
575 starting in-place swap of repository data
576 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
576 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
577 replacing store...
577 replacing store...
578 store replacement complete; repository was inconsistent for *s (glob)
578 store replacement complete; repository was inconsistent for *s (glob)
579 finalizing requirements file and making repository readable again
579 finalizing requirements file and making repository readable again
580 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
580 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
581 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
581 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
582 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
582 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
583
583
584 fncache is valid after upgrade
584 fncache is valid after upgrade
585
585
586 $ hg debugrebuildfncache
586 $ hg debugrebuildfncache
587 fncache already up to date
587 fncache already up to date
588
588
589 $ cd ..
589 $ cd ..
590
590
591 Check upgrading a large file repository
591 Check upgrading a large file repository
592 ---------------------------------------
592 ---------------------------------------
593
593
594 $ hg init largefilesrepo
594 $ hg init largefilesrepo
595 $ cat << EOF >> largefilesrepo/.hg/hgrc
595 $ cat << EOF >> largefilesrepo/.hg/hgrc
596 > [extensions]
596 > [extensions]
597 > largefiles =
597 > largefiles =
598 > EOF
598 > EOF
599
599
600 $ cd largefilesrepo
600 $ cd largefilesrepo
601 $ touch foo
601 $ touch foo
602 $ hg add --large foo
602 $ hg add --large foo
603 $ hg -q commit -m initial
603 $ hg -q commit -m initial
604 $ cat .hg/requires
604 $ cat .hg/requires
605 dotencode
605 dotencode
606 fncache
606 fncache
607 generaldelta
607 generaldelta
608 largefiles
608 largefiles
609 revlogv1
609 revlogv1
610 sparserevlog
610 sparserevlog
611 store
611 store
612
612
613 $ hg debugupgraderepo --run
613 $ hg debugupgraderepo --run
614 upgrade will perform the following actions:
614 upgrade will perform the following actions:
615
615
616 requirements
616 requirements
617 preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, sparserevlog, store
617 preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, sparserevlog, store
618
618
619 beginning upgrade...
619 beginning upgrade...
620 repository locked and read-only
620 repository locked and read-only
621 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
621 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
622 (it is safe to interrupt this process any time before data migration completes)
622 (it is safe to interrupt this process any time before data migration completes)
623 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
623 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
624 migrating 355 bytes in store; 160 bytes tracked data
624 migrating 355 bytes in store; 160 bytes tracked data
625 migrating 1 filelogs containing 1 revisions (106 bytes in store; 41 bytes tracked data)
625 migrating 1 filelogs containing 1 revisions (106 bytes in store; 41 bytes tracked data)
626 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
626 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
627 migrating 1 manifests containing 1 revisions (116 bytes in store; 51 bytes tracked data)
627 migrating 1 manifests containing 1 revisions (116 bytes in store; 51 bytes tracked data)
628 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
628 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
629 migrating changelog containing 1 revisions (133 bytes in store; 68 bytes tracked data)
629 migrating changelog containing 1 revisions (133 bytes in store; 68 bytes tracked data)
630 finished migrating 1 changelog revisions; change in size: 0 bytes
630 finished migrating 1 changelog revisions; change in size: 0 bytes
631 finished migrating 3 total revisions; total change in store size: 0 bytes
631 finished migrating 3 total revisions; total change in store size: 0 bytes
632 copying phaseroots
632 copying phaseroots
633 data fully migrated to temporary repository
633 data fully migrated to temporary repository
634 marking source repository as being upgraded; clients will be unable to read from repository
634 marking source repository as being upgraded; clients will be unable to read from repository
635 starting in-place swap of repository data
635 starting in-place swap of repository data
636 replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
636 replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
637 replacing store...
637 replacing store...
638 store replacement complete; repository was inconsistent for *s (glob)
638 store replacement complete; repository was inconsistent for *s (glob)
639 finalizing requirements file and making repository readable again
639 finalizing requirements file and making repository readable again
640 removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
640 removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
641 copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
641 copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
642 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
642 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
643 $ cat .hg/requires
643 $ cat .hg/requires
644 dotencode
644 dotencode
645 fncache
645 fncache
646 generaldelta
646 generaldelta
647 largefiles
647 largefiles
648 revlogv1
648 revlogv1
649 sparserevlog
649 sparserevlog
650 store
650 store
651
651
652 $ cat << EOF >> .hg/hgrc
652 $ cat << EOF >> .hg/hgrc
653 > [extensions]
653 > [extensions]
654 > lfs =
654 > lfs =
655 > [lfs]
655 > [lfs]
656 > threshold = 10
656 > threshold = 10
657 > EOF
657 > EOF
658 $ echo '123456789012345' > lfs.bin
658 $ echo '123456789012345' > lfs.bin
659 $ hg ci -Am 'lfs.bin'
659 $ hg ci -Am 'lfs.bin'
660 adding lfs.bin
660 adding lfs.bin
661 $ grep lfs .hg/requires
661 $ grep lfs .hg/requires
662 lfs
662 lfs
663 $ find .hg/store/lfs -type f
663 $ find .hg/store/lfs -type f
664 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
664 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
665
665
666 $ hg debugupgraderepo --run
666 $ hg debugupgraderepo --run
667 upgrade will perform the following actions:
667 upgrade will perform the following actions:
668
668
669 requirements
669 requirements
670 preserved: dotencode, fncache, generaldelta, largefiles, lfs, revlogv1, sparserevlog, store
670 preserved: dotencode, fncache, generaldelta, largefiles, lfs, revlogv1, sparserevlog, store
671
671
672 beginning upgrade...
672 beginning upgrade...
673 repository locked and read-only
673 repository locked and read-only
674 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
674 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
675 (it is safe to interrupt this process any time before data migration completes)
675 (it is safe to interrupt this process any time before data migration completes)
676 migrating 6 total revisions (2 in filelogs, 2 in manifests, 2 in changelog)
676 migrating 6 total revisions (2 in filelogs, 2 in manifests, 2 in changelog)
677 migrating 801 bytes in store; 467 bytes tracked data
677 migrating 801 bytes in store; 467 bytes tracked data
678 migrating 2 filelogs containing 2 revisions (296 bytes in store; 182 bytes tracked data)
678 migrating 2 filelogs containing 2 revisions (296 bytes in store; 182 bytes tracked data)
679 finished migrating 2 filelog revisions across 2 filelogs; change in size: 0 bytes
679 finished migrating 2 filelog revisions across 2 filelogs; change in size: 0 bytes
680 migrating 1 manifests containing 2 revisions (241 bytes in store; 151 bytes tracked data)
680 migrating 1 manifests containing 2 revisions (241 bytes in store; 151 bytes tracked data)
681 finished migrating 2 manifest revisions across 1 manifests; change in size: 0 bytes
681 finished migrating 2 manifest revisions across 1 manifests; change in size: 0 bytes
682 migrating changelog containing 2 revisions (264 bytes in store; 134 bytes tracked data)
682 migrating changelog containing 2 revisions (264 bytes in store; 134 bytes tracked data)
683 finished migrating 2 changelog revisions; change in size: 0 bytes
683 finished migrating 2 changelog revisions; change in size: 0 bytes
684 finished migrating 6 total revisions; total change in store size: 0 bytes
684 finished migrating 6 total revisions; total change in store size: 0 bytes
685 copying phaseroots
685 copying phaseroots
686 copying lfs blob d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
686 copying lfs blob d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
687 data fully migrated to temporary repository
687 data fully migrated to temporary repository
688 marking source repository as being upgraded; clients will be unable to read from repository
688 marking source repository as being upgraded; clients will be unable to read from repository
689 starting in-place swap of repository data
689 starting in-place swap of repository data
690 replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
690 replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
691 replacing store...
691 replacing store...
692 store replacement complete; repository was inconsistent for *s (glob)
692 store replacement complete; repository was inconsistent for *s (glob)
693 finalizing requirements file and making repository readable again
693 finalizing requirements file and making repository readable again
694 removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
694 removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
695 copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
695 copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
696 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
696 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
697
697
698 $ grep lfs .hg/requires
698 $ grep lfs .hg/requires
699 lfs
699 lfs
700 $ find .hg/store/lfs -type f
700 $ find .hg/store/lfs -type f
701 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
701 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
702 $ hg verify
702 $ hg verify
703 checking changesets
703 checking changesets
704 checking manifests
704 checking manifests
705 crosschecking files in changesets and manifests
705 crosschecking files in changesets and manifests
706 checking files
706 checking files
707 checked 2 changesets with 2 changes to 2 files
707 checked 2 changesets with 2 changes to 2 files
708 $ hg debugdata lfs.bin 0
708 $ hg debugdata lfs.bin 0
709 version https://git-lfs.github.com/spec/v1
709 version https://git-lfs.github.com/spec/v1
710 oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
710 oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
711 size 16
711 size 16
712 x-is-binary 0
712 x-is-binary 0
713
713
714 $ cd ..
714 $ cd ..
715
715
716 repository config is taken in account
716 repository config is taken in account
717 -------------------------------------
717 -------------------------------------
718
718
719 $ cat << EOF >> $HGRCPATH
719 $ cat << EOF >> $HGRCPATH
720 > [format]
720 > [format]
721 > maxchainlen = 1
721 > maxchainlen = 1
722 > EOF
722 > EOF
723
723
724 $ hg init localconfig
724 $ hg init localconfig
725 $ cd localconfig
725 $ cd localconfig
726 $ cat << EOF > file
726 $ cat << EOF > file
727 > some content
727 > some content
728 > with some length
728 > with some length
729 > to make sure we get a delta
729 > to make sure we get a delta
730 > after changes
730 > after changes
731 > very long
731 > very long
732 > very long
732 > very long
733 > very long
733 > very long
734 > very long
734 > very long
735 > very long
735 > very long
736 > very long
736 > very long
737 > very long
737 > very long
738 > very long
738 > very long
739 > very long
739 > very long
740 > very long
740 > very long
741 > very long
741 > very long
742 > EOF
742 > EOF
743 $ hg -q commit -A -m A
743 $ hg -q commit -A -m A
744 $ echo "new line" >> file
744 $ echo "new line" >> file
745 $ hg -q commit -m B
745 $ hg -q commit -m B
746 $ echo "new line" >> file
746 $ echo "new line" >> file
747 $ hg -q commit -m C
747 $ hg -q commit -m C
748
748
749 $ cat << EOF >> .hg/hgrc
749 $ cat << EOF >> .hg/hgrc
750 > [format]
750 > [format]
751 > maxchainlen = 9001
751 > maxchainlen = 9001
752 > EOF
752 > EOF
753 $ hg config format
753 $ hg config format
754 format.maxchainlen=9001
754 format.maxchainlen=9001
755 $ hg debugdeltachain file
755 $ hg debugdeltachain file
756 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
756 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
757 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
757 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
758 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
758 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
759 2 1 2 0 other 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1
759 2 1 2 0 other 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1
760
760
761 $ hg debugupgraderepo --run --optimize redeltaall
761 $ hg debugupgraderepo --run --optimize redeltaall
762 upgrade will perform the following actions:
762 upgrade will perform the following actions:
763
763
764 requirements
764 requirements
765 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
765 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
766
766
767 re-delta-all
767 re-delta-all
768 deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time
768 deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time
769
769
770 beginning upgrade...
770 beginning upgrade...
771 repository locked and read-only
771 repository locked and read-only
772 creating temporary repository to stage migrated data: $TESTTMP/localconfig/.hg/upgrade.* (glob)
772 creating temporary repository to stage migrated data: $TESTTMP/localconfig/.hg/upgrade.* (glob)
773 (it is safe to interrupt this process any time before data migration completes)
773 (it is safe to interrupt this process any time before data migration completes)
774 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
774 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
775 migrating 1019 bytes in store; 882 bytes tracked data
775 migrating 1019 bytes in store; 882 bytes tracked data
776 migrating 1 filelogs containing 3 revisions (320 bytes in store; 573 bytes tracked data)
776 migrating 1 filelogs containing 3 revisions (320 bytes in store; 573 bytes tracked data)
777 finished migrating 3 filelog revisions across 1 filelogs; change in size: -9 bytes
777 finished migrating 3 filelog revisions across 1 filelogs; change in size: -9 bytes
778 migrating 1 manifests containing 3 revisions (333 bytes in store; 138 bytes tracked data)
778 migrating 1 manifests containing 3 revisions (333 bytes in store; 138 bytes tracked data)
779 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
779 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
780 migrating changelog containing 3 revisions (366 bytes in store; 171 bytes tracked data)
780 migrating changelog containing 3 revisions (366 bytes in store; 171 bytes tracked data)
781 finished migrating 3 changelog revisions; change in size: 0 bytes
781 finished migrating 3 changelog revisions; change in size: 0 bytes
782 finished migrating 9 total revisions; total change in store size: -9 bytes
782 finished migrating 9 total revisions; total change in store size: -9 bytes
783 copying phaseroots
783 copying phaseroots
784 data fully migrated to temporary repository
784 data fully migrated to temporary repository
785 marking source repository as being upgraded; clients will be unable to read from repository
785 marking source repository as being upgraded; clients will be unable to read from repository
786 starting in-place swap of repository data
786 starting in-place swap of repository data
787 replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
787 replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
788 replacing store...
788 replacing store...
789 store replacement complete; repository was inconsistent for *s (glob)
789 store replacement complete; repository was inconsistent for *s (glob)
790 finalizing requirements file and making repository readable again
790 finalizing requirements file and making repository readable again
791 removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob)
791 removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob)
792 copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
792 copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
793 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
793 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
794 $ hg debugdeltachain file
794 $ hg debugdeltachain file
795 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
795 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
796 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
796 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
797 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
797 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
798 2 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 119 119 1.00000 1
798 2 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 119 119 1.00000 1
799 $ cd ..
799 $ cd ..
800
800
801 $ cat << EOF >> $HGRCPATH
801 $ cat << EOF >> $HGRCPATH
802 > [format]
802 > [format]
803 > maxchainlen = 9001
803 > maxchainlen = 9001
804 > EOF
804 > EOF
805
805
806 Check upgrading a sparse-revlog repository
806 Check upgrading a sparse-revlog repository
807 ---------------------------------------
807 ---------------------------------------
808
808
809 $ hg init sparserevlogrepo --config format.sparse-revlog=no
809 $ hg init sparserevlogrepo --config format.sparse-revlog=no
810 $ cd sparserevlogrepo
810 $ cd sparserevlogrepo
811 $ touch foo
811 $ touch foo
812 $ hg add foo
812 $ hg add foo
813 $ hg -q commit -m "foo"
813 $ hg -q commit -m "foo"
814 $ cat .hg/requires
814 $ cat .hg/requires
815 dotencode
815 dotencode
816 fncache
816 fncache
817 generaldelta
817 generaldelta
818 revlogv1
818 revlogv1
819 store
819 store
820
820
821 Check that we can add the sparse-revlog format requirement
821 Check that we can add the sparse-revlog format requirement
822 $ hg --config format.sparse-revlog=yes debugupgraderepo --run >/dev/null
822 $ hg --config format.sparse-revlog=yes debugupgraderepo --run >/dev/null
823 copy of old repository backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob)
823 copy of old repository backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob)
824 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
824 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
825 $ cat .hg/requires
825 $ cat .hg/requires
826 dotencode
826 dotencode
827 fncache
827 fncache
828 generaldelta
828 generaldelta
829 revlogv1
829 revlogv1
830 sparserevlog
830 sparserevlog
831 store
831 store
832
832
833 Check that we can remove the sparse-revlog format requirement
833 Check that we can remove the sparse-revlog format requirement
834 $ hg --config format.sparse-revlog=no debugupgraderepo --run >/dev/null
834 $ hg --config format.sparse-revlog=no debugupgraderepo --run >/dev/null
835 copy of old repository backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob)
835 copy of old repository backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob)
836 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
836 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
837 $ cat .hg/requires
837 $ cat .hg/requires
838 dotencode
838 dotencode
839 fncache
839 fncache
840 generaldelta
840 generaldelta
841 revlogv1
841 revlogv1
842 store
842 store
843 $ cd ..
843 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now