Show More
@@ -1,607 +1,671 b'' | |||||
1 | $ cat >> $HGRCPATH << EOF |
|
1 | $ cat >> $HGRCPATH << EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > share = |
|
3 | > share = | |
4 | > EOF |
|
4 | > EOF | |
5 |
|
5 | |||
6 | store and revlogv1 are required in source |
|
6 | store and revlogv1 are required in source | |
7 |
|
7 | |||
8 | $ hg --config format.usestore=false init no-store |
|
8 | $ hg --config format.usestore=false init no-store | |
9 | $ hg -R no-store debugupgraderepo |
|
9 | $ hg -R no-store debugupgraderepo | |
10 | abort: cannot upgrade repository; requirement missing: store |
|
10 | abort: cannot upgrade repository; requirement missing: store | |
11 | [255] |
|
11 | [255] | |
12 |
|
12 | |||
13 | $ hg init no-revlogv1 |
|
13 | $ hg init no-revlogv1 | |
14 | $ cat > no-revlogv1/.hg/requires << EOF |
|
14 | $ cat > no-revlogv1/.hg/requires << EOF | |
15 | > dotencode |
|
15 | > dotencode | |
16 | > fncache |
|
16 | > fncache | |
17 | > generaldelta |
|
17 | > generaldelta | |
18 | > store |
|
18 | > store | |
19 | > EOF |
|
19 | > EOF | |
20 |
|
20 | |||
21 | $ hg -R no-revlogv1 debugupgraderepo |
|
21 | $ hg -R no-revlogv1 debugupgraderepo | |
22 | abort: cannot upgrade repository; requirement missing: revlogv1 |
|
22 | abort: cannot upgrade repository; requirement missing: revlogv1 | |
23 | [255] |
|
23 | [255] | |
24 |
|
24 | |||
25 | Cannot upgrade shared repositories |
|
25 | Cannot upgrade shared repositories | |
26 |
|
26 | |||
27 | $ hg init share-parent |
|
27 | $ hg init share-parent | |
28 | $ hg -q share share-parent share-child |
|
28 | $ hg -q share share-parent share-child | |
29 |
|
29 | |||
30 | $ hg -R share-child debugupgraderepo |
|
30 | $ hg -R share-child debugupgraderepo | |
31 | abort: cannot upgrade repository; unsupported source requirement: shared |
|
31 | abort: cannot upgrade repository; unsupported source requirement: shared | |
32 | [255] |
|
32 | [255] | |
33 |
|
33 | |||
34 | Do not yet support upgrading manifestv2 and treemanifest repos |
|
34 | Do not yet support upgrading manifestv2 and treemanifest repos | |
35 |
|
35 | |||
36 | $ hg --config experimental.manifestv2=true init manifestv2 |
|
36 | $ hg --config experimental.manifestv2=true init manifestv2 | |
37 | $ hg -R manifestv2 debugupgraderepo |
|
37 | $ hg -R manifestv2 debugupgraderepo | |
38 | abort: cannot upgrade repository; unsupported source requirement: manifestv2 |
|
38 | abort: cannot upgrade repository; unsupported source requirement: manifestv2 | |
39 | [255] |
|
39 | [255] | |
40 |
|
40 | |||
41 | $ hg --config experimental.treemanifest=true init treemanifest |
|
41 | $ hg --config experimental.treemanifest=true init treemanifest | |
42 | $ hg -R treemanifest debugupgraderepo |
|
42 | $ hg -R treemanifest debugupgraderepo | |
43 | abort: cannot upgrade repository; unsupported source requirement: treemanifest |
|
43 | abort: cannot upgrade repository; unsupported source requirement: treemanifest | |
44 | [255] |
|
44 | [255] | |
45 |
|
45 | |||
46 | Cannot add manifestv2 or treemanifest requirement during upgrade |
|
46 | Cannot add manifestv2 or treemanifest requirement during upgrade | |
47 |
|
47 | |||
48 | $ hg init disallowaddedreq |
|
48 | $ hg init disallowaddedreq | |
49 | $ hg -R disallowaddedreq --config experimental.manifestv2=true --config experimental.treemanifest=true debugupgraderepo |
|
49 | $ hg -R disallowaddedreq --config experimental.manifestv2=true --config experimental.treemanifest=true debugupgraderepo | |
50 | abort: cannot upgrade repository; do not support adding requirement: manifestv2, treemanifest |
|
50 | abort: cannot upgrade repository; do not support adding requirement: manifestv2, treemanifest | |
51 | [255] |
|
51 | [255] | |
52 |
|
52 | |||
53 | An upgrade of a repository created with recommended settings only suggests optimizations |
|
53 | An upgrade of a repository created with recommended settings only suggests optimizations | |
54 |
|
54 | |||
55 | $ hg init empty |
|
55 | $ hg init empty | |
56 | $ cd empty |
|
56 | $ cd empty | |
57 | $ hg debugformat |
|
57 | $ hg debugformat | |
58 | format-variant repo |
|
58 | format-variant repo | |
59 | fncache: yes |
|
59 | fncache: yes | |
60 | dotencode: yes |
|
60 | dotencode: yes | |
61 | generaldelta: yes |
|
61 | generaldelta: yes | |
62 | plain-cl-delta: yes |
|
62 | plain-cl-delta: yes | |
63 | compression: zlib |
|
63 | compression: zlib | |
64 | $ hg debugformat --verbose |
|
64 | $ hg debugformat --verbose | |
65 | format-variant repo config default |
|
65 | format-variant repo config default | |
66 | fncache: yes yes yes |
|
66 | fncache: yes yes yes | |
67 | dotencode: yes yes yes |
|
67 | dotencode: yes yes yes | |
68 | generaldelta: yes yes yes |
|
68 | generaldelta: 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 | $ hg debugformat --verbose --config format.usegfncache=no |
|
71 | $ hg debugformat --verbose --config format.usegfncache=no | |
72 | format-variant repo config default |
|
72 | format-variant repo config default | |
73 | fncache: yes yes yes |
|
73 | fncache: yes yes yes | |
74 | dotencode: yes yes yes |
|
74 | dotencode: yes yes yes | |
75 | generaldelta: yes yes yes |
|
75 | generaldelta: 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.usegfncache=no --color=debug |
|
78 | $ hg debugformat --verbose --config format.usegfncache=no --color=debug | |
79 | format-variant repo config default |
|
79 | format-variant repo config default | |
80 | [formatvariant.name.uptodate|fncache: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
80 | [formatvariant.name.uptodate|fncache: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | |
81 | [formatvariant.name.uptodate|dotencode: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
81 | [formatvariant.name.uptodate|dotencode: ][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] |
|
82 | [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | |
83 | [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
83 | [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | |
84 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] |
|
84 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] | |
85 | $ hg debugupgraderepo |
|
85 | $ hg debugupgraderepo | |
86 | (no feature deficiencies found in existing repository) |
|
86 | (no feature deficiencies found in existing repository) | |
87 | performing an upgrade with "--run" will make the following changes: |
|
87 | performing an upgrade with "--run" will make the following changes: | |
88 |
|
88 | |||
89 | requirements |
|
89 | requirements | |
90 | preserved: dotencode, fncache, generaldelta, revlogv1, store |
|
90 | preserved: dotencode, fncache, generaldelta, revlogv1, store | |
91 |
|
91 | |||
92 | additional optimizations are available by specifying "--optimize <name>": |
|
92 | additional optimizations are available by specifying "--optimize <name>": | |
93 |
|
93 | |||
94 | redeltaparent |
|
94 | redeltaparent | |
95 | 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 |
|
95 | 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 | |
96 |
|
96 | |||
97 | redeltamultibase |
|
97 | redeltamultibase | |
98 | 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 |
|
98 | 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 | |
99 |
|
99 | |||
100 | redeltaall |
|
100 | redeltaall | |
101 | 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 |
|
101 | 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 | |
102 |
|
102 | |||
103 | redeltafulladd |
|
103 | redeltafulladd | |
104 | 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 "redeltaall" but even slower since more logic is involved. |
|
104 | 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 "redeltaall" but even slower since more logic is involved. | |
105 |
|
105 | |||
106 |
|
106 | |||
107 | --optimize can be used to add optimizations |
|
107 | --optimize can be used to add optimizations | |
108 |
|
108 | |||
109 | $ hg debugupgrade --optimize redeltaparent |
|
109 | $ hg debugupgrade --optimize redeltaparent | |
110 | (no feature deficiencies found in existing repository) |
|
110 | (no feature deficiencies found in existing repository) | |
111 | performing an upgrade with "--run" will make the following changes: |
|
111 | performing an upgrade with "--run" will make the following changes: | |
112 |
|
112 | |||
113 | requirements |
|
113 | requirements | |
114 | preserved: dotencode, fncache, generaldelta, revlogv1, store |
|
114 | preserved: dotencode, fncache, generaldelta, revlogv1, store | |
115 |
|
115 | |||
116 | redeltaparent |
|
116 | redeltaparent | |
117 | deltas within internal storage will choose a new base revision if needed |
|
117 | deltas within internal storage will choose a new base revision if needed | |
118 |
|
118 | |||
119 | additional optimizations are available by specifying "--optimize <name>": |
|
119 | additional optimizations are available by specifying "--optimize <name>": | |
120 |
|
120 | |||
121 | redeltamultibase |
|
121 | redeltamultibase | |
122 | 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 |
|
122 | 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 | |
123 |
|
123 | |||
124 | redeltaall |
|
124 | redeltaall | |
125 | 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 |
|
125 | 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 | |
126 |
|
126 | |||
127 | redeltafulladd |
|
127 | redeltafulladd | |
128 | 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 "redeltaall" but even slower since more logic is involved. |
|
128 | 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 "redeltaall" but even slower since more logic is involved. | |
129 |
|
129 | |||
130 |
|
130 | |||
131 | Various sub-optimal detections work |
|
131 | Various sub-optimal detections work | |
132 |
|
132 | |||
133 | $ cat > .hg/requires << EOF |
|
133 | $ cat > .hg/requires << EOF | |
134 | > revlogv1 |
|
134 | > revlogv1 | |
135 | > store |
|
135 | > store | |
136 | > EOF |
|
136 | > EOF | |
137 |
|
137 | |||
138 | $ hg debugformat |
|
138 | $ hg debugformat | |
139 | format-variant repo |
|
139 | format-variant repo | |
140 | fncache: no |
|
140 | fncache: no | |
141 | dotencode: no |
|
141 | dotencode: no | |
142 | generaldelta: no |
|
142 | generaldelta: no | |
143 | plain-cl-delta: yes |
|
143 | plain-cl-delta: yes | |
144 | compression: zlib |
|
144 | compression: zlib | |
145 | $ hg debugformat --verbose |
|
145 | $ hg debugformat --verbose | |
146 | format-variant repo config default |
|
146 | format-variant repo config default | |
147 | fncache: no yes yes |
|
147 | fncache: no yes yes | |
148 | dotencode: no yes yes |
|
148 | dotencode: no yes yes | |
149 | generaldelta: no yes yes |
|
149 | generaldelta: no yes yes | |
150 | plain-cl-delta: yes yes yes |
|
150 | plain-cl-delta: yes yes yes | |
151 | compression: zlib zlib zlib |
|
151 | compression: zlib zlib zlib | |
152 | $ hg debugformat --verbose --config format.usegeneraldelta=no |
|
152 | $ hg debugformat --verbose --config format.usegeneraldelta=no | |
153 | format-variant repo config default |
|
153 | format-variant repo config default | |
154 | fncache: no yes yes |
|
154 | fncache: no yes yes | |
155 | dotencode: no yes yes |
|
155 | dotencode: no yes yes | |
156 | generaldelta: no no yes |
|
156 | generaldelta: no no yes | |
157 | plain-cl-delta: yes yes yes |
|
157 | plain-cl-delta: yes yes yes | |
158 | compression: zlib zlib zlib |
|
158 | compression: zlib zlib zlib | |
159 | $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug |
|
159 | $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug | |
160 | format-variant repo config default |
|
160 | format-variant repo config default | |
161 | [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] |
|
161 | [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] | |
162 | [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] |
|
162 | [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] | |
163 | [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] |
|
163 | [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] | |
164 | [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
164 | [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | |
165 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] |
|
165 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] | |
166 | $ hg debugupgraderepo |
|
166 | $ hg debugupgraderepo | |
167 | repository lacks features recommended by current config options: |
|
167 | repository lacks features recommended by current config options: | |
168 |
|
168 | |||
169 | fncache |
|
169 | fncache | |
170 | long and reserved filenames may not work correctly; repository performance is sub-optimal |
|
170 | long and reserved filenames may not work correctly; repository performance is sub-optimal | |
171 |
|
171 | |||
172 | dotencode |
|
172 | dotencode | |
173 | storage of filenames beginning with a period or space may not work correctly |
|
173 | storage of filenames beginning with a period or space may not work correctly | |
174 |
|
174 | |||
175 | generaldelta |
|
175 | generaldelta | |
176 | 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 |
|
176 | 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 | |
177 |
|
177 | |||
178 |
|
178 | |||
179 | performing an upgrade with "--run" will make the following changes: |
|
179 | performing an upgrade with "--run" will make the following changes: | |
180 |
|
180 | |||
181 | requirements |
|
181 | requirements | |
182 | preserved: revlogv1, store |
|
182 | preserved: revlogv1, store | |
183 | added: dotencode, fncache, generaldelta |
|
183 | added: dotencode, fncache, generaldelta | |
184 |
|
184 | |||
185 | fncache |
|
185 | fncache | |
186 | repository will be more resilient to storing certain paths and performance of certain operations should be improved |
|
186 | repository will be more resilient to storing certain paths and performance of certain operations should be improved | |
187 |
|
187 | |||
188 | dotencode |
|
188 | dotencode | |
189 | repository will be better able to store files beginning with a space or period |
|
189 | repository will be better able to store files beginning with a space or period | |
190 |
|
190 | |||
191 | generaldelta |
|
191 | generaldelta | |
192 | 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 |
|
192 | 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 | |
193 |
|
193 | |||
194 | additional optimizations are available by specifying "--optimize <name>": |
|
194 | additional optimizations are available by specifying "--optimize <name>": | |
195 |
|
195 | |||
196 | redeltaparent |
|
196 | redeltaparent | |
197 | 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 |
|
197 | 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 | |
198 |
|
198 | |||
199 | redeltamultibase |
|
199 | redeltamultibase | |
200 | 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 |
|
200 | 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 | |
201 |
|
201 | |||
202 | redeltaall |
|
202 | redeltaall | |
203 | 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 |
|
203 | 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 | |
204 |
|
204 | |||
205 | redeltafulladd |
|
205 | redeltafulladd | |
206 | 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 "redeltaall" but even slower since more logic is involved. |
|
206 | 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 "redeltaall" but even slower since more logic is involved. | |
207 |
|
207 | |||
208 |
|
208 | |||
209 | $ hg --config format.dotencode=false debugupgraderepo |
|
209 | $ hg --config format.dotencode=false debugupgraderepo | |
210 | repository lacks features recommended by current config options: |
|
210 | repository lacks features recommended by current config options: | |
211 |
|
211 | |||
212 | fncache |
|
212 | fncache | |
213 | long and reserved filenames may not work correctly; repository performance is sub-optimal |
|
213 | long and reserved filenames may not work correctly; repository performance is sub-optimal | |
214 |
|
214 | |||
215 | generaldelta |
|
215 | generaldelta | |
216 | 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 |
|
216 | 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 | |
217 |
|
217 | |||
218 | repository lacks features used by the default config options: |
|
218 | repository lacks features used by the default config options: | |
219 |
|
219 | |||
220 | dotencode |
|
220 | dotencode | |
221 | storage of filenames beginning with a period or space may not work correctly |
|
221 | storage of filenames beginning with a period or space may not work correctly | |
222 |
|
222 | |||
223 |
|
223 | |||
224 | performing an upgrade with "--run" will make the following changes: |
|
224 | performing an upgrade with "--run" will make the following changes: | |
225 |
|
225 | |||
226 | requirements |
|
226 | requirements | |
227 | preserved: revlogv1, store |
|
227 | preserved: revlogv1, store | |
228 | added: fncache, generaldelta |
|
228 | added: fncache, generaldelta | |
229 |
|
229 | |||
230 | fncache |
|
230 | fncache | |
231 | repository will be more resilient to storing certain paths and performance of certain operations should be improved |
|
231 | repository will be more resilient to storing certain paths and performance of certain operations should be improved | |
232 |
|
232 | |||
233 | generaldelta |
|
233 | generaldelta | |
234 | 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 |
|
234 | 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 | |
235 |
|
235 | |||
236 | additional optimizations are available by specifying "--optimize <name>": |
|
236 | additional optimizations are available by specifying "--optimize <name>": | |
237 |
|
237 | |||
238 | redeltaparent |
|
238 | redeltaparent | |
239 | 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 |
|
239 | 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 | |
240 |
|
240 | |||
241 | redeltamultibase |
|
241 | redeltamultibase | |
242 | 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 |
|
242 | 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 | |
243 |
|
243 | |||
244 | redeltaall |
|
244 | redeltaall | |
245 | 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 |
|
245 | 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 | |
246 |
|
246 | |||
247 | redeltafulladd |
|
247 | redeltafulladd | |
248 | 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 "redeltaall" but even slower since more logic is involved. |
|
248 | 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 "redeltaall" but even slower since more logic is involved. | |
249 |
|
249 | |||
250 |
|
250 | |||
251 | $ cd .. |
|
251 | $ cd .. | |
252 |
|
252 | |||
253 | Upgrading a repository that is already modern essentially no-ops |
|
253 | Upgrading a repository that is already modern essentially no-ops | |
254 |
|
254 | |||
255 | $ hg init modern |
|
255 | $ hg init modern | |
256 | $ hg -R modern debugupgraderepo --run |
|
256 | $ hg -R modern debugupgraderepo --run | |
257 | upgrade will perform the following actions: |
|
257 | upgrade will perform the following actions: | |
258 |
|
258 | |||
259 | requirements |
|
259 | requirements | |
260 | preserved: dotencode, fncache, generaldelta, revlogv1, store |
|
260 | preserved: dotencode, fncache, generaldelta, revlogv1, store | |
261 |
|
261 | |||
262 | beginning upgrade... |
|
262 | beginning upgrade... | |
263 | repository locked and read-only |
|
263 | repository locked and read-only | |
264 | creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob) |
|
264 | creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob) | |
265 | (it is safe to interrupt this process any time before data migration completes) |
|
265 | (it is safe to interrupt this process any time before data migration completes) | |
266 | data fully migrated to temporary repository |
|
266 | data fully migrated to temporary repository | |
267 | marking source repository as being upgraded; clients will be unable to read from repository |
|
267 | marking source repository as being upgraded; clients will be unable to read from repository | |
268 | starting in-place swap of repository data |
|
268 | starting in-place swap of repository data | |
269 | replaced files will be backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob) |
|
269 | replaced files will be backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob) | |
270 | replacing store... |
|
270 | replacing store... | |
271 | store replacement complete; repository was inconsistent for *s (glob) |
|
271 | store replacement complete; repository was inconsistent for *s (glob) | |
272 | finalizing requirements file and making repository readable again |
|
272 | finalizing requirements file and making repository readable again | |
273 | removing temporary repository $TESTTMP/modern/.hg/upgrade.* (glob) |
|
273 | removing temporary repository $TESTTMP/modern/.hg/upgrade.* (glob) | |
274 | copy of old repository backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob) |
|
274 | copy of old repository backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob) | |
275 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
275 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
276 |
|
276 | |||
277 | Upgrading a repository to generaldelta works |
|
277 | Upgrading a repository to generaldelta works | |
278 |
|
278 | |||
279 | $ hg --config format.usegeneraldelta=false init upgradegd |
|
279 | $ hg --config format.usegeneraldelta=false init upgradegd | |
280 | $ cd upgradegd |
|
280 | $ cd upgradegd | |
281 | $ touch f0 |
|
281 | $ touch f0 | |
282 | $ hg -q commit -A -m initial |
|
282 | $ hg -q commit -A -m initial | |
283 | $ touch f1 |
|
283 | $ touch f1 | |
284 | $ hg -q commit -A -m 'add f1' |
|
284 | $ hg -q commit -A -m 'add f1' | |
285 | $ hg -q up -r 0 |
|
285 | $ hg -q up -r 0 | |
286 | $ touch f2 |
|
286 | $ touch f2 | |
287 | $ hg -q commit -A -m 'add f2' |
|
287 | $ hg -q commit -A -m 'add f2' | |
288 |
|
288 | |||
289 | $ hg debugupgraderepo --run |
|
289 | $ hg debugupgraderepo --run | |
290 | upgrade will perform the following actions: |
|
290 | upgrade will perform the following actions: | |
291 |
|
291 | |||
292 | requirements |
|
292 | requirements | |
293 | preserved: dotencode, fncache, revlogv1, store |
|
293 | preserved: dotencode, fncache, revlogv1, store | |
294 | added: generaldelta |
|
294 | added: generaldelta | |
295 |
|
295 | |||
296 | generaldelta |
|
296 | generaldelta | |
297 | 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 |
|
297 | 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 | |
298 |
|
298 | |||
299 | beginning upgrade... |
|
299 | beginning upgrade... | |
300 | repository locked and read-only |
|
300 | repository locked and read-only | |
301 | creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
301 | creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
302 | (it is safe to interrupt this process any time before data migration completes) |
|
302 | (it is safe to interrupt this process any time before data migration completes) | |
303 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
303 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
304 | migrating 341 bytes in store; 401 bytes tracked data |
|
304 | migrating 341 bytes in store; 401 bytes tracked data | |
305 | migrating 3 filelogs containing 3 revisions (0 bytes in store; 0 bytes tracked data) |
|
305 | migrating 3 filelogs containing 3 revisions (0 bytes in store; 0 bytes tracked data) | |
306 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
306 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | |
307 | migrating 1 manifests containing 3 revisions (157 bytes in store; 220 bytes tracked data) |
|
307 | migrating 1 manifests containing 3 revisions (157 bytes in store; 220 bytes tracked data) | |
308 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
308 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
309 | migrating changelog containing 3 revisions (184 bytes in store; 181 bytes tracked data) |
|
309 | migrating changelog containing 3 revisions (184 bytes in store; 181 bytes tracked data) | |
310 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
310 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
311 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
311 | finished migrating 9 total revisions; total change in store size: 0 bytes | |
312 | copying phaseroots |
|
312 | copying phaseroots | |
313 | data fully migrated to temporary repository |
|
313 | data fully migrated to temporary repository | |
314 | marking source repository as being upgraded; clients will be unable to read from repository |
|
314 | marking source repository as being upgraded; clients will be unable to read from repository | |
315 | starting in-place swap of repository data |
|
315 | starting in-place swap of repository data | |
316 | replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) |
|
316 | replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | |
317 | replacing store... |
|
317 | replacing store... | |
318 | store replacement complete; repository was inconsistent for *s (glob) |
|
318 | store replacement complete; repository was inconsistent for *s (glob) | |
319 | finalizing requirements file and making repository readable again |
|
319 | finalizing requirements file and making repository readable again | |
320 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
320 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
321 | copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) |
|
321 | copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | |
322 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
322 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
323 |
|
323 | |||
324 | Original requirements backed up |
|
324 | Original requirements backed up | |
325 |
|
325 | |||
326 | $ cat .hg/upgradebackup.*/requires |
|
326 | $ cat .hg/upgradebackup.*/requires | |
327 | dotencode |
|
327 | dotencode | |
328 | fncache |
|
328 | fncache | |
329 | revlogv1 |
|
329 | revlogv1 | |
330 | store |
|
330 | store | |
331 |
|
331 | |||
332 | generaldelta added to original requirements files |
|
332 | generaldelta added to original requirements files | |
333 |
|
333 | |||
334 | $ cat .hg/requires |
|
334 | $ cat .hg/requires | |
335 | dotencode |
|
335 | dotencode | |
336 | fncache |
|
336 | fncache | |
337 | generaldelta |
|
337 | generaldelta | |
338 | revlogv1 |
|
338 | revlogv1 | |
339 | store |
|
339 | store | |
340 |
|
340 | |||
341 | store directory has files we expect |
|
341 | store directory has files we expect | |
342 |
|
342 | |||
343 | $ ls .hg/store |
|
343 | $ ls .hg/store | |
344 | 00changelog.i |
|
344 | 00changelog.i | |
345 | 00manifest.i |
|
345 | 00manifest.i | |
346 | data |
|
346 | data | |
347 | fncache |
|
347 | fncache | |
348 | phaseroots |
|
348 | phaseroots | |
349 | undo |
|
349 | undo | |
350 | undo.backupfiles |
|
350 | undo.backupfiles | |
351 | undo.phaseroots |
|
351 | undo.phaseroots | |
352 |
|
352 | |||
353 | manifest should be generaldelta |
|
353 | manifest should be generaldelta | |
354 |
|
354 | |||
355 | $ hg debugrevlog -m | grep flags |
|
355 | $ hg debugrevlog -m | grep flags | |
356 | flags : inline, generaldelta |
|
356 | flags : inline, generaldelta | |
357 |
|
357 | |||
358 | verify should be happy |
|
358 | verify should be happy | |
359 |
|
359 | |||
360 | $ hg verify |
|
360 | $ hg verify | |
361 | checking changesets |
|
361 | checking changesets | |
362 | checking manifests |
|
362 | checking manifests | |
363 | crosschecking files in changesets and manifests |
|
363 | crosschecking files in changesets and manifests | |
364 | checking files |
|
364 | checking files | |
365 | 3 files, 3 changesets, 3 total revisions |
|
365 | 3 files, 3 changesets, 3 total revisions | |
366 |
|
366 | |||
367 | old store should be backed up |
|
367 | old store should be backed up | |
368 |
|
368 | |||
369 | $ ls .hg/upgradebackup.*/store |
|
369 | $ ls .hg/upgradebackup.*/store | |
370 | 00changelog.i |
|
370 | 00changelog.i | |
371 | 00manifest.i |
|
371 | 00manifest.i | |
372 | data |
|
372 | data | |
373 | fncache |
|
373 | fncache | |
374 | phaseroots |
|
374 | phaseroots | |
375 | undo |
|
375 | undo | |
376 | undo.backup.fncache |
|
376 | undo.backup.fncache | |
377 | undo.backupfiles |
|
377 | undo.backupfiles | |
378 | undo.phaseroots |
|
378 | undo.phaseroots | |
379 |
|
379 | |||
380 | $ cd .. |
|
380 | $ cd .. | |
381 |
|
381 | |||
382 | store files with special filenames aren't encoded during copy |
|
382 | store files with special filenames aren't encoded during copy | |
383 |
|
383 | |||
384 | $ hg init store-filenames |
|
384 | $ hg init store-filenames | |
385 | $ cd store-filenames |
|
385 | $ cd store-filenames | |
386 | $ touch foo |
|
386 | $ touch foo | |
387 | $ hg -q commit -A -m initial |
|
387 | $ hg -q commit -A -m initial | |
388 | $ touch .hg/store/.XX_special_filename |
|
388 | $ touch .hg/store/.XX_special_filename | |
389 |
|
389 | |||
390 | $ hg debugupgraderepo --run |
|
390 | $ hg debugupgraderepo --run | |
391 | upgrade will perform the following actions: |
|
391 | upgrade will perform the following actions: | |
392 |
|
392 | |||
393 | requirements |
|
393 | requirements | |
394 | preserved: dotencode, fncache, generaldelta, revlogv1, store |
|
394 | preserved: dotencode, fncache, generaldelta, revlogv1, store | |
395 |
|
395 | |||
396 | beginning upgrade... |
|
396 | beginning upgrade... | |
397 | repository locked and read-only |
|
397 | repository locked and read-only | |
398 | creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob) |
|
398 | creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob) | |
399 | (it is safe to interrupt this process any time before data migration completes) |
|
399 | (it is safe to interrupt this process any time before data migration completes) | |
400 | migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) |
|
400 | migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) | |
401 | migrating 109 bytes in store; 107 bytes tracked data |
|
401 | migrating 109 bytes in store; 107 bytes tracked data | |
402 | migrating 1 filelogs containing 1 revisions (0 bytes in store; 0 bytes tracked data) |
|
402 | migrating 1 filelogs containing 1 revisions (0 bytes in store; 0 bytes tracked data) | |
403 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes |
|
403 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes | |
404 | migrating 1 manifests containing 1 revisions (46 bytes in store; 45 bytes tracked data) |
|
404 | migrating 1 manifests containing 1 revisions (46 bytes in store; 45 bytes tracked data) | |
405 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes |
|
405 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes | |
406 | migrating changelog containing 1 revisions (63 bytes in store; 62 bytes tracked data) |
|
406 | migrating changelog containing 1 revisions (63 bytes in store; 62 bytes tracked data) | |
407 | finished migrating 1 changelog revisions; change in size: 0 bytes |
|
407 | finished migrating 1 changelog revisions; change in size: 0 bytes | |
408 | finished migrating 3 total revisions; total change in store size: 0 bytes |
|
408 | finished migrating 3 total revisions; total change in store size: 0 bytes | |
409 | copying .XX_special_filename |
|
409 | copying .XX_special_filename | |
410 | copying phaseroots |
|
410 | copying phaseroots | |
411 | data fully migrated to temporary repository |
|
411 | data fully migrated to temporary repository | |
412 | marking source repository as being upgraded; clients will be unable to read from repository |
|
412 | marking source repository as being upgraded; clients will be unable to read from repository | |
413 | starting in-place swap of repository data |
|
413 | starting in-place swap of repository data | |
414 | replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) |
|
414 | replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) | |
415 | replacing store... |
|
415 | replacing store... | |
416 | store replacement complete; repository was inconsistent for *s (glob) |
|
416 | store replacement complete; repository was inconsistent for *s (glob) | |
417 | finalizing requirements file and making repository readable again |
|
417 | finalizing requirements file and making repository readable again | |
418 | removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob) |
|
418 | removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob) | |
419 | copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) |
|
419 | copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) | |
420 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
420 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
421 | $ hg debugupgraderepo --run --optimize redeltafulladd |
|
421 | $ hg debugupgraderepo --run --optimize redeltafulladd | |
422 | upgrade will perform the following actions: |
|
422 | upgrade will perform the following actions: | |
423 |
|
423 | |||
424 | requirements |
|
424 | requirements | |
425 | preserved: dotencode, fncache, generaldelta, revlogv1, store |
|
425 | preserved: dotencode, fncache, generaldelta, revlogv1, store | |
426 |
|
426 | |||
427 | redeltafulladd |
|
427 | redeltafulladd | |
428 | 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 |
|
428 | 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 | |
429 |
|
429 | |||
430 | beginning upgrade... |
|
430 | beginning upgrade... | |
431 | repository locked and read-only |
|
431 | repository locked and read-only | |
432 | creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob) |
|
432 | creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob) | |
433 | (it is safe to interrupt this process any time before data migration completes) |
|
433 | (it is safe to interrupt this process any time before data migration completes) | |
434 | migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) |
|
434 | migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) | |
435 | migrating 109 bytes in store; 107 bytes tracked data |
|
435 | migrating 109 bytes in store; 107 bytes tracked data | |
436 | migrating 1 filelogs containing 1 revisions (0 bytes in store; 0 bytes tracked data) |
|
436 | migrating 1 filelogs containing 1 revisions (0 bytes in store; 0 bytes tracked data) | |
437 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes |
|
437 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes | |
438 | migrating 1 manifests containing 1 revisions (46 bytes in store; 45 bytes tracked data) |
|
438 | migrating 1 manifests containing 1 revisions (46 bytes in store; 45 bytes tracked data) | |
439 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes |
|
439 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes | |
440 | migrating changelog containing 1 revisions (63 bytes in store; 62 bytes tracked data) |
|
440 | migrating changelog containing 1 revisions (63 bytes in store; 62 bytes tracked data) | |
441 | finished migrating 1 changelog revisions; change in size: 0 bytes |
|
441 | finished migrating 1 changelog revisions; change in size: 0 bytes | |
442 | finished migrating 3 total revisions; total change in store size: 0 bytes |
|
442 | finished migrating 3 total revisions; total change in store size: 0 bytes | |
443 | copying .XX_special_filename |
|
443 | copying .XX_special_filename | |
444 | copying phaseroots |
|
444 | copying phaseroots | |
445 | data fully migrated to temporary repository |
|
445 | data fully migrated to temporary repository | |
446 | marking source repository as being upgraded; clients will be unable to read from repository |
|
446 | marking source repository as being upgraded; clients will be unable to read from repository | |
447 | starting in-place swap of repository data |
|
447 | starting in-place swap of repository data | |
448 | replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) |
|
448 | replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) | |
449 | replacing store... |
|
449 | replacing store... | |
450 | store replacement complete; repository was inconsistent for *s (glob) |
|
450 | store replacement complete; repository was inconsistent for *s (glob) | |
451 | finalizing requirements file and making repository readable again |
|
451 | finalizing requirements file and making repository readable again | |
452 | removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob) |
|
452 | removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob) | |
453 | copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) |
|
453 | copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) | |
454 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
454 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
455 |
|
455 | |||
456 | $ cd .. |
|
456 | $ cd .. | |
457 |
|
457 | |||
458 | Check upgrading a large file repository |
|
458 | Check upgrading a large file repository | |
459 | --------------------------------------- |
|
459 | --------------------------------------- | |
460 |
|
460 | |||
461 | $ hg init largefilesrepo |
|
461 | $ hg init largefilesrepo | |
462 | $ cat << EOF >> largefilesrepo/.hg/hgrc |
|
462 | $ cat << EOF >> largefilesrepo/.hg/hgrc | |
463 | > [extensions] |
|
463 | > [extensions] | |
464 | > largefiles = |
|
464 | > largefiles = | |
465 | > EOF |
|
465 | > EOF | |
466 |
|
466 | |||
467 | $ cd largefilesrepo |
|
467 | $ cd largefilesrepo | |
468 | $ touch foo |
|
468 | $ touch foo | |
469 | $ hg add --large foo |
|
469 | $ hg add --large foo | |
470 | $ hg -q commit -m initial |
|
470 | $ hg -q commit -m initial | |
471 | $ cat .hg/requires |
|
471 | $ cat .hg/requires | |
472 | dotencode |
|
472 | dotencode | |
473 | fncache |
|
473 | fncache | |
474 | generaldelta |
|
474 | generaldelta | |
475 | largefiles |
|
475 | largefiles | |
476 | revlogv1 |
|
476 | revlogv1 | |
477 | store |
|
477 | store | |
478 |
|
478 | |||
479 | $ hg debugupgraderepo --run |
|
479 | $ hg debugupgraderepo --run | |
480 | upgrade will perform the following actions: |
|
480 | upgrade will perform the following actions: | |
481 |
|
481 | |||
482 | requirements |
|
482 | requirements | |
483 | preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, store |
|
483 | preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, store | |
484 |
|
484 | |||
485 | beginning upgrade... |
|
485 | beginning upgrade... | |
486 | repository locked and read-only |
|
486 | repository locked and read-only | |
487 | creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) |
|
487 | creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) | |
488 | (it is safe to interrupt this process any time before data migration completes) |
|
488 | (it is safe to interrupt this process any time before data migration completes) | |
489 | migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) |
|
489 | migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) | |
490 | migrating 163 bytes in store; 160 bytes tracked data |
|
490 | migrating 163 bytes in store; 160 bytes tracked data | |
491 | migrating 1 filelogs containing 1 revisions (42 bytes in store; 41 bytes tracked data) |
|
491 | migrating 1 filelogs containing 1 revisions (42 bytes in store; 41 bytes tracked data) | |
492 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes |
|
492 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes | |
493 | migrating 1 manifests containing 1 revisions (52 bytes in store; 51 bytes tracked data) |
|
493 | migrating 1 manifests containing 1 revisions (52 bytes in store; 51 bytes tracked data) | |
494 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes |
|
494 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes | |
495 | migrating changelog containing 1 revisions (69 bytes in store; 68 bytes tracked data) |
|
495 | migrating changelog containing 1 revisions (69 bytes in store; 68 bytes tracked data) | |
496 | finished migrating 1 changelog revisions; change in size: 0 bytes |
|
496 | finished migrating 1 changelog revisions; change in size: 0 bytes | |
497 | finished migrating 3 total revisions; total change in store size: 0 bytes |
|
497 | finished migrating 3 total revisions; total change in store size: 0 bytes | |
498 | copying phaseroots |
|
498 | copying phaseroots | |
499 | data fully migrated to temporary repository |
|
499 | data fully migrated to temporary repository | |
500 | marking source repository as being upgraded; clients will be unable to read from repository |
|
500 | marking source repository as being upgraded; clients will be unable to read from repository | |
501 | starting in-place swap of repository data |
|
501 | starting in-place swap of repository data | |
502 | replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob) |
|
502 | replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob) | |
503 | replacing store... |
|
503 | replacing store... | |
504 | store replacement complete; repository was inconsistent for *s (glob) |
|
504 | store replacement complete; repository was inconsistent for *s (glob) | |
505 | finalizing requirements file and making repository readable again |
|
505 | finalizing requirements file and making repository readable again | |
506 | removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) |
|
506 | removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) | |
507 | copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob) |
|
507 | copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob) | |
508 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
508 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
509 | $ cat .hg/requires |
|
509 | $ cat .hg/requires | |
510 | dotencode |
|
510 | dotencode | |
511 | fncache |
|
511 | fncache | |
512 | generaldelta |
|
512 | generaldelta | |
513 | largefiles |
|
513 | largefiles | |
514 | revlogv1 |
|
514 | revlogv1 | |
515 | store |
|
515 | store | |
516 |
|
516 | |||
|
517 | $ cat << EOF >> .hg/hgrc | |||
|
518 | > [extensions] | |||
|
519 | > lfs = | |||
|
520 | > [lfs] | |||
|
521 | > threshold = 10 | |||
|
522 | > EOF | |||
|
523 | $ echo '123456789012345' > lfs.bin | |||
|
524 | $ hg ci -Am 'lfs.bin' | |||
|
525 | adding lfs.bin | |||
|
526 | $ grep lfs .hg/requires | |||
|
527 | lfs | |||
|
528 | $ find .hg/store/lfs -type f | |||
|
529 | .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f | |||
|
530 | ||||
|
531 | $ hg debugupgraderepo --run | |||
|
532 | upgrade will perform the following actions: | |||
|
533 | ||||
|
534 | requirements | |||
|
535 | preserved: dotencode, fncache, generaldelta, largefiles, lfs, revlogv1, store | |||
|
536 | ||||
|
537 | beginning upgrade... | |||
|
538 | repository locked and read-only | |||
|
539 | creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) | |||
|
540 | (it is safe to interrupt this process any time before data migration completes) | |||
|
541 | migrating 6 total revisions (2 in filelogs, 2 in manifests, 2 in changelog) | |||
|
542 | migrating 417 bytes in store; 467 bytes tracked data | |||
|
543 | migrating 2 filelogs containing 2 revisions (168 bytes in store; 182 bytes tracked data) | |||
|
544 | finished migrating 2 filelog revisions across 2 filelogs; change in size: 0 bytes | |||
|
545 | migrating 1 manifests containing 2 revisions (113 bytes in store; 151 bytes tracked data) | |||
|
546 | finished migrating 2 manifest revisions across 1 manifests; change in size: 0 bytes | |||
|
547 | migrating changelog containing 2 revisions (136 bytes in store; 134 bytes tracked data) | |||
|
548 | finished migrating 2 changelog revisions; change in size: 0 bytes | |||
|
549 | finished migrating 6 total revisions; total change in store size: 0 bytes | |||
|
550 | copying phaseroots | |||
|
551 | data fully migrated to temporary repository | |||
|
552 | marking source repository as being upgraded; clients will be unable to read from repository | |||
|
553 | starting in-place swap of repository data | |||
|
554 | replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob) | |||
|
555 | replacing store... | |||
|
556 | store replacement complete; repository was inconsistent for *s (glob) | |||
|
557 | finalizing requirements file and making repository readable again | |||
|
558 | removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) | |||
|
559 | copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob) | |||
|
560 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |||
|
561 | ||||
|
562 | $ grep lfs .hg/requires | |||
|
563 | lfs | |||
|
564 | TODO: restore the local lfs store. For now, objects are copied from the user | |||
|
565 | cache as needed. | |||
|
566 | $ find .hg/store/lfs -type f | |||
|
567 | find: `.hg/store/lfs': $ENOENT$ | |||
|
568 | [1] | |||
|
569 | $ hg verify | |||
|
570 | checking changesets | |||
|
571 | checking manifests | |||
|
572 | crosschecking files in changesets and manifests | |||
|
573 | checking files | |||
|
574 | 2 files, 2 changesets, 2 total revisions | |||
|
575 | $ hg debugdata lfs.bin 0 | |||
|
576 | version https://git-lfs.github.com/spec/v1 | |||
|
577 | oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f | |||
|
578 | size 16 | |||
|
579 | x-is-binary 0 | |||
|
580 | ||||
517 | $ cd .. |
|
581 | $ cd .. | |
518 |
|
582 | |||
519 | repository config is taken in account |
|
583 | repository config is taken in account | |
520 | ------------------------------------- |
|
584 | ------------------------------------- | |
521 |
|
585 | |||
522 | $ cat << EOF >> $HGRCPATH |
|
586 | $ cat << EOF >> $HGRCPATH | |
523 | > [format] |
|
587 | > [format] | |
524 | > maxchainlen = 1 |
|
588 | > maxchainlen = 1 | |
525 | > EOF |
|
589 | > EOF | |
526 |
|
590 | |||
527 | $ hg init localconfig |
|
591 | $ hg init localconfig | |
528 | $ cd localconfig |
|
592 | $ cd localconfig | |
529 | $ cat << EOF > file |
|
593 | $ cat << EOF > file | |
530 |
> some |
|
594 | > some content | |
531 |
> with |
|
595 | > with some length | |
532 |
> to |
|
596 | > to make sure we get a delta | |
533 |
> after |
|
597 | > after changes | |
534 |
> very |
|
598 | > very long | |
535 |
> very |
|
599 | > very long | |
536 |
> very |
|
600 | > very long | |
537 |
> very |
|
601 | > very long | |
538 |
> very |
|
602 | > very long | |
539 |
> very |
|
603 | > very long | |
540 |
> very |
|
604 | > very long | |
541 |
> very |
|
605 | > very long | |
542 |
> very |
|
606 | > very long | |
543 |
> very |
|
607 | > very long | |
544 |
> very |
|
608 | > very long | |
545 | > EOF |
|
609 | > EOF | |
546 |
$ |
|
610 | $ hg -q commit -A -m A | |
547 |
$ |
|
611 | $ echo "new line" >> file | |
548 | $ hg -q commit -m B |
|
612 | $ hg -q commit -m B | |
549 | $ echo "new line" >> file |
|
613 | $ echo "new line" >> file | |
550 | $ hg -q commit -m C |
|
614 | $ hg -q commit -m C | |
551 |
|
615 | |||
552 | $ cat << EOF >> .hg/hgrc |
|
616 | $ cat << EOF >> .hg/hgrc | |
553 | > [format] |
|
617 | > [format] | |
554 | > maxchainlen = 9001 |
|
618 | > maxchainlen = 9001 | |
555 | > EOF |
|
619 | > EOF | |
556 | $ hg config format |
|
620 | $ hg config format | |
557 | format.maxchainlen=9001 |
|
621 | format.maxchainlen=9001 | |
558 | $ hg debugindex file |
|
622 | $ hg debugindex file | |
559 | rev offset length delta linkrev nodeid p1 p2 |
|
623 | rev offset length delta linkrev nodeid p1 p2 | |
560 | 0 0 77 -1 0 bcc1d3df78b2 000000000000 000000000000 |
|
624 | 0 0 77 -1 0 bcc1d3df78b2 000000000000 000000000000 | |
561 | 1 77 21 0 1 af3e29f7a72e bcc1d3df78b2 000000000000 |
|
625 | 1 77 21 0 1 af3e29f7a72e bcc1d3df78b2 000000000000 | |
562 | 2 98 84 -1 2 8daf79c5522b af3e29f7a72e 000000000000 |
|
626 | 2 98 84 -1 2 8daf79c5522b af3e29f7a72e 000000000000 | |
563 |
|
627 | |||
564 | $ hg debugupgraderepo --run --optimize redeltaall |
|
628 | $ hg debugupgraderepo --run --optimize redeltaall | |
565 | upgrade will perform the following actions: |
|
629 | upgrade will perform the following actions: | |
566 |
|
630 | |||
567 | requirements |
|
631 | requirements | |
568 | preserved: dotencode, fncache, generaldelta, revlogv1, store |
|
632 | preserved: dotencode, fncache, generaldelta, revlogv1, store | |
569 |
|
633 | |||
570 | redeltaall |
|
634 | redeltaall | |
571 | deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time |
|
635 | deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time | |
572 |
|
636 | |||
573 | beginning upgrade... |
|
637 | beginning upgrade... | |
574 | repository locked and read-only |
|
638 | repository locked and read-only | |
575 | creating temporary repository to stage migrated data: $TESTTMP/localconfig/.hg/upgrade.* (glob) |
|
639 | creating temporary repository to stage migrated data: $TESTTMP/localconfig/.hg/upgrade.* (glob) | |
576 | (it is safe to interrupt this process any time before data migration completes) |
|
640 | (it is safe to interrupt this process any time before data migration completes) | |
577 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
641 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
578 | migrating 497 bytes in store; 882 bytes tracked data |
|
642 | migrating 497 bytes in store; 882 bytes tracked data | |
579 | migrating 1 filelogs containing 3 revisions (182 bytes in store; 573 bytes tracked data) |
|
643 | migrating 1 filelogs containing 3 revisions (182 bytes in store; 573 bytes tracked data) | |
580 | finished migrating 3 filelog revisions across 1 filelogs; change in size: -63 bytes |
|
644 | finished migrating 3 filelog revisions across 1 filelogs; change in size: -63 bytes | |
581 | migrating 1 manifests containing 3 revisions (141 bytes in store; 138 bytes tracked data) |
|
645 | migrating 1 manifests containing 3 revisions (141 bytes in store; 138 bytes tracked data) | |
582 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
646 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
583 | migrating changelog containing 3 revisions (174 bytes in store; 171 bytes tracked data) |
|
647 | migrating changelog containing 3 revisions (174 bytes in store; 171 bytes tracked data) | |
584 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
648 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
585 | finished migrating 9 total revisions; total change in store size: -63 bytes |
|
649 | finished migrating 9 total revisions; total change in store size: -63 bytes | |
586 | copying phaseroots |
|
650 | copying phaseroots | |
587 | data fully migrated to temporary repository |
|
651 | data fully migrated to temporary repository | |
588 | marking source repository as being upgraded; clients will be unable to read from repository |
|
652 | marking source repository as being upgraded; clients will be unable to read from repository | |
589 | starting in-place swap of repository data |
|
653 | starting in-place swap of repository data | |
590 | replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) |
|
654 | replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) | |
591 | replacing store... |
|
655 | replacing store... | |
592 | store replacement complete; repository was inconsistent for *s (glob) |
|
656 | store replacement complete; repository was inconsistent for *s (glob) | |
593 | finalizing requirements file and making repository readable again |
|
657 | finalizing requirements file and making repository readable again | |
594 | removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob) |
|
658 | removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob) | |
595 | copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) |
|
659 | copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) | |
596 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
660 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
597 | $ hg debugindex file |
|
661 | $ hg debugindex file | |
598 | rev offset length delta linkrev nodeid p1 p2 |
|
662 | rev offset length delta linkrev nodeid p1 p2 | |
599 | 0 0 77 -1 0 bcc1d3df78b2 000000000000 000000000000 |
|
663 | 0 0 77 -1 0 bcc1d3df78b2 000000000000 000000000000 | |
600 | 1 77 21 0 1 af3e29f7a72e bcc1d3df78b2 000000000000 |
|
664 | 1 77 21 0 1 af3e29f7a72e bcc1d3df78b2 000000000000 | |
601 | 2 98 21 1 2 8daf79c5522b af3e29f7a72e 000000000000 |
|
665 | 2 98 21 1 2 8daf79c5522b af3e29f7a72e 000000000000 | |
602 | $ cd .. |
|
666 | $ cd .. | |
603 |
|
667 | |||
604 | $ cat << EOF >> $HGRCPATH |
|
668 | $ cat << EOF >> $HGRCPATH | |
605 | > [format] |
|
669 | > [format] | |
606 | > maxchainlen = 9001 |
|
670 | > maxchainlen = 9001 | |
607 | > EOF |
|
671 | > EOF |
General Comments 0
You need to be logged in to leave comments.
Login now