Show More
@@ -1,1120 +1,1124 | |||||
1 | # upgrade.py - functions for in place upgrade of Mercurial repository |
|
1 | # upgrade.py - functions for in place upgrade of Mercurial repository | |
2 | # |
|
2 | # | |
3 | # Copyright (c) 2016-present, Gregory Szorc |
|
3 | # Copyright (c) 2016-present, Gregory Szorc | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 |
|
8 | |||
9 | from ..i18n import _ |
|
9 | from ..i18n import _ | |
10 | from .. import ( |
|
10 | from .. import ( | |
11 | error, |
|
11 | error, | |
12 | localrepo, |
|
12 | localrepo, | |
13 | pycompat, |
|
13 | pycompat, | |
14 | requirements, |
|
14 | requirements, | |
15 | revlog, |
|
15 | revlog, | |
16 | util, |
|
16 | util, | |
17 | ) |
|
17 | ) | |
18 |
|
18 | |||
19 | from ..utils import compression |
|
19 | from ..utils import compression | |
20 |
|
20 | |||
21 | if pycompat.TYPE_CHECKING: |
|
21 | if pycompat.TYPE_CHECKING: | |
22 | from typing import ( |
|
22 | from typing import ( | |
23 | List, |
|
23 | List, | |
24 | Type, |
|
24 | Type, | |
25 | ) |
|
25 | ) | |
26 |
|
26 | |||
27 |
|
27 | |||
28 | # list of requirements that request a clone of all revlog if added/removed |
|
28 | # list of requirements that request a clone of all revlog if added/removed | |
29 | RECLONES_REQUIREMENTS = { |
|
29 | RECLONES_REQUIREMENTS = { | |
30 | requirements.GENERALDELTA_REQUIREMENT, |
|
30 | requirements.GENERALDELTA_REQUIREMENT, | |
31 | requirements.SPARSEREVLOG_REQUIREMENT, |
|
31 | requirements.SPARSEREVLOG_REQUIREMENT, | |
32 | requirements.REVLOGV2_REQUIREMENT, |
|
32 | requirements.REVLOGV2_REQUIREMENT, | |
33 | requirements.CHANGELOGV2_REQUIREMENT, |
|
33 | requirements.CHANGELOGV2_REQUIREMENT, | |
34 | } |
|
34 | } | |
35 |
|
35 | |||
36 |
|
36 | |||
37 | def preservedrequirements(repo): |
|
37 | def preservedrequirements(repo): | |
38 | preserved = { |
|
38 | preserved = { | |
39 | requirements.SHARED_REQUIREMENT, |
|
39 | requirements.SHARED_REQUIREMENT, | |
40 | requirements.NARROW_REQUIREMENT, |
|
40 | requirements.NARROW_REQUIREMENT, | |
41 | } |
|
41 | } | |
42 | return preserved & repo.requirements |
|
42 | return preserved & repo.requirements | |
43 |
|
43 | |||
44 |
|
44 | |||
45 | FORMAT_VARIANT = b'deficiency' |
|
45 | FORMAT_VARIANT = b'deficiency' | |
46 | OPTIMISATION = b'optimization' |
|
46 | OPTIMISATION = b'optimization' | |
47 |
|
47 | |||
48 |
|
48 | |||
49 | class improvement: |
|
49 | class improvement: | |
50 | """Represents an improvement that can be made as part of an upgrade.""" |
|
50 | """Represents an improvement that can be made as part of an upgrade.""" | |
51 |
|
51 | |||
52 | ### The following attributes should be defined for each subclass: |
|
52 | ### The following attributes should be defined for each subclass: | |
53 |
|
53 | |||
54 | # Either ``FORMAT_VARIANT`` or ``OPTIMISATION``. |
|
54 | # Either ``FORMAT_VARIANT`` or ``OPTIMISATION``. | |
55 | # A format variant is where we change the storage format. Not all format |
|
55 | # A format variant is where we change the storage format. Not all format | |
56 | # variant changes are an obvious problem. |
|
56 | # variant changes are an obvious problem. | |
57 | # An optimization is an action (sometimes optional) that |
|
57 | # An optimization is an action (sometimes optional) that | |
58 | # can be taken to further improve the state of the repository. |
|
58 | # can be taken to further improve the state of the repository. | |
59 | type = None |
|
59 | type = None | |
60 |
|
60 | |||
61 | # machine-readable string uniquely identifying this improvement. it will be |
|
61 | # machine-readable string uniquely identifying this improvement. it will be | |
62 | # mapped to an action later in the upgrade process. |
|
62 | # mapped to an action later in the upgrade process. | |
63 | name = None |
|
63 | name = None | |
64 |
|
64 | |||
65 | # message intended for humans explaining the improvement in more detail, |
|
65 | # message intended for humans explaining the improvement in more detail, | |
66 | # including the implications of it ``FORMAT_VARIANT`` types, should be |
|
66 | # including the implications of it ``FORMAT_VARIANT`` types, should be | |
67 | # worded |
|
67 | # worded | |
68 | # in the present tense. |
|
68 | # in the present tense. | |
69 | description = None |
|
69 | description = None | |
70 |
|
70 | |||
71 | # message intended for humans explaining what an upgrade addressing this |
|
71 | # message intended for humans explaining what an upgrade addressing this | |
72 | # issue will do. should be worded in the future tense. |
|
72 | # issue will do. should be worded in the future tense. | |
73 | upgrademessage = None |
|
73 | upgrademessage = None | |
74 |
|
74 | |||
75 | # value of current Mercurial default for new repository |
|
75 | # value of current Mercurial default for new repository | |
76 | default = None |
|
76 | default = None | |
77 |
|
77 | |||
78 | # Message intended for humans which will be shown post an upgrade |
|
78 | # Message intended for humans which will be shown post an upgrade | |
79 | # operation when the improvement will be added |
|
79 | # operation when the improvement will be added | |
80 | postupgrademessage = None |
|
80 | postupgrademessage = None | |
81 |
|
81 | |||
82 | # Message intended for humans which will be shown post an upgrade |
|
82 | # Message intended for humans which will be shown post an upgrade | |
83 | # operation in which this improvement was removed |
|
83 | # operation in which this improvement was removed | |
84 | postdowngrademessage = None |
|
84 | postdowngrademessage = None | |
85 |
|
85 | |||
86 | # By default we assume that every improvement touches requirements and all revlogs |
|
86 | # By default we assume that every improvement touches requirements and all revlogs | |
87 |
|
87 | |||
88 | # Whether this improvement touches filelogs |
|
88 | # Whether this improvement touches filelogs | |
89 | touches_filelogs = True |
|
89 | touches_filelogs = True | |
90 |
|
90 | |||
91 | # Whether this improvement touches manifests |
|
91 | # Whether this improvement touches manifests | |
92 | touches_manifests = True |
|
92 | touches_manifests = True | |
93 |
|
93 | |||
94 | # Whether this improvement touches changelog |
|
94 | # Whether this improvement touches changelog | |
95 | touches_changelog = True |
|
95 | touches_changelog = True | |
96 |
|
96 | |||
97 | # Whether this improvement changes repository requirements |
|
97 | # Whether this improvement changes repository requirements | |
98 | touches_requirements = True |
|
98 | touches_requirements = True | |
99 |
|
99 | |||
100 | # Whether this improvement touches the dirstate |
|
100 | # Whether this improvement touches the dirstate | |
101 | touches_dirstate = False |
|
101 | touches_dirstate = False | |
102 |
|
102 | |||
103 | # Can this action be run on a share instead of its mains repository |
|
103 | # Can this action be run on a share instead of its mains repository | |
104 | compatible_with_share = False |
|
104 | compatible_with_share = False | |
105 |
|
105 | |||
106 |
|
106 | |||
107 | allformatvariant = [] # type: List[Type['formatvariant']] |
|
107 | allformatvariant = [] # type: List[Type['formatvariant']] | |
108 |
|
108 | |||
109 |
|
109 | |||
110 | def registerformatvariant(cls): |
|
110 | def registerformatvariant(cls): | |
111 | allformatvariant.append(cls) |
|
111 | allformatvariant.append(cls) | |
112 | return cls |
|
112 | return cls | |
113 |
|
113 | |||
114 |
|
114 | |||
115 | class formatvariant(improvement): |
|
115 | class formatvariant(improvement): | |
116 | """an improvement subclass dedicated to repository format""" |
|
116 | """an improvement subclass dedicated to repository format""" | |
117 |
|
117 | |||
118 | type = FORMAT_VARIANT |
|
118 | type = FORMAT_VARIANT | |
119 |
|
119 | |||
120 | @staticmethod |
|
120 | @staticmethod | |
121 | def fromrepo(repo): |
|
121 | def fromrepo(repo): | |
122 | """current value of the variant in the repository""" |
|
122 | """current value of the variant in the repository""" | |
123 | raise NotImplementedError() |
|
123 | raise NotImplementedError() | |
124 |
|
124 | |||
125 | @staticmethod |
|
125 | @staticmethod | |
126 | def fromconfig(repo): |
|
126 | def fromconfig(repo): | |
127 | """current value of the variant in the configuration""" |
|
127 | """current value of the variant in the configuration""" | |
128 | raise NotImplementedError() |
|
128 | raise NotImplementedError() | |
129 |
|
129 | |||
130 |
|
130 | |||
131 | class requirementformatvariant(formatvariant): |
|
131 | class requirementformatvariant(formatvariant): | |
132 | """formatvariant based on a 'requirement' name. |
|
132 | """formatvariant based on a 'requirement' name. | |
133 |
|
133 | |||
134 | Many format variant are controlled by a 'requirement'. We define a small |
|
134 | Many format variant are controlled by a 'requirement'. We define a small | |
135 | subclass to factor the code. |
|
135 | subclass to factor the code. | |
136 | """ |
|
136 | """ | |
137 |
|
137 | |||
138 | # the requirement that control this format variant |
|
138 | # the requirement that control this format variant | |
139 | _requirement = None |
|
139 | _requirement = None | |
140 |
|
140 | |||
141 | @staticmethod |
|
141 | @staticmethod | |
142 | def _newreporequirements(ui): |
|
142 | def _newreporequirements(ui): | |
143 | return localrepo.newreporequirements( |
|
143 | return localrepo.newreporequirements( | |
144 | ui, localrepo.defaultcreateopts(ui) |
|
144 | ui, localrepo.defaultcreateopts(ui) | |
145 | ) |
|
145 | ) | |
146 |
|
146 | |||
147 | @classmethod |
|
147 | @classmethod | |
148 | def fromrepo(cls, repo): |
|
148 | def fromrepo(cls, repo): | |
149 | assert cls._requirement is not None |
|
149 | assert cls._requirement is not None | |
150 | return cls._requirement in repo.requirements |
|
150 | return cls._requirement in repo.requirements | |
151 |
|
151 | |||
152 | @classmethod |
|
152 | @classmethod | |
153 | def fromconfig(cls, repo): |
|
153 | def fromconfig(cls, repo): | |
154 | assert cls._requirement is not None |
|
154 | assert cls._requirement is not None | |
155 | return cls._requirement in cls._newreporequirements(repo.ui) |
|
155 | return cls._requirement in cls._newreporequirements(repo.ui) | |
156 |
|
156 | |||
157 |
|
157 | |||
158 | @registerformatvariant |
|
158 | @registerformatvariant | |
159 | class fncache(requirementformatvariant): |
|
159 | class fncache(requirementformatvariant): | |
160 | name = b'fncache' |
|
160 | name = b'fncache' | |
161 |
|
161 | |||
162 | _requirement = requirements.FNCACHE_REQUIREMENT |
|
162 | _requirement = requirements.FNCACHE_REQUIREMENT | |
163 |
|
163 | |||
164 | default = True |
|
164 | default = True | |
165 |
|
165 | |||
166 | description = _( |
|
166 | description = _( | |
167 | b'long and reserved filenames may not work correctly; ' |
|
167 | b'long and reserved filenames may not work correctly; ' | |
168 | b'repository performance is sub-optimal' |
|
168 | b'repository performance is sub-optimal' | |
169 | ) |
|
169 | ) | |
170 |
|
170 | |||
171 | upgrademessage = _( |
|
171 | upgrademessage = _( | |
172 | b'repository will be more resilient to storing ' |
|
172 | b'repository will be more resilient to storing ' | |
173 | b'certain paths and performance of certain ' |
|
173 | b'certain paths and performance of certain ' | |
174 | b'operations should be improved' |
|
174 | b'operations should be improved' | |
175 | ) |
|
175 | ) | |
176 |
|
176 | |||
177 |
|
177 | |||
178 | @registerformatvariant |
|
178 | @registerformatvariant | |
179 | class dirstatev2(requirementformatvariant): |
|
179 | class dirstatev2(requirementformatvariant): | |
180 | name = b'dirstate-v2' |
|
180 | name = b'dirstate-v2' | |
181 | _requirement = requirements.DIRSTATE_V2_REQUIREMENT |
|
181 | _requirement = requirements.DIRSTATE_V2_REQUIREMENT | |
182 |
|
182 | |||
183 | default = False |
|
183 | default = False | |
184 |
|
184 | |||
185 | description = _( |
|
185 | description = _( | |
186 | b'version 1 of the dirstate file format requires ' |
|
186 | b'version 1 of the dirstate file format requires ' | |
187 | b'reading and parsing it all at once.\n' |
|
187 | b'reading and parsing it all at once.\n' | |
188 | b'Version 2 has a better structure,' |
|
188 | b'Version 2 has a better structure,' | |
189 | b'better information and lighter update mechanism' |
|
189 | b'better information and lighter update mechanism' | |
190 | ) |
|
190 | ) | |
191 |
|
191 | |||
192 | upgrademessage = _(b'"hg status" will be faster') |
|
192 | upgrademessage = _(b'"hg status" will be faster') | |
193 |
|
193 | |||
194 | touches_filelogs = False |
|
194 | touches_filelogs = False | |
195 | touches_manifests = False |
|
195 | touches_manifests = False | |
196 | touches_changelog = False |
|
196 | touches_changelog = False | |
197 | touches_requirements = True |
|
197 | touches_requirements = True | |
198 | touches_dirstate = True |
|
198 | touches_dirstate = True | |
199 | compatible_with_share = True |
|
199 | compatible_with_share = True | |
200 |
|
200 | |||
201 |
|
201 | |||
202 | @registerformatvariant |
|
202 | @registerformatvariant | |
203 | class dirstatetrackedkey(requirementformatvariant): |
|
203 | class dirstatetrackedkey(requirementformatvariant): | |
204 | name = b'tracked-hint' |
|
204 | name = b'tracked-hint' | |
205 | _requirement = requirements.DIRSTATE_TRACKED_HINT_V1 |
|
205 | _requirement = requirements.DIRSTATE_TRACKED_HINT_V1 | |
206 |
|
206 | |||
207 | default = False |
|
207 | default = False | |
208 |
|
208 | |||
209 | description = _( |
|
209 | description = _( | |
210 | b'Add a small file to help external tooling that watch the tracked set' |
|
210 | b'Add a small file to help external tooling that watch the tracked set' | |
211 | ) |
|
211 | ) | |
212 |
|
212 | |||
213 | upgrademessage = _( |
|
213 | upgrademessage = _( | |
214 | b'external tools will be informated of potential change in the tracked set' |
|
214 | b'external tools will be informated of potential change in the tracked set' | |
215 | ) |
|
215 | ) | |
216 |
|
216 | |||
217 | touches_filelogs = False |
|
217 | touches_filelogs = False | |
218 | touches_manifests = False |
|
218 | touches_manifests = False | |
219 | touches_changelog = False |
|
219 | touches_changelog = False | |
220 | touches_requirements = True |
|
220 | touches_requirements = True | |
221 | touches_dirstate = True |
|
221 | touches_dirstate = True | |
222 | compatible_with_share = True |
|
222 | compatible_with_share = True | |
223 |
|
223 | |||
224 |
|
224 | |||
225 | @registerformatvariant |
|
225 | @registerformatvariant | |
226 | class dotencode(requirementformatvariant): |
|
226 | class dotencode(requirementformatvariant): | |
227 | name = b'dotencode' |
|
227 | name = b'dotencode' | |
228 |
|
228 | |||
229 | _requirement = requirements.DOTENCODE_REQUIREMENT |
|
229 | _requirement = requirements.DOTENCODE_REQUIREMENT | |
230 |
|
230 | |||
231 | default = True |
|
231 | default = True | |
232 |
|
232 | |||
233 | description = _( |
|
233 | description = _( | |
234 | b'storage of filenames beginning with a period or ' |
|
234 | b'storage of filenames beginning with a period or ' | |
235 | b'space may not work correctly' |
|
235 | b'space may not work correctly' | |
236 | ) |
|
236 | ) | |
237 |
|
237 | |||
238 | upgrademessage = _( |
|
238 | upgrademessage = _( | |
239 | b'repository will be better able to store files ' |
|
239 | b'repository will be better able to store files ' | |
240 | b'beginning with a space or period' |
|
240 | b'beginning with a space or period' | |
241 | ) |
|
241 | ) | |
242 |
|
242 | |||
243 |
|
243 | |||
244 | @registerformatvariant |
|
244 | @registerformatvariant | |
245 | class generaldelta(requirementformatvariant): |
|
245 | class generaldelta(requirementformatvariant): | |
246 | name = b'generaldelta' |
|
246 | name = b'generaldelta' | |
247 |
|
247 | |||
248 | _requirement = requirements.GENERALDELTA_REQUIREMENT |
|
248 | _requirement = requirements.GENERALDELTA_REQUIREMENT | |
249 |
|
249 | |||
250 | default = True |
|
250 | default = True | |
251 |
|
251 | |||
252 | description = _( |
|
252 | description = _( | |
253 | b'deltas within internal storage are unable to ' |
|
253 | b'deltas within internal storage are unable to ' | |
254 | b'choose optimal revisions; repository is larger and ' |
|
254 | b'choose optimal revisions; repository is larger and ' | |
255 | b'slower than it could be; interaction with other ' |
|
255 | b'slower than it could be; interaction with other ' | |
256 | b'repositories may require extra network and CPU ' |
|
256 | b'repositories may require extra network and CPU ' | |
257 | b'resources, making "hg push" and "hg pull" slower' |
|
257 | b'resources, making "hg push" and "hg pull" slower' | |
258 | ) |
|
258 | ) | |
259 |
|
259 | |||
260 | upgrademessage = _( |
|
260 | upgrademessage = _( | |
261 | b'repository storage will be able to create ' |
|
261 | b'repository storage will be able to create ' | |
262 | b'optimal deltas; new repository data will be ' |
|
262 | b'optimal deltas; new repository data will be ' | |
263 | b'smaller and read times should decrease; ' |
|
263 | b'smaller and read times should decrease; ' | |
264 | b'interacting with other repositories using this ' |
|
264 | b'interacting with other repositories using this ' | |
265 | b'storage model should require less network and ' |
|
265 | b'storage model should require less network and ' | |
266 | b'CPU resources, making "hg push" and "hg pull" ' |
|
266 | b'CPU resources, making "hg push" and "hg pull" ' | |
267 | b'faster' |
|
267 | b'faster' | |
268 | ) |
|
268 | ) | |
269 |
|
269 | |||
270 |
|
270 | |||
271 | @registerformatvariant |
|
271 | @registerformatvariant | |
272 | class sharesafe(requirementformatvariant): |
|
272 | class sharesafe(requirementformatvariant): | |
273 | name = b'share-safe' |
|
273 | name = b'share-safe' | |
274 | _requirement = requirements.SHARESAFE_REQUIREMENT |
|
274 | _requirement = requirements.SHARESAFE_REQUIREMENT | |
275 |
|
275 | |||
276 | default = True |
|
276 | default = True | |
277 |
|
277 | |||
278 | description = _( |
|
278 | description = _( | |
279 | b'old shared repositories do not share source repository ' |
|
279 | b'old shared repositories do not share source repository ' | |
280 | b'requirements and config. This leads to various problems ' |
|
280 | b'requirements and config. This leads to various problems ' | |
281 | b'when the source repository format is upgraded or some new ' |
|
281 | b'when the source repository format is upgraded or some new ' | |
282 | b'extensions are enabled.' |
|
282 | b'extensions are enabled.' | |
283 | ) |
|
283 | ) | |
284 |
|
284 | |||
285 | upgrademessage = _( |
|
285 | upgrademessage = _( | |
286 | b'Upgrades a repository to share-safe format so that future ' |
|
286 | b'Upgrades a repository to share-safe format so that future ' | |
287 | b'shares of this repository share its requirements and configs.' |
|
287 | b'shares of this repository share its requirements and configs.' | |
288 | ) |
|
288 | ) | |
289 |
|
289 | |||
290 | postdowngrademessage = _( |
|
290 | postdowngrademessage = _( | |
291 | b'repository downgraded to not use share safe mode, ' |
|
291 | b'repository downgraded to not use share safe mode, ' | |
292 | b'existing shares will not work and needs to' |
|
292 | b'existing shares will not work and needs to' | |
293 | b' be reshared.' |
|
293 | b' be reshared.' | |
294 | ) |
|
294 | ) | |
295 |
|
295 | |||
296 | postupgrademessage = _( |
|
296 | postupgrademessage = _( | |
297 | b'repository upgraded to share safe mode, existing' |
|
297 | b'repository upgraded to share safe mode, existing' | |
298 | b' shares will still work in old non-safe mode. ' |
|
298 | b' shares will still work in old non-safe mode. ' | |
299 | b'Re-share existing shares to use them in safe mode' |
|
299 | b'Re-share existing shares to use them in safe mode' | |
300 | b' New shares will be created in safe mode.' |
|
300 | b' New shares will be created in safe mode.' | |
301 | ) |
|
301 | ) | |
302 |
|
302 | |||
303 | # upgrade only needs to change the requirements |
|
303 | # upgrade only needs to change the requirements | |
304 | touches_filelogs = False |
|
304 | touches_filelogs = False | |
305 | touches_manifests = False |
|
305 | touches_manifests = False | |
306 | touches_changelog = False |
|
306 | touches_changelog = False | |
307 | touches_requirements = True |
|
307 | touches_requirements = True | |
308 |
|
308 | |||
309 |
|
309 | |||
310 | @registerformatvariant |
|
310 | @registerformatvariant | |
311 | class sparserevlog(requirementformatvariant): |
|
311 | class sparserevlog(requirementformatvariant): | |
312 | name = b'sparserevlog' |
|
312 | name = b'sparserevlog' | |
313 |
|
313 | |||
314 | _requirement = requirements.SPARSEREVLOG_REQUIREMENT |
|
314 | _requirement = requirements.SPARSEREVLOG_REQUIREMENT | |
315 |
|
315 | |||
316 | default = True |
|
316 | default = True | |
317 |
|
317 | |||
318 | description = _( |
|
318 | description = _( | |
319 | b'in order to limit disk reading and memory usage on older ' |
|
319 | b'in order to limit disk reading and memory usage on older ' | |
320 | b'version, the span of a delta chain from its root to its ' |
|
320 | b'version, the span of a delta chain from its root to its ' | |
321 | b'end is limited, whatever the relevant data in this span. ' |
|
321 | b'end is limited, whatever the relevant data in this span. ' | |
322 | b'This can severly limit Mercurial ability to build good ' |
|
322 | b'This can severly limit Mercurial ability to build good ' | |
323 | b'chain of delta resulting is much more storage space being ' |
|
323 | b'chain of delta resulting is much more storage space being ' | |
324 | b'taken and limit reusability of on disk delta during ' |
|
324 | b'taken and limit reusability of on disk delta during ' | |
325 | b'exchange.' |
|
325 | b'exchange.' | |
326 | ) |
|
326 | ) | |
327 |
|
327 | |||
328 | upgrademessage = _( |
|
328 | upgrademessage = _( | |
329 | b'Revlog supports delta chain with more unused data ' |
|
329 | b'Revlog supports delta chain with more unused data ' | |
330 | b'between payload. These gaps will be skipped at read ' |
|
330 | b'between payload. These gaps will be skipped at read ' | |
331 | b'time. This allows for better delta chains, making a ' |
|
331 | b'time. This allows for better delta chains, making a ' | |
332 | b'better compression and faster exchange with server.' |
|
332 | b'better compression and faster exchange with server.' | |
333 | ) |
|
333 | ) | |
334 |
|
334 | |||
335 |
|
335 | |||
336 | @registerformatvariant |
|
336 | @registerformatvariant | |
337 | class persistentnodemap(requirementformatvariant): |
|
337 | class persistentnodemap(requirementformatvariant): | |
338 | name = b'persistent-nodemap' |
|
338 | name = b'persistent-nodemap' | |
339 |
|
339 | |||
340 | _requirement = requirements.NODEMAP_REQUIREMENT |
|
340 | _requirement = requirements.NODEMAP_REQUIREMENT | |
341 |
|
341 | |||
342 | default = False |
|
342 | default = False | |
343 |
|
343 | |||
344 | description = _( |
|
344 | description = _( | |
345 | b'persist the node -> rev mapping on disk to speedup lookup' |
|
345 | b'persist the node -> rev mapping on disk to speedup lookup' | |
346 | ) |
|
346 | ) | |
347 |
|
347 | |||
348 | upgrademessage = _(b'Speedup revision lookup by node id.') |
|
348 | upgrademessage = _(b'Speedup revision lookup by node id.') | |
349 |
|
349 | |||
350 |
|
350 | |||
351 | @registerformatvariant |
|
351 | @registerformatvariant | |
352 | class copiessdc(requirementformatvariant): |
|
352 | class copiessdc(requirementformatvariant): | |
353 | name = b'copies-sdc' |
|
353 | name = b'copies-sdc' | |
354 |
|
354 | |||
355 | _requirement = requirements.COPIESSDC_REQUIREMENT |
|
355 | _requirement = requirements.COPIESSDC_REQUIREMENT | |
356 |
|
356 | |||
357 | default = False |
|
357 | default = False | |
358 |
|
358 | |||
359 | description = _(b'Stores copies information alongside changesets.') |
|
359 | description = _(b'Stores copies information alongside changesets.') | |
360 |
|
360 | |||
361 | upgrademessage = _( |
|
361 | upgrademessage = _( | |
362 | b'Allows to use more efficient algorithm to deal with ' b'copy tracing.' |
|
362 | b'Allows to use more efficient algorithm to deal with ' b'copy tracing.' | |
363 | ) |
|
363 | ) | |
364 |
|
364 | |||
365 | touches_filelogs = False |
|
365 | touches_filelogs = False | |
366 | touches_manifests = False |
|
366 | touches_manifests = False | |
367 |
|
367 | |||
368 |
|
368 | |||
369 | @registerformatvariant |
|
369 | @registerformatvariant | |
370 | class revlogv2(requirementformatvariant): |
|
370 | class revlogv2(requirementformatvariant): | |
371 | name = b'revlog-v2' |
|
371 | name = b'revlog-v2' | |
372 | _requirement = requirements.REVLOGV2_REQUIREMENT |
|
372 | _requirement = requirements.REVLOGV2_REQUIREMENT | |
373 | default = False |
|
373 | default = False | |
374 | description = _(b'Version 2 of the revlog.') |
|
374 | description = _(b'Version 2 of the revlog.') | |
375 | upgrademessage = _(b'very experimental') |
|
375 | upgrademessage = _(b'very experimental') | |
376 |
|
376 | |||
377 |
|
377 | |||
378 | @registerformatvariant |
|
378 | @registerformatvariant | |
379 | class changelogv2(requirementformatvariant): |
|
379 | class changelogv2(requirementformatvariant): | |
380 | name = b'changelog-v2' |
|
380 | name = b'changelog-v2' | |
381 | _requirement = requirements.CHANGELOGV2_REQUIREMENT |
|
381 | _requirement = requirements.CHANGELOGV2_REQUIREMENT | |
382 | default = False |
|
382 | default = False | |
383 | description = _(b'An iteration of the revlog focussed on changelog needs.') |
|
383 | description = _(b'An iteration of the revlog focussed on changelog needs.') | |
384 | upgrademessage = _(b'quite experimental') |
|
384 | upgrademessage = _(b'quite experimental') | |
385 |
|
385 | |||
386 | touches_filelogs = False |
|
386 | touches_filelogs = False | |
387 | touches_manifests = False |
|
387 | touches_manifests = False | |
388 |
|
388 | |||
389 |
|
389 | |||
390 | @registerformatvariant |
|
390 | @registerformatvariant | |
391 | class removecldeltachain(formatvariant): |
|
391 | class removecldeltachain(formatvariant): | |
392 | name = b'plain-cl-delta' |
|
392 | name = b'plain-cl-delta' | |
393 |
|
393 | |||
394 | default = True |
|
394 | default = True | |
395 |
|
395 | |||
396 | description = _( |
|
396 | description = _( | |
397 | b'changelog storage is using deltas instead of ' |
|
397 | b'changelog storage is using deltas instead of ' | |
398 | b'raw entries; changelog reading and any ' |
|
398 | b'raw entries; changelog reading and any ' | |
399 | b'operation relying on changelog data are slower ' |
|
399 | b'operation relying on changelog data are slower ' | |
400 | b'than they could be' |
|
400 | b'than they could be' | |
401 | ) |
|
401 | ) | |
402 |
|
402 | |||
403 | upgrademessage = _( |
|
403 | upgrademessage = _( | |
404 | b'changelog storage will be reformated to ' |
|
404 | b'changelog storage will be reformated to ' | |
405 | b'store raw entries; changelog reading will be ' |
|
405 | b'store raw entries; changelog reading will be ' | |
406 | b'faster; changelog size may be reduced' |
|
406 | b'faster; changelog size may be reduced' | |
407 | ) |
|
407 | ) | |
408 |
|
408 | |||
409 | @staticmethod |
|
409 | @staticmethod | |
410 | def fromrepo(repo): |
|
410 | def fromrepo(repo): | |
411 | # Mercurial 4.0 changed changelogs to not use delta chains. Search for |
|
411 | # Mercurial 4.0 changed changelogs to not use delta chains. Search for | |
412 | # changelogs with deltas. |
|
412 | # changelogs with deltas. | |
413 | cl = repo.changelog |
|
413 | cl = repo.changelog | |
414 | chainbase = cl.chainbase |
|
414 | chainbase = cl.chainbase | |
415 | return all(rev == chainbase(rev) for rev in cl) |
|
415 | return all(rev == chainbase(rev) for rev in cl) | |
416 |
|
416 | |||
417 | @staticmethod |
|
417 | @staticmethod | |
418 | def fromconfig(repo): |
|
418 | def fromconfig(repo): | |
419 | return True |
|
419 | return True | |
420 |
|
420 | |||
421 |
|
421 | |||
422 | _has_zstd = ( |
|
422 | _has_zstd = ( | |
423 | b'zstd' in util.compengines |
|
423 | b'zstd' in util.compengines | |
424 | and util.compengines[b'zstd'].available() |
|
424 | and util.compengines[b'zstd'].available() | |
425 | and util.compengines[b'zstd'].revlogheader() |
|
425 | and util.compengines[b'zstd'].revlogheader() | |
426 | ) |
|
426 | ) | |
427 |
|
427 | |||
428 |
|
428 | |||
429 | @registerformatvariant |
|
429 | @registerformatvariant | |
430 | class compressionengine(formatvariant): |
|
430 | class compressionengine(formatvariant): | |
431 | name = b'compression' |
|
431 | name = b'compression' | |
432 |
|
432 | |||
433 | if _has_zstd: |
|
433 | if _has_zstd: | |
434 | default = b'zstd' |
|
434 | default = b'zstd' | |
435 | else: |
|
435 | else: | |
436 | default = b'zlib' |
|
436 | default = b'zlib' | |
437 |
|
437 | |||
438 | description = _( |
|
438 | description = _( | |
439 | b'Compresion algorithm used to compress data. ' |
|
439 | b'Compresion algorithm used to compress data. ' | |
440 | b'Some engine are faster than other' |
|
440 | b'Some engine are faster than other' | |
441 | ) |
|
441 | ) | |
442 |
|
442 | |||
443 | upgrademessage = _( |
|
443 | upgrademessage = _( | |
444 | b'revlog content will be recompressed with the new algorithm.' |
|
444 | b'revlog content will be recompressed with the new algorithm.' | |
445 | ) |
|
445 | ) | |
446 |
|
446 | |||
447 | @classmethod |
|
447 | @classmethod | |
448 | def fromrepo(cls, repo): |
|
448 | def fromrepo(cls, repo): | |
449 | # we allow multiple compression engine requirement to co-exist because |
|
449 | # we allow multiple compression engine requirement to co-exist because | |
450 | # strickly speaking, revlog seems to support mixed compression style. |
|
450 | # strickly speaking, revlog seems to support mixed compression style. | |
451 | # |
|
451 | # | |
452 | # The compression used for new entries will be "the last one" |
|
452 | # The compression used for new entries will be "the last one" | |
453 | compression = b'zlib' |
|
453 | compression = b'zlib' | |
454 | for req in repo.requirements: |
|
454 | for req in repo.requirements: | |
455 | prefix = req.startswith |
|
455 | prefix = req.startswith | |
456 | if prefix(b'revlog-compression-') or prefix(b'exp-compression-'): |
|
456 | if prefix(b'revlog-compression-') or prefix(b'exp-compression-'): | |
457 | compression = req.split(b'-', 2)[2] |
|
457 | compression = req.split(b'-', 2)[2] | |
458 | return compression |
|
458 | return compression | |
459 |
|
459 | |||
460 | @classmethod |
|
460 | @classmethod | |
461 | def fromconfig(cls, repo): |
|
461 | def fromconfig(cls, repo): | |
462 | compengines = repo.ui.configlist(b'format', b'revlog-compression') |
|
462 | compengines = repo.ui.configlist(b'format', b'revlog-compression') | |
463 | # return the first valid value as the selection code would do |
|
463 | # return the first valid value as the selection code would do | |
464 | for comp in compengines: |
|
464 | for comp in compengines: | |
465 | if comp in util.compengines: |
|
465 | if comp in util.compengines: | |
466 | e = util.compengines[comp] |
|
466 | e = util.compengines[comp] | |
467 | if e.available() and e.revlogheader(): |
|
467 | if e.available() and e.revlogheader(): | |
468 | return comp |
|
468 | return comp | |
469 |
|
469 | |||
470 | # no valide compression found lets display it all for clarity |
|
470 | # no valide compression found lets display it all for clarity | |
471 | return b','.join(compengines) |
|
471 | return b','.join(compengines) | |
472 |
|
472 | |||
473 |
|
473 | |||
474 | @registerformatvariant |
|
474 | @registerformatvariant | |
475 | class compressionlevel(formatvariant): |
|
475 | class compressionlevel(formatvariant): | |
476 | name = b'compression-level' |
|
476 | name = b'compression-level' | |
477 | default = b'default' |
|
477 | default = b'default' | |
478 |
|
478 | |||
479 | description = _(b'compression level') |
|
479 | description = _(b'compression level') | |
480 |
|
480 | |||
481 | upgrademessage = _(b'revlog content will be recompressed') |
|
481 | upgrademessage = _(b'revlog content will be recompressed') | |
482 |
|
482 | |||
483 | @classmethod |
|
483 | @classmethod | |
484 | def fromrepo(cls, repo): |
|
484 | def fromrepo(cls, repo): | |
485 | comp = compressionengine.fromrepo(repo) |
|
485 | comp = compressionengine.fromrepo(repo) | |
486 | level = None |
|
486 | level = None | |
487 | if comp == b'zlib': |
|
487 | if comp == b'zlib': | |
488 | level = repo.ui.configint(b'storage', b'revlog.zlib.level') |
|
488 | level = repo.ui.configint(b'storage', b'revlog.zlib.level') | |
489 | elif comp == b'zstd': |
|
489 | elif comp == b'zstd': | |
490 | level = repo.ui.configint(b'storage', b'revlog.zstd.level') |
|
490 | level = repo.ui.configint(b'storage', b'revlog.zstd.level') | |
491 | if level is None: |
|
491 | if level is None: | |
492 | return b'default' |
|
492 | return b'default' | |
493 | return bytes(level) |
|
493 | return bytes(level) | |
494 |
|
494 | |||
495 | @classmethod |
|
495 | @classmethod | |
496 | def fromconfig(cls, repo): |
|
496 | def fromconfig(cls, repo): | |
497 | comp = compressionengine.fromconfig(repo) |
|
497 | comp = compressionengine.fromconfig(repo) | |
498 | level = None |
|
498 | level = None | |
499 | if comp == b'zlib': |
|
499 | if comp == b'zlib': | |
500 | level = repo.ui.configint(b'storage', b'revlog.zlib.level') |
|
500 | level = repo.ui.configint(b'storage', b'revlog.zlib.level') | |
501 | elif comp == b'zstd': |
|
501 | elif comp == b'zstd': | |
502 | level = repo.ui.configint(b'storage', b'revlog.zstd.level') |
|
502 | level = repo.ui.configint(b'storage', b'revlog.zstd.level') | |
503 | if level is None: |
|
503 | if level is None: | |
504 | return b'default' |
|
504 | return b'default' | |
505 | return bytes(level) |
|
505 | return bytes(level) | |
506 |
|
506 | |||
507 |
|
507 | |||
508 | def find_format_upgrades(repo): |
|
508 | def find_format_upgrades(repo): | |
509 | """returns a list of format upgrades which can be perform on the repo""" |
|
509 | """returns a list of format upgrades which can be perform on the repo""" | |
510 | upgrades = [] |
|
510 | upgrades = [] | |
511 |
|
511 | |||
512 | # We could detect lack of revlogv1 and store here, but they were added |
|
512 | # We could detect lack of revlogv1 and store here, but they were added | |
513 | # in 0.9.2 and we don't support upgrading repos without these |
|
513 | # in 0.9.2 and we don't support upgrading repos without these | |
514 | # requirements, so let's not bother. |
|
514 | # requirements, so let's not bother. | |
515 |
|
515 | |||
516 | for fv in allformatvariant: |
|
516 | for fv in allformatvariant: | |
517 | if not fv.fromrepo(repo): |
|
517 | if not fv.fromrepo(repo): | |
518 | upgrades.append(fv) |
|
518 | upgrades.append(fv) | |
519 |
|
519 | |||
520 | return upgrades |
|
520 | return upgrades | |
521 |
|
521 | |||
522 |
|
522 | |||
523 | def find_format_downgrades(repo): |
|
523 | def find_format_downgrades(repo): | |
524 | """returns a list of format downgrades which will be performed on the repo |
|
524 | """returns a list of format downgrades which will be performed on the repo | |
525 | because of disabled config option for them""" |
|
525 | because of disabled config option for them""" | |
526 |
|
526 | |||
527 | downgrades = [] |
|
527 | downgrades = [] | |
528 |
|
528 | |||
529 | for fv in allformatvariant: |
|
529 | for fv in allformatvariant: | |
530 | if fv.name == b'compression': |
|
530 | if fv.name == b'compression': | |
531 | # If there is a compression change between repository |
|
531 | # If there is a compression change between repository | |
532 | # and config, destination repository compression will change |
|
532 | # and config, destination repository compression will change | |
533 | # and current compression will be removed. |
|
533 | # and current compression will be removed. | |
534 | if fv.fromrepo(repo) != fv.fromconfig(repo): |
|
534 | if fv.fromrepo(repo) != fv.fromconfig(repo): | |
535 | downgrades.append(fv) |
|
535 | downgrades.append(fv) | |
536 | continue |
|
536 | continue | |
537 | # format variant exist in repo but does not exist in new repository |
|
537 | # format variant exist in repo but does not exist in new repository | |
538 | # config |
|
538 | # config | |
539 | if fv.fromrepo(repo) and not fv.fromconfig(repo): |
|
539 | if fv.fromrepo(repo) and not fv.fromconfig(repo): | |
540 | downgrades.append(fv) |
|
540 | downgrades.append(fv) | |
541 |
|
541 | |||
542 | return downgrades |
|
542 | return downgrades | |
543 |
|
543 | |||
544 |
|
544 | |||
545 | ALL_OPTIMISATIONS = [] |
|
545 | ALL_OPTIMISATIONS = [] | |
546 |
|
546 | |||
547 |
|
547 | |||
548 | def register_optimization(obj): |
|
548 | def register_optimization(obj): | |
549 | ALL_OPTIMISATIONS.append(obj) |
|
549 | ALL_OPTIMISATIONS.append(obj) | |
550 | return obj |
|
550 | return obj | |
551 |
|
551 | |||
552 |
|
552 | |||
553 | class optimization(improvement): |
|
553 | class optimization(improvement): | |
554 | """an improvement subclass dedicated to optimizations""" |
|
554 | """an improvement subclass dedicated to optimizations""" | |
555 |
|
555 | |||
556 | type = OPTIMISATION |
|
556 | type = OPTIMISATION | |
557 |
|
557 | |||
558 |
|
558 | |||
559 | @register_optimization |
|
559 | @register_optimization | |
560 | class redeltaparents(optimization): |
|
560 | class redeltaparents(optimization): | |
561 | name = b're-delta-parent' |
|
561 | name = b're-delta-parent' | |
562 |
|
562 | |||
563 | type = OPTIMISATION |
|
563 | type = OPTIMISATION | |
564 |
|
564 | |||
565 | description = _( |
|
565 | description = _( | |
566 | b'deltas within internal storage will be recalculated to ' |
|
566 | b'deltas within internal storage will be recalculated to ' | |
567 | b'choose an optimal base revision where this was not ' |
|
567 | b'choose an optimal base revision where this was not ' | |
568 | b'already done; the size of the repository may shrink and ' |
|
568 | b'already done; the size of the repository may shrink and ' | |
569 | b'various operations may become faster; the first time ' |
|
569 | b'various operations may become faster; the first time ' | |
570 | b'this optimization is performed could slow down upgrade ' |
|
570 | b'this optimization is performed could slow down upgrade ' | |
571 | b'execution considerably; subsequent invocations should ' |
|
571 | b'execution considerably; subsequent invocations should ' | |
572 | b'not run noticeably slower' |
|
572 | b'not run noticeably slower' | |
573 | ) |
|
573 | ) | |
574 |
|
574 | |||
575 | upgrademessage = _( |
|
575 | upgrademessage = _( | |
576 | b'deltas within internal storage will choose a new ' |
|
576 | b'deltas within internal storage will choose a new ' | |
577 | b'base revision if needed' |
|
577 | b'base revision if needed' | |
578 | ) |
|
578 | ) | |
579 |
|
579 | |||
580 |
|
580 | |||
581 | @register_optimization |
|
581 | @register_optimization | |
582 | class redeltamultibase(optimization): |
|
582 | class redeltamultibase(optimization): | |
583 | name = b're-delta-multibase' |
|
583 | name = b're-delta-multibase' | |
584 |
|
584 | |||
585 | type = OPTIMISATION |
|
585 | type = OPTIMISATION | |
586 |
|
586 | |||
587 | description = _( |
|
587 | description = _( | |
588 | b'deltas within internal storage will be recalculated ' |
|
588 | b'deltas within internal storage will be recalculated ' | |
589 | b'against multiple base revision and the smallest ' |
|
589 | b'against multiple base revision and the smallest ' | |
590 | b'difference will be used; the size of the repository may ' |
|
590 | b'difference will be used; the size of the repository may ' | |
591 | b'shrink significantly when there are many merges; this ' |
|
591 | b'shrink significantly when there are many merges; this ' | |
592 | b'optimization will slow down execution in proportion to ' |
|
592 | b'optimization will slow down execution in proportion to ' | |
593 | b'the number of merges in the repository and the amount ' |
|
593 | b'the number of merges in the repository and the amount ' | |
594 | b'of files in the repository; this slow down should not ' |
|
594 | b'of files in the repository; this slow down should not ' | |
595 | b'be significant unless there are tens of thousands of ' |
|
595 | b'be significant unless there are tens of thousands of ' | |
596 | b'files and thousands of merges' |
|
596 | b'files and thousands of merges' | |
597 | ) |
|
597 | ) | |
598 |
|
598 | |||
599 | upgrademessage = _( |
|
599 | upgrademessage = _( | |
600 | b'deltas within internal storage will choose an ' |
|
600 | b'deltas within internal storage will choose an ' | |
601 | b'optimal delta by computing deltas against multiple ' |
|
601 | b'optimal delta by computing deltas against multiple ' | |
602 | b'parents; may slow down execution time ' |
|
602 | b'parents; may slow down execution time ' | |
603 | b'significantly' |
|
603 | b'significantly' | |
604 | ) |
|
604 | ) | |
605 |
|
605 | |||
606 |
|
606 | |||
607 | @register_optimization |
|
607 | @register_optimization | |
608 | class redeltaall(optimization): |
|
608 | class redeltaall(optimization): | |
609 | name = b're-delta-all' |
|
609 | name = b're-delta-all' | |
610 |
|
610 | |||
611 | type = OPTIMISATION |
|
611 | type = OPTIMISATION | |
612 |
|
612 | |||
613 | description = _( |
|
613 | description = _( | |
614 | b'deltas within internal storage will always be ' |
|
614 | b'deltas within internal storage will always be ' | |
615 | b'recalculated without reusing prior deltas; this will ' |
|
615 | b'recalculated without reusing prior deltas; this will ' | |
616 | b'likely make execution run several times slower; this ' |
|
616 | b'likely make execution run several times slower; this ' | |
617 | b'optimization is typically not needed' |
|
617 | b'optimization is typically not needed' | |
618 | ) |
|
618 | ) | |
619 |
|
619 | |||
620 | upgrademessage = _( |
|
620 | upgrademessage = _( | |
621 | b'deltas within internal storage will be fully ' |
|
621 | b'deltas within internal storage will be fully ' | |
622 | b'recomputed; this will likely drastically slow down ' |
|
622 | b'recomputed; this will likely drastically slow down ' | |
623 | b'execution time' |
|
623 | b'execution time' | |
624 | ) |
|
624 | ) | |
625 |
|
625 | |||
626 |
|
626 | |||
627 | @register_optimization |
|
627 | @register_optimization | |
628 | class redeltafulladd(optimization): |
|
628 | class redeltafulladd(optimization): | |
629 | name = b're-delta-fulladd' |
|
629 | name = b're-delta-fulladd' | |
630 |
|
630 | |||
631 | type = OPTIMISATION |
|
631 | type = OPTIMISATION | |
632 |
|
632 | |||
633 | description = _( |
|
633 | description = _( | |
634 | b'every revision will be re-added as if it was new ' |
|
634 | b'every revision will be re-added as if it was new ' | |
635 | b'content. It will go through the full storage ' |
|
635 | b'content. It will go through the full storage ' | |
636 | b'mechanism giving extensions a chance to process it ' |
|
636 | b'mechanism giving extensions a chance to process it ' | |
637 | b'(eg. lfs). This is similar to "re-delta-all" but even ' |
|
637 | b'(eg. lfs). This is similar to "re-delta-all" but even ' | |
638 | b'slower since more logic is involved.' |
|
638 | b'slower since more logic is involved.' | |
639 | ) |
|
639 | ) | |
640 |
|
640 | |||
641 | upgrademessage = _( |
|
641 | upgrademessage = _( | |
642 | b'each revision will be added as new content to the ' |
|
642 | b'each revision will be added as new content to the ' | |
643 | b'internal storage; this will likely drastically slow ' |
|
643 | b'internal storage; this will likely drastically slow ' | |
644 | b'down execution time, but some extensions might need ' |
|
644 | b'down execution time, but some extensions might need ' | |
645 | b'it' |
|
645 | b'it' | |
646 | ) |
|
646 | ) | |
647 |
|
647 | |||
648 |
|
648 | |||
649 | def findoptimizations(repo): |
|
649 | def findoptimizations(repo): | |
650 | """Determine optimisation that could be used during upgrade""" |
|
650 | """Determine optimisation that could be used during upgrade""" | |
651 | # These are unconditionally added. There is logic later that figures out |
|
651 | # These are unconditionally added. There is logic later that figures out | |
652 | # which ones to apply. |
|
652 | # which ones to apply. | |
653 | return list(ALL_OPTIMISATIONS) |
|
653 | return list(ALL_OPTIMISATIONS) | |
654 |
|
654 | |||
655 |
|
655 | |||
656 | def determine_upgrade_actions( |
|
656 | def determine_upgrade_actions( | |
657 | repo, format_upgrades, optimizations, sourcereqs, destreqs |
|
657 | repo, format_upgrades, optimizations, sourcereqs, destreqs | |
658 | ): |
|
658 | ): | |
659 | """Determine upgrade actions that will be performed. |
|
659 | """Determine upgrade actions that will be performed. | |
660 |
|
660 | |||
661 | Given a list of improvements as returned by ``find_format_upgrades`` and |
|
661 | Given a list of improvements as returned by ``find_format_upgrades`` and | |
662 | ``findoptimizations``, determine the list of upgrade actions that |
|
662 | ``findoptimizations``, determine the list of upgrade actions that | |
663 | will be performed. |
|
663 | will be performed. | |
664 |
|
664 | |||
665 | The role of this function is to filter improvements if needed, apply |
|
665 | The role of this function is to filter improvements if needed, apply | |
666 | recommended optimizations from the improvements list that make sense, |
|
666 | recommended optimizations from the improvements list that make sense, | |
667 | etc. |
|
667 | etc. | |
668 |
|
668 | |||
669 | Returns a list of action names. |
|
669 | Returns a list of action names. | |
670 | """ |
|
670 | """ | |
671 | newactions = [] |
|
671 | newactions = [] | |
672 |
|
672 | |||
673 | for d in format_upgrades: |
|
673 | for d in format_upgrades: | |
674 | if util.safehasattr(d, '_requirement'): |
|
674 | if util.safehasattr(d, '_requirement'): | |
675 | name = d._requirement |
|
675 | name = d._requirement | |
676 | else: |
|
676 | else: | |
677 | name = None |
|
677 | name = None | |
678 |
|
678 | |||
679 | # If the action is a requirement that doesn't show up in the |
|
679 | # If the action is a requirement that doesn't show up in the | |
680 | # destination requirements, prune the action. |
|
680 | # destination requirements, prune the action. | |
681 | if name is not None and name not in destreqs: |
|
681 | if name is not None and name not in destreqs: | |
682 | continue |
|
682 | continue | |
683 |
|
683 | |||
684 | newactions.append(d) |
|
684 | newactions.append(d) | |
685 |
|
685 | |||
686 | newactions.extend(o for o in sorted(optimizations) if o not in newactions) |
|
686 | newactions.extend( | |
|
687 | o | |||
|
688 | for o in sorted(optimizations, key=(lambda x: x.name)) | |||
|
689 | if o not in newactions | |||
|
690 | ) | |||
687 |
|
691 | |||
688 | # FUTURE consider adding some optimizations here for certain transitions. |
|
692 | # FUTURE consider adding some optimizations here for certain transitions. | |
689 | # e.g. adding generaldelta could schedule parent redeltas. |
|
693 | # e.g. adding generaldelta could schedule parent redeltas. | |
690 |
|
694 | |||
691 | return newactions |
|
695 | return newactions | |
692 |
|
696 | |||
693 |
|
697 | |||
694 | class BaseOperation: |
|
698 | class BaseOperation: | |
695 | """base class that contains the minimum for an upgrade to work |
|
699 | """base class that contains the minimum for an upgrade to work | |
696 |
|
700 | |||
697 | (this might need to be extended as the usage for subclass alternative to |
|
701 | (this might need to be extended as the usage for subclass alternative to | |
698 | UpgradeOperation extends) |
|
702 | UpgradeOperation extends) | |
699 | """ |
|
703 | """ | |
700 |
|
704 | |||
701 | def __init__( |
|
705 | def __init__( | |
702 | self, |
|
706 | self, | |
703 | new_requirements, |
|
707 | new_requirements, | |
704 | backup_store, |
|
708 | backup_store, | |
705 | ): |
|
709 | ): | |
706 | self.new_requirements = new_requirements |
|
710 | self.new_requirements = new_requirements | |
707 | # should this operation create a backup of the store |
|
711 | # should this operation create a backup of the store | |
708 | self.backup_store = backup_store |
|
712 | self.backup_store = backup_store | |
709 |
|
713 | |||
710 |
|
714 | |||
711 | class UpgradeOperation(BaseOperation): |
|
715 | class UpgradeOperation(BaseOperation): | |
712 | """represent the work to be done during an upgrade""" |
|
716 | """represent the work to be done during an upgrade""" | |
713 |
|
717 | |||
714 | def __init__( |
|
718 | def __init__( | |
715 | self, |
|
719 | self, | |
716 | ui, |
|
720 | ui, | |
717 | new_requirements, |
|
721 | new_requirements, | |
718 | current_requirements, |
|
722 | current_requirements, | |
719 | upgrade_actions, |
|
723 | upgrade_actions, | |
720 | removed_actions, |
|
724 | removed_actions, | |
721 | revlogs_to_process, |
|
725 | revlogs_to_process, | |
722 | backup_store, |
|
726 | backup_store, | |
723 | ): |
|
727 | ): | |
724 | super().__init__( |
|
728 | super().__init__( | |
725 | new_requirements, |
|
729 | new_requirements, | |
726 | backup_store, |
|
730 | backup_store, | |
727 | ) |
|
731 | ) | |
728 | self.ui = ui |
|
732 | self.ui = ui | |
729 | self.current_requirements = current_requirements |
|
733 | self.current_requirements = current_requirements | |
730 | # list of upgrade actions the operation will perform |
|
734 | # list of upgrade actions the operation will perform | |
731 | self.upgrade_actions = upgrade_actions |
|
735 | self.upgrade_actions = upgrade_actions | |
732 | self.removed_actions = removed_actions |
|
736 | self.removed_actions = removed_actions | |
733 | self.revlogs_to_process = revlogs_to_process |
|
737 | self.revlogs_to_process = revlogs_to_process | |
734 | # requirements which will be added by the operation |
|
738 | # requirements which will be added by the operation | |
735 | self._added_requirements = ( |
|
739 | self._added_requirements = ( | |
736 | self.new_requirements - self.current_requirements |
|
740 | self.new_requirements - self.current_requirements | |
737 | ) |
|
741 | ) | |
738 | # requirements which will be removed by the operation |
|
742 | # requirements which will be removed by the operation | |
739 | self._removed_requirements = ( |
|
743 | self._removed_requirements = ( | |
740 | self.current_requirements - self.new_requirements |
|
744 | self.current_requirements - self.new_requirements | |
741 | ) |
|
745 | ) | |
742 | # requirements which will be preserved by the operation |
|
746 | # requirements which will be preserved by the operation | |
743 | self._preserved_requirements = ( |
|
747 | self._preserved_requirements = ( | |
744 | self.current_requirements & self.new_requirements |
|
748 | self.current_requirements & self.new_requirements | |
745 | ) |
|
749 | ) | |
746 | # optimizations which are not used and it's recommended that they |
|
750 | # optimizations which are not used and it's recommended that they | |
747 | # should use them |
|
751 | # should use them | |
748 | all_optimizations = findoptimizations(None) |
|
752 | all_optimizations = findoptimizations(None) | |
749 | self.unused_optimizations = [ |
|
753 | self.unused_optimizations = [ | |
750 | i for i in all_optimizations if i not in self.upgrade_actions |
|
754 | i for i in all_optimizations if i not in self.upgrade_actions | |
751 | ] |
|
755 | ] | |
752 |
|
756 | |||
753 | # delta reuse mode of this upgrade operation |
|
757 | # delta reuse mode of this upgrade operation | |
754 | upgrade_actions_names = self.upgrade_actions_names |
|
758 | upgrade_actions_names = self.upgrade_actions_names | |
755 | self.delta_reuse_mode = revlog.revlog.DELTAREUSEALWAYS |
|
759 | self.delta_reuse_mode = revlog.revlog.DELTAREUSEALWAYS | |
756 | if b're-delta-all' in upgrade_actions_names: |
|
760 | if b're-delta-all' in upgrade_actions_names: | |
757 | self.delta_reuse_mode = revlog.revlog.DELTAREUSENEVER |
|
761 | self.delta_reuse_mode = revlog.revlog.DELTAREUSENEVER | |
758 | elif b're-delta-parent' in upgrade_actions_names: |
|
762 | elif b're-delta-parent' in upgrade_actions_names: | |
759 | self.delta_reuse_mode = revlog.revlog.DELTAREUSESAMEREVS |
|
763 | self.delta_reuse_mode = revlog.revlog.DELTAREUSESAMEREVS | |
760 | elif b're-delta-multibase' in upgrade_actions_names: |
|
764 | elif b're-delta-multibase' in upgrade_actions_names: | |
761 | self.delta_reuse_mode = revlog.revlog.DELTAREUSESAMEREVS |
|
765 | self.delta_reuse_mode = revlog.revlog.DELTAREUSESAMEREVS | |
762 | elif b're-delta-fulladd' in upgrade_actions_names: |
|
766 | elif b're-delta-fulladd' in upgrade_actions_names: | |
763 | self.delta_reuse_mode = revlog.revlog.DELTAREUSEFULLADD |
|
767 | self.delta_reuse_mode = revlog.revlog.DELTAREUSEFULLADD | |
764 |
|
768 | |||
765 | # should this operation force re-delta of both parents |
|
769 | # should this operation force re-delta of both parents | |
766 | self.force_re_delta_both_parents = ( |
|
770 | self.force_re_delta_both_parents = ( | |
767 | b're-delta-multibase' in upgrade_actions_names |
|
771 | b're-delta-multibase' in upgrade_actions_names | |
768 | ) |
|
772 | ) | |
769 |
|
773 | |||
770 | @property |
|
774 | @property | |
771 | def upgrade_actions_names(self): |
|
775 | def upgrade_actions_names(self): | |
772 | return set([a.name for a in self.upgrade_actions]) |
|
776 | return set([a.name for a in self.upgrade_actions]) | |
773 |
|
777 | |||
774 | @property |
|
778 | @property | |
775 | def requirements_only(self): |
|
779 | def requirements_only(self): | |
776 | # does the operation only touches repository requirement |
|
780 | # does the operation only touches repository requirement | |
777 | return ( |
|
781 | return ( | |
778 | self.touches_requirements |
|
782 | self.touches_requirements | |
779 | and not self.touches_filelogs |
|
783 | and not self.touches_filelogs | |
780 | and not self.touches_manifests |
|
784 | and not self.touches_manifests | |
781 | and not self.touches_changelog |
|
785 | and not self.touches_changelog | |
782 | and not self.touches_dirstate |
|
786 | and not self.touches_dirstate | |
783 | ) |
|
787 | ) | |
784 |
|
788 | |||
785 | @property |
|
789 | @property | |
786 | def touches_filelogs(self): |
|
790 | def touches_filelogs(self): | |
787 | for a in self.upgrade_actions: |
|
791 | for a in self.upgrade_actions: | |
788 | # in optimisations, we re-process the revlogs again |
|
792 | # in optimisations, we re-process the revlogs again | |
789 | if a.type == OPTIMISATION: |
|
793 | if a.type == OPTIMISATION: | |
790 | return True |
|
794 | return True | |
791 | elif a.touches_filelogs: |
|
795 | elif a.touches_filelogs: | |
792 | return True |
|
796 | return True | |
793 | for a in self.removed_actions: |
|
797 | for a in self.removed_actions: | |
794 | if a.touches_filelogs: |
|
798 | if a.touches_filelogs: | |
795 | return True |
|
799 | return True | |
796 | return False |
|
800 | return False | |
797 |
|
801 | |||
798 | @property |
|
802 | @property | |
799 | def touches_manifests(self): |
|
803 | def touches_manifests(self): | |
800 | for a in self.upgrade_actions: |
|
804 | for a in self.upgrade_actions: | |
801 | # in optimisations, we re-process the revlogs again |
|
805 | # in optimisations, we re-process the revlogs again | |
802 | if a.type == OPTIMISATION: |
|
806 | if a.type == OPTIMISATION: | |
803 | return True |
|
807 | return True | |
804 | elif a.touches_manifests: |
|
808 | elif a.touches_manifests: | |
805 | return True |
|
809 | return True | |
806 | for a in self.removed_actions: |
|
810 | for a in self.removed_actions: | |
807 | if a.touches_manifests: |
|
811 | if a.touches_manifests: | |
808 | return True |
|
812 | return True | |
809 | return False |
|
813 | return False | |
810 |
|
814 | |||
811 | @property |
|
815 | @property | |
812 | def touches_changelog(self): |
|
816 | def touches_changelog(self): | |
813 | for a in self.upgrade_actions: |
|
817 | for a in self.upgrade_actions: | |
814 | # in optimisations, we re-process the revlogs again |
|
818 | # in optimisations, we re-process the revlogs again | |
815 | if a.type == OPTIMISATION: |
|
819 | if a.type == OPTIMISATION: | |
816 | return True |
|
820 | return True | |
817 | elif a.touches_changelog: |
|
821 | elif a.touches_changelog: | |
818 | return True |
|
822 | return True | |
819 | for a in self.removed_actions: |
|
823 | for a in self.removed_actions: | |
820 | if a.touches_changelog: |
|
824 | if a.touches_changelog: | |
821 | return True |
|
825 | return True | |
822 | return False |
|
826 | return False | |
823 |
|
827 | |||
824 | @property |
|
828 | @property | |
825 | def touches_requirements(self): |
|
829 | def touches_requirements(self): | |
826 | for a in self.upgrade_actions: |
|
830 | for a in self.upgrade_actions: | |
827 | # optimisations are used to re-process revlogs and does not result |
|
831 | # optimisations are used to re-process revlogs and does not result | |
828 | # in a requirement being added or removed |
|
832 | # in a requirement being added or removed | |
829 | if a.type == OPTIMISATION: |
|
833 | if a.type == OPTIMISATION: | |
830 | pass |
|
834 | pass | |
831 | elif a.touches_requirements: |
|
835 | elif a.touches_requirements: | |
832 | return True |
|
836 | return True | |
833 | for a in self.removed_actions: |
|
837 | for a in self.removed_actions: | |
834 | if a.touches_requirements: |
|
838 | if a.touches_requirements: | |
835 | return True |
|
839 | return True | |
836 |
|
840 | |||
837 | @property |
|
841 | @property | |
838 | def touches_dirstate(self): |
|
842 | def touches_dirstate(self): | |
839 | for a in self.upgrade_actions: |
|
843 | for a in self.upgrade_actions: | |
840 | # revlog optimisations do not affect the dirstate |
|
844 | # revlog optimisations do not affect the dirstate | |
841 | if a.type == OPTIMISATION: |
|
845 | if a.type == OPTIMISATION: | |
842 | pass |
|
846 | pass | |
843 | elif a.touches_dirstate: |
|
847 | elif a.touches_dirstate: | |
844 | return True |
|
848 | return True | |
845 | for a in self.removed_actions: |
|
849 | for a in self.removed_actions: | |
846 | if a.touches_dirstate: |
|
850 | if a.touches_dirstate: | |
847 | return True |
|
851 | return True | |
848 |
|
852 | |||
849 | return False |
|
853 | return False | |
850 |
|
854 | |||
851 | def _write_labeled(self, l, label): |
|
855 | def _write_labeled(self, l, label): | |
852 | """ |
|
856 | """ | |
853 | Utility function to aid writing of a list under one label |
|
857 | Utility function to aid writing of a list under one label | |
854 | """ |
|
858 | """ | |
855 | first = True |
|
859 | first = True | |
856 | for r in sorted(l): |
|
860 | for r in sorted(l): | |
857 | if not first: |
|
861 | if not first: | |
858 | self.ui.write(b', ') |
|
862 | self.ui.write(b', ') | |
859 | self.ui.write(r, label=label) |
|
863 | self.ui.write(r, label=label) | |
860 | first = False |
|
864 | first = False | |
861 |
|
865 | |||
862 | def print_requirements(self): |
|
866 | def print_requirements(self): | |
863 | self.ui.write(_(b'requirements\n')) |
|
867 | self.ui.write(_(b'requirements\n')) | |
864 | self.ui.write(_(b' preserved: ')) |
|
868 | self.ui.write(_(b' preserved: ')) | |
865 | self._write_labeled( |
|
869 | self._write_labeled( | |
866 | self._preserved_requirements, "upgrade-repo.requirement.preserved" |
|
870 | self._preserved_requirements, "upgrade-repo.requirement.preserved" | |
867 | ) |
|
871 | ) | |
868 | self.ui.write((b'\n')) |
|
872 | self.ui.write((b'\n')) | |
869 | if self._removed_requirements: |
|
873 | if self._removed_requirements: | |
870 | self.ui.write(_(b' removed: ')) |
|
874 | self.ui.write(_(b' removed: ')) | |
871 | self._write_labeled( |
|
875 | self._write_labeled( | |
872 | self._removed_requirements, "upgrade-repo.requirement.removed" |
|
876 | self._removed_requirements, "upgrade-repo.requirement.removed" | |
873 | ) |
|
877 | ) | |
874 | self.ui.write((b'\n')) |
|
878 | self.ui.write((b'\n')) | |
875 | if self._added_requirements: |
|
879 | if self._added_requirements: | |
876 | self.ui.write(_(b' added: ')) |
|
880 | self.ui.write(_(b' added: ')) | |
877 | self._write_labeled( |
|
881 | self._write_labeled( | |
878 | self._added_requirements, "upgrade-repo.requirement.added" |
|
882 | self._added_requirements, "upgrade-repo.requirement.added" | |
879 | ) |
|
883 | ) | |
880 | self.ui.write((b'\n')) |
|
884 | self.ui.write((b'\n')) | |
881 | self.ui.write(b'\n') |
|
885 | self.ui.write(b'\n') | |
882 |
|
886 | |||
883 | def print_optimisations(self): |
|
887 | def print_optimisations(self): | |
884 | optimisations = [ |
|
888 | optimisations = [ | |
885 | a for a in self.upgrade_actions if a.type == OPTIMISATION |
|
889 | a for a in self.upgrade_actions if a.type == OPTIMISATION | |
886 | ] |
|
890 | ] | |
887 | optimisations.sort(key=lambda a: a.name) |
|
891 | optimisations.sort(key=lambda a: a.name) | |
888 | if optimisations: |
|
892 | if optimisations: | |
889 | self.ui.write(_(b'optimisations: ')) |
|
893 | self.ui.write(_(b'optimisations: ')) | |
890 | self._write_labeled( |
|
894 | self._write_labeled( | |
891 | [a.name for a in optimisations], |
|
895 | [a.name for a in optimisations], | |
892 | "upgrade-repo.optimisation.performed", |
|
896 | "upgrade-repo.optimisation.performed", | |
893 | ) |
|
897 | ) | |
894 | self.ui.write(b'\n\n') |
|
898 | self.ui.write(b'\n\n') | |
895 |
|
899 | |||
896 | def print_upgrade_actions(self): |
|
900 | def print_upgrade_actions(self): | |
897 | for a in self.upgrade_actions: |
|
901 | for a in self.upgrade_actions: | |
898 | self.ui.status(b'%s\n %s\n\n' % (a.name, a.upgrademessage)) |
|
902 | self.ui.status(b'%s\n %s\n\n' % (a.name, a.upgrademessage)) | |
899 |
|
903 | |||
900 | def print_affected_revlogs(self): |
|
904 | def print_affected_revlogs(self): | |
901 | if not self.revlogs_to_process: |
|
905 | if not self.revlogs_to_process: | |
902 | self.ui.write((b'no revlogs to process\n')) |
|
906 | self.ui.write((b'no revlogs to process\n')) | |
903 | else: |
|
907 | else: | |
904 | self.ui.write((b'processed revlogs:\n')) |
|
908 | self.ui.write((b'processed revlogs:\n')) | |
905 | for r in sorted(self.revlogs_to_process): |
|
909 | for r in sorted(self.revlogs_to_process): | |
906 | self.ui.write((b' - %s\n' % r)) |
|
910 | self.ui.write((b' - %s\n' % r)) | |
907 | self.ui.write((b'\n')) |
|
911 | self.ui.write((b'\n')) | |
908 |
|
912 | |||
909 | def print_unused_optimizations(self): |
|
913 | def print_unused_optimizations(self): | |
910 | for i in self.unused_optimizations: |
|
914 | for i in self.unused_optimizations: | |
911 | self.ui.status(_(b'%s\n %s\n\n') % (i.name, i.description)) |
|
915 | self.ui.status(_(b'%s\n %s\n\n') % (i.name, i.description)) | |
912 |
|
916 | |||
913 | def has_upgrade_action(self, name): |
|
917 | def has_upgrade_action(self, name): | |
914 | """Check whether the upgrade operation will perform this action""" |
|
918 | """Check whether the upgrade operation will perform this action""" | |
915 | return name in self._upgrade_actions_names |
|
919 | return name in self._upgrade_actions_names | |
916 |
|
920 | |||
917 | def print_post_op_messages(self): |
|
921 | def print_post_op_messages(self): | |
918 | """print post upgrade operation warning messages""" |
|
922 | """print post upgrade operation warning messages""" | |
919 | for a in self.upgrade_actions: |
|
923 | for a in self.upgrade_actions: | |
920 | if a.postupgrademessage is not None: |
|
924 | if a.postupgrademessage is not None: | |
921 | self.ui.warn(b'%s\n' % a.postupgrademessage) |
|
925 | self.ui.warn(b'%s\n' % a.postupgrademessage) | |
922 | for a in self.removed_actions: |
|
926 | for a in self.removed_actions: | |
923 | if a.postdowngrademessage is not None: |
|
927 | if a.postdowngrademessage is not None: | |
924 | self.ui.warn(b'%s\n' % a.postdowngrademessage) |
|
928 | self.ui.warn(b'%s\n' % a.postdowngrademessage) | |
925 |
|
929 | |||
926 |
|
930 | |||
927 | ### Code checking if a repository can got through the upgrade process at all. # |
|
931 | ### Code checking if a repository can got through the upgrade process at all. # | |
928 |
|
932 | |||
929 |
|
933 | |||
930 | def requiredsourcerequirements(repo): |
|
934 | def requiredsourcerequirements(repo): | |
931 | """Obtain requirements required to be present to upgrade a repo. |
|
935 | """Obtain requirements required to be present to upgrade a repo. | |
932 |
|
936 | |||
933 | An upgrade will not be allowed if the repository doesn't have the |
|
937 | An upgrade will not be allowed if the repository doesn't have the | |
934 | requirements returned by this function. |
|
938 | requirements returned by this function. | |
935 | """ |
|
939 | """ | |
936 | return { |
|
940 | return { | |
937 | # Introduced in Mercurial 0.9.2. |
|
941 | # Introduced in Mercurial 0.9.2. | |
938 | requirements.STORE_REQUIREMENT, |
|
942 | requirements.STORE_REQUIREMENT, | |
939 | } |
|
943 | } | |
940 |
|
944 | |||
941 |
|
945 | |||
942 | def blocksourcerequirements(repo): |
|
946 | def blocksourcerequirements(repo): | |
943 | """Obtain requirements that will prevent an upgrade from occurring. |
|
947 | """Obtain requirements that will prevent an upgrade from occurring. | |
944 |
|
948 | |||
945 | An upgrade cannot be performed if the source repository contains a |
|
949 | An upgrade cannot be performed if the source repository contains a | |
946 | requirements in the returned set. |
|
950 | requirements in the returned set. | |
947 | """ |
|
951 | """ | |
948 | return { |
|
952 | return { | |
949 | # The upgrade code does not yet support these experimental features. |
|
953 | # The upgrade code does not yet support these experimental features. | |
950 | # This is an artificial limitation. |
|
954 | # This is an artificial limitation. | |
951 | requirements.TREEMANIFEST_REQUIREMENT, |
|
955 | requirements.TREEMANIFEST_REQUIREMENT, | |
952 | # This was a precursor to generaldelta and was never enabled by default. |
|
956 | # This was a precursor to generaldelta and was never enabled by default. | |
953 | # It should (hopefully) not exist in the wild. |
|
957 | # It should (hopefully) not exist in the wild. | |
954 | b'parentdelta', |
|
958 | b'parentdelta', | |
955 | } |
|
959 | } | |
956 |
|
960 | |||
957 |
|
961 | |||
958 | def check_revlog_version(reqs): |
|
962 | def check_revlog_version(reqs): | |
959 | """Check that the requirements contain at least one Revlog version""" |
|
963 | """Check that the requirements contain at least one Revlog version""" | |
960 | all_revlogs = { |
|
964 | all_revlogs = { | |
961 | requirements.REVLOGV1_REQUIREMENT, |
|
965 | requirements.REVLOGV1_REQUIREMENT, | |
962 | requirements.REVLOGV2_REQUIREMENT, |
|
966 | requirements.REVLOGV2_REQUIREMENT, | |
963 | } |
|
967 | } | |
964 | if not all_revlogs.intersection(reqs): |
|
968 | if not all_revlogs.intersection(reqs): | |
965 | msg = _(b'cannot upgrade repository; missing a revlog version') |
|
969 | msg = _(b'cannot upgrade repository; missing a revlog version') | |
966 | raise error.Abort(msg) |
|
970 | raise error.Abort(msg) | |
967 |
|
971 | |||
968 |
|
972 | |||
969 | def check_source_requirements(repo): |
|
973 | def check_source_requirements(repo): | |
970 | """Ensure that no existing requirements prevent the repository upgrade""" |
|
974 | """Ensure that no existing requirements prevent the repository upgrade""" | |
971 |
|
975 | |||
972 | check_revlog_version(repo.requirements) |
|
976 | check_revlog_version(repo.requirements) | |
973 | required = requiredsourcerequirements(repo) |
|
977 | required = requiredsourcerequirements(repo) | |
974 | missingreqs = required - repo.requirements |
|
978 | missingreqs = required - repo.requirements | |
975 | if missingreqs: |
|
979 | if missingreqs: | |
976 | msg = _(b'cannot upgrade repository; requirement missing: %s') |
|
980 | msg = _(b'cannot upgrade repository; requirement missing: %s') | |
977 | missingreqs = b', '.join(sorted(missingreqs)) |
|
981 | missingreqs = b', '.join(sorted(missingreqs)) | |
978 | raise error.Abort(msg % missingreqs) |
|
982 | raise error.Abort(msg % missingreqs) | |
979 |
|
983 | |||
980 | blocking = blocksourcerequirements(repo) |
|
984 | blocking = blocksourcerequirements(repo) | |
981 | blockingreqs = blocking & repo.requirements |
|
985 | blockingreqs = blocking & repo.requirements | |
982 | if blockingreqs: |
|
986 | if blockingreqs: | |
983 | m = _(b'cannot upgrade repository; unsupported source requirement: %s') |
|
987 | m = _(b'cannot upgrade repository; unsupported source requirement: %s') | |
984 | blockingreqs = b', '.join(sorted(blockingreqs)) |
|
988 | blockingreqs = b', '.join(sorted(blockingreqs)) | |
985 | raise error.Abort(m % blockingreqs) |
|
989 | raise error.Abort(m % blockingreqs) | |
986 | # Upgrade should operate on the actual store, not the shared link. |
|
990 | # Upgrade should operate on the actual store, not the shared link. | |
987 |
|
991 | |||
988 | bad_share = ( |
|
992 | bad_share = ( | |
989 | requirements.SHARED_REQUIREMENT in repo.requirements |
|
993 | requirements.SHARED_REQUIREMENT in repo.requirements | |
990 | and requirements.SHARESAFE_REQUIREMENT not in repo.requirements |
|
994 | and requirements.SHARESAFE_REQUIREMENT not in repo.requirements | |
991 | ) |
|
995 | ) | |
992 | if bad_share: |
|
996 | if bad_share: | |
993 | m = _(b'cannot upgrade repository; share repository without share-safe') |
|
997 | m = _(b'cannot upgrade repository; share repository without share-safe') | |
994 | h = _(b'check :hg:`help config.format.use-share-safe`') |
|
998 | h = _(b'check :hg:`help config.format.use-share-safe`') | |
995 | raise error.Abort(m, hint=h) |
|
999 | raise error.Abort(m, hint=h) | |
996 |
|
1000 | |||
997 |
|
1001 | |||
998 | ### Verify the validity of the planned requirement changes #################### |
|
1002 | ### Verify the validity of the planned requirement changes #################### | |
999 |
|
1003 | |||
1000 |
|
1004 | |||
1001 | def supportremovedrequirements(repo): |
|
1005 | def supportremovedrequirements(repo): | |
1002 | """Obtain requirements that can be removed during an upgrade. |
|
1006 | """Obtain requirements that can be removed during an upgrade. | |
1003 |
|
1007 | |||
1004 | If an upgrade were to create a repository that dropped a requirement, |
|
1008 | If an upgrade were to create a repository that dropped a requirement, | |
1005 | the dropped requirement must appear in the returned set for the upgrade |
|
1009 | the dropped requirement must appear in the returned set for the upgrade | |
1006 | to be allowed. |
|
1010 | to be allowed. | |
1007 | """ |
|
1011 | """ | |
1008 | supported = { |
|
1012 | supported = { | |
1009 | requirements.SPARSEREVLOG_REQUIREMENT, |
|
1013 | requirements.SPARSEREVLOG_REQUIREMENT, | |
1010 | requirements.COPIESSDC_REQUIREMENT, |
|
1014 | requirements.COPIESSDC_REQUIREMENT, | |
1011 | requirements.NODEMAP_REQUIREMENT, |
|
1015 | requirements.NODEMAP_REQUIREMENT, | |
1012 | requirements.SHARESAFE_REQUIREMENT, |
|
1016 | requirements.SHARESAFE_REQUIREMENT, | |
1013 | requirements.REVLOGV2_REQUIREMENT, |
|
1017 | requirements.REVLOGV2_REQUIREMENT, | |
1014 | requirements.CHANGELOGV2_REQUIREMENT, |
|
1018 | requirements.CHANGELOGV2_REQUIREMENT, | |
1015 | requirements.REVLOGV1_REQUIREMENT, |
|
1019 | requirements.REVLOGV1_REQUIREMENT, | |
1016 | requirements.DIRSTATE_TRACKED_HINT_V1, |
|
1020 | requirements.DIRSTATE_TRACKED_HINT_V1, | |
1017 | requirements.DIRSTATE_V2_REQUIREMENT, |
|
1021 | requirements.DIRSTATE_V2_REQUIREMENT, | |
1018 | } |
|
1022 | } | |
1019 | for name in compression.compengines: |
|
1023 | for name in compression.compengines: | |
1020 | engine = compression.compengines[name] |
|
1024 | engine = compression.compengines[name] | |
1021 | if engine.available() and engine.revlogheader(): |
|
1025 | if engine.available() and engine.revlogheader(): | |
1022 | supported.add(b'exp-compression-%s' % name) |
|
1026 | supported.add(b'exp-compression-%s' % name) | |
1023 | if engine.name() == b'zstd': |
|
1027 | if engine.name() == b'zstd': | |
1024 | supported.add(b'revlog-compression-zstd') |
|
1028 | supported.add(b'revlog-compression-zstd') | |
1025 | return supported |
|
1029 | return supported | |
1026 |
|
1030 | |||
1027 |
|
1031 | |||
1028 | def supporteddestrequirements(repo): |
|
1032 | def supporteddestrequirements(repo): | |
1029 | """Obtain requirements that upgrade supports in the destination. |
|
1033 | """Obtain requirements that upgrade supports in the destination. | |
1030 |
|
1034 | |||
1031 | If the result of the upgrade would have requirements not in this set, |
|
1035 | If the result of the upgrade would have requirements not in this set, | |
1032 | the upgrade is disallowed. |
|
1036 | the upgrade is disallowed. | |
1033 |
|
1037 | |||
1034 | Extensions should monkeypatch this to add their custom requirements. |
|
1038 | Extensions should monkeypatch this to add their custom requirements. | |
1035 | """ |
|
1039 | """ | |
1036 | supported = { |
|
1040 | supported = { | |
1037 | requirements.CHANGELOGV2_REQUIREMENT, |
|
1041 | requirements.CHANGELOGV2_REQUIREMENT, | |
1038 | requirements.COPIESSDC_REQUIREMENT, |
|
1042 | requirements.COPIESSDC_REQUIREMENT, | |
1039 | requirements.DIRSTATE_TRACKED_HINT_V1, |
|
1043 | requirements.DIRSTATE_TRACKED_HINT_V1, | |
1040 | requirements.DIRSTATE_V2_REQUIREMENT, |
|
1044 | requirements.DIRSTATE_V2_REQUIREMENT, | |
1041 | requirements.DOTENCODE_REQUIREMENT, |
|
1045 | requirements.DOTENCODE_REQUIREMENT, | |
1042 | requirements.FNCACHE_REQUIREMENT, |
|
1046 | requirements.FNCACHE_REQUIREMENT, | |
1043 | requirements.GENERALDELTA_REQUIREMENT, |
|
1047 | requirements.GENERALDELTA_REQUIREMENT, | |
1044 | requirements.NODEMAP_REQUIREMENT, |
|
1048 | requirements.NODEMAP_REQUIREMENT, | |
1045 | requirements.REVLOGV1_REQUIREMENT, # allowed in case of downgrade |
|
1049 | requirements.REVLOGV1_REQUIREMENT, # allowed in case of downgrade | |
1046 | requirements.REVLOGV2_REQUIREMENT, |
|
1050 | requirements.REVLOGV2_REQUIREMENT, | |
1047 | requirements.SHARED_REQUIREMENT, |
|
1051 | requirements.SHARED_REQUIREMENT, | |
1048 | requirements.SHARESAFE_REQUIREMENT, |
|
1052 | requirements.SHARESAFE_REQUIREMENT, | |
1049 | requirements.SPARSEREVLOG_REQUIREMENT, |
|
1053 | requirements.SPARSEREVLOG_REQUIREMENT, | |
1050 | requirements.STORE_REQUIREMENT, |
|
1054 | requirements.STORE_REQUIREMENT, | |
1051 | requirements.NARROW_REQUIREMENT, |
|
1055 | requirements.NARROW_REQUIREMENT, | |
1052 | } |
|
1056 | } | |
1053 | for name in compression.compengines: |
|
1057 | for name in compression.compengines: | |
1054 | engine = compression.compengines[name] |
|
1058 | engine = compression.compengines[name] | |
1055 | if engine.available() and engine.revlogheader(): |
|
1059 | if engine.available() and engine.revlogheader(): | |
1056 | supported.add(b'exp-compression-%s' % name) |
|
1060 | supported.add(b'exp-compression-%s' % name) | |
1057 | if engine.name() == b'zstd': |
|
1061 | if engine.name() == b'zstd': | |
1058 | supported.add(b'revlog-compression-zstd') |
|
1062 | supported.add(b'revlog-compression-zstd') | |
1059 | return supported |
|
1063 | return supported | |
1060 |
|
1064 | |||
1061 |
|
1065 | |||
1062 | def allowednewrequirements(repo): |
|
1066 | def allowednewrequirements(repo): | |
1063 | """Obtain requirements that can be added to a repository during upgrade. |
|
1067 | """Obtain requirements that can be added to a repository during upgrade. | |
1064 |
|
1068 | |||
1065 | This is used to disallow proposed requirements from being added when |
|
1069 | This is used to disallow proposed requirements from being added when | |
1066 | they weren't present before. |
|
1070 | they weren't present before. | |
1067 |
|
1071 | |||
1068 | We use a list of allowed requirement additions instead of a list of known |
|
1072 | We use a list of allowed requirement additions instead of a list of known | |
1069 | bad additions because the whitelist approach is safer and will prevent |
|
1073 | bad additions because the whitelist approach is safer and will prevent | |
1070 | future, unknown requirements from accidentally being added. |
|
1074 | future, unknown requirements from accidentally being added. | |
1071 | """ |
|
1075 | """ | |
1072 | supported = { |
|
1076 | supported = { | |
1073 | requirements.DOTENCODE_REQUIREMENT, |
|
1077 | requirements.DOTENCODE_REQUIREMENT, | |
1074 | requirements.FNCACHE_REQUIREMENT, |
|
1078 | requirements.FNCACHE_REQUIREMENT, | |
1075 | requirements.GENERALDELTA_REQUIREMENT, |
|
1079 | requirements.GENERALDELTA_REQUIREMENT, | |
1076 | requirements.SPARSEREVLOG_REQUIREMENT, |
|
1080 | requirements.SPARSEREVLOG_REQUIREMENT, | |
1077 | requirements.COPIESSDC_REQUIREMENT, |
|
1081 | requirements.COPIESSDC_REQUIREMENT, | |
1078 | requirements.NODEMAP_REQUIREMENT, |
|
1082 | requirements.NODEMAP_REQUIREMENT, | |
1079 | requirements.SHARESAFE_REQUIREMENT, |
|
1083 | requirements.SHARESAFE_REQUIREMENT, | |
1080 | requirements.REVLOGV1_REQUIREMENT, |
|
1084 | requirements.REVLOGV1_REQUIREMENT, | |
1081 | requirements.REVLOGV2_REQUIREMENT, |
|
1085 | requirements.REVLOGV2_REQUIREMENT, | |
1082 | requirements.CHANGELOGV2_REQUIREMENT, |
|
1086 | requirements.CHANGELOGV2_REQUIREMENT, | |
1083 | requirements.DIRSTATE_TRACKED_HINT_V1, |
|
1087 | requirements.DIRSTATE_TRACKED_HINT_V1, | |
1084 | requirements.DIRSTATE_V2_REQUIREMENT, |
|
1088 | requirements.DIRSTATE_V2_REQUIREMENT, | |
1085 | } |
|
1089 | } | |
1086 | for name in compression.compengines: |
|
1090 | for name in compression.compengines: | |
1087 | engine = compression.compengines[name] |
|
1091 | engine = compression.compengines[name] | |
1088 | if engine.available() and engine.revlogheader(): |
|
1092 | if engine.available() and engine.revlogheader(): | |
1089 | supported.add(b'exp-compression-%s' % name) |
|
1093 | supported.add(b'exp-compression-%s' % name) | |
1090 | if engine.name() == b'zstd': |
|
1094 | if engine.name() == b'zstd': | |
1091 | supported.add(b'revlog-compression-zstd') |
|
1095 | supported.add(b'revlog-compression-zstd') | |
1092 | return supported |
|
1096 | return supported | |
1093 |
|
1097 | |||
1094 |
|
1098 | |||
1095 | def check_requirements_changes(repo, new_reqs): |
|
1099 | def check_requirements_changes(repo, new_reqs): | |
1096 | old_reqs = repo.requirements |
|
1100 | old_reqs = repo.requirements | |
1097 | check_revlog_version(repo.requirements) |
|
1101 | check_revlog_version(repo.requirements) | |
1098 | support_removal = supportremovedrequirements(repo) |
|
1102 | support_removal = supportremovedrequirements(repo) | |
1099 | no_remove_reqs = old_reqs - new_reqs - support_removal |
|
1103 | no_remove_reqs = old_reqs - new_reqs - support_removal | |
1100 | if no_remove_reqs: |
|
1104 | if no_remove_reqs: | |
1101 | msg = _(b'cannot upgrade repository; requirement would be removed: %s') |
|
1105 | msg = _(b'cannot upgrade repository; requirement would be removed: %s') | |
1102 | no_remove_reqs = b', '.join(sorted(no_remove_reqs)) |
|
1106 | no_remove_reqs = b', '.join(sorted(no_remove_reqs)) | |
1103 | raise error.Abort(msg % no_remove_reqs) |
|
1107 | raise error.Abort(msg % no_remove_reqs) | |
1104 |
|
1108 | |||
1105 | support_addition = allowednewrequirements(repo) |
|
1109 | support_addition = allowednewrequirements(repo) | |
1106 | no_add_reqs = new_reqs - old_reqs - support_addition |
|
1110 | no_add_reqs = new_reqs - old_reqs - support_addition | |
1107 | if no_add_reqs: |
|
1111 | if no_add_reqs: | |
1108 | m = _(b'cannot upgrade repository; do not support adding requirement: ') |
|
1112 | m = _(b'cannot upgrade repository; do not support adding requirement: ') | |
1109 | no_add_reqs = b', '.join(sorted(no_add_reqs)) |
|
1113 | no_add_reqs = b', '.join(sorted(no_add_reqs)) | |
1110 | raise error.Abort(m + no_add_reqs) |
|
1114 | raise error.Abort(m + no_add_reqs) | |
1111 |
|
1115 | |||
1112 | supported = supporteddestrequirements(repo) |
|
1116 | supported = supporteddestrequirements(repo) | |
1113 | unsupported_reqs = new_reqs - supported |
|
1117 | unsupported_reqs = new_reqs - supported | |
1114 | if unsupported_reqs: |
|
1118 | if unsupported_reqs: | |
1115 | msg = _( |
|
1119 | msg = _( | |
1116 | b'cannot upgrade repository; do not support destination ' |
|
1120 | b'cannot upgrade repository; do not support destination ' | |
1117 | b'requirement: %s' |
|
1121 | b'requirement: %s' | |
1118 | ) |
|
1122 | ) | |
1119 | unsupported_reqs = b', '.join(sorted(unsupported_reqs)) |
|
1123 | unsupported_reqs = b', '.join(sorted(unsupported_reqs)) | |
1120 | raise error.Abort(msg % unsupported_reqs) |
|
1124 | raise error.Abort(msg % unsupported_reqs) |
@@ -1,2128 +1,2143 | |||||
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 | > [format] |
|
6 | > [format] | |
7 | > # stabilize test accross variant |
|
7 | > # stabilize test accross variant | |
8 | > revlog-compression=zlib |
|
8 | > revlog-compression=zlib | |
9 | > [storage] |
|
9 | > [storage] | |
10 | > dirstate-v2.slow-path=allow |
|
10 | > dirstate-v2.slow-path=allow | |
11 | > EOF |
|
11 | > EOF | |
12 |
|
12 | |||
13 | store and revlogv1 are required in source |
|
13 | store and revlogv1 are required in source | |
14 |
|
14 | |||
15 | $ hg --config format.usestore=false init no-store |
|
15 | $ hg --config format.usestore=false init no-store | |
16 | $ hg -R no-store debugupgraderepo |
|
16 | $ hg -R no-store debugupgraderepo | |
17 | abort: cannot upgrade repository; requirement missing: store |
|
17 | abort: cannot upgrade repository; requirement missing: store | |
18 | [255] |
|
18 | [255] | |
19 |
|
19 | |||
20 | $ hg init no-revlogv1 |
|
20 | $ hg init no-revlogv1 | |
21 | $ cat > no-revlogv1/.hg/requires << EOF |
|
21 | $ cat > no-revlogv1/.hg/requires << EOF | |
22 | > dotencode |
|
22 | > dotencode | |
23 | > fncache |
|
23 | > fncache | |
24 | > generaldelta |
|
24 | > generaldelta | |
25 | > store |
|
25 | > store | |
26 | > EOF |
|
26 | > EOF | |
27 |
|
27 | |||
28 | $ hg -R no-revlogv1 debugupgraderepo |
|
28 | $ hg -R no-revlogv1 debugupgraderepo | |
29 | abort: cannot upgrade repository; missing a revlog version |
|
29 | abort: cannot upgrade repository; missing a revlog version | |
30 | [255] |
|
30 | [255] | |
31 |
|
31 | |||
32 | Cannot upgrade shared repositories |
|
32 | Cannot upgrade shared repositories | |
33 |
|
33 | |||
34 | $ hg init share-parent |
|
34 | $ hg init share-parent | |
35 | $ hg -R share-parent debugbuilddag -n .+9 |
|
35 | $ hg -R share-parent debugbuilddag -n .+9 | |
36 | $ hg -R share-parent up tip |
|
36 | $ hg -R share-parent up tip | |
37 | 10 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
37 | 10 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
38 | $ hg -q share share-parent share-child |
|
38 | $ hg -q share share-parent share-child | |
39 |
|
39 | |||
40 | $ hg -R share-child debugupgraderepo --config format.sparse-revlog=no |
|
40 | $ hg -R share-child debugupgraderepo --config format.sparse-revlog=no | |
41 | abort: cannot use these actions on a share repository: sparserevlog |
|
41 | abort: cannot use these actions on a share repository: sparserevlog | |
42 | (upgrade the main repository directly) |
|
42 | (upgrade the main repository directly) | |
43 | [255] |
|
43 | [255] | |
44 |
|
44 | |||
45 | Unless the action is compatible with share |
|
45 | Unless the action is compatible with share | |
46 |
|
46 | |||
47 | $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=yes --quiet |
|
47 | $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=yes --quiet | |
48 | requirements |
|
48 | requirements | |
49 | preserved: * (glob) |
|
49 | preserved: * (glob) | |
50 | added: dirstate-v2 |
|
50 | added: dirstate-v2 | |
51 |
|
51 | |||
52 | no revlogs to process |
|
52 | no revlogs to process | |
53 |
|
53 | |||
54 |
|
54 | |||
55 | $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=yes --quiet --run |
|
55 | $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=yes --quiet --run | |
56 | upgrade will perform the following actions: |
|
56 | upgrade will perform the following actions: | |
57 |
|
57 | |||
58 | requirements |
|
58 | requirements | |
59 | preserved: * (glob) |
|
59 | preserved: * (glob) | |
60 | added: dirstate-v2 |
|
60 | added: dirstate-v2 | |
61 |
|
61 | |||
62 | no revlogs to process |
|
62 | no revlogs to process | |
63 |
|
63 | |||
64 | $ hg debugformat -R share-child | grep dirstate-v2 |
|
64 | $ hg debugformat -R share-child | grep dirstate-v2 | |
65 | dirstate-v2: yes |
|
65 | dirstate-v2: yes | |
66 | $ hg debugformat -R share-parent | grep dirstate-v2 |
|
66 | $ hg debugformat -R share-parent | grep dirstate-v2 | |
67 | dirstate-v2: no |
|
67 | dirstate-v2: no | |
68 | $ hg status --all -R share-child |
|
68 | $ hg status --all -R share-child | |
69 | C nf0 |
|
69 | C nf0 | |
70 | C nf1 |
|
70 | C nf1 | |
71 | C nf2 |
|
71 | C nf2 | |
72 | C nf3 |
|
72 | C nf3 | |
73 | C nf4 |
|
73 | C nf4 | |
74 | C nf5 |
|
74 | C nf5 | |
75 | C nf6 |
|
75 | C nf6 | |
76 | C nf7 |
|
76 | C nf7 | |
77 | C nf8 |
|
77 | C nf8 | |
78 | C nf9 |
|
78 | C nf9 | |
79 | $ hg log -l 3 -R share-child |
|
79 | $ hg log -l 3 -R share-child | |
80 | changeset: 9:0059eb38e4a4 |
|
80 | changeset: 9:0059eb38e4a4 | |
81 | tag: tip |
|
81 | tag: tip | |
82 | user: debugbuilddag |
|
82 | user: debugbuilddag | |
83 | date: Thu Jan 01 00:00:09 1970 +0000 |
|
83 | date: Thu Jan 01 00:00:09 1970 +0000 | |
84 | summary: r9 |
|
84 | summary: r9 | |
85 |
|
85 | |||
86 | changeset: 8:4d5be70c8130 |
|
86 | changeset: 8:4d5be70c8130 | |
87 | user: debugbuilddag |
|
87 | user: debugbuilddag | |
88 | date: Thu Jan 01 00:00:08 1970 +0000 |
|
88 | date: Thu Jan 01 00:00:08 1970 +0000 | |
89 | summary: r8 |
|
89 | summary: r8 | |
90 |
|
90 | |||
91 | changeset: 7:e60bfe72517e |
|
91 | changeset: 7:e60bfe72517e | |
92 | user: debugbuilddag |
|
92 | user: debugbuilddag | |
93 | date: Thu Jan 01 00:00:07 1970 +0000 |
|
93 | date: Thu Jan 01 00:00:07 1970 +0000 | |
94 | summary: r7 |
|
94 | summary: r7 | |
95 |
|
95 | |||
96 | $ hg status --all -R share-parent |
|
96 | $ hg status --all -R share-parent | |
97 | C nf0 |
|
97 | C nf0 | |
98 | C nf1 |
|
98 | C nf1 | |
99 | C nf2 |
|
99 | C nf2 | |
100 | C nf3 |
|
100 | C nf3 | |
101 | C nf4 |
|
101 | C nf4 | |
102 | C nf5 |
|
102 | C nf5 | |
103 | C nf6 |
|
103 | C nf6 | |
104 | C nf7 |
|
104 | C nf7 | |
105 | C nf8 |
|
105 | C nf8 | |
106 | C nf9 |
|
106 | C nf9 | |
107 | $ hg log -l 3 -R share-parent |
|
107 | $ hg log -l 3 -R share-parent | |
108 | changeset: 9:0059eb38e4a4 |
|
108 | changeset: 9:0059eb38e4a4 | |
109 | tag: tip |
|
109 | tag: tip | |
110 | user: debugbuilddag |
|
110 | user: debugbuilddag | |
111 | date: Thu Jan 01 00:00:09 1970 +0000 |
|
111 | date: Thu Jan 01 00:00:09 1970 +0000 | |
112 | summary: r9 |
|
112 | summary: r9 | |
113 |
|
113 | |||
114 | changeset: 8:4d5be70c8130 |
|
114 | changeset: 8:4d5be70c8130 | |
115 | user: debugbuilddag |
|
115 | user: debugbuilddag | |
116 | date: Thu Jan 01 00:00:08 1970 +0000 |
|
116 | date: Thu Jan 01 00:00:08 1970 +0000 | |
117 | summary: r8 |
|
117 | summary: r8 | |
118 |
|
118 | |||
119 | changeset: 7:e60bfe72517e |
|
119 | changeset: 7:e60bfe72517e | |
120 | user: debugbuilddag |
|
120 | user: debugbuilddag | |
121 | date: Thu Jan 01 00:00:07 1970 +0000 |
|
121 | date: Thu Jan 01 00:00:07 1970 +0000 | |
122 | summary: r7 |
|
122 | summary: r7 | |
123 |
|
123 | |||
124 |
|
124 | |||
125 | $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=no --quiet --run |
|
125 | $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=no --quiet --run | |
126 | upgrade will perform the following actions: |
|
126 | upgrade will perform the following actions: | |
127 |
|
127 | |||
128 | requirements |
|
128 | requirements | |
129 | preserved: * (glob) |
|
129 | preserved: * (glob) | |
130 | removed: dirstate-v2 |
|
130 | removed: dirstate-v2 | |
131 |
|
131 | |||
132 | no revlogs to process |
|
132 | no revlogs to process | |
133 |
|
133 | |||
134 | $ hg debugformat -R share-child | grep dirstate-v2 |
|
134 | $ hg debugformat -R share-child | grep dirstate-v2 | |
135 | dirstate-v2: no |
|
135 | dirstate-v2: no | |
136 | $ hg debugformat -R share-parent | grep dirstate-v2 |
|
136 | $ hg debugformat -R share-parent | grep dirstate-v2 | |
137 | dirstate-v2: no |
|
137 | dirstate-v2: no | |
138 | $ hg status --all -R share-child |
|
138 | $ hg status --all -R share-child | |
139 | C nf0 |
|
139 | C nf0 | |
140 | C nf1 |
|
140 | C nf1 | |
141 | C nf2 |
|
141 | C nf2 | |
142 | C nf3 |
|
142 | C nf3 | |
143 | C nf4 |
|
143 | C nf4 | |
144 | C nf5 |
|
144 | C nf5 | |
145 | C nf6 |
|
145 | C nf6 | |
146 | C nf7 |
|
146 | C nf7 | |
147 | C nf8 |
|
147 | C nf8 | |
148 | C nf9 |
|
148 | C nf9 | |
149 | $ hg log -l 3 -R share-child |
|
149 | $ hg log -l 3 -R share-child | |
150 | changeset: 9:0059eb38e4a4 |
|
150 | changeset: 9:0059eb38e4a4 | |
151 | tag: tip |
|
151 | tag: tip | |
152 | user: debugbuilddag |
|
152 | user: debugbuilddag | |
153 | date: Thu Jan 01 00:00:09 1970 +0000 |
|
153 | date: Thu Jan 01 00:00:09 1970 +0000 | |
154 | summary: r9 |
|
154 | summary: r9 | |
155 |
|
155 | |||
156 | changeset: 8:4d5be70c8130 |
|
156 | changeset: 8:4d5be70c8130 | |
157 | user: debugbuilddag |
|
157 | user: debugbuilddag | |
158 | date: Thu Jan 01 00:00:08 1970 +0000 |
|
158 | date: Thu Jan 01 00:00:08 1970 +0000 | |
159 | summary: r8 |
|
159 | summary: r8 | |
160 |
|
160 | |||
161 | changeset: 7:e60bfe72517e |
|
161 | changeset: 7:e60bfe72517e | |
162 | user: debugbuilddag |
|
162 | user: debugbuilddag | |
163 | date: Thu Jan 01 00:00:07 1970 +0000 |
|
163 | date: Thu Jan 01 00:00:07 1970 +0000 | |
164 | summary: r7 |
|
164 | summary: r7 | |
165 |
|
165 | |||
166 | $ hg status --all -R share-parent |
|
166 | $ hg status --all -R share-parent | |
167 | C nf0 |
|
167 | C nf0 | |
168 | C nf1 |
|
168 | C nf1 | |
169 | C nf2 |
|
169 | C nf2 | |
170 | C nf3 |
|
170 | C nf3 | |
171 | C nf4 |
|
171 | C nf4 | |
172 | C nf5 |
|
172 | C nf5 | |
173 | C nf6 |
|
173 | C nf6 | |
174 | C nf7 |
|
174 | C nf7 | |
175 | C nf8 |
|
175 | C nf8 | |
176 | C nf9 |
|
176 | C nf9 | |
177 | $ hg log -l 3 -R share-parent |
|
177 | $ hg log -l 3 -R share-parent | |
178 | changeset: 9:0059eb38e4a4 |
|
178 | changeset: 9:0059eb38e4a4 | |
179 | tag: tip |
|
179 | tag: tip | |
180 | user: debugbuilddag |
|
180 | user: debugbuilddag | |
181 | date: Thu Jan 01 00:00:09 1970 +0000 |
|
181 | date: Thu Jan 01 00:00:09 1970 +0000 | |
182 | summary: r9 |
|
182 | summary: r9 | |
183 |
|
183 | |||
184 | changeset: 8:4d5be70c8130 |
|
184 | changeset: 8:4d5be70c8130 | |
185 | user: debugbuilddag |
|
185 | user: debugbuilddag | |
186 | date: Thu Jan 01 00:00:08 1970 +0000 |
|
186 | date: Thu Jan 01 00:00:08 1970 +0000 | |
187 | summary: r8 |
|
187 | summary: r8 | |
188 |
|
188 | |||
189 | changeset: 7:e60bfe72517e |
|
189 | changeset: 7:e60bfe72517e | |
190 | user: debugbuilddag |
|
190 | user: debugbuilddag | |
191 | date: Thu Jan 01 00:00:07 1970 +0000 |
|
191 | date: Thu Jan 01 00:00:07 1970 +0000 | |
192 | summary: r7 |
|
192 | summary: r7 | |
193 |
|
193 | |||
194 |
|
194 | |||
195 | Do not yet support upgrading treemanifest repos |
|
195 | Do not yet support upgrading treemanifest repos | |
196 |
|
196 | |||
197 | $ hg --config experimental.treemanifest=true init treemanifest |
|
197 | $ hg --config experimental.treemanifest=true init treemanifest | |
198 | $ hg -R treemanifest debugupgraderepo |
|
198 | $ hg -R treemanifest debugupgraderepo | |
199 | abort: cannot upgrade repository; unsupported source requirement: treemanifest |
|
199 | abort: cannot upgrade repository; unsupported source requirement: treemanifest | |
200 | [255] |
|
200 | [255] | |
201 |
|
201 | |||
202 | Cannot add treemanifest requirement during upgrade |
|
202 | Cannot add treemanifest requirement during upgrade | |
203 |
|
203 | |||
204 | $ hg init disallowaddedreq |
|
204 | $ hg init disallowaddedreq | |
205 | $ hg -R disallowaddedreq --config experimental.treemanifest=true debugupgraderepo |
|
205 | $ hg -R disallowaddedreq --config experimental.treemanifest=true debugupgraderepo | |
206 | abort: cannot upgrade repository; do not support adding requirement: treemanifest |
|
206 | abort: cannot upgrade repository; do not support adding requirement: treemanifest | |
207 | [255] |
|
207 | [255] | |
208 |
|
208 | |||
209 | An upgrade of a repository created with recommended settings only suggests optimizations |
|
209 | An upgrade of a repository created with recommended settings only suggests optimizations | |
210 |
|
210 | |||
211 | $ hg init empty |
|
211 | $ hg init empty | |
212 | $ cd empty |
|
212 | $ cd empty | |
213 | $ hg debugformat |
|
213 | $ hg debugformat | |
214 | format-variant repo |
|
214 | format-variant repo | |
215 | fncache: yes |
|
215 | fncache: yes | |
216 | dirstate-v2: no |
|
216 | dirstate-v2: no | |
217 | tracked-hint: no |
|
217 | tracked-hint: no | |
218 | dotencode: yes |
|
218 | dotencode: yes | |
219 | generaldelta: yes |
|
219 | generaldelta: yes | |
220 | share-safe: yes |
|
220 | share-safe: yes | |
221 | sparserevlog: yes |
|
221 | sparserevlog: yes | |
222 | persistent-nodemap: no (no-rust !) |
|
222 | persistent-nodemap: no (no-rust !) | |
223 | persistent-nodemap: yes (rust !) |
|
223 | persistent-nodemap: yes (rust !) | |
224 | copies-sdc: no |
|
224 | copies-sdc: no | |
225 | revlog-v2: no |
|
225 | revlog-v2: no | |
226 | changelog-v2: no |
|
226 | changelog-v2: no | |
227 | plain-cl-delta: yes |
|
227 | plain-cl-delta: yes | |
228 | compression: zlib |
|
228 | compression: zlib | |
229 | compression-level: default |
|
229 | compression-level: default | |
230 | $ hg debugformat --verbose |
|
230 | $ hg debugformat --verbose | |
231 | format-variant repo config default |
|
231 | format-variant repo config default | |
232 | fncache: yes yes yes |
|
232 | fncache: yes yes yes | |
233 | dirstate-v2: no no no |
|
233 | dirstate-v2: no no no | |
234 | tracked-hint: no no no |
|
234 | tracked-hint: no no no | |
235 | dotencode: yes yes yes |
|
235 | dotencode: yes yes yes | |
236 | generaldelta: yes yes yes |
|
236 | generaldelta: yes yes yes | |
237 | share-safe: yes yes yes |
|
237 | share-safe: yes yes yes | |
238 | sparserevlog: yes yes yes |
|
238 | sparserevlog: yes yes yes | |
239 | persistent-nodemap: no no no (no-rust !) |
|
239 | persistent-nodemap: no no no (no-rust !) | |
240 | persistent-nodemap: yes yes no (rust !) |
|
240 | persistent-nodemap: yes yes no (rust !) | |
241 | copies-sdc: no no no |
|
241 | copies-sdc: no no no | |
242 | revlog-v2: no no no |
|
242 | revlog-v2: no no no | |
243 | changelog-v2: no no no |
|
243 | changelog-v2: no no no | |
244 | plain-cl-delta: yes yes yes |
|
244 | plain-cl-delta: yes yes yes | |
245 | compression: zlib zlib zlib (no-zstd !) |
|
245 | compression: zlib zlib zlib (no-zstd !) | |
246 | compression: zlib zlib zstd (zstd !) |
|
246 | compression: zlib zlib zstd (zstd !) | |
247 | compression-level: default default default |
|
247 | compression-level: default default default | |
248 | $ hg debugformat --verbose --config format.usefncache=no |
|
248 | $ hg debugformat --verbose --config format.usefncache=no | |
249 | format-variant repo config default |
|
249 | format-variant repo config default | |
250 | fncache: yes no yes |
|
250 | fncache: yes no yes | |
251 | dirstate-v2: no no no |
|
251 | dirstate-v2: no no no | |
252 | tracked-hint: no no no |
|
252 | tracked-hint: no no no | |
253 | dotencode: yes no yes |
|
253 | dotencode: yes no yes | |
254 | generaldelta: yes yes yes |
|
254 | generaldelta: yes yes yes | |
255 | share-safe: yes yes yes |
|
255 | share-safe: yes yes yes | |
256 | sparserevlog: yes yes yes |
|
256 | sparserevlog: yes yes yes | |
257 | persistent-nodemap: no no no (no-rust !) |
|
257 | persistent-nodemap: no no no (no-rust !) | |
258 | persistent-nodemap: yes yes no (rust !) |
|
258 | persistent-nodemap: yes yes no (rust !) | |
259 | copies-sdc: no no no |
|
259 | copies-sdc: no no no | |
260 | revlog-v2: no no no |
|
260 | revlog-v2: no no no | |
261 | changelog-v2: no no no |
|
261 | changelog-v2: no no no | |
262 | plain-cl-delta: yes yes yes |
|
262 | plain-cl-delta: yes yes yes | |
263 | compression: zlib zlib zlib (no-zstd !) |
|
263 | compression: zlib zlib zlib (no-zstd !) | |
264 | compression: zlib zlib zstd (zstd !) |
|
264 | compression: zlib zlib zstd (zstd !) | |
265 | compression-level: default default default |
|
265 | compression-level: default default default | |
266 | $ hg debugformat --verbose --config format.usefncache=no --color=debug |
|
266 | $ hg debugformat --verbose --config format.usefncache=no --color=debug | |
267 | format-variant repo config default |
|
267 | format-variant repo config default | |
268 | [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes] |
|
268 | [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes] | |
269 | [formatvariant.name.uptodate|dirstate-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
269 | [formatvariant.name.uptodate|dirstate-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
270 | [formatvariant.name.uptodate|tracked-hint: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
270 | [formatvariant.name.uptodate|tracked-hint: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
271 | [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes] |
|
271 | [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes] | |
272 | [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
272 | [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | |
273 | [formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
273 | [formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | |
274 | [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
274 | [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | |
275 | [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !) |
|
275 | [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !) | |
276 | [formatvariant.name.mismatchdefault|persistent-nodemap:][formatvariant.repo.mismatchdefault| yes][formatvariant.config.special| yes][formatvariant.default| no] (rust !) |
|
276 | [formatvariant.name.mismatchdefault|persistent-nodemap:][formatvariant.repo.mismatchdefault| yes][formatvariant.config.special| yes][formatvariant.default| no] (rust !) | |
277 | [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
277 | [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
278 | [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
278 | [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
279 | [formatvariant.name.uptodate|changelog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
279 | [formatvariant.name.uptodate|changelog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
280 | [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
280 | [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | |
281 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !) |
|
281 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !) | |
282 | [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !) |
|
282 | [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !) | |
283 | [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default] |
|
283 | [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default] | |
284 | $ hg debugformat -Tjson |
|
284 | $ hg debugformat -Tjson | |
285 | [ |
|
285 | [ | |
286 | { |
|
286 | { | |
287 | "config": true, |
|
287 | "config": true, | |
288 | "default": true, |
|
288 | "default": true, | |
289 | "name": "fncache", |
|
289 | "name": "fncache", | |
290 | "repo": true |
|
290 | "repo": true | |
291 | }, |
|
291 | }, | |
292 | { |
|
292 | { | |
293 | "config": false, |
|
293 | "config": false, | |
294 | "default": false, |
|
294 | "default": false, | |
295 | "name": "dirstate-v2", |
|
295 | "name": "dirstate-v2", | |
296 | "repo": false |
|
296 | "repo": false | |
297 | }, |
|
297 | }, | |
298 | { |
|
298 | { | |
299 | "config": false, |
|
299 | "config": false, | |
300 | "default": false, |
|
300 | "default": false, | |
301 | "name": "tracked-hint", |
|
301 | "name": "tracked-hint", | |
302 | "repo": false |
|
302 | "repo": false | |
303 | }, |
|
303 | }, | |
304 | { |
|
304 | { | |
305 | "config": true, |
|
305 | "config": true, | |
306 | "default": true, |
|
306 | "default": true, | |
307 | "name": "dotencode", |
|
307 | "name": "dotencode", | |
308 | "repo": true |
|
308 | "repo": true | |
309 | }, |
|
309 | }, | |
310 | { |
|
310 | { | |
311 | "config": true, |
|
311 | "config": true, | |
312 | "default": true, |
|
312 | "default": true, | |
313 | "name": "generaldelta", |
|
313 | "name": "generaldelta", | |
314 | "repo": true |
|
314 | "repo": true | |
315 | }, |
|
315 | }, | |
316 | { |
|
316 | { | |
317 | "config": true, |
|
317 | "config": true, | |
318 | "default": true, |
|
318 | "default": true, | |
319 | "name": "share-safe", |
|
319 | "name": "share-safe", | |
320 | "repo": true |
|
320 | "repo": true | |
321 | }, |
|
321 | }, | |
322 | { |
|
322 | { | |
323 | "config": true, |
|
323 | "config": true, | |
324 | "default": true, |
|
324 | "default": true, | |
325 | "name": "sparserevlog", |
|
325 | "name": "sparserevlog", | |
326 | "repo": true |
|
326 | "repo": true | |
327 | }, |
|
327 | }, | |
328 | { |
|
328 | { | |
329 | "config": false, (no-rust !) |
|
329 | "config": false, (no-rust !) | |
330 | "config": true, (rust !) |
|
330 | "config": true, (rust !) | |
331 | "default": false, |
|
331 | "default": false, | |
332 | "name": "persistent-nodemap", |
|
332 | "name": "persistent-nodemap", | |
333 | "repo": false (no-rust !) |
|
333 | "repo": false (no-rust !) | |
334 | "repo": true (rust !) |
|
334 | "repo": true (rust !) | |
335 | }, |
|
335 | }, | |
336 | { |
|
336 | { | |
337 | "config": false, |
|
337 | "config": false, | |
338 | "default": false, |
|
338 | "default": false, | |
339 | "name": "copies-sdc", |
|
339 | "name": "copies-sdc", | |
340 | "repo": false |
|
340 | "repo": false | |
341 | }, |
|
341 | }, | |
342 | { |
|
342 | { | |
343 | "config": false, |
|
343 | "config": false, | |
344 | "default": false, |
|
344 | "default": false, | |
345 | "name": "revlog-v2", |
|
345 | "name": "revlog-v2", | |
346 | "repo": false |
|
346 | "repo": false | |
347 | }, |
|
347 | }, | |
348 | { |
|
348 | { | |
349 | "config": false, |
|
349 | "config": false, | |
350 | "default": false, |
|
350 | "default": false, | |
351 | "name": "changelog-v2", |
|
351 | "name": "changelog-v2", | |
352 | "repo": false |
|
352 | "repo": false | |
353 | }, |
|
353 | }, | |
354 | { |
|
354 | { | |
355 | "config": true, |
|
355 | "config": true, | |
356 | "default": true, |
|
356 | "default": true, | |
357 | "name": "plain-cl-delta", |
|
357 | "name": "plain-cl-delta", | |
358 | "repo": true |
|
358 | "repo": true | |
359 | }, |
|
359 | }, | |
360 | { |
|
360 | { | |
361 | "config": "zlib", |
|
361 | "config": "zlib", | |
362 | "default": "zlib", (no-zstd !) |
|
362 | "default": "zlib", (no-zstd !) | |
363 | "default": "zstd", (zstd !) |
|
363 | "default": "zstd", (zstd !) | |
364 | "name": "compression", |
|
364 | "name": "compression", | |
365 | "repo": "zlib" |
|
365 | "repo": "zlib" | |
366 | }, |
|
366 | }, | |
367 | { |
|
367 | { | |
368 | "config": "default", |
|
368 | "config": "default", | |
369 | "default": "default", |
|
369 | "default": "default", | |
370 | "name": "compression-level", |
|
370 | "name": "compression-level", | |
371 | "repo": "default" |
|
371 | "repo": "default" | |
372 | } |
|
372 | } | |
373 | ] |
|
373 | ] | |
374 | $ hg debugupgraderepo |
|
374 | $ hg debugupgraderepo | |
375 | (no format upgrades found in existing repository) |
|
375 | (no format upgrades found in existing repository) | |
376 | performing an upgrade with "--run" will make the following changes: |
|
376 | performing an upgrade with "--run" will make the following changes: | |
377 |
|
377 | |||
378 | requirements |
|
378 | requirements | |
379 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
379 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
380 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
380 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
381 |
|
381 | |||
382 | no revlogs to process |
|
382 | no revlogs to process | |
383 |
|
383 | |||
384 | additional optimizations are available by specifying "--optimize <name>": |
|
384 | additional optimizations are available by specifying "--optimize <name>": | |
385 |
|
385 | |||
386 | re-delta-parent |
|
386 | re-delta-parent | |
387 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower |
|
387 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower | |
388 |
|
388 | |||
389 | re-delta-multibase |
|
389 | re-delta-multibase | |
390 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges |
|
390 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges | |
391 |
|
391 | |||
392 | re-delta-all |
|
392 | re-delta-all | |
393 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed |
|
393 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed | |
394 |
|
394 | |||
395 | re-delta-fulladd |
|
395 | re-delta-fulladd | |
396 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. |
|
396 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. | |
397 |
|
397 | |||
398 |
|
398 | |||
399 | $ hg debugupgraderepo --quiet |
|
399 | $ hg debugupgraderepo --quiet | |
400 | requirements |
|
400 | requirements | |
401 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
401 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
402 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
402 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
403 |
|
403 | |||
404 | no revlogs to process |
|
404 | no revlogs to process | |
405 |
|
405 | |||
406 |
|
406 | |||
407 | --optimize can be used to add optimizations |
|
407 | --optimize can be used to add optimizations | |
408 |
|
408 | |||
409 | $ hg debugupgrade --optimize 're-delta-parent' |
|
409 | $ hg debugupgrade --optimize 're-delta-parent' | |
410 | (no format upgrades found in existing repository) |
|
410 | (no format upgrades found in existing repository) | |
411 | performing an upgrade with "--run" will make the following changes: |
|
411 | performing an upgrade with "--run" will make the following changes: | |
412 |
|
412 | |||
413 | requirements |
|
413 | requirements | |
414 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
414 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
415 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
415 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
416 |
|
416 | |||
417 | optimisations: re-delta-parent |
|
417 | optimisations: re-delta-parent | |
418 |
|
418 | |||
419 | re-delta-parent |
|
419 | re-delta-parent | |
420 | deltas within internal storage will choose a new base revision if needed |
|
420 | deltas within internal storage will choose a new base revision if needed | |
421 |
|
421 | |||
422 | processed revlogs: |
|
422 | processed revlogs: | |
423 | - all-filelogs |
|
423 | - all-filelogs | |
424 | - changelog |
|
424 | - changelog | |
425 | - manifest |
|
425 | - manifest | |
426 |
|
426 | |||
427 | additional optimizations are available by specifying "--optimize <name>": |
|
427 | additional optimizations are available by specifying "--optimize <name>": | |
428 |
|
428 | |||
429 | re-delta-multibase |
|
429 | re-delta-multibase | |
430 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges |
|
430 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges | |
431 |
|
431 | |||
432 | re-delta-all |
|
432 | re-delta-all | |
433 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed |
|
433 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed | |
434 |
|
434 | |||
435 | re-delta-fulladd |
|
435 | re-delta-fulladd | |
436 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. |
|
436 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. | |
437 |
|
437 | |||
438 |
|
438 | |||
439 | modern form of the option |
|
439 | modern form of the option | |
440 |
|
440 | |||
441 | $ hg debugupgrade --optimize re-delta-parent |
|
441 | $ hg debugupgrade --optimize re-delta-parent | |
442 | (no format upgrades found in existing repository) |
|
442 | (no format upgrades found in existing repository) | |
443 | performing an upgrade with "--run" will make the following changes: |
|
443 | performing an upgrade with "--run" will make the following changes: | |
444 |
|
444 | |||
445 | requirements |
|
445 | requirements | |
446 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
446 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
447 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
447 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
448 |
|
448 | |||
449 | optimisations: re-delta-parent |
|
449 | optimisations: re-delta-parent | |
450 |
|
450 | |||
451 | re-delta-parent |
|
451 | re-delta-parent | |
452 | deltas within internal storage will choose a new base revision if needed |
|
452 | deltas within internal storage will choose a new base revision if needed | |
453 |
|
453 | |||
454 | processed revlogs: |
|
454 | processed revlogs: | |
455 | - all-filelogs |
|
455 | - all-filelogs | |
456 | - changelog |
|
456 | - changelog | |
457 | - manifest |
|
457 | - manifest | |
458 |
|
458 | |||
459 | additional optimizations are available by specifying "--optimize <name>": |
|
459 | additional optimizations are available by specifying "--optimize <name>": | |
460 |
|
460 | |||
461 | re-delta-multibase |
|
461 | re-delta-multibase | |
462 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges |
|
462 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges | |
463 |
|
463 | |||
464 | re-delta-all |
|
464 | re-delta-all | |
465 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed |
|
465 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed | |
466 |
|
466 | |||
467 | re-delta-fulladd |
|
467 | re-delta-fulladd | |
468 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. |
|
468 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. | |
469 |
|
469 | |||
|
470 | ||||
470 | $ hg debugupgrade --optimize re-delta-parent --quiet |
|
471 | $ hg debugupgrade --optimize re-delta-parent --quiet | |
471 | requirements |
|
472 | requirements | |
472 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
473 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
473 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
474 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
474 |
|
475 | |||
475 | optimisations: re-delta-parent |
|
476 | optimisations: re-delta-parent | |
476 |
|
477 | |||
477 | processed revlogs: |
|
478 | processed revlogs: | |
478 | - all-filelogs |
|
479 | - all-filelogs | |
479 | - changelog |
|
480 | - changelog | |
480 | - manifest |
|
481 | - manifest | |
481 |
|
482 | |||
482 |
|
483 | |||
|
484 | passing multiple optimization: | |||
|
485 | ||||
|
486 | $ hg debugupgrade --optimize re-delta-parent --optimize re-delta-multibase --quiet | |||
|
487 | requirements | |||
|
488 | preserved: * (glob) | |||
|
489 | ||||
|
490 | optimisations: re-delta-multibase, re-delta-parent | |||
|
491 | ||||
|
492 | processed revlogs: | |||
|
493 | - all-filelogs | |||
|
494 | - changelog | |||
|
495 | - manifest | |||
|
496 | ||||
|
497 | ||||
483 | unknown optimization: |
|
498 | unknown optimization: | |
484 |
|
499 | |||
485 | $ hg debugupgrade --optimize foobar |
|
500 | $ hg debugupgrade --optimize foobar | |
486 | abort: unknown optimization action requested: foobar |
|
501 | abort: unknown optimization action requested: foobar | |
487 | (run without arguments to see valid optimizations) |
|
502 | (run without arguments to see valid optimizations) | |
488 | [255] |
|
503 | [255] | |
489 |
|
504 | |||
490 | Various sub-optimal detections work |
|
505 | Various sub-optimal detections work | |
491 |
|
506 | |||
492 | $ cat > .hg/requires << EOF |
|
507 | $ cat > .hg/requires << EOF | |
493 | > revlogv1 |
|
508 | > revlogv1 | |
494 | > store |
|
509 | > store | |
495 | > EOF |
|
510 | > EOF | |
496 |
|
511 | |||
497 | $ hg debugformat |
|
512 | $ hg debugformat | |
498 | format-variant repo |
|
513 | format-variant repo | |
499 | fncache: no |
|
514 | fncache: no | |
500 | dirstate-v2: no |
|
515 | dirstate-v2: no | |
501 | tracked-hint: no |
|
516 | tracked-hint: no | |
502 | dotencode: no |
|
517 | dotencode: no | |
503 | generaldelta: no |
|
518 | generaldelta: no | |
504 | share-safe: no |
|
519 | share-safe: no | |
505 | sparserevlog: no |
|
520 | sparserevlog: no | |
506 | persistent-nodemap: no |
|
521 | persistent-nodemap: no | |
507 | copies-sdc: no |
|
522 | copies-sdc: no | |
508 | revlog-v2: no |
|
523 | revlog-v2: no | |
509 | changelog-v2: no |
|
524 | changelog-v2: no | |
510 | plain-cl-delta: yes |
|
525 | plain-cl-delta: yes | |
511 | compression: zlib |
|
526 | compression: zlib | |
512 | compression-level: default |
|
527 | compression-level: default | |
513 | $ hg debugformat --verbose |
|
528 | $ hg debugformat --verbose | |
514 | format-variant repo config default |
|
529 | format-variant repo config default | |
515 | fncache: no yes yes |
|
530 | fncache: no yes yes | |
516 | dirstate-v2: no no no |
|
531 | dirstate-v2: no no no | |
517 | tracked-hint: no no no |
|
532 | tracked-hint: no no no | |
518 | dotencode: no yes yes |
|
533 | dotencode: no yes yes | |
519 | generaldelta: no yes yes |
|
534 | generaldelta: no yes yes | |
520 | share-safe: no yes yes |
|
535 | share-safe: no yes yes | |
521 | sparserevlog: no yes yes |
|
536 | sparserevlog: no yes yes | |
522 | persistent-nodemap: no no no (no-rust !) |
|
537 | persistent-nodemap: no no no (no-rust !) | |
523 | persistent-nodemap: no yes no (rust !) |
|
538 | persistent-nodemap: no yes no (rust !) | |
524 | copies-sdc: no no no |
|
539 | copies-sdc: no no no | |
525 | revlog-v2: no no no |
|
540 | revlog-v2: no no no | |
526 | changelog-v2: no no no |
|
541 | changelog-v2: no no no | |
527 | plain-cl-delta: yes yes yes |
|
542 | plain-cl-delta: yes yes yes | |
528 | compression: zlib zlib zlib (no-zstd !) |
|
543 | compression: zlib zlib zlib (no-zstd !) | |
529 | compression: zlib zlib zstd (zstd !) |
|
544 | compression: zlib zlib zstd (zstd !) | |
530 | compression-level: default default default |
|
545 | compression-level: default default default | |
531 | $ hg debugformat --verbose --config format.usegeneraldelta=no |
|
546 | $ hg debugformat --verbose --config format.usegeneraldelta=no | |
532 | format-variant repo config default |
|
547 | format-variant repo config default | |
533 | fncache: no yes yes |
|
548 | fncache: no yes yes | |
534 | dirstate-v2: no no no |
|
549 | dirstate-v2: no no no | |
535 | tracked-hint: no no no |
|
550 | tracked-hint: no no no | |
536 | dotencode: no yes yes |
|
551 | dotencode: no yes yes | |
537 | generaldelta: no no yes |
|
552 | generaldelta: no no yes | |
538 | share-safe: no yes yes |
|
553 | share-safe: no yes yes | |
539 | sparserevlog: no no yes |
|
554 | sparserevlog: no no yes | |
540 | persistent-nodemap: no no no (no-rust !) |
|
555 | persistent-nodemap: no no no (no-rust !) | |
541 | persistent-nodemap: no yes no (rust !) |
|
556 | persistent-nodemap: no yes no (rust !) | |
542 | copies-sdc: no no no |
|
557 | copies-sdc: no no no | |
543 | revlog-v2: no no no |
|
558 | revlog-v2: no no no | |
544 | changelog-v2: no no no |
|
559 | changelog-v2: no no no | |
545 | plain-cl-delta: yes yes yes |
|
560 | plain-cl-delta: yes yes yes | |
546 | compression: zlib zlib zlib (no-zstd !) |
|
561 | compression: zlib zlib zlib (no-zstd !) | |
547 | compression: zlib zlib zstd (zstd !) |
|
562 | compression: zlib zlib zstd (zstd !) | |
548 | compression-level: default default default |
|
563 | compression-level: default default default | |
549 | $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug |
|
564 | $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug | |
550 | format-variant repo config default |
|
565 | format-variant repo config default | |
551 | [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] |
|
566 | [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] | |
552 | [formatvariant.name.uptodate|dirstate-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
567 | [formatvariant.name.uptodate|dirstate-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
553 | [formatvariant.name.uptodate|tracked-hint: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
568 | [formatvariant.name.uptodate|tracked-hint: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
554 | [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] |
|
569 | [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] | |
555 | [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] |
|
570 | [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] | |
556 | [formatvariant.name.mismatchconfig|share-safe: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] |
|
571 | [formatvariant.name.mismatchconfig|share-safe: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] | |
557 | [formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] |
|
572 | [formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] | |
558 | [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !) |
|
573 | [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !) | |
559 | [formatvariant.name.mismatchconfig|persistent-nodemap:][formatvariant.repo.mismatchconfig| no][formatvariant.config.special| yes][formatvariant.default| no] (rust !) |
|
574 | [formatvariant.name.mismatchconfig|persistent-nodemap:][formatvariant.repo.mismatchconfig| no][formatvariant.config.special| yes][formatvariant.default| no] (rust !) | |
560 | [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
575 | [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
561 | [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
576 | [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
562 | [formatvariant.name.uptodate|changelog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
577 | [formatvariant.name.uptodate|changelog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
563 | [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
578 | [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | |
564 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !) |
|
579 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !) | |
565 | [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !) |
|
580 | [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !) | |
566 | [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default] |
|
581 | [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default] | |
567 | $ hg debugupgraderepo |
|
582 | $ hg debugupgraderepo | |
568 | note: selecting all-filelogs for processing to change: dotencode |
|
583 | note: selecting all-filelogs for processing to change: dotencode | |
569 | note: selecting all-manifestlogs for processing to change: dotencode |
|
584 | note: selecting all-manifestlogs for processing to change: dotencode | |
570 | note: selecting changelog for processing to change: dotencode |
|
585 | note: selecting changelog for processing to change: dotencode | |
571 |
|
586 | |||
572 | repository lacks features recommended by current config options: |
|
587 | repository lacks features recommended by current config options: | |
573 |
|
588 | |||
574 | fncache |
|
589 | fncache | |
575 | long and reserved filenames may not work correctly; repository performance is sub-optimal |
|
590 | long and reserved filenames may not work correctly; repository performance is sub-optimal | |
576 |
|
591 | |||
577 | dotencode |
|
592 | dotencode | |
578 | storage of filenames beginning with a period or space may not work correctly |
|
593 | storage of filenames beginning with a period or space may not work correctly | |
579 |
|
594 | |||
580 | generaldelta |
|
595 | generaldelta | |
581 | deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower |
|
596 | deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower | |
582 |
|
597 | |||
583 | share-safe |
|
598 | share-safe | |
584 | old shared repositories do not share source repository requirements and config. This leads to various problems when the source repository format is upgraded or some new extensions are enabled. |
|
599 | old shared repositories do not share source repository requirements and config. This leads to various problems when the source repository format is upgraded or some new extensions are enabled. | |
585 |
|
600 | |||
586 | sparserevlog |
|
601 | sparserevlog | |
587 | in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange. |
|
602 | in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange. | |
588 |
|
603 | |||
589 | persistent-nodemap (rust !) |
|
604 | persistent-nodemap (rust !) | |
590 | persist the node -> rev mapping on disk to speedup lookup (rust !) |
|
605 | persist the node -> rev mapping on disk to speedup lookup (rust !) | |
591 | (rust !) |
|
606 | (rust !) | |
592 |
|
607 | |||
593 | performing an upgrade with "--run" will make the following changes: |
|
608 | performing an upgrade with "--run" will make the following changes: | |
594 |
|
609 | |||
595 | requirements |
|
610 | requirements | |
596 | preserved: revlogv1, store |
|
611 | preserved: revlogv1, store | |
597 | added: dotencode, fncache, generaldelta, share-safe, sparserevlog (no-rust !) |
|
612 | added: dotencode, fncache, generaldelta, share-safe, sparserevlog (no-rust !) | |
598 | added: dotencode, fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !) |
|
613 | added: dotencode, fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !) | |
599 |
|
614 | |||
600 | fncache |
|
615 | fncache | |
601 | repository will be more resilient to storing certain paths and performance of certain operations should be improved |
|
616 | repository will be more resilient to storing certain paths and performance of certain operations should be improved | |
602 |
|
617 | |||
603 | dotencode |
|
618 | dotencode | |
604 | repository will be better able to store files beginning with a space or period |
|
619 | repository will be better able to store files beginning with a space or period | |
605 |
|
620 | |||
606 | generaldelta |
|
621 | generaldelta | |
607 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster |
|
622 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster | |
608 |
|
623 | |||
609 | share-safe |
|
624 | share-safe | |
610 | Upgrades a repository to share-safe format so that future shares of this repository share its requirements and configs. |
|
625 | Upgrades a repository to share-safe format so that future shares of this repository share its requirements and configs. | |
611 |
|
626 | |||
612 | sparserevlog |
|
627 | sparserevlog | |
613 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. |
|
628 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. | |
614 |
|
629 | |||
615 | persistent-nodemap (rust !) |
|
630 | persistent-nodemap (rust !) | |
616 | Speedup revision lookup by node id. (rust !) |
|
631 | Speedup revision lookup by node id. (rust !) | |
617 | (rust !) |
|
632 | (rust !) | |
618 | processed revlogs: |
|
633 | processed revlogs: | |
619 | - all-filelogs |
|
634 | - all-filelogs | |
620 | - changelog |
|
635 | - changelog | |
621 | - manifest |
|
636 | - manifest | |
622 |
|
637 | |||
623 | additional optimizations are available by specifying "--optimize <name>": |
|
638 | additional optimizations are available by specifying "--optimize <name>": | |
624 |
|
639 | |||
625 | re-delta-parent |
|
640 | re-delta-parent | |
626 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower |
|
641 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower | |
627 |
|
642 | |||
628 | re-delta-multibase |
|
643 | re-delta-multibase | |
629 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges |
|
644 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges | |
630 |
|
645 | |||
631 | re-delta-all |
|
646 | re-delta-all | |
632 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed |
|
647 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed | |
633 |
|
648 | |||
634 | re-delta-fulladd |
|
649 | re-delta-fulladd | |
635 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. |
|
650 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. | |
636 |
|
651 | |||
637 | $ hg debugupgraderepo --quiet |
|
652 | $ hg debugupgraderepo --quiet | |
638 | requirements |
|
653 | requirements | |
639 | preserved: revlogv1, store |
|
654 | preserved: revlogv1, store | |
640 | added: dotencode, fncache, generaldelta, share-safe, sparserevlog (no-rust !) |
|
655 | added: dotencode, fncache, generaldelta, share-safe, sparserevlog (no-rust !) | |
641 | added: dotencode, fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !) |
|
656 | added: dotencode, fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !) | |
642 |
|
657 | |||
643 | processed revlogs: |
|
658 | processed revlogs: | |
644 | - all-filelogs |
|
659 | - all-filelogs | |
645 | - changelog |
|
660 | - changelog | |
646 | - manifest |
|
661 | - manifest | |
647 |
|
662 | |||
648 |
|
663 | |||
649 | $ hg --config format.dotencode=false debugupgraderepo |
|
664 | $ hg --config format.dotencode=false debugupgraderepo | |
650 | note: selecting all-filelogs for processing to change: fncache |
|
665 | note: selecting all-filelogs for processing to change: fncache | |
651 | note: selecting all-manifestlogs for processing to change: fncache |
|
666 | note: selecting all-manifestlogs for processing to change: fncache | |
652 | note: selecting changelog for processing to change: fncache |
|
667 | note: selecting changelog for processing to change: fncache | |
653 |
|
668 | |||
654 | repository lacks features recommended by current config options: |
|
669 | repository lacks features recommended by current config options: | |
655 |
|
670 | |||
656 | fncache |
|
671 | fncache | |
657 | long and reserved filenames may not work correctly; repository performance is sub-optimal |
|
672 | long and reserved filenames may not work correctly; repository performance is sub-optimal | |
658 |
|
673 | |||
659 | generaldelta |
|
674 | generaldelta | |
660 | deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower |
|
675 | deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower | |
661 |
|
676 | |||
662 | share-safe |
|
677 | share-safe | |
663 | old shared repositories do not share source repository requirements and config. This leads to various problems when the source repository format is upgraded or some new extensions are enabled. |
|
678 | old shared repositories do not share source repository requirements and config. This leads to various problems when the source repository format is upgraded or some new extensions are enabled. | |
664 |
|
679 | |||
665 | sparserevlog |
|
680 | sparserevlog | |
666 | in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange. |
|
681 | in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange. | |
667 |
|
682 | |||
668 | persistent-nodemap (rust !) |
|
683 | persistent-nodemap (rust !) | |
669 | persist the node -> rev mapping on disk to speedup lookup (rust !) |
|
684 | persist the node -> rev mapping on disk to speedup lookup (rust !) | |
670 | (rust !) |
|
685 | (rust !) | |
671 | repository lacks features used by the default config options: |
|
686 | repository lacks features used by the default config options: | |
672 |
|
687 | |||
673 | dotencode |
|
688 | dotencode | |
674 | storage of filenames beginning with a period or space may not work correctly |
|
689 | storage of filenames beginning with a period or space may not work correctly | |
675 |
|
690 | |||
676 |
|
691 | |||
677 | performing an upgrade with "--run" will make the following changes: |
|
692 | performing an upgrade with "--run" will make the following changes: | |
678 |
|
693 | |||
679 | requirements |
|
694 | requirements | |
680 | preserved: revlogv1, store |
|
695 | preserved: revlogv1, store | |
681 | added: fncache, generaldelta, share-safe, sparserevlog (no-rust !) |
|
696 | added: fncache, generaldelta, share-safe, sparserevlog (no-rust !) | |
682 | added: fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !) |
|
697 | added: fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !) | |
683 |
|
698 | |||
684 | fncache |
|
699 | fncache | |
685 | repository will be more resilient to storing certain paths and performance of certain operations should be improved |
|
700 | repository will be more resilient to storing certain paths and performance of certain operations should be improved | |
686 |
|
701 | |||
687 | generaldelta |
|
702 | generaldelta | |
688 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster |
|
703 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster | |
689 |
|
704 | |||
690 | share-safe |
|
705 | share-safe | |
691 | Upgrades a repository to share-safe format so that future shares of this repository share its requirements and configs. |
|
706 | Upgrades a repository to share-safe format so that future shares of this repository share its requirements and configs. | |
692 |
|
707 | |||
693 | sparserevlog |
|
708 | sparserevlog | |
694 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. |
|
709 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. | |
695 |
|
710 | |||
696 | persistent-nodemap (rust !) |
|
711 | persistent-nodemap (rust !) | |
697 | Speedup revision lookup by node id. (rust !) |
|
712 | Speedup revision lookup by node id. (rust !) | |
698 | (rust !) |
|
713 | (rust !) | |
699 | processed revlogs: |
|
714 | processed revlogs: | |
700 | - all-filelogs |
|
715 | - all-filelogs | |
701 | - changelog |
|
716 | - changelog | |
702 | - manifest |
|
717 | - manifest | |
703 |
|
718 | |||
704 | additional optimizations are available by specifying "--optimize <name>": |
|
719 | additional optimizations are available by specifying "--optimize <name>": | |
705 |
|
720 | |||
706 | re-delta-parent |
|
721 | re-delta-parent | |
707 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower |
|
722 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower | |
708 |
|
723 | |||
709 | re-delta-multibase |
|
724 | re-delta-multibase | |
710 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges |
|
725 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges | |
711 |
|
726 | |||
712 | re-delta-all |
|
727 | re-delta-all | |
713 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed |
|
728 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed | |
714 |
|
729 | |||
715 | re-delta-fulladd |
|
730 | re-delta-fulladd | |
716 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. |
|
731 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. | |
717 |
|
732 | |||
718 |
|
733 | |||
719 | $ cd .. |
|
734 | $ cd .. | |
720 |
|
735 | |||
721 | Upgrading a repository that is already modern essentially no-ops |
|
736 | Upgrading a repository that is already modern essentially no-ops | |
722 |
|
737 | |||
723 | $ hg init modern |
|
738 | $ hg init modern | |
724 | $ hg -R modern debugupgraderepo --run |
|
739 | $ hg -R modern debugupgraderepo --run | |
725 | nothing to do |
|
740 | nothing to do | |
726 |
|
741 | |||
727 | Upgrading a repository to generaldelta works |
|
742 | Upgrading a repository to generaldelta works | |
728 |
|
743 | |||
729 | $ hg --config format.usegeneraldelta=false init upgradegd |
|
744 | $ hg --config format.usegeneraldelta=false init upgradegd | |
730 | $ cd upgradegd |
|
745 | $ cd upgradegd | |
731 | $ touch f0 |
|
746 | $ touch f0 | |
732 | $ hg -q commit -A -m initial |
|
747 | $ hg -q commit -A -m initial | |
733 | $ mkdir FooBarDirectory.d |
|
748 | $ mkdir FooBarDirectory.d | |
734 | $ touch FooBarDirectory.d/f1 |
|
749 | $ touch FooBarDirectory.d/f1 | |
735 | $ hg -q commit -A -m 'add f1' |
|
750 | $ hg -q commit -A -m 'add f1' | |
736 | $ hg -q up -r 0 |
|
751 | $ hg -q up -r 0 | |
737 | >>> import random |
|
752 | >>> import random | |
738 | >>> random.seed(0) # have a reproducible content |
|
753 | >>> random.seed(0) # have a reproducible content | |
739 | >>> with open("f2", "wb") as f: |
|
754 | >>> with open("f2", "wb") as f: | |
740 | ... for i in range(100000): |
|
755 | ... for i in range(100000): | |
741 | ... f.write(b"%d\n" % random.randint(1000000000, 9999999999)) and None |
|
756 | ... f.write(b"%d\n" % random.randint(1000000000, 9999999999)) and None | |
742 | $ hg -q commit -A -m 'add f2' |
|
757 | $ hg -q commit -A -m 'add f2' | |
743 |
|
758 | |||
744 | make sure we have a .d file |
|
759 | make sure we have a .d file | |
745 |
|
760 | |||
746 | $ ls -d .hg/store/data/* |
|
761 | $ ls -d .hg/store/data/* | |
747 | .hg/store/data/_foo_bar_directory.d.hg |
|
762 | .hg/store/data/_foo_bar_directory.d.hg | |
748 | .hg/store/data/f0.i |
|
763 | .hg/store/data/f0.i | |
749 | .hg/store/data/f2.d |
|
764 | .hg/store/data/f2.d | |
750 | .hg/store/data/f2.i |
|
765 | .hg/store/data/f2.i | |
751 |
|
766 | |||
752 | $ hg debugupgraderepo --run --config format.sparse-revlog=false |
|
767 | $ hg debugupgraderepo --run --config format.sparse-revlog=false | |
753 | note: selecting all-filelogs for processing to change: generaldelta |
|
768 | note: selecting all-filelogs for processing to change: generaldelta | |
754 | note: selecting all-manifestlogs for processing to change: generaldelta |
|
769 | note: selecting all-manifestlogs for processing to change: generaldelta | |
755 | note: selecting changelog for processing to change: generaldelta |
|
770 | note: selecting changelog for processing to change: generaldelta | |
756 |
|
771 | |||
757 | upgrade will perform the following actions: |
|
772 | upgrade will perform the following actions: | |
758 |
|
773 | |||
759 | requirements |
|
774 | requirements | |
760 | preserved: dotencode, fncache, revlogv1, share-safe, store (no-rust !) |
|
775 | preserved: dotencode, fncache, revlogv1, share-safe, store (no-rust !) | |
761 | preserved: dotencode, fncache, persistent-nodemap, revlogv1, share-safe, store (rust !) |
|
776 | preserved: dotencode, fncache, persistent-nodemap, revlogv1, share-safe, store (rust !) | |
762 | added: generaldelta |
|
777 | added: generaldelta | |
763 |
|
778 | |||
764 | generaldelta |
|
779 | generaldelta | |
765 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster |
|
780 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster | |
766 |
|
781 | |||
767 | processed revlogs: |
|
782 | processed revlogs: | |
768 | - all-filelogs |
|
783 | - all-filelogs | |
769 | - changelog |
|
784 | - changelog | |
770 | - manifest |
|
785 | - manifest | |
771 |
|
786 | |||
772 | beginning upgrade... |
|
787 | beginning upgrade... | |
773 | repository locked and read-only |
|
788 | repository locked and read-only | |
774 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
789 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
775 | (it is safe to interrupt this process any time before data migration completes) |
|
790 | (it is safe to interrupt this process any time before data migration completes) | |
776 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
791 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
777 | migrating 519 KB in store; 1.05 MB tracked data |
|
792 | migrating 519 KB in store; 1.05 MB tracked data | |
778 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
793 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | |
779 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
794 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | |
780 | migrating 1 manifests containing 3 revisions (384 bytes in store; 238 bytes tracked data) |
|
795 | migrating 1 manifests containing 3 revisions (384 bytes in store; 238 bytes tracked data) | |
781 | finished migrating 3 manifest revisions across 1 manifests; change in size: -17 bytes |
|
796 | finished migrating 3 manifest revisions across 1 manifests; change in size: -17 bytes | |
782 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
797 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |
783 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
798 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
784 | finished migrating 9 total revisions; total change in store size: -17 bytes |
|
799 | finished migrating 9 total revisions; total change in store size: -17 bytes | |
785 | copying phaseroots |
|
800 | copying phaseroots | |
786 | copying requires |
|
801 | copying requires | |
787 | data fully upgraded in a temporary repository |
|
802 | data fully upgraded in a temporary repository | |
788 | marking source repository as being upgraded; clients will be unable to read from repository |
|
803 | marking source repository as being upgraded; clients will be unable to read from repository | |
789 | starting in-place swap of repository data |
|
804 | starting in-place swap of repository data | |
790 | replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) |
|
805 | replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | |
791 | replacing store... |
|
806 | replacing store... | |
792 | store replacement complete; repository was inconsistent for *s (glob) |
|
807 | store replacement complete; repository was inconsistent for *s (glob) | |
793 | finalizing requirements file and making repository readable again |
|
808 | finalizing requirements file and making repository readable again | |
794 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
809 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
795 | copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) |
|
810 | copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | |
796 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
811 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
797 |
|
812 | |||
798 | Original requirements backed up |
|
813 | Original requirements backed up | |
799 |
|
814 | |||
800 | $ cat .hg/upgradebackup.*/requires |
|
815 | $ cat .hg/upgradebackup.*/requires | |
801 | share-safe |
|
816 | share-safe | |
802 | $ cat .hg/upgradebackup.*/store/requires |
|
817 | $ cat .hg/upgradebackup.*/store/requires | |
803 | dotencode |
|
818 | dotencode | |
804 | fncache |
|
819 | fncache | |
805 | persistent-nodemap (rust !) |
|
820 | persistent-nodemap (rust !) | |
806 | revlogv1 |
|
821 | revlogv1 | |
807 | store |
|
822 | store | |
808 | upgradeinprogress |
|
823 | upgradeinprogress | |
809 |
|
824 | |||
810 | generaldelta added to original requirements files |
|
825 | generaldelta added to original requirements files | |
811 |
|
826 | |||
812 | $ hg debugrequires |
|
827 | $ hg debugrequires | |
813 | dotencode |
|
828 | dotencode | |
814 | fncache |
|
829 | fncache | |
815 | generaldelta |
|
830 | generaldelta | |
816 | persistent-nodemap (rust !) |
|
831 | persistent-nodemap (rust !) | |
817 | revlogv1 |
|
832 | revlogv1 | |
818 | share-safe |
|
833 | share-safe | |
819 | store |
|
834 | store | |
820 |
|
835 | |||
821 | store directory has files we expect |
|
836 | store directory has files we expect | |
822 |
|
837 | |||
823 | $ ls .hg/store |
|
838 | $ ls .hg/store | |
824 | 00changelog.i |
|
839 | 00changelog.i | |
825 | 00manifest.i |
|
840 | 00manifest.i | |
826 | data |
|
841 | data | |
827 | fncache |
|
842 | fncache | |
828 | phaseroots |
|
843 | phaseroots | |
829 | requires |
|
844 | requires | |
830 | undo |
|
845 | undo | |
831 | undo.backupfiles |
|
846 | undo.backupfiles | |
832 | undo.phaseroots |
|
847 | undo.phaseroots | |
833 |
|
848 | |||
834 | manifest should be generaldelta |
|
849 | manifest should be generaldelta | |
835 |
|
850 | |||
836 | $ hg debugrevlog -m | grep flags |
|
851 | $ hg debugrevlog -m | grep flags | |
837 | flags : inline, generaldelta |
|
852 | flags : inline, generaldelta | |
838 |
|
853 | |||
839 | verify should be happy |
|
854 | verify should be happy | |
840 |
|
855 | |||
841 | $ hg verify |
|
856 | $ hg verify | |
842 | checking changesets |
|
857 | checking changesets | |
843 | checking manifests |
|
858 | checking manifests | |
844 | crosschecking files in changesets and manifests |
|
859 | crosschecking files in changesets and manifests | |
845 | checking files |
|
860 | checking files | |
846 | checked 3 changesets with 3 changes to 3 files |
|
861 | checked 3 changesets with 3 changes to 3 files | |
847 |
|
862 | |||
848 | old store should be backed up |
|
863 | old store should be backed up | |
849 |
|
864 | |||
850 | $ ls -d .hg/upgradebackup.*/ |
|
865 | $ ls -d .hg/upgradebackup.*/ | |
851 | .hg/upgradebackup.*/ (glob) |
|
866 | .hg/upgradebackup.*/ (glob) | |
852 | $ ls .hg/upgradebackup.*/store |
|
867 | $ ls .hg/upgradebackup.*/store | |
853 | 00changelog.i |
|
868 | 00changelog.i | |
854 | 00manifest.i |
|
869 | 00manifest.i | |
855 | data |
|
870 | data | |
856 | fncache |
|
871 | fncache | |
857 | phaseroots |
|
872 | phaseroots | |
858 | requires |
|
873 | requires | |
859 | undo |
|
874 | undo | |
860 | undo.backup.fncache |
|
875 | undo.backup.fncache | |
861 | undo.backupfiles |
|
876 | undo.backupfiles | |
862 | undo.phaseroots |
|
877 | undo.phaseroots | |
863 |
|
878 | |||
864 | unless --no-backup is passed |
|
879 | unless --no-backup is passed | |
865 |
|
880 | |||
866 | $ rm -rf .hg/upgradebackup.*/ |
|
881 | $ rm -rf .hg/upgradebackup.*/ | |
867 | $ hg debugupgraderepo --run --no-backup |
|
882 | $ hg debugupgraderepo --run --no-backup | |
868 | note: selecting all-filelogs for processing to change: sparserevlog |
|
883 | note: selecting all-filelogs for processing to change: sparserevlog | |
869 | note: selecting all-manifestlogs for processing to change: sparserevlog |
|
884 | note: selecting all-manifestlogs for processing to change: sparserevlog | |
870 | note: selecting changelog for processing to change: sparserevlog |
|
885 | note: selecting changelog for processing to change: sparserevlog | |
871 |
|
886 | |||
872 | upgrade will perform the following actions: |
|
887 | upgrade will perform the following actions: | |
873 |
|
888 | |||
874 | requirements |
|
889 | requirements | |
875 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) |
|
890 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) | |
876 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) |
|
891 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) | |
877 | added: sparserevlog |
|
892 | added: sparserevlog | |
878 |
|
893 | |||
879 | sparserevlog |
|
894 | sparserevlog | |
880 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. |
|
895 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. | |
881 |
|
896 | |||
882 | processed revlogs: |
|
897 | processed revlogs: | |
883 | - all-filelogs |
|
898 | - all-filelogs | |
884 | - changelog |
|
899 | - changelog | |
885 | - manifest |
|
900 | - manifest | |
886 |
|
901 | |||
887 | beginning upgrade... |
|
902 | beginning upgrade... | |
888 | repository locked and read-only |
|
903 | repository locked and read-only | |
889 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
904 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
890 | (it is safe to interrupt this process any time before data migration completes) |
|
905 | (it is safe to interrupt this process any time before data migration completes) | |
891 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
906 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
892 | migrating 519 KB in store; 1.05 MB tracked data |
|
907 | migrating 519 KB in store; 1.05 MB tracked data | |
893 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
908 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | |
894 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
909 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | |
895 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
910 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |
896 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
911 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
897 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
912 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |
898 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
913 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
899 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
914 | finished migrating 9 total revisions; total change in store size: 0 bytes | |
900 | copying phaseroots |
|
915 | copying phaseroots | |
901 | copying requires |
|
916 | copying requires | |
902 | data fully upgraded in a temporary repository |
|
917 | data fully upgraded in a temporary repository | |
903 | marking source repository as being upgraded; clients will be unable to read from repository |
|
918 | marking source repository as being upgraded; clients will be unable to read from repository | |
904 | starting in-place swap of repository data |
|
919 | starting in-place swap of repository data | |
905 | replacing store... |
|
920 | replacing store... | |
906 | store replacement complete; repository was inconsistent for * (glob) |
|
921 | store replacement complete; repository was inconsistent for * (glob) | |
907 | finalizing requirements file and making repository readable again |
|
922 | finalizing requirements file and making repository readable again | |
908 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
923 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
909 | $ ls -1 .hg/ | grep upgradebackup |
|
924 | $ ls -1 .hg/ | grep upgradebackup | |
910 | [1] |
|
925 | [1] | |
911 |
|
926 | |||
912 | We can restrict optimization to some revlog: |
|
927 | We can restrict optimization to some revlog: | |
913 |
|
928 | |||
914 | $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback |
|
929 | $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback | |
915 | upgrade will perform the following actions: |
|
930 | upgrade will perform the following actions: | |
916 |
|
931 | |||
917 | requirements |
|
932 | requirements | |
918 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
933 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
919 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
934 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
920 |
|
935 | |||
921 | optimisations: re-delta-parent |
|
936 | optimisations: re-delta-parent | |
922 |
|
937 | |||
923 | re-delta-parent |
|
938 | re-delta-parent | |
924 | deltas within internal storage will choose a new base revision if needed |
|
939 | deltas within internal storage will choose a new base revision if needed | |
925 |
|
940 | |||
926 | processed revlogs: |
|
941 | processed revlogs: | |
927 | - manifest |
|
942 | - manifest | |
928 |
|
943 | |||
929 | beginning upgrade... |
|
944 | beginning upgrade... | |
930 | repository locked and read-only |
|
945 | repository locked and read-only | |
931 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
946 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
932 | (it is safe to interrupt this process any time before data migration completes) |
|
947 | (it is safe to interrupt this process any time before data migration completes) | |
933 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
948 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
934 | migrating 519 KB in store; 1.05 MB tracked data |
|
949 | migrating 519 KB in store; 1.05 MB tracked data | |
935 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
950 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | |
936 | blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions |
|
951 | blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions | |
937 | blindly copying data/f0.i containing 1 revisions |
|
952 | blindly copying data/f0.i containing 1 revisions | |
938 | blindly copying data/f2.i containing 1 revisions |
|
953 | blindly copying data/f2.i containing 1 revisions | |
939 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
954 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | |
940 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
955 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |
941 | cloning 3 revisions from 00manifest.i |
|
956 | cloning 3 revisions from 00manifest.i | |
942 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
957 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
943 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
958 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |
944 | blindly copying 00changelog.i containing 3 revisions |
|
959 | blindly copying 00changelog.i containing 3 revisions | |
945 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
960 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
946 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
961 | finished migrating 9 total revisions; total change in store size: 0 bytes | |
947 | copying phaseroots |
|
962 | copying phaseroots | |
948 | copying requires |
|
963 | copying requires | |
949 | data fully upgraded in a temporary repository |
|
964 | data fully upgraded in a temporary repository | |
950 | marking source repository as being upgraded; clients will be unable to read from repository |
|
965 | marking source repository as being upgraded; clients will be unable to read from repository | |
951 | starting in-place swap of repository data |
|
966 | starting in-place swap of repository data | |
952 | replacing store... |
|
967 | replacing store... | |
953 | store replacement complete; repository was inconsistent for *s (glob) |
|
968 | store replacement complete; repository was inconsistent for *s (glob) | |
954 | finalizing requirements file and making repository readable again |
|
969 | finalizing requirements file and making repository readable again | |
955 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
970 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
956 |
|
971 | |||
957 | Check that the repo still works fine |
|
972 | Check that the repo still works fine | |
958 |
|
973 | |||
959 | $ hg log -G --stat |
|
974 | $ hg log -G --stat | |
960 | @ changeset: 2:fca376863211 (py3 !) |
|
975 | @ changeset: 2:fca376863211 (py3 !) | |
961 | | tag: tip |
|
976 | | tag: tip | |
962 | | parent: 0:ba592bf28da2 |
|
977 | | parent: 0:ba592bf28da2 | |
963 | | user: test |
|
978 | | user: test | |
964 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
979 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
965 | | summary: add f2 |
|
980 | | summary: add f2 | |
966 | | |
|
981 | | | |
967 | | f2 | 100000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
982 | | f2 | 100000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
968 | | 1 files changed, 100000 insertions(+), 0 deletions(-) |
|
983 | | 1 files changed, 100000 insertions(+), 0 deletions(-) | |
969 | | |
|
984 | | | |
970 | | o changeset: 1:2029ce2354e2 |
|
985 | | o changeset: 1:2029ce2354e2 | |
971 | |/ user: test |
|
986 | |/ user: test | |
972 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
987 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
973 | | summary: add f1 |
|
988 | | summary: add f1 | |
974 | | |
|
989 | | | |
975 | | |
|
990 | | | |
976 | o changeset: 0:ba592bf28da2 |
|
991 | o changeset: 0:ba592bf28da2 | |
977 | user: test |
|
992 | user: test | |
978 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
993 | date: Thu Jan 01 00:00:00 1970 +0000 | |
979 | summary: initial |
|
994 | summary: initial | |
980 |
|
995 | |||
981 |
|
996 | |||
982 |
|
997 | |||
983 | $ hg verify |
|
998 | $ hg verify | |
984 | checking changesets |
|
999 | checking changesets | |
985 | checking manifests |
|
1000 | checking manifests | |
986 | crosschecking files in changesets and manifests |
|
1001 | crosschecking files in changesets and manifests | |
987 | checking files |
|
1002 | checking files | |
988 | checked 3 changesets with 3 changes to 3 files |
|
1003 | checked 3 changesets with 3 changes to 3 files | |
989 |
|
1004 | |||
990 | Check we can select negatively |
|
1005 | Check we can select negatively | |
991 |
|
1006 | |||
992 | $ hg debugupgrade --optimize re-delta-parent --run --no-manifest --no-backup --debug --traceback |
|
1007 | $ hg debugupgrade --optimize re-delta-parent --run --no-manifest --no-backup --debug --traceback | |
993 | upgrade will perform the following actions: |
|
1008 | upgrade will perform the following actions: | |
994 |
|
1009 | |||
995 | requirements |
|
1010 | requirements | |
996 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
1011 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
997 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
1012 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
998 |
|
1013 | |||
999 | optimisations: re-delta-parent |
|
1014 | optimisations: re-delta-parent | |
1000 |
|
1015 | |||
1001 | re-delta-parent |
|
1016 | re-delta-parent | |
1002 | deltas within internal storage will choose a new base revision if needed |
|
1017 | deltas within internal storage will choose a new base revision if needed | |
1003 |
|
1018 | |||
1004 | processed revlogs: |
|
1019 | processed revlogs: | |
1005 | - all-filelogs |
|
1020 | - all-filelogs | |
1006 | - changelog |
|
1021 | - changelog | |
1007 |
|
1022 | |||
1008 | beginning upgrade... |
|
1023 | beginning upgrade... | |
1009 | repository locked and read-only |
|
1024 | repository locked and read-only | |
1010 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1025 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1011 | (it is safe to interrupt this process any time before data migration completes) |
|
1026 | (it is safe to interrupt this process any time before data migration completes) | |
1012 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
1027 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
1013 | migrating 519 KB in store; 1.05 MB tracked data |
|
1028 | migrating 519 KB in store; 1.05 MB tracked data | |
1014 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
1029 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | |
1015 | cloning 1 revisions from data/FooBarDirectory.d/f1.i |
|
1030 | cloning 1 revisions from data/FooBarDirectory.d/f1.i | |
1016 | cloning 1 revisions from data/f0.i |
|
1031 | cloning 1 revisions from data/f0.i | |
1017 | cloning 1 revisions from data/f2.i |
|
1032 | cloning 1 revisions from data/f2.i | |
1018 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
1033 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | |
1019 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
1034 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |
1020 | blindly copying 00manifest.i containing 3 revisions |
|
1035 | blindly copying 00manifest.i containing 3 revisions | |
1021 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
1036 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
1022 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
1037 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |
1023 | cloning 3 revisions from 00changelog.i |
|
1038 | cloning 3 revisions from 00changelog.i | |
1024 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
1039 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
1025 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
1040 | finished migrating 9 total revisions; total change in store size: 0 bytes | |
1026 | copying phaseroots |
|
1041 | copying phaseroots | |
1027 | copying requires |
|
1042 | copying requires | |
1028 | data fully upgraded in a temporary repository |
|
1043 | data fully upgraded in a temporary repository | |
1029 | marking source repository as being upgraded; clients will be unable to read from repository |
|
1044 | marking source repository as being upgraded; clients will be unable to read from repository | |
1030 | starting in-place swap of repository data |
|
1045 | starting in-place swap of repository data | |
1031 | replacing store... |
|
1046 | replacing store... | |
1032 | store replacement complete; repository was inconsistent for *s (glob) |
|
1047 | store replacement complete; repository was inconsistent for *s (glob) | |
1033 | finalizing requirements file and making repository readable again |
|
1048 | finalizing requirements file and making repository readable again | |
1034 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1049 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1035 | $ hg verify |
|
1050 | $ hg verify | |
1036 | checking changesets |
|
1051 | checking changesets | |
1037 | checking manifests |
|
1052 | checking manifests | |
1038 | crosschecking files in changesets and manifests |
|
1053 | crosschecking files in changesets and manifests | |
1039 | checking files |
|
1054 | checking files | |
1040 | checked 3 changesets with 3 changes to 3 files |
|
1055 | checked 3 changesets with 3 changes to 3 files | |
1041 |
|
1056 | |||
1042 | Check that we can select changelog only |
|
1057 | Check that we can select changelog only | |
1043 |
|
1058 | |||
1044 | $ hg debugupgrade --optimize re-delta-parent --run --changelog --no-backup --debug --traceback |
|
1059 | $ hg debugupgrade --optimize re-delta-parent --run --changelog --no-backup --debug --traceback | |
1045 | upgrade will perform the following actions: |
|
1060 | upgrade will perform the following actions: | |
1046 |
|
1061 | |||
1047 | requirements |
|
1062 | requirements | |
1048 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
1063 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
1049 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
1064 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
1050 |
|
1065 | |||
1051 | optimisations: re-delta-parent |
|
1066 | optimisations: re-delta-parent | |
1052 |
|
1067 | |||
1053 | re-delta-parent |
|
1068 | re-delta-parent | |
1054 | deltas within internal storage will choose a new base revision if needed |
|
1069 | deltas within internal storage will choose a new base revision if needed | |
1055 |
|
1070 | |||
1056 | processed revlogs: |
|
1071 | processed revlogs: | |
1057 | - changelog |
|
1072 | - changelog | |
1058 |
|
1073 | |||
1059 | beginning upgrade... |
|
1074 | beginning upgrade... | |
1060 | repository locked and read-only |
|
1075 | repository locked and read-only | |
1061 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1076 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1062 | (it is safe to interrupt this process any time before data migration completes) |
|
1077 | (it is safe to interrupt this process any time before data migration completes) | |
1063 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
1078 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
1064 | migrating 519 KB in store; 1.05 MB tracked data |
|
1079 | migrating 519 KB in store; 1.05 MB tracked data | |
1065 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
1080 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | |
1066 | blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions |
|
1081 | blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions | |
1067 | blindly copying data/f0.i containing 1 revisions |
|
1082 | blindly copying data/f0.i containing 1 revisions | |
1068 | blindly copying data/f2.i containing 1 revisions |
|
1083 | blindly copying data/f2.i containing 1 revisions | |
1069 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
1084 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | |
1070 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
1085 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |
1071 | blindly copying 00manifest.i containing 3 revisions |
|
1086 | blindly copying 00manifest.i containing 3 revisions | |
1072 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
1087 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
1073 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
1088 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |
1074 | cloning 3 revisions from 00changelog.i |
|
1089 | cloning 3 revisions from 00changelog.i | |
1075 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
1090 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
1076 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
1091 | finished migrating 9 total revisions; total change in store size: 0 bytes | |
1077 | copying phaseroots |
|
1092 | copying phaseroots | |
1078 | copying requires |
|
1093 | copying requires | |
1079 | data fully upgraded in a temporary repository |
|
1094 | data fully upgraded in a temporary repository | |
1080 | marking source repository as being upgraded; clients will be unable to read from repository |
|
1095 | marking source repository as being upgraded; clients will be unable to read from repository | |
1081 | starting in-place swap of repository data |
|
1096 | starting in-place swap of repository data | |
1082 | replacing store... |
|
1097 | replacing store... | |
1083 | store replacement complete; repository was inconsistent for *s (glob) |
|
1098 | store replacement complete; repository was inconsistent for *s (glob) | |
1084 | finalizing requirements file and making repository readable again |
|
1099 | finalizing requirements file and making repository readable again | |
1085 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1100 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1086 | $ hg verify |
|
1101 | $ hg verify | |
1087 | checking changesets |
|
1102 | checking changesets | |
1088 | checking manifests |
|
1103 | checking manifests | |
1089 | crosschecking files in changesets and manifests |
|
1104 | crosschecking files in changesets and manifests | |
1090 | checking files |
|
1105 | checking files | |
1091 | checked 3 changesets with 3 changes to 3 files |
|
1106 | checked 3 changesets with 3 changes to 3 files | |
1092 |
|
1107 | |||
1093 | Check that we can select filelog only |
|
1108 | Check that we can select filelog only | |
1094 |
|
1109 | |||
1095 | $ hg debugupgrade --optimize re-delta-parent --run --no-changelog --no-manifest --no-backup --debug --traceback |
|
1110 | $ hg debugupgrade --optimize re-delta-parent --run --no-changelog --no-manifest --no-backup --debug --traceback | |
1096 | upgrade will perform the following actions: |
|
1111 | upgrade will perform the following actions: | |
1097 |
|
1112 | |||
1098 | requirements |
|
1113 | requirements | |
1099 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
1114 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
1100 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
1115 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
1101 |
|
1116 | |||
1102 | optimisations: re-delta-parent |
|
1117 | optimisations: re-delta-parent | |
1103 |
|
1118 | |||
1104 | re-delta-parent |
|
1119 | re-delta-parent | |
1105 | deltas within internal storage will choose a new base revision if needed |
|
1120 | deltas within internal storage will choose a new base revision if needed | |
1106 |
|
1121 | |||
1107 | processed revlogs: |
|
1122 | processed revlogs: | |
1108 | - all-filelogs |
|
1123 | - all-filelogs | |
1109 |
|
1124 | |||
1110 | beginning upgrade... |
|
1125 | beginning upgrade... | |
1111 | repository locked and read-only |
|
1126 | repository locked and read-only | |
1112 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1127 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1113 | (it is safe to interrupt this process any time before data migration completes) |
|
1128 | (it is safe to interrupt this process any time before data migration completes) | |
1114 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
1129 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
1115 | migrating 519 KB in store; 1.05 MB tracked data |
|
1130 | migrating 519 KB in store; 1.05 MB tracked data | |
1116 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
1131 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | |
1117 | cloning 1 revisions from data/FooBarDirectory.d/f1.i |
|
1132 | cloning 1 revisions from data/FooBarDirectory.d/f1.i | |
1118 | cloning 1 revisions from data/f0.i |
|
1133 | cloning 1 revisions from data/f0.i | |
1119 | cloning 1 revisions from data/f2.i |
|
1134 | cloning 1 revisions from data/f2.i | |
1120 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
1135 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | |
1121 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
1136 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |
1122 | blindly copying 00manifest.i containing 3 revisions |
|
1137 | blindly copying 00manifest.i containing 3 revisions | |
1123 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
1138 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
1124 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
1139 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |
1125 | blindly copying 00changelog.i containing 3 revisions |
|
1140 | blindly copying 00changelog.i containing 3 revisions | |
1126 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
1141 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
1127 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
1142 | finished migrating 9 total revisions; total change in store size: 0 bytes | |
1128 | copying phaseroots |
|
1143 | copying phaseroots | |
1129 | copying requires |
|
1144 | copying requires | |
1130 | data fully upgraded in a temporary repository |
|
1145 | data fully upgraded in a temporary repository | |
1131 | marking source repository as being upgraded; clients will be unable to read from repository |
|
1146 | marking source repository as being upgraded; clients will be unable to read from repository | |
1132 | starting in-place swap of repository data |
|
1147 | starting in-place swap of repository data | |
1133 | replacing store... |
|
1148 | replacing store... | |
1134 | store replacement complete; repository was inconsistent for *s (glob) |
|
1149 | store replacement complete; repository was inconsistent for *s (glob) | |
1135 | finalizing requirements file and making repository readable again |
|
1150 | finalizing requirements file and making repository readable again | |
1136 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1151 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1137 | $ hg verify |
|
1152 | $ hg verify | |
1138 | checking changesets |
|
1153 | checking changesets | |
1139 | checking manifests |
|
1154 | checking manifests | |
1140 | crosschecking files in changesets and manifests |
|
1155 | crosschecking files in changesets and manifests | |
1141 | checking files |
|
1156 | checking files | |
1142 | checked 3 changesets with 3 changes to 3 files |
|
1157 | checked 3 changesets with 3 changes to 3 files | |
1143 |
|
1158 | |||
1144 |
|
1159 | |||
1145 | Check you can't skip revlog clone during important format downgrade |
|
1160 | Check you can't skip revlog clone during important format downgrade | |
1146 |
|
1161 | |||
1147 | $ echo "[format]" > .hg/hgrc |
|
1162 | $ echo "[format]" > .hg/hgrc | |
1148 | $ echo "sparse-revlog=no" >> .hg/hgrc |
|
1163 | $ echo "sparse-revlog=no" >> .hg/hgrc | |
1149 | $ hg debugupgrade --optimize re-delta-parent --no-manifest --no-backup --quiet |
|
1164 | $ hg debugupgrade --optimize re-delta-parent --no-manifest --no-backup --quiet | |
1150 | warning: ignoring --no-manifest, as upgrade is changing: sparserevlog |
|
1165 | warning: ignoring --no-manifest, as upgrade is changing: sparserevlog | |
1151 |
|
1166 | |||
1152 | requirements |
|
1167 | requirements | |
1153 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) |
|
1168 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) | |
1154 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) |
|
1169 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) | |
1155 | removed: sparserevlog |
|
1170 | removed: sparserevlog | |
1156 |
|
1171 | |||
1157 | optimisations: re-delta-parent |
|
1172 | optimisations: re-delta-parent | |
1158 |
|
1173 | |||
1159 | processed revlogs: |
|
1174 | processed revlogs: | |
1160 | - all-filelogs |
|
1175 | - all-filelogs | |
1161 | - changelog |
|
1176 | - changelog | |
1162 | - manifest |
|
1177 | - manifest | |
1163 |
|
1178 | |||
1164 | $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback |
|
1179 | $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback | |
1165 | note: selecting all-filelogs for processing to change: sparserevlog |
|
1180 | note: selecting all-filelogs for processing to change: sparserevlog | |
1166 | note: selecting changelog for processing to change: sparserevlog |
|
1181 | note: selecting changelog for processing to change: sparserevlog | |
1167 |
|
1182 | |||
1168 | upgrade will perform the following actions: |
|
1183 | upgrade will perform the following actions: | |
1169 |
|
1184 | |||
1170 | requirements |
|
1185 | requirements | |
1171 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) |
|
1186 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) | |
1172 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) |
|
1187 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) | |
1173 | removed: sparserevlog |
|
1188 | removed: sparserevlog | |
1174 |
|
1189 | |||
1175 | optimisations: re-delta-parent |
|
1190 | optimisations: re-delta-parent | |
1176 |
|
1191 | |||
1177 | re-delta-parent |
|
1192 | re-delta-parent | |
1178 | deltas within internal storage will choose a new base revision if needed |
|
1193 | deltas within internal storage will choose a new base revision if needed | |
1179 |
|
1194 | |||
1180 | processed revlogs: |
|
1195 | processed revlogs: | |
1181 | - all-filelogs |
|
1196 | - all-filelogs | |
1182 | - changelog |
|
1197 | - changelog | |
1183 | - manifest |
|
1198 | - manifest | |
1184 |
|
1199 | |||
1185 | beginning upgrade... |
|
1200 | beginning upgrade... | |
1186 | repository locked and read-only |
|
1201 | repository locked and read-only | |
1187 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1202 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1188 | (it is safe to interrupt this process any time before data migration completes) |
|
1203 | (it is safe to interrupt this process any time before data migration completes) | |
1189 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
1204 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
1190 | migrating 519 KB in store; 1.05 MB tracked data |
|
1205 | migrating 519 KB in store; 1.05 MB tracked data | |
1191 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
1206 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | |
1192 | cloning 1 revisions from data/FooBarDirectory.d/f1.i |
|
1207 | cloning 1 revisions from data/FooBarDirectory.d/f1.i | |
1193 | cloning 1 revisions from data/f0.i |
|
1208 | cloning 1 revisions from data/f0.i | |
1194 | cloning 1 revisions from data/f2.i |
|
1209 | cloning 1 revisions from data/f2.i | |
1195 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
1210 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | |
1196 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
1211 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |
1197 | cloning 3 revisions from 00manifest.i |
|
1212 | cloning 3 revisions from 00manifest.i | |
1198 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
1213 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
1199 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
1214 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |
1200 | cloning 3 revisions from 00changelog.i |
|
1215 | cloning 3 revisions from 00changelog.i | |
1201 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
1216 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
1202 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
1217 | finished migrating 9 total revisions; total change in store size: 0 bytes | |
1203 | copying phaseroots |
|
1218 | copying phaseroots | |
1204 | copying requires |
|
1219 | copying requires | |
1205 | data fully upgraded in a temporary repository |
|
1220 | data fully upgraded in a temporary repository | |
1206 | marking source repository as being upgraded; clients will be unable to read from repository |
|
1221 | marking source repository as being upgraded; clients will be unable to read from repository | |
1207 | starting in-place swap of repository data |
|
1222 | starting in-place swap of repository data | |
1208 | replacing store... |
|
1223 | replacing store... | |
1209 | store replacement complete; repository was inconsistent for *s (glob) |
|
1224 | store replacement complete; repository was inconsistent for *s (glob) | |
1210 | finalizing requirements file and making repository readable again |
|
1225 | finalizing requirements file and making repository readable again | |
1211 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1226 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1212 | $ hg verify |
|
1227 | $ hg verify | |
1213 | checking changesets |
|
1228 | checking changesets | |
1214 | checking manifests |
|
1229 | checking manifests | |
1215 | crosschecking files in changesets and manifests |
|
1230 | crosschecking files in changesets and manifests | |
1216 | checking files |
|
1231 | checking files | |
1217 | checked 3 changesets with 3 changes to 3 files |
|
1232 | checked 3 changesets with 3 changes to 3 files | |
1218 |
|
1233 | |||
1219 | Check you can't skip revlog clone during important format upgrade |
|
1234 | Check you can't skip revlog clone during important format upgrade | |
1220 |
|
1235 | |||
1221 | $ echo "sparse-revlog=yes" >> .hg/hgrc |
|
1236 | $ echo "sparse-revlog=yes" >> .hg/hgrc | |
1222 | $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback |
|
1237 | $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback | |
1223 | note: selecting all-filelogs for processing to change: sparserevlog |
|
1238 | note: selecting all-filelogs for processing to change: sparserevlog | |
1224 | note: selecting changelog for processing to change: sparserevlog |
|
1239 | note: selecting changelog for processing to change: sparserevlog | |
1225 |
|
1240 | |||
1226 | upgrade will perform the following actions: |
|
1241 | upgrade will perform the following actions: | |
1227 |
|
1242 | |||
1228 | requirements |
|
1243 | requirements | |
1229 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) |
|
1244 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) | |
1230 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) |
|
1245 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) | |
1231 | added: sparserevlog |
|
1246 | added: sparserevlog | |
1232 |
|
1247 | |||
1233 | optimisations: re-delta-parent |
|
1248 | optimisations: re-delta-parent | |
1234 |
|
1249 | |||
1235 | sparserevlog |
|
1250 | sparserevlog | |
1236 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. |
|
1251 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. | |
1237 |
|
1252 | |||
1238 | re-delta-parent |
|
1253 | re-delta-parent | |
1239 | deltas within internal storage will choose a new base revision if needed |
|
1254 | deltas within internal storage will choose a new base revision if needed | |
1240 |
|
1255 | |||
1241 | processed revlogs: |
|
1256 | processed revlogs: | |
1242 | - all-filelogs |
|
1257 | - all-filelogs | |
1243 | - changelog |
|
1258 | - changelog | |
1244 | - manifest |
|
1259 | - manifest | |
1245 |
|
1260 | |||
1246 | beginning upgrade... |
|
1261 | beginning upgrade... | |
1247 | repository locked and read-only |
|
1262 | repository locked and read-only | |
1248 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1263 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1249 | (it is safe to interrupt this process any time before data migration completes) |
|
1264 | (it is safe to interrupt this process any time before data migration completes) | |
1250 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
1265 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
1251 | migrating 519 KB in store; 1.05 MB tracked data |
|
1266 | migrating 519 KB in store; 1.05 MB tracked data | |
1252 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
1267 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | |
1253 | cloning 1 revisions from data/FooBarDirectory.d/f1.i |
|
1268 | cloning 1 revisions from data/FooBarDirectory.d/f1.i | |
1254 | cloning 1 revisions from data/f0.i |
|
1269 | cloning 1 revisions from data/f0.i | |
1255 | cloning 1 revisions from data/f2.i |
|
1270 | cloning 1 revisions from data/f2.i | |
1256 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
1271 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | |
1257 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
1272 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |
1258 | cloning 3 revisions from 00manifest.i |
|
1273 | cloning 3 revisions from 00manifest.i | |
1259 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
1274 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
1260 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
1275 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |
1261 | cloning 3 revisions from 00changelog.i |
|
1276 | cloning 3 revisions from 00changelog.i | |
1262 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
1277 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
1263 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
1278 | finished migrating 9 total revisions; total change in store size: 0 bytes | |
1264 | copying phaseroots |
|
1279 | copying phaseroots | |
1265 | copying requires |
|
1280 | copying requires | |
1266 | data fully upgraded in a temporary repository |
|
1281 | data fully upgraded in a temporary repository | |
1267 | marking source repository as being upgraded; clients will be unable to read from repository |
|
1282 | marking source repository as being upgraded; clients will be unable to read from repository | |
1268 | starting in-place swap of repository data |
|
1283 | starting in-place swap of repository data | |
1269 | replacing store... |
|
1284 | replacing store... | |
1270 | store replacement complete; repository was inconsistent for *s (glob) |
|
1285 | store replacement complete; repository was inconsistent for *s (glob) | |
1271 | finalizing requirements file and making repository readable again |
|
1286 | finalizing requirements file and making repository readable again | |
1272 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1287 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1273 | $ hg verify |
|
1288 | $ hg verify | |
1274 | checking changesets |
|
1289 | checking changesets | |
1275 | checking manifests |
|
1290 | checking manifests | |
1276 | crosschecking files in changesets and manifests |
|
1291 | crosschecking files in changesets and manifests | |
1277 | checking files |
|
1292 | checking files | |
1278 | checked 3 changesets with 3 changes to 3 files |
|
1293 | checked 3 changesets with 3 changes to 3 files | |
1279 |
|
1294 | |||
1280 | $ cd .. |
|
1295 | $ cd .. | |
1281 |
|
1296 | |||
1282 | store files with special filenames aren't encoded during copy |
|
1297 | store files with special filenames aren't encoded during copy | |
1283 |
|
1298 | |||
1284 | $ hg init store-filenames |
|
1299 | $ hg init store-filenames | |
1285 | $ cd store-filenames |
|
1300 | $ cd store-filenames | |
1286 | $ touch foo |
|
1301 | $ touch foo | |
1287 | $ hg -q commit -A -m initial |
|
1302 | $ hg -q commit -A -m initial | |
1288 | $ touch .hg/store/.XX_special_filename |
|
1303 | $ touch .hg/store/.XX_special_filename | |
1289 |
|
1304 | |||
1290 | $ hg debugupgraderepo --run |
|
1305 | $ hg debugupgraderepo --run | |
1291 | nothing to do |
|
1306 | nothing to do | |
1292 | $ hg debugupgraderepo --run --optimize 're-delta-fulladd' |
|
1307 | $ hg debugupgraderepo --run --optimize 're-delta-fulladd' | |
1293 | upgrade will perform the following actions: |
|
1308 | upgrade will perform the following actions: | |
1294 |
|
1309 | |||
1295 | requirements |
|
1310 | requirements | |
1296 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
1311 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
1297 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
1312 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
1298 |
|
1313 | |||
1299 | optimisations: re-delta-fulladd |
|
1314 | optimisations: re-delta-fulladd | |
1300 |
|
1315 | |||
1301 | re-delta-fulladd |
|
1316 | re-delta-fulladd | |
1302 | each revision will be added as new content to the internal storage; this will likely drastically slow down execution time, but some extensions might need it |
|
1317 | each revision will be added as new content to the internal storage; this will likely drastically slow down execution time, but some extensions might need it | |
1303 |
|
1318 | |||
1304 | processed revlogs: |
|
1319 | processed revlogs: | |
1305 | - all-filelogs |
|
1320 | - all-filelogs | |
1306 | - changelog |
|
1321 | - changelog | |
1307 | - manifest |
|
1322 | - manifest | |
1308 |
|
1323 | |||
1309 | beginning upgrade... |
|
1324 | beginning upgrade... | |
1310 | repository locked and read-only |
|
1325 | repository locked and read-only | |
1311 | creating temporary repository to stage upgraded data: $TESTTMP/store-filenames/.hg/upgrade.* (glob) |
|
1326 | creating temporary repository to stage upgraded data: $TESTTMP/store-filenames/.hg/upgrade.* (glob) | |
1312 | (it is safe to interrupt this process any time before data migration completes) |
|
1327 | (it is safe to interrupt this process any time before data migration completes) | |
1313 | migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) |
|
1328 | migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) | |
1314 | migrating 301 bytes in store; 107 bytes tracked data |
|
1329 | migrating 301 bytes in store; 107 bytes tracked data | |
1315 | migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data) |
|
1330 | migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data) | |
1316 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes |
|
1331 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes | |
1317 | migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data) |
|
1332 | migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data) | |
1318 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes |
|
1333 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes | |
1319 | migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data) |
|
1334 | migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data) | |
1320 | finished migrating 1 changelog revisions; change in size: 0 bytes |
|
1335 | finished migrating 1 changelog revisions; change in size: 0 bytes | |
1321 | finished migrating 3 total revisions; total change in store size: 0 bytes |
|
1336 | finished migrating 3 total revisions; total change in store size: 0 bytes | |
1322 | copying .XX_special_filename |
|
1337 | copying .XX_special_filename | |
1323 | copying phaseroots |
|
1338 | copying phaseroots | |
1324 | copying requires |
|
1339 | copying requires | |
1325 | data fully upgraded in a temporary repository |
|
1340 | data fully upgraded in a temporary repository | |
1326 | marking source repository as being upgraded; clients will be unable to read from repository |
|
1341 | marking source repository as being upgraded; clients will be unable to read from repository | |
1327 | starting in-place swap of repository data |
|
1342 | starting in-place swap of repository data | |
1328 | replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) |
|
1343 | replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) | |
1329 | replacing store... |
|
1344 | replacing store... | |
1330 | store replacement complete; repository was inconsistent for *s (glob) |
|
1345 | store replacement complete; repository was inconsistent for *s (glob) | |
1331 | finalizing requirements file and making repository readable again |
|
1346 | finalizing requirements file and making repository readable again | |
1332 | removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob) |
|
1347 | removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob) | |
1333 | copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) |
|
1348 | copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) | |
1334 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
1349 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
1335 |
|
1350 | |||
1336 | fncache is valid after upgrade |
|
1351 | fncache is valid after upgrade | |
1337 |
|
1352 | |||
1338 | $ hg debugrebuildfncache |
|
1353 | $ hg debugrebuildfncache | |
1339 | fncache already up to date |
|
1354 | fncache already up to date | |
1340 |
|
1355 | |||
1341 | $ cd .. |
|
1356 | $ cd .. | |
1342 |
|
1357 | |||
1343 | Check upgrading a large file repository |
|
1358 | Check upgrading a large file repository | |
1344 | --------------------------------------- |
|
1359 | --------------------------------------- | |
1345 |
|
1360 | |||
1346 | $ hg init largefilesrepo |
|
1361 | $ hg init largefilesrepo | |
1347 | $ cat << EOF >> largefilesrepo/.hg/hgrc |
|
1362 | $ cat << EOF >> largefilesrepo/.hg/hgrc | |
1348 | > [extensions] |
|
1363 | > [extensions] | |
1349 | > largefiles = |
|
1364 | > largefiles = | |
1350 | > EOF |
|
1365 | > EOF | |
1351 |
|
1366 | |||
1352 | $ cd largefilesrepo |
|
1367 | $ cd largefilesrepo | |
1353 | $ touch foo |
|
1368 | $ touch foo | |
1354 | $ hg add --large foo |
|
1369 | $ hg add --large foo | |
1355 | $ hg -q commit -m initial |
|
1370 | $ hg -q commit -m initial | |
1356 | $ hg debugrequires |
|
1371 | $ hg debugrequires | |
1357 | dotencode |
|
1372 | dotencode | |
1358 | fncache |
|
1373 | fncache | |
1359 | generaldelta |
|
1374 | generaldelta | |
1360 | largefiles |
|
1375 | largefiles | |
1361 | persistent-nodemap (rust !) |
|
1376 | persistent-nodemap (rust !) | |
1362 | revlogv1 |
|
1377 | revlogv1 | |
1363 | share-safe |
|
1378 | share-safe | |
1364 | sparserevlog |
|
1379 | sparserevlog | |
1365 | store |
|
1380 | store | |
1366 |
|
1381 | |||
1367 | $ hg debugupgraderepo --run |
|
1382 | $ hg debugupgraderepo --run | |
1368 | nothing to do |
|
1383 | nothing to do | |
1369 | $ hg debugrequires |
|
1384 | $ hg debugrequires | |
1370 | dotencode |
|
1385 | dotencode | |
1371 | fncache |
|
1386 | fncache | |
1372 | generaldelta |
|
1387 | generaldelta | |
1373 | largefiles |
|
1388 | largefiles | |
1374 | persistent-nodemap (rust !) |
|
1389 | persistent-nodemap (rust !) | |
1375 | revlogv1 |
|
1390 | revlogv1 | |
1376 | share-safe |
|
1391 | share-safe | |
1377 | sparserevlog |
|
1392 | sparserevlog | |
1378 | store |
|
1393 | store | |
1379 |
|
1394 | |||
1380 | $ cat << EOF >> .hg/hgrc |
|
1395 | $ cat << EOF >> .hg/hgrc | |
1381 | > [extensions] |
|
1396 | > [extensions] | |
1382 | > lfs = |
|
1397 | > lfs = | |
1383 | > [lfs] |
|
1398 | > [lfs] | |
1384 | > threshold = 10 |
|
1399 | > threshold = 10 | |
1385 | > EOF |
|
1400 | > EOF | |
1386 | $ echo '123456789012345' > lfs.bin |
|
1401 | $ echo '123456789012345' > lfs.bin | |
1387 | $ hg ci -Am 'lfs.bin' |
|
1402 | $ hg ci -Am 'lfs.bin' | |
1388 | adding lfs.bin |
|
1403 | adding lfs.bin | |
1389 | $ hg debugrequires | grep lfs |
|
1404 | $ hg debugrequires | grep lfs | |
1390 | lfs |
|
1405 | lfs | |
1391 | $ find .hg/store/lfs -type f |
|
1406 | $ find .hg/store/lfs -type f | |
1392 | .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f |
|
1407 | .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f | |
1393 |
|
1408 | |||
1394 | $ hg debugupgraderepo --run |
|
1409 | $ hg debugupgraderepo --run | |
1395 | nothing to do |
|
1410 | nothing to do | |
1396 |
|
1411 | |||
1397 | $ hg debugrequires | grep lfs |
|
1412 | $ hg debugrequires | grep lfs | |
1398 | lfs |
|
1413 | lfs | |
1399 | $ find .hg/store/lfs -type f |
|
1414 | $ find .hg/store/lfs -type f | |
1400 | .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f |
|
1415 | .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f | |
1401 | $ hg verify |
|
1416 | $ hg verify | |
1402 | checking changesets |
|
1417 | checking changesets | |
1403 | checking manifests |
|
1418 | checking manifests | |
1404 | crosschecking files in changesets and manifests |
|
1419 | crosschecking files in changesets and manifests | |
1405 | checking files |
|
1420 | checking files | |
1406 | checked 2 changesets with 2 changes to 2 files |
|
1421 | checked 2 changesets with 2 changes to 2 files | |
1407 | $ hg debugdata lfs.bin 0 |
|
1422 | $ hg debugdata lfs.bin 0 | |
1408 | version https://git-lfs.github.com/spec/v1 |
|
1423 | version https://git-lfs.github.com/spec/v1 | |
1409 | oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f |
|
1424 | oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f | |
1410 | size 16 |
|
1425 | size 16 | |
1411 | x-is-binary 0 |
|
1426 | x-is-binary 0 | |
1412 |
|
1427 | |||
1413 | $ cd .. |
|
1428 | $ cd .. | |
1414 |
|
1429 | |||
1415 | repository config is taken in account |
|
1430 | repository config is taken in account | |
1416 | ------------------------------------- |
|
1431 | ------------------------------------- | |
1417 |
|
1432 | |||
1418 | $ cat << EOF >> $HGRCPATH |
|
1433 | $ cat << EOF >> $HGRCPATH | |
1419 | > [format] |
|
1434 | > [format] | |
1420 | > maxchainlen = 1 |
|
1435 | > maxchainlen = 1 | |
1421 | > EOF |
|
1436 | > EOF | |
1422 |
|
1437 | |||
1423 | $ hg init localconfig |
|
1438 | $ hg init localconfig | |
1424 | $ cd localconfig |
|
1439 | $ cd localconfig | |
1425 | $ cat << EOF > file |
|
1440 | $ cat << EOF > file | |
1426 | > some content |
|
1441 | > some content | |
1427 | > with some length |
|
1442 | > with some length | |
1428 | > to make sure we get a delta |
|
1443 | > to make sure we get a delta | |
1429 | > after changes |
|
1444 | > after changes | |
1430 | > very long |
|
1445 | > very long | |
1431 | > very long |
|
1446 | > very long | |
1432 | > very long |
|
1447 | > very long | |
1433 | > very long |
|
1448 | > very long | |
1434 | > very long |
|
1449 | > very long | |
1435 | > very long |
|
1450 | > very long | |
1436 | > very long |
|
1451 | > very long | |
1437 | > very long |
|
1452 | > very long | |
1438 | > very long |
|
1453 | > very long | |
1439 | > very long |
|
1454 | > very long | |
1440 | > very long |
|
1455 | > very long | |
1441 | > EOF |
|
1456 | > EOF | |
1442 | $ hg -q commit -A -m A |
|
1457 | $ hg -q commit -A -m A | |
1443 | $ echo "new line" >> file |
|
1458 | $ echo "new line" >> file | |
1444 | $ hg -q commit -m B |
|
1459 | $ hg -q commit -m B | |
1445 | $ echo "new line" >> file |
|
1460 | $ echo "new line" >> file | |
1446 | $ hg -q commit -m C |
|
1461 | $ hg -q commit -m C | |
1447 |
|
1462 | |||
1448 | $ cat << EOF >> .hg/hgrc |
|
1463 | $ cat << EOF >> .hg/hgrc | |
1449 | > [format] |
|
1464 | > [format] | |
1450 | > maxchainlen = 9001 |
|
1465 | > maxchainlen = 9001 | |
1451 | > EOF |
|
1466 | > EOF | |
1452 | $ hg config format |
|
1467 | $ hg config format | |
1453 | format.revlog-compression=$BUNDLE2_COMPRESSIONS$ |
|
1468 | format.revlog-compression=$BUNDLE2_COMPRESSIONS$ | |
1454 | format.maxchainlen=9001 |
|
1469 | format.maxchainlen=9001 | |
1455 | $ hg debugdeltachain file |
|
1470 | $ hg debugdeltachain file | |
1456 | rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks |
|
1471 | rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks | |
1457 | 0 -1 -1 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1 |
|
1472 | 0 -1 -1 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1 | |
1458 | 1 0 -1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1 |
|
1473 | 1 0 -1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1 | |
1459 | 2 1 -1 1 2 0 snap 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1 |
|
1474 | 2 1 -1 1 2 0 snap 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1 | |
1460 |
|
1475 | |||
1461 | $ hg debugupgraderepo --run --optimize 're-delta-all' |
|
1476 | $ hg debugupgraderepo --run --optimize 're-delta-all' | |
1462 | upgrade will perform the following actions: |
|
1477 | upgrade will perform the following actions: | |
1463 |
|
1478 | |||
1464 | requirements |
|
1479 | requirements | |
1465 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
1480 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
1466 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
1481 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
1467 |
|
1482 | |||
1468 | optimisations: re-delta-all |
|
1483 | optimisations: re-delta-all | |
1469 |
|
1484 | |||
1470 | re-delta-all |
|
1485 | re-delta-all | |
1471 | deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time |
|
1486 | deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time | |
1472 |
|
1487 | |||
1473 | processed revlogs: |
|
1488 | processed revlogs: | |
1474 | - all-filelogs |
|
1489 | - all-filelogs | |
1475 | - changelog |
|
1490 | - changelog | |
1476 | - manifest |
|
1491 | - manifest | |
1477 |
|
1492 | |||
1478 | beginning upgrade... |
|
1493 | beginning upgrade... | |
1479 | repository locked and read-only |
|
1494 | repository locked and read-only | |
1480 | creating temporary repository to stage upgraded data: $TESTTMP/localconfig/.hg/upgrade.* (glob) |
|
1495 | creating temporary repository to stage upgraded data: $TESTTMP/localconfig/.hg/upgrade.* (glob) | |
1481 | (it is safe to interrupt this process any time before data migration completes) |
|
1496 | (it is safe to interrupt this process any time before data migration completes) | |
1482 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
1497 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
1483 | migrating 1019 bytes in store; 882 bytes tracked data |
|
1498 | migrating 1019 bytes in store; 882 bytes tracked data | |
1484 | migrating 1 filelogs containing 3 revisions (320 bytes in store; 573 bytes tracked data) |
|
1499 | migrating 1 filelogs containing 3 revisions (320 bytes in store; 573 bytes tracked data) | |
1485 | finished migrating 3 filelog revisions across 1 filelogs; change in size: -9 bytes |
|
1500 | finished migrating 3 filelog revisions across 1 filelogs; change in size: -9 bytes | |
1486 | migrating 1 manifests containing 3 revisions (333 bytes in store; 138 bytes tracked data) |
|
1501 | migrating 1 manifests containing 3 revisions (333 bytes in store; 138 bytes tracked data) | |
1487 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
1502 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
1488 | migrating changelog containing 3 revisions (366 bytes in store; 171 bytes tracked data) |
|
1503 | migrating changelog containing 3 revisions (366 bytes in store; 171 bytes tracked data) | |
1489 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
1504 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
1490 | finished migrating 9 total revisions; total change in store size: -9 bytes |
|
1505 | finished migrating 9 total revisions; total change in store size: -9 bytes | |
1491 | copying phaseroots |
|
1506 | copying phaseroots | |
1492 | copying requires |
|
1507 | copying requires | |
1493 | data fully upgraded in a temporary repository |
|
1508 | data fully upgraded in a temporary repository | |
1494 | marking source repository as being upgraded; clients will be unable to read from repository |
|
1509 | marking source repository as being upgraded; clients will be unable to read from repository | |
1495 | starting in-place swap of repository data |
|
1510 | starting in-place swap of repository data | |
1496 | replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) |
|
1511 | replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) | |
1497 | replacing store... |
|
1512 | replacing store... | |
1498 | store replacement complete; repository was inconsistent for *s (glob) |
|
1513 | store replacement complete; repository was inconsistent for *s (glob) | |
1499 | finalizing requirements file and making repository readable again |
|
1514 | finalizing requirements file and making repository readable again | |
1500 | removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob) |
|
1515 | removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob) | |
1501 | copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) |
|
1516 | copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) | |
1502 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
1517 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
1503 | $ hg debugdeltachain file |
|
1518 | $ hg debugdeltachain file | |
1504 | rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks |
|
1519 | rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks | |
1505 | 0 -1 -1 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1 |
|
1520 | 0 -1 -1 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1 | |
1506 | 1 0 -1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1 |
|
1521 | 1 0 -1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1 | |
1507 | 2 1 -1 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 119 119 1.00000 1 |
|
1522 | 2 1 -1 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 119 119 1.00000 1 | |
1508 | $ cd .. |
|
1523 | $ cd .. | |
1509 |
|
1524 | |||
1510 | $ cat << EOF >> $HGRCPATH |
|
1525 | $ cat << EOF >> $HGRCPATH | |
1511 | > [format] |
|
1526 | > [format] | |
1512 | > maxchainlen = 9001 |
|
1527 | > maxchainlen = 9001 | |
1513 | > EOF |
|
1528 | > EOF | |
1514 |
|
1529 | |||
1515 | Check upgrading a sparse-revlog repository |
|
1530 | Check upgrading a sparse-revlog repository | |
1516 | --------------------------------------- |
|
1531 | --------------------------------------- | |
1517 |
|
1532 | |||
1518 | $ hg init sparserevlogrepo --config format.sparse-revlog=no |
|
1533 | $ hg init sparserevlogrepo --config format.sparse-revlog=no | |
1519 | $ cd sparserevlogrepo |
|
1534 | $ cd sparserevlogrepo | |
1520 | $ touch foo |
|
1535 | $ touch foo | |
1521 | $ hg add foo |
|
1536 | $ hg add foo | |
1522 | $ hg -q commit -m "foo" |
|
1537 | $ hg -q commit -m "foo" | |
1523 | $ hg debugrequires |
|
1538 | $ hg debugrequires | |
1524 | dotencode |
|
1539 | dotencode | |
1525 | fncache |
|
1540 | fncache | |
1526 | generaldelta |
|
1541 | generaldelta | |
1527 | persistent-nodemap (rust !) |
|
1542 | persistent-nodemap (rust !) | |
1528 | revlogv1 |
|
1543 | revlogv1 | |
1529 | share-safe |
|
1544 | share-safe | |
1530 | store |
|
1545 | store | |
1531 |
|
1546 | |||
1532 | Check that we can add the sparse-revlog format requirement |
|
1547 | Check that we can add the sparse-revlog format requirement | |
1533 | $ hg --config format.sparse-revlog=yes debugupgraderepo --run --quiet |
|
1548 | $ hg --config format.sparse-revlog=yes debugupgraderepo --run --quiet | |
1534 | upgrade will perform the following actions: |
|
1549 | upgrade will perform the following actions: | |
1535 |
|
1550 | |||
1536 | requirements |
|
1551 | requirements | |
1537 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) |
|
1552 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) | |
1538 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) |
|
1553 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) | |
1539 | added: sparserevlog |
|
1554 | added: sparserevlog | |
1540 |
|
1555 | |||
1541 | processed revlogs: |
|
1556 | processed revlogs: | |
1542 | - all-filelogs |
|
1557 | - all-filelogs | |
1543 | - changelog |
|
1558 | - changelog | |
1544 | - manifest |
|
1559 | - manifest | |
1545 |
|
1560 | |||
1546 | $ hg debugrequires |
|
1561 | $ hg debugrequires | |
1547 | dotencode |
|
1562 | dotencode | |
1548 | fncache |
|
1563 | fncache | |
1549 | generaldelta |
|
1564 | generaldelta | |
1550 | persistent-nodemap (rust !) |
|
1565 | persistent-nodemap (rust !) | |
1551 | revlogv1 |
|
1566 | revlogv1 | |
1552 | share-safe |
|
1567 | share-safe | |
1553 | sparserevlog |
|
1568 | sparserevlog | |
1554 | store |
|
1569 | store | |
1555 |
|
1570 | |||
1556 | Check that we can remove the sparse-revlog format requirement |
|
1571 | Check that we can remove the sparse-revlog format requirement | |
1557 | $ hg --config format.sparse-revlog=no debugupgraderepo --run --quiet |
|
1572 | $ hg --config format.sparse-revlog=no debugupgraderepo --run --quiet | |
1558 | upgrade will perform the following actions: |
|
1573 | upgrade will perform the following actions: | |
1559 |
|
1574 | |||
1560 | requirements |
|
1575 | requirements | |
1561 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) |
|
1576 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) | |
1562 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) |
|
1577 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) | |
1563 | removed: sparserevlog |
|
1578 | removed: sparserevlog | |
1564 |
|
1579 | |||
1565 | processed revlogs: |
|
1580 | processed revlogs: | |
1566 | - all-filelogs |
|
1581 | - all-filelogs | |
1567 | - changelog |
|
1582 | - changelog | |
1568 | - manifest |
|
1583 | - manifest | |
1569 |
|
1584 | |||
1570 | $ hg debugrequires |
|
1585 | $ hg debugrequires | |
1571 | dotencode |
|
1586 | dotencode | |
1572 | fncache |
|
1587 | fncache | |
1573 | generaldelta |
|
1588 | generaldelta | |
1574 | persistent-nodemap (rust !) |
|
1589 | persistent-nodemap (rust !) | |
1575 | revlogv1 |
|
1590 | revlogv1 | |
1576 | share-safe |
|
1591 | share-safe | |
1577 | store |
|
1592 | store | |
1578 |
|
1593 | |||
1579 | #if zstd |
|
1594 | #if zstd | |
1580 |
|
1595 | |||
1581 | Check upgrading to a zstd revlog |
|
1596 | Check upgrading to a zstd revlog | |
1582 | -------------------------------- |
|
1597 | -------------------------------- | |
1583 |
|
1598 | |||
1584 | upgrade |
|
1599 | upgrade | |
1585 |
|
1600 | |||
1586 | $ hg --config format.revlog-compression=zstd debugupgraderepo --run --no-backup --quiet |
|
1601 | $ hg --config format.revlog-compression=zstd debugupgraderepo --run --no-backup --quiet | |
1587 | upgrade will perform the following actions: |
|
1602 | upgrade will perform the following actions: | |
1588 |
|
1603 | |||
1589 | requirements |
|
1604 | requirements | |
1590 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) |
|
1605 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) | |
1591 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) |
|
1606 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) | |
1592 | added: revlog-compression-zstd, sparserevlog |
|
1607 | added: revlog-compression-zstd, sparserevlog | |
1593 |
|
1608 | |||
1594 | processed revlogs: |
|
1609 | processed revlogs: | |
1595 | - all-filelogs |
|
1610 | - all-filelogs | |
1596 | - changelog |
|
1611 | - changelog | |
1597 | - manifest |
|
1612 | - manifest | |
1598 |
|
1613 | |||
1599 | $ hg debugformat -v |
|
1614 | $ hg debugformat -v | |
1600 | format-variant repo config default |
|
1615 | format-variant repo config default | |
1601 | fncache: yes yes yes |
|
1616 | fncache: yes yes yes | |
1602 | dirstate-v2: no no no |
|
1617 | dirstate-v2: no no no | |
1603 | tracked-hint: no no no |
|
1618 | tracked-hint: no no no | |
1604 | dotencode: yes yes yes |
|
1619 | dotencode: yes yes yes | |
1605 | generaldelta: yes yes yes |
|
1620 | generaldelta: yes yes yes | |
1606 | share-safe: yes yes yes |
|
1621 | share-safe: yes yes yes | |
1607 | sparserevlog: yes yes yes |
|
1622 | sparserevlog: yes yes yes | |
1608 | persistent-nodemap: no no no (no-rust !) |
|
1623 | persistent-nodemap: no no no (no-rust !) | |
1609 | persistent-nodemap: yes yes no (rust !) |
|
1624 | persistent-nodemap: yes yes no (rust !) | |
1610 | copies-sdc: no no no |
|
1625 | copies-sdc: no no no | |
1611 | revlog-v2: no no no |
|
1626 | revlog-v2: no no no | |
1612 | changelog-v2: no no no |
|
1627 | changelog-v2: no no no | |
1613 | plain-cl-delta: yes yes yes |
|
1628 | plain-cl-delta: yes yes yes | |
1614 | compression: zlib zlib zlib (no-zstd !) |
|
1629 | compression: zlib zlib zlib (no-zstd !) | |
1615 | compression: zstd zlib zstd (zstd !) |
|
1630 | compression: zstd zlib zstd (zstd !) | |
1616 | compression-level: default default default |
|
1631 | compression-level: default default default | |
1617 | $ hg debugrequires |
|
1632 | $ hg debugrequires | |
1618 | dotencode |
|
1633 | dotencode | |
1619 | fncache |
|
1634 | fncache | |
1620 | generaldelta |
|
1635 | generaldelta | |
1621 | persistent-nodemap (rust !) |
|
1636 | persistent-nodemap (rust !) | |
1622 | revlog-compression-zstd |
|
1637 | revlog-compression-zstd | |
1623 | revlogv1 |
|
1638 | revlogv1 | |
1624 | share-safe |
|
1639 | share-safe | |
1625 | sparserevlog |
|
1640 | sparserevlog | |
1626 | store |
|
1641 | store | |
1627 |
|
1642 | |||
1628 | downgrade |
|
1643 | downgrade | |
1629 |
|
1644 | |||
1630 | $ hg debugupgraderepo --run --no-backup --quiet |
|
1645 | $ hg debugupgraderepo --run --no-backup --quiet | |
1631 | upgrade will perform the following actions: |
|
1646 | upgrade will perform the following actions: | |
1632 |
|
1647 | |||
1633 | requirements |
|
1648 | requirements | |
1634 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
1649 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
1635 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
1650 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
1636 | removed: revlog-compression-zstd |
|
1651 | removed: revlog-compression-zstd | |
1637 |
|
1652 | |||
1638 | processed revlogs: |
|
1653 | processed revlogs: | |
1639 | - all-filelogs |
|
1654 | - all-filelogs | |
1640 | - changelog |
|
1655 | - changelog | |
1641 | - manifest |
|
1656 | - manifest | |
1642 |
|
1657 | |||
1643 | $ hg debugformat -v |
|
1658 | $ hg debugformat -v | |
1644 | format-variant repo config default |
|
1659 | format-variant repo config default | |
1645 | fncache: yes yes yes |
|
1660 | fncache: yes yes yes | |
1646 | dirstate-v2: no no no |
|
1661 | dirstate-v2: no no no | |
1647 | tracked-hint: no no no |
|
1662 | tracked-hint: no no no | |
1648 | dotencode: yes yes yes |
|
1663 | dotencode: yes yes yes | |
1649 | generaldelta: yes yes yes |
|
1664 | generaldelta: yes yes yes | |
1650 | share-safe: yes yes yes |
|
1665 | share-safe: yes yes yes | |
1651 | sparserevlog: yes yes yes |
|
1666 | sparserevlog: yes yes yes | |
1652 | persistent-nodemap: no no no (no-rust !) |
|
1667 | persistent-nodemap: no no no (no-rust !) | |
1653 | persistent-nodemap: yes yes no (rust !) |
|
1668 | persistent-nodemap: yes yes no (rust !) | |
1654 | copies-sdc: no no no |
|
1669 | copies-sdc: no no no | |
1655 | revlog-v2: no no no |
|
1670 | revlog-v2: no no no | |
1656 | changelog-v2: no no no |
|
1671 | changelog-v2: no no no | |
1657 | plain-cl-delta: yes yes yes |
|
1672 | plain-cl-delta: yes yes yes | |
1658 | compression: zlib zlib zlib (no-zstd !) |
|
1673 | compression: zlib zlib zlib (no-zstd !) | |
1659 | compression: zlib zlib zstd (zstd !) |
|
1674 | compression: zlib zlib zstd (zstd !) | |
1660 | compression-level: default default default |
|
1675 | compression-level: default default default | |
1661 | $ hg debugrequires |
|
1676 | $ hg debugrequires | |
1662 | dotencode |
|
1677 | dotencode | |
1663 | fncache |
|
1678 | fncache | |
1664 | generaldelta |
|
1679 | generaldelta | |
1665 | persistent-nodemap (rust !) |
|
1680 | persistent-nodemap (rust !) | |
1666 | revlogv1 |
|
1681 | revlogv1 | |
1667 | share-safe |
|
1682 | share-safe | |
1668 | sparserevlog |
|
1683 | sparserevlog | |
1669 | store |
|
1684 | store | |
1670 |
|
1685 | |||
1671 | upgrade from hgrc |
|
1686 | upgrade from hgrc | |
1672 |
|
1687 | |||
1673 | $ cat >> .hg/hgrc << EOF |
|
1688 | $ cat >> .hg/hgrc << EOF | |
1674 | > [format] |
|
1689 | > [format] | |
1675 | > revlog-compression=zstd |
|
1690 | > revlog-compression=zstd | |
1676 | > EOF |
|
1691 | > EOF | |
1677 | $ hg debugupgraderepo --run --no-backup --quiet |
|
1692 | $ hg debugupgraderepo --run --no-backup --quiet | |
1678 | upgrade will perform the following actions: |
|
1693 | upgrade will perform the following actions: | |
1679 |
|
1694 | |||
1680 | requirements |
|
1695 | requirements | |
1681 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
1696 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
1682 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
1697 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
1683 | added: revlog-compression-zstd |
|
1698 | added: revlog-compression-zstd | |
1684 |
|
1699 | |||
1685 | processed revlogs: |
|
1700 | processed revlogs: | |
1686 | - all-filelogs |
|
1701 | - all-filelogs | |
1687 | - changelog |
|
1702 | - changelog | |
1688 | - manifest |
|
1703 | - manifest | |
1689 |
|
1704 | |||
1690 | $ hg debugformat -v |
|
1705 | $ hg debugformat -v | |
1691 | format-variant repo config default |
|
1706 | format-variant repo config default | |
1692 | fncache: yes yes yes |
|
1707 | fncache: yes yes yes | |
1693 | dirstate-v2: no no no |
|
1708 | dirstate-v2: no no no | |
1694 | tracked-hint: no no no |
|
1709 | tracked-hint: no no no | |
1695 | dotencode: yes yes yes |
|
1710 | dotencode: yes yes yes | |
1696 | generaldelta: yes yes yes |
|
1711 | generaldelta: yes yes yes | |
1697 | share-safe: yes yes yes |
|
1712 | share-safe: yes yes yes | |
1698 | sparserevlog: yes yes yes |
|
1713 | sparserevlog: yes yes yes | |
1699 | persistent-nodemap: no no no (no-rust !) |
|
1714 | persistent-nodemap: no no no (no-rust !) | |
1700 | persistent-nodemap: yes yes no (rust !) |
|
1715 | persistent-nodemap: yes yes no (rust !) | |
1701 | copies-sdc: no no no |
|
1716 | copies-sdc: no no no | |
1702 | revlog-v2: no no no |
|
1717 | revlog-v2: no no no | |
1703 | changelog-v2: no no no |
|
1718 | changelog-v2: no no no | |
1704 | plain-cl-delta: yes yes yes |
|
1719 | plain-cl-delta: yes yes yes | |
1705 | compression: zlib zlib zlib (no-zstd !) |
|
1720 | compression: zlib zlib zlib (no-zstd !) | |
1706 | compression: zstd zstd zstd (zstd !) |
|
1721 | compression: zstd zstd zstd (zstd !) | |
1707 | compression-level: default default default |
|
1722 | compression-level: default default default | |
1708 | $ hg debugrequires |
|
1723 | $ hg debugrequires | |
1709 | dotencode |
|
1724 | dotencode | |
1710 | fncache |
|
1725 | fncache | |
1711 | generaldelta |
|
1726 | generaldelta | |
1712 | persistent-nodemap (rust !) |
|
1727 | persistent-nodemap (rust !) | |
1713 | revlog-compression-zstd |
|
1728 | revlog-compression-zstd | |
1714 | revlogv1 |
|
1729 | revlogv1 | |
1715 | share-safe |
|
1730 | share-safe | |
1716 | sparserevlog |
|
1731 | sparserevlog | |
1717 | store |
|
1732 | store | |
1718 |
|
1733 | |||
1719 | #endif |
|
1734 | #endif | |
1720 |
|
1735 | |||
1721 | Check upgrading to a revlog format supporting sidedata |
|
1736 | Check upgrading to a revlog format supporting sidedata | |
1722 | ------------------------------------------------------ |
|
1737 | ------------------------------------------------------ | |
1723 |
|
1738 | |||
1724 | upgrade |
|
1739 | upgrade | |
1725 |
|
1740 | |||
1726 | $ hg debugsidedata -c 0 |
|
1741 | $ hg debugsidedata -c 0 | |
1727 | $ hg --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data debugupgraderepo --run --no-backup --config "extensions.sidedata=$TESTDIR/testlib/ext-sidedata.py" --quiet |
|
1742 | $ hg --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data debugupgraderepo --run --no-backup --config "extensions.sidedata=$TESTDIR/testlib/ext-sidedata.py" --quiet | |
1728 | upgrade will perform the following actions: |
|
1743 | upgrade will perform the following actions: | |
1729 |
|
1744 | |||
1730 | requirements |
|
1745 | requirements | |
1731 | preserved: dotencode, fncache, generaldelta, share-safe, store (no-zstd !) |
|
1746 | preserved: dotencode, fncache, generaldelta, share-safe, store (no-zstd !) | |
1732 | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !) |
|
1747 | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !) | |
1733 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !) |
|
1748 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !) | |
1734 | removed: revlogv1 |
|
1749 | removed: revlogv1 | |
1735 | added: exp-revlogv2.2 (zstd !) |
|
1750 | added: exp-revlogv2.2 (zstd !) | |
1736 | added: exp-revlogv2.2, sparserevlog (no-zstd !) |
|
1751 | added: exp-revlogv2.2, sparserevlog (no-zstd !) | |
1737 |
|
1752 | |||
1738 | processed revlogs: |
|
1753 | processed revlogs: | |
1739 | - all-filelogs |
|
1754 | - all-filelogs | |
1740 | - changelog |
|
1755 | - changelog | |
1741 | - manifest |
|
1756 | - manifest | |
1742 |
|
1757 | |||
1743 | $ hg debugformat -v |
|
1758 | $ hg debugformat -v | |
1744 | format-variant repo config default |
|
1759 | format-variant repo config default | |
1745 | fncache: yes yes yes |
|
1760 | fncache: yes yes yes | |
1746 | dirstate-v2: no no no |
|
1761 | dirstate-v2: no no no | |
1747 | tracked-hint: no no no |
|
1762 | tracked-hint: no no no | |
1748 | dotencode: yes yes yes |
|
1763 | dotencode: yes yes yes | |
1749 | generaldelta: yes yes yes |
|
1764 | generaldelta: yes yes yes | |
1750 | share-safe: yes yes yes |
|
1765 | share-safe: yes yes yes | |
1751 | sparserevlog: yes yes yes |
|
1766 | sparserevlog: yes yes yes | |
1752 | persistent-nodemap: no no no (no-rust !) |
|
1767 | persistent-nodemap: no no no (no-rust !) | |
1753 | persistent-nodemap: yes yes no (rust !) |
|
1768 | persistent-nodemap: yes yes no (rust !) | |
1754 | copies-sdc: no no no |
|
1769 | copies-sdc: no no no | |
1755 | revlog-v2: yes no no |
|
1770 | revlog-v2: yes no no | |
1756 | changelog-v2: no no no |
|
1771 | changelog-v2: no no no | |
1757 | plain-cl-delta: yes yes yes |
|
1772 | plain-cl-delta: yes yes yes | |
1758 | compression: zlib zlib zlib (no-zstd !) |
|
1773 | compression: zlib zlib zlib (no-zstd !) | |
1759 | compression: zstd zstd zstd (zstd !) |
|
1774 | compression: zstd zstd zstd (zstd !) | |
1760 | compression-level: default default default |
|
1775 | compression-level: default default default | |
1761 | $ hg debugrequires |
|
1776 | $ hg debugrequires | |
1762 | dotencode |
|
1777 | dotencode | |
1763 | exp-revlogv2.2 |
|
1778 | exp-revlogv2.2 | |
1764 | fncache |
|
1779 | fncache | |
1765 | generaldelta |
|
1780 | generaldelta | |
1766 | persistent-nodemap (rust !) |
|
1781 | persistent-nodemap (rust !) | |
1767 | revlog-compression-zstd (zstd !) |
|
1782 | revlog-compression-zstd (zstd !) | |
1768 | share-safe |
|
1783 | share-safe | |
1769 | sparserevlog |
|
1784 | sparserevlog | |
1770 | store |
|
1785 | store | |
1771 | $ hg debugsidedata -c 0 |
|
1786 | $ hg debugsidedata -c 0 | |
1772 | 2 sidedata entries |
|
1787 | 2 sidedata entries | |
1773 | entry-0001 size 4 |
|
1788 | entry-0001 size 4 | |
1774 | entry-0002 size 32 |
|
1789 | entry-0002 size 32 | |
1775 |
|
1790 | |||
1776 | downgrade |
|
1791 | downgrade | |
1777 |
|
1792 | |||
1778 | $ hg debugupgraderepo --config experimental.revlogv2=no --run --no-backup --quiet |
|
1793 | $ hg debugupgraderepo --config experimental.revlogv2=no --run --no-backup --quiet | |
1779 | upgrade will perform the following actions: |
|
1794 | upgrade will perform the following actions: | |
1780 |
|
1795 | |||
1781 | requirements |
|
1796 | requirements | |
1782 | preserved: dotencode, fncache, generaldelta, share-safe, sparserevlog, store (no-zstd !) |
|
1797 | preserved: dotencode, fncache, generaldelta, share-safe, sparserevlog, store (no-zstd !) | |
1783 | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !) |
|
1798 | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !) | |
1784 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !) |
|
1799 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !) | |
1785 | removed: exp-revlogv2.2 |
|
1800 | removed: exp-revlogv2.2 | |
1786 | added: revlogv1 |
|
1801 | added: revlogv1 | |
1787 |
|
1802 | |||
1788 | processed revlogs: |
|
1803 | processed revlogs: | |
1789 | - all-filelogs |
|
1804 | - all-filelogs | |
1790 | - changelog |
|
1805 | - changelog | |
1791 | - manifest |
|
1806 | - manifest | |
1792 |
|
1807 | |||
1793 | $ hg debugformat -v |
|
1808 | $ hg debugformat -v | |
1794 | format-variant repo config default |
|
1809 | format-variant repo config default | |
1795 | fncache: yes yes yes |
|
1810 | fncache: yes yes yes | |
1796 | dirstate-v2: no no no |
|
1811 | dirstate-v2: no no no | |
1797 | tracked-hint: no no no |
|
1812 | tracked-hint: no no no | |
1798 | dotencode: yes yes yes |
|
1813 | dotencode: yes yes yes | |
1799 | generaldelta: yes yes yes |
|
1814 | generaldelta: yes yes yes | |
1800 | share-safe: yes yes yes |
|
1815 | share-safe: yes yes yes | |
1801 | sparserevlog: yes yes yes |
|
1816 | sparserevlog: yes yes yes | |
1802 | persistent-nodemap: no no no (no-rust !) |
|
1817 | persistent-nodemap: no no no (no-rust !) | |
1803 | persistent-nodemap: yes yes no (rust !) |
|
1818 | persistent-nodemap: yes yes no (rust !) | |
1804 | copies-sdc: no no no |
|
1819 | copies-sdc: no no no | |
1805 | revlog-v2: no no no |
|
1820 | revlog-v2: no no no | |
1806 | changelog-v2: no no no |
|
1821 | changelog-v2: no no no | |
1807 | plain-cl-delta: yes yes yes |
|
1822 | plain-cl-delta: yes yes yes | |
1808 | compression: zlib zlib zlib (no-zstd !) |
|
1823 | compression: zlib zlib zlib (no-zstd !) | |
1809 | compression: zstd zstd zstd (zstd !) |
|
1824 | compression: zstd zstd zstd (zstd !) | |
1810 | compression-level: default default default |
|
1825 | compression-level: default default default | |
1811 | $ hg debugrequires |
|
1826 | $ hg debugrequires | |
1812 | dotencode |
|
1827 | dotencode | |
1813 | fncache |
|
1828 | fncache | |
1814 | generaldelta |
|
1829 | generaldelta | |
1815 | persistent-nodemap (rust !) |
|
1830 | persistent-nodemap (rust !) | |
1816 | revlog-compression-zstd (zstd !) |
|
1831 | revlog-compression-zstd (zstd !) | |
1817 | revlogv1 |
|
1832 | revlogv1 | |
1818 | share-safe |
|
1833 | share-safe | |
1819 | sparserevlog |
|
1834 | sparserevlog | |
1820 | store |
|
1835 | store | |
1821 | $ hg debugsidedata -c 0 |
|
1836 | $ hg debugsidedata -c 0 | |
1822 |
|
1837 | |||
1823 | upgrade from hgrc |
|
1838 | upgrade from hgrc | |
1824 |
|
1839 | |||
1825 | $ cat >> .hg/hgrc << EOF |
|
1840 | $ cat >> .hg/hgrc << EOF | |
1826 | > [experimental] |
|
1841 | > [experimental] | |
1827 | > revlogv2=enable-unstable-format-and-corrupt-my-data |
|
1842 | > revlogv2=enable-unstable-format-and-corrupt-my-data | |
1828 | > EOF |
|
1843 | > EOF | |
1829 | $ hg debugupgraderepo --run --no-backup --quiet |
|
1844 | $ hg debugupgraderepo --run --no-backup --quiet | |
1830 | upgrade will perform the following actions: |
|
1845 | upgrade will perform the following actions: | |
1831 |
|
1846 | |||
1832 | requirements |
|
1847 | requirements | |
1833 | preserved: dotencode, fncache, generaldelta, share-safe, sparserevlog, store (no-zstd !) |
|
1848 | preserved: dotencode, fncache, generaldelta, share-safe, sparserevlog, store (no-zstd !) | |
1834 | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !) |
|
1849 | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !) | |
1835 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !) |
|
1850 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !) | |
1836 | removed: revlogv1 |
|
1851 | removed: revlogv1 | |
1837 | added: exp-revlogv2.2 |
|
1852 | added: exp-revlogv2.2 | |
1838 |
|
1853 | |||
1839 | processed revlogs: |
|
1854 | processed revlogs: | |
1840 | - all-filelogs |
|
1855 | - all-filelogs | |
1841 | - changelog |
|
1856 | - changelog | |
1842 | - manifest |
|
1857 | - manifest | |
1843 |
|
1858 | |||
1844 | $ hg debugformat -v |
|
1859 | $ hg debugformat -v | |
1845 | format-variant repo config default |
|
1860 | format-variant repo config default | |
1846 | fncache: yes yes yes |
|
1861 | fncache: yes yes yes | |
1847 | dirstate-v2: no no no |
|
1862 | dirstate-v2: no no no | |
1848 | tracked-hint: no no no |
|
1863 | tracked-hint: no no no | |
1849 | dotencode: yes yes yes |
|
1864 | dotencode: yes yes yes | |
1850 | generaldelta: yes yes yes |
|
1865 | generaldelta: yes yes yes | |
1851 | share-safe: yes yes yes |
|
1866 | share-safe: yes yes yes | |
1852 | sparserevlog: yes yes yes |
|
1867 | sparserevlog: yes yes yes | |
1853 | persistent-nodemap: no no no (no-rust !) |
|
1868 | persistent-nodemap: no no no (no-rust !) | |
1854 | persistent-nodemap: yes yes no (rust !) |
|
1869 | persistent-nodemap: yes yes no (rust !) | |
1855 | copies-sdc: no no no |
|
1870 | copies-sdc: no no no | |
1856 | revlog-v2: yes yes no |
|
1871 | revlog-v2: yes yes no | |
1857 | changelog-v2: no no no |
|
1872 | changelog-v2: no no no | |
1858 | plain-cl-delta: yes yes yes |
|
1873 | plain-cl-delta: yes yes yes | |
1859 | compression: zlib zlib zlib (no-zstd !) |
|
1874 | compression: zlib zlib zlib (no-zstd !) | |
1860 | compression: zstd zstd zstd (zstd !) |
|
1875 | compression: zstd zstd zstd (zstd !) | |
1861 | compression-level: default default default |
|
1876 | compression-level: default default default | |
1862 | $ hg debugrequires |
|
1877 | $ hg debugrequires | |
1863 | dotencode |
|
1878 | dotencode | |
1864 | exp-revlogv2.2 |
|
1879 | exp-revlogv2.2 | |
1865 | fncache |
|
1880 | fncache | |
1866 | generaldelta |
|
1881 | generaldelta | |
1867 | persistent-nodemap (rust !) |
|
1882 | persistent-nodemap (rust !) | |
1868 | revlog-compression-zstd (zstd !) |
|
1883 | revlog-compression-zstd (zstd !) | |
1869 | share-safe |
|
1884 | share-safe | |
1870 | sparserevlog |
|
1885 | sparserevlog | |
1871 | store |
|
1886 | store | |
1872 | $ hg debugsidedata -c 0 |
|
1887 | $ hg debugsidedata -c 0 | |
1873 |
|
1888 | |||
1874 | Demonstrate that nothing to perform upgrade will still run all the way through |
|
1889 | Demonstrate that nothing to perform upgrade will still run all the way through | |
1875 |
|
1890 | |||
1876 | $ hg debugupgraderepo --run |
|
1891 | $ hg debugupgraderepo --run | |
1877 | nothing to do |
|
1892 | nothing to do | |
1878 |
|
1893 | |||
1879 | #if no-rust |
|
1894 | #if no-rust | |
1880 |
|
1895 | |||
1881 | $ cat << EOF >> $HGRCPATH |
|
1896 | $ cat << EOF >> $HGRCPATH | |
1882 | > [storage] |
|
1897 | > [storage] | |
1883 | > dirstate-v2.slow-path = allow |
|
1898 | > dirstate-v2.slow-path = allow | |
1884 | > EOF |
|
1899 | > EOF | |
1885 |
|
1900 | |||
1886 | #endif |
|
1901 | #endif | |
1887 |
|
1902 | |||
1888 | Upgrade to dirstate-v2 |
|
1903 | Upgrade to dirstate-v2 | |
1889 |
|
1904 | |||
1890 | $ hg debugformat -v --config format.use-dirstate-v2=1 | grep dirstate-v2 |
|
1905 | $ hg debugformat -v --config format.use-dirstate-v2=1 | grep dirstate-v2 | |
1891 | dirstate-v2: no yes no |
|
1906 | dirstate-v2: no yes no | |
1892 | $ hg debugupgraderepo --config format.use-dirstate-v2=1 --run |
|
1907 | $ hg debugupgraderepo --config format.use-dirstate-v2=1 --run | |
1893 | upgrade will perform the following actions: |
|
1908 | upgrade will perform the following actions: | |
1894 |
|
1909 | |||
1895 | requirements |
|
1910 | requirements | |
1896 | preserved: * (glob) |
|
1911 | preserved: * (glob) | |
1897 | added: dirstate-v2 |
|
1912 | added: dirstate-v2 | |
1898 |
|
1913 | |||
1899 | dirstate-v2 |
|
1914 | dirstate-v2 | |
1900 | "hg status" will be faster |
|
1915 | "hg status" will be faster | |
1901 |
|
1916 | |||
1902 | no revlogs to process |
|
1917 | no revlogs to process | |
1903 |
|
1918 | |||
1904 | beginning upgrade... |
|
1919 | beginning upgrade... | |
1905 | repository locked and read-only |
|
1920 | repository locked and read-only | |
1906 | creating temporary repository to stage upgraded data: $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) |
|
1921 | creating temporary repository to stage upgraded data: $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) | |
1907 | (it is safe to interrupt this process any time before data migration completes) |
|
1922 | (it is safe to interrupt this process any time before data migration completes) | |
1908 | upgrading to dirstate-v2 from v1 |
|
1923 | upgrading to dirstate-v2 from v1 | |
1909 | replaced files will be backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob) |
|
1924 | replaced files will be backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob) | |
1910 | removing temporary repository $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) |
|
1925 | removing temporary repository $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) | |
1911 | $ ls .hg/upgradebackup.*/dirstate |
|
1926 | $ ls .hg/upgradebackup.*/dirstate | |
1912 | .hg/upgradebackup.*/dirstate (glob) |
|
1927 | .hg/upgradebackup.*/dirstate (glob) | |
1913 | $ hg debugformat -v | grep dirstate-v2 |
|
1928 | $ hg debugformat -v | grep dirstate-v2 | |
1914 | dirstate-v2: yes no no |
|
1929 | dirstate-v2: yes no no | |
1915 | $ hg status |
|
1930 | $ hg status | |
1916 | $ dd bs=12 count=1 if=.hg/dirstate 2> /dev/null |
|
1931 | $ dd bs=12 count=1 if=.hg/dirstate 2> /dev/null | |
1917 | dirstate-v2 |
|
1932 | dirstate-v2 | |
1918 |
|
1933 | |||
1919 | Downgrade from dirstate-v2 |
|
1934 | Downgrade from dirstate-v2 | |
1920 |
|
1935 | |||
1921 | $ hg debugupgraderepo --run |
|
1936 | $ hg debugupgraderepo --run | |
1922 | upgrade will perform the following actions: |
|
1937 | upgrade will perform the following actions: | |
1923 |
|
1938 | |||
1924 | requirements |
|
1939 | requirements | |
1925 | preserved: * (glob) |
|
1940 | preserved: * (glob) | |
1926 | removed: dirstate-v2 |
|
1941 | removed: dirstate-v2 | |
1927 |
|
1942 | |||
1928 | no revlogs to process |
|
1943 | no revlogs to process | |
1929 |
|
1944 | |||
1930 | beginning upgrade... |
|
1945 | beginning upgrade... | |
1931 | repository locked and read-only |
|
1946 | repository locked and read-only | |
1932 | creating temporary repository to stage upgraded data: $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) |
|
1947 | creating temporary repository to stage upgraded data: $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) | |
1933 | (it is safe to interrupt this process any time before data migration completes) |
|
1948 | (it is safe to interrupt this process any time before data migration completes) | |
1934 | downgrading from dirstate-v2 to v1 |
|
1949 | downgrading from dirstate-v2 to v1 | |
1935 | replaced files will be backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob) |
|
1950 | replaced files will be backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob) | |
1936 | removing temporary repository $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) |
|
1951 | removing temporary repository $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) | |
1937 | $ hg debugformat -v | grep dirstate-v2 |
|
1952 | $ hg debugformat -v | grep dirstate-v2 | |
1938 | dirstate-v2: no no no |
|
1953 | dirstate-v2: no no no | |
1939 | $ hg status |
|
1954 | $ hg status | |
1940 |
|
1955 | |||
1941 | $ cd .. |
|
1956 | $ cd .. | |
1942 |
|
1957 | |||
1943 | dirstate-v2: upgrade and downgrade from and empty repository: |
|
1958 | dirstate-v2: upgrade and downgrade from and empty repository: | |
1944 | ------------------------------------------------------------- |
|
1959 | ------------------------------------------------------------- | |
1945 |
|
1960 | |||
1946 | $ hg init --config format.use-dirstate-v2=no dirstate-v2-empty |
|
1961 | $ hg init --config format.use-dirstate-v2=no dirstate-v2-empty | |
1947 | $ cd dirstate-v2-empty |
|
1962 | $ cd dirstate-v2-empty | |
1948 | $ hg debugformat | grep dirstate-v2 |
|
1963 | $ hg debugformat | grep dirstate-v2 | |
1949 | dirstate-v2: no |
|
1964 | dirstate-v2: no | |
1950 |
|
1965 | |||
1951 | upgrade |
|
1966 | upgrade | |
1952 |
|
1967 | |||
1953 | $ hg debugupgraderepo --run --config format.use-dirstate-v2=yes |
|
1968 | $ hg debugupgraderepo --run --config format.use-dirstate-v2=yes | |
1954 | upgrade will perform the following actions: |
|
1969 | upgrade will perform the following actions: | |
1955 |
|
1970 | |||
1956 | requirements |
|
1971 | requirements | |
1957 | preserved: * (glob) |
|
1972 | preserved: * (glob) | |
1958 | added: dirstate-v2 |
|
1973 | added: dirstate-v2 | |
1959 |
|
1974 | |||
1960 | dirstate-v2 |
|
1975 | dirstate-v2 | |
1961 | "hg status" will be faster |
|
1976 | "hg status" will be faster | |
1962 |
|
1977 | |||
1963 | no revlogs to process |
|
1978 | no revlogs to process | |
1964 |
|
1979 | |||
1965 | beginning upgrade... |
|
1980 | beginning upgrade... | |
1966 | repository locked and read-only |
|
1981 | repository locked and read-only | |
1967 | creating temporary repository to stage upgraded data: $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) |
|
1982 | creating temporary repository to stage upgraded data: $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) | |
1968 | (it is safe to interrupt this process any time before data migration completes) |
|
1983 | (it is safe to interrupt this process any time before data migration completes) | |
1969 | upgrading to dirstate-v2 from v1 |
|
1984 | upgrading to dirstate-v2 from v1 | |
1970 | replaced files will be backed up at $TESTTMP/dirstate-v2-empty/.hg/upgradebackup.* (glob) |
|
1985 | replaced files will be backed up at $TESTTMP/dirstate-v2-empty/.hg/upgradebackup.* (glob) | |
1971 | removing temporary repository $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) |
|
1986 | removing temporary repository $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) | |
1972 | $ hg debugformat | grep dirstate-v2 |
|
1987 | $ hg debugformat | grep dirstate-v2 | |
1973 | dirstate-v2: yes |
|
1988 | dirstate-v2: yes | |
1974 |
|
1989 | |||
1975 | downgrade |
|
1990 | downgrade | |
1976 |
|
1991 | |||
1977 | $ hg debugupgraderepo --run --config format.use-dirstate-v2=no |
|
1992 | $ hg debugupgraderepo --run --config format.use-dirstate-v2=no | |
1978 | upgrade will perform the following actions: |
|
1993 | upgrade will perform the following actions: | |
1979 |
|
1994 | |||
1980 | requirements |
|
1995 | requirements | |
1981 | preserved: * (glob) |
|
1996 | preserved: * (glob) | |
1982 | removed: dirstate-v2 |
|
1997 | removed: dirstate-v2 | |
1983 |
|
1998 | |||
1984 | no revlogs to process |
|
1999 | no revlogs to process | |
1985 |
|
2000 | |||
1986 | beginning upgrade... |
|
2001 | beginning upgrade... | |
1987 | repository locked and read-only |
|
2002 | repository locked and read-only | |
1988 | creating temporary repository to stage upgraded data: $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) |
|
2003 | creating temporary repository to stage upgraded data: $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) | |
1989 | (it is safe to interrupt this process any time before data migration completes) |
|
2004 | (it is safe to interrupt this process any time before data migration completes) | |
1990 | downgrading from dirstate-v2 to v1 |
|
2005 | downgrading from dirstate-v2 to v1 | |
1991 | replaced files will be backed up at $TESTTMP/dirstate-v2-empty/.hg/upgradebackup.* (glob) |
|
2006 | replaced files will be backed up at $TESTTMP/dirstate-v2-empty/.hg/upgradebackup.* (glob) | |
1992 | removing temporary repository $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) |
|
2007 | removing temporary repository $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) | |
1993 | $ hg debugformat | grep dirstate-v2 |
|
2008 | $ hg debugformat | grep dirstate-v2 | |
1994 | dirstate-v2: no |
|
2009 | dirstate-v2: no | |
1995 |
|
2010 | |||
1996 | $ cd .. |
|
2011 | $ cd .. | |
1997 |
|
2012 | |||
1998 | Test automatic upgrade/downgrade |
|
2013 | Test automatic upgrade/downgrade | |
1999 | ================================ |
|
2014 | ================================ | |
2000 |
|
2015 | |||
2001 |
|
2016 | |||
2002 | For dirstate v2 |
|
2017 | For dirstate v2 | |
2003 | --------------- |
|
2018 | --------------- | |
2004 |
|
2019 | |||
2005 | create an initial repository |
|
2020 | create an initial repository | |
2006 |
|
2021 | |||
2007 | $ hg init auto-upgrade \ |
|
2022 | $ hg init auto-upgrade \ | |
2008 | > --config format.use-dirstate-v2=no \ |
|
2023 | > --config format.use-dirstate-v2=no \ | |
2009 | > --config format.use-dirstate-tracked-hint=yes \ |
|
2024 | > --config format.use-dirstate-tracked-hint=yes \ | |
2010 | > --config format.use-share-safe=no |
|
2025 | > --config format.use-share-safe=no | |
2011 | $ hg debugbuilddag -R auto-upgrade --new-file .+5 |
|
2026 | $ hg debugbuilddag -R auto-upgrade --new-file .+5 | |
2012 | $ hg -R auto-upgrade update |
|
2027 | $ hg -R auto-upgrade update | |
2013 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2028 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
2014 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 |
|
2029 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 | |
2015 | dirstate-v2: no |
|
2030 | dirstate-v2: no | |
2016 |
|
2031 | |||
2017 | upgrade it to dirstate-v2 automatically |
|
2032 | upgrade it to dirstate-v2 automatically | |
2018 |
|
2033 | |||
2019 | $ hg status -R auto-upgrade \ |
|
2034 | $ hg status -R auto-upgrade \ | |
2020 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2035 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ | |
2021 | > --config format.use-dirstate-v2=yes |
|
2036 | > --config format.use-dirstate-v2=yes | |
2022 | automatically upgrading repository to the `dirstate-v2` feature |
|
2037 | automatically upgrading repository to the `dirstate-v2` feature | |
2023 | (see `hg help config.format.use-dirstate-v2` for details) |
|
2038 | (see `hg help config.format.use-dirstate-v2` for details) | |
2024 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 |
|
2039 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 | |
2025 | dirstate-v2: yes |
|
2040 | dirstate-v2: yes | |
2026 |
|
2041 | |||
2027 | downgrade it from dirstate-v2 automatically |
|
2042 | downgrade it from dirstate-v2 automatically | |
2028 |
|
2043 | |||
2029 | $ hg status -R auto-upgrade \ |
|
2044 | $ hg status -R auto-upgrade \ | |
2030 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2045 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ | |
2031 | > --config format.use-dirstate-v2=no |
|
2046 | > --config format.use-dirstate-v2=no | |
2032 | automatically downgrading repository from the `dirstate-v2` feature |
|
2047 | automatically downgrading repository from the `dirstate-v2` feature | |
2033 | (see `hg help config.format.use-dirstate-v2` for details) |
|
2048 | (see `hg help config.format.use-dirstate-v2` for details) | |
2034 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 |
|
2049 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 | |
2035 | dirstate-v2: no |
|
2050 | dirstate-v2: no | |
2036 |
|
2051 | |||
2037 |
|
2052 | |||
2038 | For multiple change at the same time |
|
2053 | For multiple change at the same time | |
2039 | ------------------------------------ |
|
2054 | ------------------------------------ | |
2040 |
|
2055 | |||
2041 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' |
|
2056 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' | |
2042 | dirstate-v2: no |
|
2057 | dirstate-v2: no | |
2043 | tracked-hint: yes |
|
2058 | tracked-hint: yes | |
2044 | share-safe: no |
|
2059 | share-safe: no | |
2045 |
|
2060 | |||
2046 | $ hg status -R auto-upgrade \ |
|
2061 | $ hg status -R auto-upgrade \ | |
2047 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2062 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ | |
2048 | > --config format.use-dirstate-v2=yes \ |
|
2063 | > --config format.use-dirstate-v2=yes \ | |
2049 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2064 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \ | |
2050 | > --config format.use-dirstate-tracked-hint=no\ |
|
2065 | > --config format.use-dirstate-tracked-hint=no\ | |
2051 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2066 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \ | |
2052 | > --config format.use-share-safe=yes |
|
2067 | > --config format.use-share-safe=yes | |
2053 | automatically upgrading repository to the `dirstate-v2` feature |
|
2068 | automatically upgrading repository to the `dirstate-v2` feature | |
2054 | (see `hg help config.format.use-dirstate-v2` for details) |
|
2069 | (see `hg help config.format.use-dirstate-v2` for details) | |
2055 | automatically upgrading repository to the `share-safe` feature |
|
2070 | automatically upgrading repository to the `share-safe` feature | |
2056 | (see `hg help config.format.use-share-safe` for details) |
|
2071 | (see `hg help config.format.use-share-safe` for details) | |
2057 | automatically downgrading repository from the `tracked-hint` feature |
|
2072 | automatically downgrading repository from the `tracked-hint` feature | |
2058 | (see `hg help config.format.use-dirstate-tracked-hint` for details) |
|
2073 | (see `hg help config.format.use-dirstate-tracked-hint` for details) | |
2059 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' |
|
2074 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' | |
2060 | dirstate-v2: yes |
|
2075 | dirstate-v2: yes | |
2061 | tracked-hint: no |
|
2076 | tracked-hint: no | |
2062 | share-safe: yes |
|
2077 | share-safe: yes | |
2063 |
|
2078 | |||
2064 | Quiet upgrade and downgrade |
|
2079 | Quiet upgrade and downgrade | |
2065 | --------------------------- |
|
2080 | --------------------------- | |
2066 |
|
2081 | |||
2067 |
|
2082 | |||
2068 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' |
|
2083 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' | |
2069 | dirstate-v2: yes |
|
2084 | dirstate-v2: yes | |
2070 | tracked-hint: no |
|
2085 | tracked-hint: no | |
2071 | share-safe: yes |
|
2086 | share-safe: yes | |
2072 | $ hg status -R auto-upgrade \ |
|
2087 | $ hg status -R auto-upgrade \ | |
2073 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2088 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ | |
2074 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet=yes \ |
|
2089 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet=yes \ | |
2075 | > --config format.use-dirstate-v2=no \ |
|
2090 | > --config format.use-dirstate-v2=no \ | |
2076 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2091 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \ | |
2077 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories:quiet=yes \ |
|
2092 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories:quiet=yes \ | |
2078 | > --config format.use-dirstate-tracked-hint=yes \ |
|
2093 | > --config format.use-dirstate-tracked-hint=yes \ | |
2079 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2094 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \ | |
2080 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet=yes \ |
|
2095 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet=yes \ | |
2081 | > --config format.use-share-safe=no |
|
2096 | > --config format.use-share-safe=no | |
2082 |
|
2097 | |||
2083 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' |
|
2098 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' | |
2084 | dirstate-v2: no |
|
2099 | dirstate-v2: no | |
2085 | tracked-hint: yes |
|
2100 | tracked-hint: yes | |
2086 | share-safe: no |
|
2101 | share-safe: no | |
2087 |
|
2102 | |||
2088 | $ hg status -R auto-upgrade \ |
|
2103 | $ hg status -R auto-upgrade \ | |
2089 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2104 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ | |
2090 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet=yes \ |
|
2105 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet=yes \ | |
2091 | > --config format.use-dirstate-v2=yes \ |
|
2106 | > --config format.use-dirstate-v2=yes \ | |
2092 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2107 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \ | |
2093 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories:quiet=yes \ |
|
2108 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories:quiet=yes \ | |
2094 | > --config format.use-dirstate-tracked-hint=no\ |
|
2109 | > --config format.use-dirstate-tracked-hint=no\ | |
2095 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2110 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \ | |
2096 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet=yes \ |
|
2111 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet=yes \ | |
2097 | > --config format.use-share-safe=yes |
|
2112 | > --config format.use-share-safe=yes | |
2098 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' |
|
2113 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' | |
2099 | dirstate-v2: yes |
|
2114 | dirstate-v2: yes | |
2100 | tracked-hint: no |
|
2115 | tracked-hint: no | |
2101 | share-safe: yes |
|
2116 | share-safe: yes | |
2102 |
|
2117 | |||
2103 | Attempting Auto-upgrade on a read-only repository |
|
2118 | Attempting Auto-upgrade on a read-only repository | |
2104 | ------------------------------------------------- |
|
2119 | ------------------------------------------------- | |
2105 |
|
2120 | |||
2106 | $ chmod -R a-w auto-upgrade |
|
2121 | $ chmod -R a-w auto-upgrade | |
2107 |
|
2122 | |||
2108 | $ hg status -R auto-upgrade \ |
|
2123 | $ hg status -R auto-upgrade \ | |
2109 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2124 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ | |
2110 | > --config format.use-dirstate-v2=no |
|
2125 | > --config format.use-dirstate-v2=no | |
2111 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 |
|
2126 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 | |
2112 | dirstate-v2: yes |
|
2127 | dirstate-v2: yes | |
2113 |
|
2128 | |||
2114 | $ chmod -R u+w auto-upgrade |
|
2129 | $ chmod -R u+w auto-upgrade | |
2115 |
|
2130 | |||
2116 | Attempting Auto-upgrade on a locked repository |
|
2131 | Attempting Auto-upgrade on a locked repository | |
2117 | ---------------------------------------------- |
|
2132 | ---------------------------------------------- | |
2118 |
|
2133 | |||
2119 | $ hg -R auto-upgrade debuglock --set-lock --quiet & |
|
2134 | $ hg -R auto-upgrade debuglock --set-lock --quiet & | |
2120 | $ echo $! >> $DAEMON_PIDS |
|
2135 | $ echo $! >> $DAEMON_PIDS | |
2121 | $ $RUNTESTDIR/testlib/wait-on-file 10 auto-upgrade/.hg/store/lock |
|
2136 | $ $RUNTESTDIR/testlib/wait-on-file 10 auto-upgrade/.hg/store/lock | |
2122 | $ hg status -R auto-upgrade \ |
|
2137 | $ hg status -R auto-upgrade \ | |
2123 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2138 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ | |
2124 | > --config format.use-dirstate-v2=no |
|
2139 | > --config format.use-dirstate-v2=no | |
2125 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 |
|
2140 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 | |
2126 | dirstate-v2: yes |
|
2141 | dirstate-v2: yes | |
2127 |
|
2142 | |||
2128 | $ killdaemons.py |
|
2143 | $ killdaemons.py |
General Comments 0
You need to be logged in to leave comments.
Login now