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