##// END OF EJS Templates
sparse-revlog: enabled by default...
Boris Feld -
r40954:3764330f default
parent child Browse files
Show More
@@ -1,1460 +1,1460 b''
1 1 # configitems.py - centralized declaration of configuration option
2 2 #
3 3 # Copyright 2017 Pierre-Yves David <pierre-yves.david@octobus.net>
4 4 #
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2 or any later version.
7 7
8 8 from __future__ import absolute_import
9 9
10 10 import functools
11 11 import re
12 12
13 13 from . import (
14 14 encoding,
15 15 error,
16 16 )
17 17
18 18 def loadconfigtable(ui, extname, configtable):
19 19 """update config item known to the ui with the extension ones"""
20 20 for section, items in sorted(configtable.items()):
21 21 knownitems = ui._knownconfig.setdefault(section, itemregister())
22 22 knownkeys = set(knownitems)
23 23 newkeys = set(items)
24 24 for key in sorted(knownkeys & newkeys):
25 25 msg = "extension '%s' overwrite config item '%s.%s'"
26 26 msg %= (extname, section, key)
27 27 ui.develwarn(msg, config='warn-config')
28 28
29 29 knownitems.update(items)
30 30
31 31 class configitem(object):
32 32 """represent a known config item
33 33
34 34 :section: the official config section where to find this item,
35 35 :name: the official name within the section,
36 36 :default: default value for this item,
37 37 :alias: optional list of tuples as alternatives,
38 38 :generic: this is a generic definition, match name using regular expression.
39 39 """
40 40
41 41 def __init__(self, section, name, default=None, alias=(),
42 42 generic=False, priority=0):
43 43 self.section = section
44 44 self.name = name
45 45 self.default = default
46 46 self.alias = list(alias)
47 47 self.generic = generic
48 48 self.priority = priority
49 49 self._re = None
50 50 if generic:
51 51 self._re = re.compile(self.name)
52 52
53 53 class itemregister(dict):
54 54 """A specialized dictionary that can handle wild-card selection"""
55 55
56 56 def __init__(self):
57 57 super(itemregister, self).__init__()
58 58 self._generics = set()
59 59
60 60 def update(self, other):
61 61 super(itemregister, self).update(other)
62 62 self._generics.update(other._generics)
63 63
64 64 def __setitem__(self, key, item):
65 65 super(itemregister, self).__setitem__(key, item)
66 66 if item.generic:
67 67 self._generics.add(item)
68 68
69 69 def get(self, key):
70 70 baseitem = super(itemregister, self).get(key)
71 71 if baseitem is not None and not baseitem.generic:
72 72 return baseitem
73 73
74 74 # search for a matching generic item
75 75 generics = sorted(self._generics, key=(lambda x: (x.priority, x.name)))
76 76 for item in generics:
77 77 # we use 'match' instead of 'search' to make the matching simpler
78 78 # for people unfamiliar with regular expression. Having the match
79 79 # rooted to the start of the string will produce less surprising
80 80 # result for user writing simple regex for sub-attribute.
81 81 #
82 82 # For example using "color\..*" match produces an unsurprising
83 83 # result, while using search could suddenly match apparently
84 84 # unrelated configuration that happens to contains "color."
85 85 # anywhere. This is a tradeoff where we favor requiring ".*" on
86 86 # some match to avoid the need to prefix most pattern with "^".
87 87 # The "^" seems more error prone.
88 88 if item._re.match(key):
89 89 return item
90 90
91 91 return None
92 92
93 93 coreitems = {}
94 94
95 95 def _register(configtable, *args, **kwargs):
96 96 item = configitem(*args, **kwargs)
97 97 section = configtable.setdefault(item.section, itemregister())
98 98 if item.name in section:
99 99 msg = "duplicated config item registration for '%s.%s'"
100 100 raise error.ProgrammingError(msg % (item.section, item.name))
101 101 section[item.name] = item
102 102
103 103 # special value for case where the default is derived from other values
104 104 dynamicdefault = object()
105 105
106 106 # Registering actual config items
107 107
108 108 def getitemregister(configtable):
109 109 f = functools.partial(_register, configtable)
110 110 # export pseudo enum as configitem.*
111 111 f.dynamicdefault = dynamicdefault
112 112 return f
113 113
114 114 coreconfigitem = getitemregister(coreitems)
115 115
116 116 coreconfigitem('alias', '.*',
117 117 default=dynamicdefault,
118 118 generic=True,
119 119 )
120 120 coreconfigitem('annotate', 'nodates',
121 121 default=False,
122 122 )
123 123 coreconfigitem('annotate', 'showfunc',
124 124 default=False,
125 125 )
126 126 coreconfigitem('annotate', 'unified',
127 127 default=None,
128 128 )
129 129 coreconfigitem('annotate', 'git',
130 130 default=False,
131 131 )
132 132 coreconfigitem('annotate', 'ignorews',
133 133 default=False,
134 134 )
135 135 coreconfigitem('annotate', 'ignorewsamount',
136 136 default=False,
137 137 )
138 138 coreconfigitem('annotate', 'ignoreblanklines',
139 139 default=False,
140 140 )
141 141 coreconfigitem('annotate', 'ignorewseol',
142 142 default=False,
143 143 )
144 144 coreconfigitem('annotate', 'nobinary',
145 145 default=False,
146 146 )
147 147 coreconfigitem('annotate', 'noprefix',
148 148 default=False,
149 149 )
150 150 coreconfigitem('annotate', 'word-diff',
151 151 default=False,
152 152 )
153 153 coreconfigitem('auth', 'cookiefile',
154 154 default=None,
155 155 )
156 156 # bookmarks.pushing: internal hack for discovery
157 157 coreconfigitem('bookmarks', 'pushing',
158 158 default=list,
159 159 )
160 160 # bundle.mainreporoot: internal hack for bundlerepo
161 161 coreconfigitem('bundle', 'mainreporoot',
162 162 default='',
163 163 )
164 164 coreconfigitem('censor', 'policy',
165 165 default='abort',
166 166 )
167 167 coreconfigitem('chgserver', 'idletimeout',
168 168 default=3600,
169 169 )
170 170 coreconfigitem('chgserver', 'skiphash',
171 171 default=False,
172 172 )
173 173 coreconfigitem('cmdserver', 'log',
174 174 default=None,
175 175 )
176 176 coreconfigitem('cmdserver', 'max-log-files',
177 177 default=7,
178 178 )
179 179 coreconfigitem('cmdserver', 'max-log-size',
180 180 default='1 MB',
181 181 )
182 182 coreconfigitem('cmdserver', 'message-encodings',
183 183 default=list,
184 184 )
185 185 coreconfigitem('cmdserver', 'track-log',
186 186 default=lambda: ['chgserver', 'cmdserver'],
187 187 )
188 188 coreconfigitem('color', '.*',
189 189 default=None,
190 190 generic=True,
191 191 )
192 192 coreconfigitem('color', 'mode',
193 193 default='auto',
194 194 )
195 195 coreconfigitem('color', 'pagermode',
196 196 default=dynamicdefault,
197 197 )
198 198 coreconfigitem('commands', 'grep.all-files',
199 199 default=False,
200 200 )
201 201 coreconfigitem('commands', 'resolve.confirm',
202 202 default=False,
203 203 )
204 204 coreconfigitem('commands', 'resolve.explicit-re-merge',
205 205 default=False,
206 206 )
207 207 coreconfigitem('commands', 'resolve.mark-check',
208 208 default='none',
209 209 )
210 210 coreconfigitem('commands', 'show.aliasprefix',
211 211 default=list,
212 212 )
213 213 coreconfigitem('commands', 'status.relative',
214 214 default=False,
215 215 )
216 216 coreconfigitem('commands', 'status.skipstates',
217 217 default=[],
218 218 )
219 219 coreconfigitem('commands', 'status.terse',
220 220 default='',
221 221 )
222 222 coreconfigitem('commands', 'status.verbose',
223 223 default=False,
224 224 )
225 225 coreconfigitem('commands', 'update.check',
226 226 default=None,
227 227 )
228 228 coreconfigitem('commands', 'update.requiredest',
229 229 default=False,
230 230 )
231 231 coreconfigitem('committemplate', '.*',
232 232 default=None,
233 233 generic=True,
234 234 )
235 235 coreconfigitem('convert', 'bzr.saverev',
236 236 default=True,
237 237 )
238 238 coreconfigitem('convert', 'cvsps.cache',
239 239 default=True,
240 240 )
241 241 coreconfigitem('convert', 'cvsps.fuzz',
242 242 default=60,
243 243 )
244 244 coreconfigitem('convert', 'cvsps.logencoding',
245 245 default=None,
246 246 )
247 247 coreconfigitem('convert', 'cvsps.mergefrom',
248 248 default=None,
249 249 )
250 250 coreconfigitem('convert', 'cvsps.mergeto',
251 251 default=None,
252 252 )
253 253 coreconfigitem('convert', 'git.committeractions',
254 254 default=lambda: ['messagedifferent'],
255 255 )
256 256 coreconfigitem('convert', 'git.extrakeys',
257 257 default=list,
258 258 )
259 259 coreconfigitem('convert', 'git.findcopiesharder',
260 260 default=False,
261 261 )
262 262 coreconfigitem('convert', 'git.remoteprefix',
263 263 default='remote',
264 264 )
265 265 coreconfigitem('convert', 'git.renamelimit',
266 266 default=400,
267 267 )
268 268 coreconfigitem('convert', 'git.saverev',
269 269 default=True,
270 270 )
271 271 coreconfigitem('convert', 'git.similarity',
272 272 default=50,
273 273 )
274 274 coreconfigitem('convert', 'git.skipsubmodules',
275 275 default=False,
276 276 )
277 277 coreconfigitem('convert', 'hg.clonebranches',
278 278 default=False,
279 279 )
280 280 coreconfigitem('convert', 'hg.ignoreerrors',
281 281 default=False,
282 282 )
283 283 coreconfigitem('convert', 'hg.revs',
284 284 default=None,
285 285 )
286 286 coreconfigitem('convert', 'hg.saverev',
287 287 default=False,
288 288 )
289 289 coreconfigitem('convert', 'hg.sourcename',
290 290 default=None,
291 291 )
292 292 coreconfigitem('convert', 'hg.startrev',
293 293 default=None,
294 294 )
295 295 coreconfigitem('convert', 'hg.tagsbranch',
296 296 default='default',
297 297 )
298 298 coreconfigitem('convert', 'hg.usebranchnames',
299 299 default=True,
300 300 )
301 301 coreconfigitem('convert', 'ignoreancestorcheck',
302 302 default=False,
303 303 )
304 304 coreconfigitem('convert', 'localtimezone',
305 305 default=False,
306 306 )
307 307 coreconfigitem('convert', 'p4.encoding',
308 308 default=dynamicdefault,
309 309 )
310 310 coreconfigitem('convert', 'p4.startrev',
311 311 default=0,
312 312 )
313 313 coreconfigitem('convert', 'skiptags',
314 314 default=False,
315 315 )
316 316 coreconfigitem('convert', 'svn.debugsvnlog',
317 317 default=True,
318 318 )
319 319 coreconfigitem('convert', 'svn.trunk',
320 320 default=None,
321 321 )
322 322 coreconfigitem('convert', 'svn.tags',
323 323 default=None,
324 324 )
325 325 coreconfigitem('convert', 'svn.branches',
326 326 default=None,
327 327 )
328 328 coreconfigitem('convert', 'svn.startrev',
329 329 default=0,
330 330 )
331 331 coreconfigitem('debug', 'dirstate.delaywrite',
332 332 default=0,
333 333 )
334 334 coreconfigitem('defaults', '.*',
335 335 default=None,
336 336 generic=True,
337 337 )
338 338 coreconfigitem('devel', 'all-warnings',
339 339 default=False,
340 340 )
341 341 coreconfigitem('devel', 'bundle2.debug',
342 342 default=False,
343 343 )
344 344 coreconfigitem('devel', 'bundle.delta',
345 345 default='',
346 346 )
347 347 coreconfigitem('devel', 'cache-vfs',
348 348 default=None,
349 349 )
350 350 coreconfigitem('devel', 'check-locks',
351 351 default=False,
352 352 )
353 353 coreconfigitem('devel', 'check-relroot',
354 354 default=False,
355 355 )
356 356 coreconfigitem('devel', 'default-date',
357 357 default=None,
358 358 )
359 359 coreconfigitem('devel', 'deprec-warn',
360 360 default=False,
361 361 )
362 362 coreconfigitem('devel', 'disableloaddefaultcerts',
363 363 default=False,
364 364 )
365 365 coreconfigitem('devel', 'warn-empty-changegroup',
366 366 default=False,
367 367 )
368 368 coreconfigitem('devel', 'legacy.exchange',
369 369 default=list,
370 370 )
371 371 coreconfigitem('devel', 'servercafile',
372 372 default='',
373 373 )
374 374 coreconfigitem('devel', 'serverexactprotocol',
375 375 default='',
376 376 )
377 377 coreconfigitem('devel', 'serverrequirecert',
378 378 default=False,
379 379 )
380 380 coreconfigitem('devel', 'strip-obsmarkers',
381 381 default=True,
382 382 )
383 383 coreconfigitem('devel', 'warn-config',
384 384 default=None,
385 385 )
386 386 coreconfigitem('devel', 'warn-config-default',
387 387 default=None,
388 388 )
389 389 coreconfigitem('devel', 'user.obsmarker',
390 390 default=None,
391 391 )
392 392 coreconfigitem('devel', 'warn-config-unknown',
393 393 default=None,
394 394 )
395 395 coreconfigitem('devel', 'debug.copies',
396 396 default=False,
397 397 )
398 398 coreconfigitem('devel', 'debug.extensions',
399 399 default=False,
400 400 )
401 401 coreconfigitem('devel', 'debug.peer-request',
402 402 default=False,
403 403 )
404 404 coreconfigitem('diff', 'nodates',
405 405 default=False,
406 406 )
407 407 coreconfigitem('diff', 'showfunc',
408 408 default=False,
409 409 )
410 410 coreconfigitem('diff', 'unified',
411 411 default=None,
412 412 )
413 413 coreconfigitem('diff', 'git',
414 414 default=False,
415 415 )
416 416 coreconfigitem('diff', 'ignorews',
417 417 default=False,
418 418 )
419 419 coreconfigitem('diff', 'ignorewsamount',
420 420 default=False,
421 421 )
422 422 coreconfigitem('diff', 'ignoreblanklines',
423 423 default=False,
424 424 )
425 425 coreconfigitem('diff', 'ignorewseol',
426 426 default=False,
427 427 )
428 428 coreconfigitem('diff', 'nobinary',
429 429 default=False,
430 430 )
431 431 coreconfigitem('diff', 'noprefix',
432 432 default=False,
433 433 )
434 434 coreconfigitem('diff', 'word-diff',
435 435 default=False,
436 436 )
437 437 coreconfigitem('email', 'bcc',
438 438 default=None,
439 439 )
440 440 coreconfigitem('email', 'cc',
441 441 default=None,
442 442 )
443 443 coreconfigitem('email', 'charsets',
444 444 default=list,
445 445 )
446 446 coreconfigitem('email', 'from',
447 447 default=None,
448 448 )
449 449 coreconfigitem('email', 'method',
450 450 default='smtp',
451 451 )
452 452 coreconfigitem('email', 'reply-to',
453 453 default=None,
454 454 )
455 455 coreconfigitem('email', 'to',
456 456 default=None,
457 457 )
458 458 coreconfigitem('experimental', 'archivemetatemplate',
459 459 default=dynamicdefault,
460 460 )
461 461 coreconfigitem('experimental', 'auto-publish',
462 462 default='publish',
463 463 )
464 464 coreconfigitem('experimental', 'bundle-phases',
465 465 default=False,
466 466 )
467 467 coreconfigitem('experimental', 'bundle2-advertise',
468 468 default=True,
469 469 )
470 470 coreconfigitem('experimental', 'bundle2-output-capture',
471 471 default=False,
472 472 )
473 473 coreconfigitem('experimental', 'bundle2.pushback',
474 474 default=False,
475 475 )
476 476 coreconfigitem('experimental', 'bundle2lazylocking',
477 477 default=False,
478 478 )
479 479 coreconfigitem('experimental', 'bundlecomplevel',
480 480 default=None,
481 481 )
482 482 coreconfigitem('experimental', 'bundlecomplevel.bzip2',
483 483 default=None,
484 484 )
485 485 coreconfigitem('experimental', 'bundlecomplevel.gzip',
486 486 default=None,
487 487 )
488 488 coreconfigitem('experimental', 'bundlecomplevel.none',
489 489 default=None,
490 490 )
491 491 coreconfigitem('experimental', 'bundlecomplevel.zstd',
492 492 default=None,
493 493 )
494 494 coreconfigitem('experimental', 'changegroup3',
495 495 default=False,
496 496 )
497 497 coreconfigitem('experimental', 'clientcompressionengines',
498 498 default=list,
499 499 )
500 500 coreconfigitem('experimental', 'copytrace',
501 501 default='on',
502 502 )
503 503 coreconfigitem('experimental', 'copytrace.movecandidateslimit',
504 504 default=100,
505 505 )
506 506 coreconfigitem('experimental', 'copytrace.sourcecommitlimit',
507 507 default=100,
508 508 )
509 509 coreconfigitem('experimental', 'crecordtest',
510 510 default=None,
511 511 )
512 512 coreconfigitem('experimental', 'directaccess',
513 513 default=False,
514 514 )
515 515 coreconfigitem('experimental', 'directaccess.revnums',
516 516 default=False,
517 517 )
518 518 coreconfigitem('experimental', 'editortmpinhg',
519 519 default=False,
520 520 )
521 521 coreconfigitem('experimental', 'evolution',
522 522 default=list,
523 523 )
524 524 coreconfigitem('experimental', 'evolution.allowdivergence',
525 525 default=False,
526 526 alias=[('experimental', 'allowdivergence')]
527 527 )
528 528 coreconfigitem('experimental', 'evolution.allowunstable',
529 529 default=None,
530 530 )
531 531 coreconfigitem('experimental', 'evolution.createmarkers',
532 532 default=None,
533 533 )
534 534 coreconfigitem('experimental', 'evolution.effect-flags',
535 535 default=True,
536 536 alias=[('experimental', 'effect-flags')]
537 537 )
538 538 coreconfigitem('experimental', 'evolution.exchange',
539 539 default=None,
540 540 )
541 541 coreconfigitem('experimental', 'evolution.bundle-obsmarker',
542 542 default=False,
543 543 )
544 544 coreconfigitem('experimental', 'evolution.report-instabilities',
545 545 default=True,
546 546 )
547 547 coreconfigitem('experimental', 'evolution.track-operation',
548 548 default=True,
549 549 )
550 550 coreconfigitem('experimental', 'maxdeltachainspan',
551 551 default=-1,
552 552 )
553 553 coreconfigitem('experimental', 'mergetempdirprefix',
554 554 default=None,
555 555 )
556 556 coreconfigitem('experimental', 'narrow',
557 557 default=False,
558 558 )
559 559 coreconfigitem('experimental', 'nonnormalparanoidcheck',
560 560 default=False,
561 561 )
562 562 coreconfigitem('experimental', 'exportableenviron',
563 563 default=list,
564 564 )
565 565 coreconfigitem('experimental', 'extendedheader.index',
566 566 default=None,
567 567 )
568 568 coreconfigitem('experimental', 'extendedheader.similarity',
569 569 default=False,
570 570 )
571 571 coreconfigitem('experimental', 'format.compression',
572 572 default='zlib',
573 573 )
574 574 coreconfigitem('experimental', 'graphshorten',
575 575 default=False,
576 576 )
577 577 coreconfigitem('experimental', 'graphstyle.parent',
578 578 default=dynamicdefault,
579 579 )
580 580 coreconfigitem('experimental', 'graphstyle.missing',
581 581 default=dynamicdefault,
582 582 )
583 583 coreconfigitem('experimental', 'graphstyle.grandparent',
584 584 default=dynamicdefault,
585 585 )
586 586 coreconfigitem('experimental', 'hook-track-tags',
587 587 default=False,
588 588 )
589 589 coreconfigitem('experimental', 'httppeer.advertise-v2',
590 590 default=False,
591 591 )
592 592 coreconfigitem('experimental', 'httppeer.v2-encoder-order',
593 593 default=None,
594 594 )
595 595 coreconfigitem('experimental', 'httppostargs',
596 596 default=False,
597 597 )
598 598 coreconfigitem('experimental', 'mergedriver',
599 599 default=None,
600 600 )
601 601 coreconfigitem('experimental', 'nointerrupt', default=False)
602 602 coreconfigitem('experimental', 'nointerrupt-interactiveonly', default=True)
603 603
604 604 coreconfigitem('experimental', 'obsmarkers-exchange-debug',
605 605 default=False,
606 606 )
607 607 coreconfigitem('experimental', 'remotenames',
608 608 default=False,
609 609 )
610 610 coreconfigitem('experimental', 'removeemptydirs',
611 611 default=True,
612 612 )
613 613 coreconfigitem('experimental', 'revisions.prefixhexnode',
614 614 default=False,
615 615 )
616 616 coreconfigitem('experimental', 'revlogv2',
617 617 default=None,
618 618 )
619 619 coreconfigitem('experimental', 'revisions.disambiguatewithin',
620 620 default=None,
621 621 )
622 622 coreconfigitem('experimental', 'server.filesdata.recommended-batch-size',
623 623 default=50000,
624 624 )
625 625 coreconfigitem('experimental', 'server.manifestdata.recommended-batch-size',
626 626 default=100000,
627 627 )
628 628 coreconfigitem('experimental', 'server.stream-narrow-clones',
629 629 default=False,
630 630 )
631 631 coreconfigitem('experimental', 'single-head-per-branch',
632 632 default=False,
633 633 )
634 634 coreconfigitem('experimental', 'sshserver.support-v2',
635 635 default=False,
636 636 )
637 637 coreconfigitem('experimental', 'sparse-read',
638 638 default=False,
639 639 )
640 640 coreconfigitem('experimental', 'sparse-read.density-threshold',
641 641 default=0.50,
642 642 )
643 643 coreconfigitem('experimental', 'sparse-read.min-gap-size',
644 644 default='65K',
645 645 )
646 646 coreconfigitem('experimental', 'treemanifest',
647 647 default=False,
648 648 )
649 649 coreconfigitem('experimental', 'update.atomic-file',
650 650 default=False,
651 651 )
652 652 coreconfigitem('experimental', 'sshpeer.advertise-v2',
653 653 default=False,
654 654 )
655 655 coreconfigitem('experimental', 'web.apiserver',
656 656 default=False,
657 657 )
658 658 coreconfigitem('experimental', 'web.api.http-v2',
659 659 default=False,
660 660 )
661 661 coreconfigitem('experimental', 'web.api.debugreflect',
662 662 default=False,
663 663 )
664 664 coreconfigitem('experimental', 'worker.wdir-get-thread-safe',
665 665 default=False,
666 666 )
667 667 coreconfigitem('experimental', 'xdiff',
668 668 default=False,
669 669 )
670 670 coreconfigitem('extensions', '.*',
671 671 default=None,
672 672 generic=True,
673 673 )
674 674 coreconfigitem('extdata', '.*',
675 675 default=None,
676 676 generic=True,
677 677 )
678 678 coreconfigitem('format', 'chunkcachesize',
679 679 default=None,
680 680 )
681 681 coreconfigitem('format', 'dotencode',
682 682 default=True,
683 683 )
684 684 coreconfigitem('format', 'generaldelta',
685 685 default=False,
686 686 )
687 687 coreconfigitem('format', 'manifestcachesize',
688 688 default=None,
689 689 )
690 690 coreconfigitem('format', 'maxchainlen',
691 691 default=dynamicdefault,
692 692 )
693 693 coreconfigitem('format', 'obsstore-version',
694 694 default=None,
695 695 )
696 696 coreconfigitem('format', 'sparse-revlog',
697 default=False,
697 default=True,
698 698 )
699 699 coreconfigitem('format', 'usefncache',
700 700 default=True,
701 701 )
702 702 coreconfigitem('format', 'usegeneraldelta',
703 703 default=True,
704 704 )
705 705 coreconfigitem('format', 'usestore',
706 706 default=True,
707 707 )
708 708 coreconfigitem('format', 'internal-phase',
709 709 default=False,
710 710 )
711 711 coreconfigitem('fsmonitor', 'warn_when_unused',
712 712 default=True,
713 713 )
714 714 coreconfigitem('fsmonitor', 'warn_update_file_count',
715 715 default=50000,
716 716 )
717 717 coreconfigitem('help', 'hidden-command\..*',
718 718 default=False,
719 719 generic=True,
720 720 )
721 721 coreconfigitem('help', 'hidden-topic\..*',
722 722 default=False,
723 723 generic=True,
724 724 )
725 725 coreconfigitem('hooks', '.*',
726 726 default=dynamicdefault,
727 727 generic=True,
728 728 )
729 729 coreconfigitem('hgweb-paths', '.*',
730 730 default=list,
731 731 generic=True,
732 732 )
733 733 coreconfigitem('hostfingerprints', '.*',
734 734 default=list,
735 735 generic=True,
736 736 )
737 737 coreconfigitem('hostsecurity', 'ciphers',
738 738 default=None,
739 739 )
740 740 coreconfigitem('hostsecurity', 'disabletls10warning',
741 741 default=False,
742 742 )
743 743 coreconfigitem('hostsecurity', 'minimumprotocol',
744 744 default=dynamicdefault,
745 745 )
746 746 coreconfigitem('hostsecurity', '.*:minimumprotocol$',
747 747 default=dynamicdefault,
748 748 generic=True,
749 749 )
750 750 coreconfigitem('hostsecurity', '.*:ciphers$',
751 751 default=dynamicdefault,
752 752 generic=True,
753 753 )
754 754 coreconfigitem('hostsecurity', '.*:fingerprints$',
755 755 default=list,
756 756 generic=True,
757 757 )
758 758 coreconfigitem('hostsecurity', '.*:verifycertsfile$',
759 759 default=None,
760 760 generic=True,
761 761 )
762 762
763 763 coreconfigitem('http_proxy', 'always',
764 764 default=False,
765 765 )
766 766 coreconfigitem('http_proxy', 'host',
767 767 default=None,
768 768 )
769 769 coreconfigitem('http_proxy', 'no',
770 770 default=list,
771 771 )
772 772 coreconfigitem('http_proxy', 'passwd',
773 773 default=None,
774 774 )
775 775 coreconfigitem('http_proxy', 'user',
776 776 default=None,
777 777 )
778 778
779 779 coreconfigitem('http', 'timeout',
780 780 default=None,
781 781 )
782 782
783 783 coreconfigitem('logtoprocess', 'commandexception',
784 784 default=None,
785 785 )
786 786 coreconfigitem('logtoprocess', 'commandfinish',
787 787 default=None,
788 788 )
789 789 coreconfigitem('logtoprocess', 'command',
790 790 default=None,
791 791 )
792 792 coreconfigitem('logtoprocess', 'develwarn',
793 793 default=None,
794 794 )
795 795 coreconfigitem('logtoprocess', 'uiblocked',
796 796 default=None,
797 797 )
798 798 coreconfigitem('merge', 'checkunknown',
799 799 default='abort',
800 800 )
801 801 coreconfigitem('merge', 'checkignored',
802 802 default='abort',
803 803 )
804 804 coreconfigitem('experimental', 'merge.checkpathconflicts',
805 805 default=False,
806 806 )
807 807 coreconfigitem('merge', 'followcopies',
808 808 default=True,
809 809 )
810 810 coreconfigitem('merge', 'on-failure',
811 811 default='continue',
812 812 )
813 813 coreconfigitem('merge', 'preferancestor',
814 814 default=lambda: ['*'],
815 815 )
816 816 coreconfigitem('merge', 'strict-capability-check',
817 817 default=False,
818 818 )
819 819 coreconfigitem('merge-tools', '.*',
820 820 default=None,
821 821 generic=True,
822 822 )
823 823 coreconfigitem('merge-tools', br'.*\.args$',
824 824 default="$local $base $other",
825 825 generic=True,
826 826 priority=-1,
827 827 )
828 828 coreconfigitem('merge-tools', br'.*\.binary$',
829 829 default=False,
830 830 generic=True,
831 831 priority=-1,
832 832 )
833 833 coreconfigitem('merge-tools', br'.*\.check$',
834 834 default=list,
835 835 generic=True,
836 836 priority=-1,
837 837 )
838 838 coreconfigitem('merge-tools', br'.*\.checkchanged$',
839 839 default=False,
840 840 generic=True,
841 841 priority=-1,
842 842 )
843 843 coreconfigitem('merge-tools', br'.*\.executable$',
844 844 default=dynamicdefault,
845 845 generic=True,
846 846 priority=-1,
847 847 )
848 848 coreconfigitem('merge-tools', br'.*\.fixeol$',
849 849 default=False,
850 850 generic=True,
851 851 priority=-1,
852 852 )
853 853 coreconfigitem('merge-tools', br'.*\.gui$',
854 854 default=False,
855 855 generic=True,
856 856 priority=-1,
857 857 )
858 858 coreconfigitem('merge-tools', br'.*\.mergemarkers$',
859 859 default='basic',
860 860 generic=True,
861 861 priority=-1,
862 862 )
863 863 coreconfigitem('merge-tools', br'.*\.mergemarkertemplate$',
864 864 default=dynamicdefault, # take from ui.mergemarkertemplate
865 865 generic=True,
866 866 priority=-1,
867 867 )
868 868 coreconfigitem('merge-tools', br'.*\.priority$',
869 869 default=0,
870 870 generic=True,
871 871 priority=-1,
872 872 )
873 873 coreconfigitem('merge-tools', br'.*\.premerge$',
874 874 default=dynamicdefault,
875 875 generic=True,
876 876 priority=-1,
877 877 )
878 878 coreconfigitem('merge-tools', br'.*\.symlink$',
879 879 default=False,
880 880 generic=True,
881 881 priority=-1,
882 882 )
883 883 coreconfigitem('pager', 'attend-.*',
884 884 default=dynamicdefault,
885 885 generic=True,
886 886 )
887 887 coreconfigitem('pager', 'ignore',
888 888 default=list,
889 889 )
890 890 coreconfigitem('pager', 'pager',
891 891 default=dynamicdefault,
892 892 )
893 893 coreconfigitem('patch', 'eol',
894 894 default='strict',
895 895 )
896 896 coreconfigitem('patch', 'fuzz',
897 897 default=2,
898 898 )
899 899 coreconfigitem('paths', 'default',
900 900 default=None,
901 901 )
902 902 coreconfigitem('paths', 'default-push',
903 903 default=None,
904 904 )
905 905 coreconfigitem('paths', '.*',
906 906 default=None,
907 907 generic=True,
908 908 )
909 909 coreconfigitem('phases', 'checksubrepos',
910 910 default='follow',
911 911 )
912 912 coreconfigitem('phases', 'new-commit',
913 913 default='draft',
914 914 )
915 915 coreconfigitem('phases', 'publish',
916 916 default=True,
917 917 )
918 918 coreconfigitem('profiling', 'enabled',
919 919 default=False,
920 920 )
921 921 coreconfigitem('profiling', 'format',
922 922 default='text',
923 923 )
924 924 coreconfigitem('profiling', 'freq',
925 925 default=1000,
926 926 )
927 927 coreconfigitem('profiling', 'limit',
928 928 default=30,
929 929 )
930 930 coreconfigitem('profiling', 'nested',
931 931 default=0,
932 932 )
933 933 coreconfigitem('profiling', 'output',
934 934 default=None,
935 935 )
936 936 coreconfigitem('profiling', 'showmax',
937 937 default=0.999,
938 938 )
939 939 coreconfigitem('profiling', 'showmin',
940 940 default=dynamicdefault,
941 941 )
942 942 coreconfigitem('profiling', 'sort',
943 943 default='inlinetime',
944 944 )
945 945 coreconfigitem('profiling', 'statformat',
946 946 default='hotpath',
947 947 )
948 948 coreconfigitem('profiling', 'time-track',
949 949 default=dynamicdefault,
950 950 )
951 951 coreconfigitem('profiling', 'type',
952 952 default='stat',
953 953 )
954 954 coreconfigitem('progress', 'assume-tty',
955 955 default=False,
956 956 )
957 957 coreconfigitem('progress', 'changedelay',
958 958 default=1,
959 959 )
960 960 coreconfigitem('progress', 'clear-complete',
961 961 default=True,
962 962 )
963 963 coreconfigitem('progress', 'debug',
964 964 default=False,
965 965 )
966 966 coreconfigitem('progress', 'delay',
967 967 default=3,
968 968 )
969 969 coreconfigitem('progress', 'disable',
970 970 default=False,
971 971 )
972 972 coreconfigitem('progress', 'estimateinterval',
973 973 default=60.0,
974 974 )
975 975 coreconfigitem('progress', 'format',
976 976 default=lambda: ['topic', 'bar', 'number', 'estimate'],
977 977 )
978 978 coreconfigitem('progress', 'refresh',
979 979 default=0.1,
980 980 )
981 981 coreconfigitem('progress', 'width',
982 982 default=dynamicdefault,
983 983 )
984 984 coreconfigitem('push', 'pushvars.server',
985 985 default=False,
986 986 )
987 987 coreconfigitem('storage', 'mmap-threshold',
988 988 default='1MB',
989 989 alias=[('experimental', 'mmapindexthreshold')],
990 990 )
991 991 coreconfigitem('storage', 'new-repo-backend',
992 992 default='revlogv1',
993 993 )
994 994 coreconfigitem('storage', 'revlog.optimize-delta-parent-choice',
995 995 default=True,
996 996 alias=[('format', 'aggressivemergedeltas')],
997 997 )
998 998 coreconfigitem('server', 'bookmarks-pushkey-compat',
999 999 default=True,
1000 1000 )
1001 1001 coreconfigitem('server', 'bundle1',
1002 1002 default=True,
1003 1003 )
1004 1004 coreconfigitem('server', 'bundle1gd',
1005 1005 default=None,
1006 1006 )
1007 1007 coreconfigitem('server', 'bundle1.pull',
1008 1008 default=None,
1009 1009 )
1010 1010 coreconfigitem('server', 'bundle1gd.pull',
1011 1011 default=None,
1012 1012 )
1013 1013 coreconfigitem('server', 'bundle1.push',
1014 1014 default=None,
1015 1015 )
1016 1016 coreconfigitem('server', 'bundle1gd.push',
1017 1017 default=None,
1018 1018 )
1019 1019 coreconfigitem('server', 'bundle2.stream',
1020 1020 default=True,
1021 1021 alias=[('experimental', 'bundle2.stream')]
1022 1022 )
1023 1023 coreconfigitem('server', 'compressionengines',
1024 1024 default=list,
1025 1025 )
1026 1026 coreconfigitem('server', 'concurrent-push-mode',
1027 1027 default='strict',
1028 1028 )
1029 1029 coreconfigitem('server', 'disablefullbundle',
1030 1030 default=False,
1031 1031 )
1032 1032 coreconfigitem('server', 'maxhttpheaderlen',
1033 1033 default=1024,
1034 1034 )
1035 1035 coreconfigitem('server', 'pullbundle',
1036 1036 default=False,
1037 1037 )
1038 1038 coreconfigitem('server', 'preferuncompressed',
1039 1039 default=False,
1040 1040 )
1041 1041 coreconfigitem('server', 'streamunbundle',
1042 1042 default=False,
1043 1043 )
1044 1044 coreconfigitem('server', 'uncompressed',
1045 1045 default=True,
1046 1046 )
1047 1047 coreconfigitem('server', 'uncompressedallowsecret',
1048 1048 default=False,
1049 1049 )
1050 1050 coreconfigitem('server', 'validate',
1051 1051 default=False,
1052 1052 )
1053 1053 coreconfigitem('server', 'zliblevel',
1054 1054 default=-1,
1055 1055 )
1056 1056 coreconfigitem('server', 'zstdlevel',
1057 1057 default=3,
1058 1058 )
1059 1059 coreconfigitem('share', 'pool',
1060 1060 default=None,
1061 1061 )
1062 1062 coreconfigitem('share', 'poolnaming',
1063 1063 default='identity',
1064 1064 )
1065 1065 coreconfigitem('smtp', 'host',
1066 1066 default=None,
1067 1067 )
1068 1068 coreconfigitem('smtp', 'local_hostname',
1069 1069 default=None,
1070 1070 )
1071 1071 coreconfigitem('smtp', 'password',
1072 1072 default=None,
1073 1073 )
1074 1074 coreconfigitem('smtp', 'port',
1075 1075 default=dynamicdefault,
1076 1076 )
1077 1077 coreconfigitem('smtp', 'tls',
1078 1078 default='none',
1079 1079 )
1080 1080 coreconfigitem('smtp', 'username',
1081 1081 default=None,
1082 1082 )
1083 1083 coreconfigitem('sparse', 'missingwarning',
1084 1084 default=True,
1085 1085 )
1086 1086 coreconfigitem('subrepos', 'allowed',
1087 1087 default=dynamicdefault, # to make backporting simpler
1088 1088 )
1089 1089 coreconfigitem('subrepos', 'hg:allowed',
1090 1090 default=dynamicdefault,
1091 1091 )
1092 1092 coreconfigitem('subrepos', 'git:allowed',
1093 1093 default=dynamicdefault,
1094 1094 )
1095 1095 coreconfigitem('subrepos', 'svn:allowed',
1096 1096 default=dynamicdefault,
1097 1097 )
1098 1098 coreconfigitem('templates', '.*',
1099 1099 default=None,
1100 1100 generic=True,
1101 1101 )
1102 1102 coreconfigitem('trusted', 'groups',
1103 1103 default=list,
1104 1104 )
1105 1105 coreconfigitem('trusted', 'users',
1106 1106 default=list,
1107 1107 )
1108 1108 coreconfigitem('ui', '_usedassubrepo',
1109 1109 default=False,
1110 1110 )
1111 1111 coreconfigitem('ui', 'allowemptycommit',
1112 1112 default=False,
1113 1113 )
1114 1114 coreconfigitem('ui', 'archivemeta',
1115 1115 default=True,
1116 1116 )
1117 1117 coreconfigitem('ui', 'askusername',
1118 1118 default=False,
1119 1119 )
1120 1120 coreconfigitem('ui', 'clonebundlefallback',
1121 1121 default=False,
1122 1122 )
1123 1123 coreconfigitem('ui', 'clonebundleprefers',
1124 1124 default=list,
1125 1125 )
1126 1126 coreconfigitem('ui', 'clonebundles',
1127 1127 default=True,
1128 1128 )
1129 1129 coreconfigitem('ui', 'color',
1130 1130 default='auto',
1131 1131 )
1132 1132 coreconfigitem('ui', 'commitsubrepos',
1133 1133 default=False,
1134 1134 )
1135 1135 coreconfigitem('ui', 'debug',
1136 1136 default=False,
1137 1137 )
1138 1138 coreconfigitem('ui', 'debugger',
1139 1139 default=None,
1140 1140 )
1141 1141 coreconfigitem('ui', 'editor',
1142 1142 default=dynamicdefault,
1143 1143 )
1144 1144 coreconfigitem('ui', 'fallbackencoding',
1145 1145 default=None,
1146 1146 )
1147 1147 coreconfigitem('ui', 'forcecwd',
1148 1148 default=None,
1149 1149 )
1150 1150 coreconfigitem('ui', 'forcemerge',
1151 1151 default=None,
1152 1152 )
1153 1153 coreconfigitem('ui', 'formatdebug',
1154 1154 default=False,
1155 1155 )
1156 1156 coreconfigitem('ui', 'formatjson',
1157 1157 default=False,
1158 1158 )
1159 1159 coreconfigitem('ui', 'formatted',
1160 1160 default=None,
1161 1161 )
1162 1162 coreconfigitem('ui', 'graphnodetemplate',
1163 1163 default=None,
1164 1164 )
1165 1165 coreconfigitem('ui', 'history-editing-backup',
1166 1166 default=True,
1167 1167 )
1168 1168 coreconfigitem('ui', 'interactive',
1169 1169 default=None,
1170 1170 )
1171 1171 coreconfigitem('ui', 'interface',
1172 1172 default=None,
1173 1173 )
1174 1174 coreconfigitem('ui', 'interface.chunkselector',
1175 1175 default=None,
1176 1176 )
1177 1177 coreconfigitem('ui', 'large-file-limit',
1178 1178 default=10000000,
1179 1179 )
1180 1180 coreconfigitem('ui', 'logblockedtimes',
1181 1181 default=False,
1182 1182 )
1183 1183 coreconfigitem('ui', 'logtemplate',
1184 1184 default=None,
1185 1185 )
1186 1186 coreconfigitem('ui', 'merge',
1187 1187 default=None,
1188 1188 )
1189 1189 coreconfigitem('ui', 'mergemarkers',
1190 1190 default='basic',
1191 1191 )
1192 1192 coreconfigitem('ui', 'mergemarkertemplate',
1193 1193 default=('{node|short} '
1194 1194 '{ifeq(tags, "tip", "", '
1195 1195 'ifeq(tags, "", "", "{tags} "))}'
1196 1196 '{if(bookmarks, "{bookmarks} ")}'
1197 1197 '{ifeq(branch, "default", "", "{branch} ")}'
1198 1198 '- {author|user}: {desc|firstline}')
1199 1199 )
1200 1200 coreconfigitem('ui', 'message-output',
1201 1201 default='stdio',
1202 1202 )
1203 1203 coreconfigitem('ui', 'nontty',
1204 1204 default=False,
1205 1205 )
1206 1206 coreconfigitem('ui', 'origbackuppath',
1207 1207 default=None,
1208 1208 )
1209 1209 coreconfigitem('ui', 'paginate',
1210 1210 default=True,
1211 1211 )
1212 1212 coreconfigitem('ui', 'patch',
1213 1213 default=None,
1214 1214 )
1215 1215 coreconfigitem('ui', 'pre-merge-tool-output-template',
1216 1216 default=None,
1217 1217 )
1218 1218 coreconfigitem('ui', 'portablefilenames',
1219 1219 default='warn',
1220 1220 )
1221 1221 coreconfigitem('ui', 'promptecho',
1222 1222 default=False,
1223 1223 )
1224 1224 coreconfigitem('ui', 'quiet',
1225 1225 default=False,
1226 1226 )
1227 1227 coreconfigitem('ui', 'quietbookmarkmove',
1228 1228 default=False,
1229 1229 )
1230 1230 coreconfigitem('ui', 'remotecmd',
1231 1231 default='hg',
1232 1232 )
1233 1233 coreconfigitem('ui', 'report_untrusted',
1234 1234 default=True,
1235 1235 )
1236 1236 coreconfigitem('ui', 'rollback',
1237 1237 default=True,
1238 1238 )
1239 1239 coreconfigitem('ui', 'signal-safe-lock',
1240 1240 default=True,
1241 1241 )
1242 1242 coreconfigitem('ui', 'slash',
1243 1243 default=False,
1244 1244 )
1245 1245 coreconfigitem('ui', 'ssh',
1246 1246 default='ssh',
1247 1247 )
1248 1248 coreconfigitem('ui', 'ssherrorhint',
1249 1249 default=None,
1250 1250 )
1251 1251 coreconfigitem('ui', 'statuscopies',
1252 1252 default=False,
1253 1253 )
1254 1254 coreconfigitem('ui', 'strict',
1255 1255 default=False,
1256 1256 )
1257 1257 coreconfigitem('ui', 'style',
1258 1258 default='',
1259 1259 )
1260 1260 coreconfigitem('ui', 'supportcontact',
1261 1261 default=None,
1262 1262 )
1263 1263 coreconfigitem('ui', 'textwidth',
1264 1264 default=78,
1265 1265 )
1266 1266 coreconfigitem('ui', 'timeout',
1267 1267 default='600',
1268 1268 )
1269 1269 coreconfigitem('ui', 'timeout.warn',
1270 1270 default=0,
1271 1271 )
1272 1272 coreconfigitem('ui', 'traceback',
1273 1273 default=False,
1274 1274 )
1275 1275 coreconfigitem('ui', 'tweakdefaults',
1276 1276 default=False,
1277 1277 )
1278 1278 coreconfigitem('ui', 'username',
1279 1279 alias=[('ui', 'user')]
1280 1280 )
1281 1281 coreconfigitem('ui', 'verbose',
1282 1282 default=False,
1283 1283 )
1284 1284 coreconfigitem('verify', 'skipflags',
1285 1285 default=None,
1286 1286 )
1287 1287 coreconfigitem('web', 'allowbz2',
1288 1288 default=False,
1289 1289 )
1290 1290 coreconfigitem('web', 'allowgz',
1291 1291 default=False,
1292 1292 )
1293 1293 coreconfigitem('web', 'allow-pull',
1294 1294 alias=[('web', 'allowpull')],
1295 1295 default=True,
1296 1296 )
1297 1297 coreconfigitem('web', 'allow-push',
1298 1298 alias=[('web', 'allow_push')],
1299 1299 default=list,
1300 1300 )
1301 1301 coreconfigitem('web', 'allowzip',
1302 1302 default=False,
1303 1303 )
1304 1304 coreconfigitem('web', 'archivesubrepos',
1305 1305 default=False,
1306 1306 )
1307 1307 coreconfigitem('web', 'cache',
1308 1308 default=True,
1309 1309 )
1310 1310 coreconfigitem('web', 'contact',
1311 1311 default=None,
1312 1312 )
1313 1313 coreconfigitem('web', 'deny_push',
1314 1314 default=list,
1315 1315 )
1316 1316 coreconfigitem('web', 'guessmime',
1317 1317 default=False,
1318 1318 )
1319 1319 coreconfigitem('web', 'hidden',
1320 1320 default=False,
1321 1321 )
1322 1322 coreconfigitem('web', 'labels',
1323 1323 default=list,
1324 1324 )
1325 1325 coreconfigitem('web', 'logoimg',
1326 1326 default='hglogo.png',
1327 1327 )
1328 1328 coreconfigitem('web', 'logourl',
1329 1329 default='https://mercurial-scm.org/',
1330 1330 )
1331 1331 coreconfigitem('web', 'accesslog',
1332 1332 default='-',
1333 1333 )
1334 1334 coreconfigitem('web', 'address',
1335 1335 default='',
1336 1336 )
1337 1337 coreconfigitem('web', 'allow-archive',
1338 1338 alias=[('web', 'allow_archive')],
1339 1339 default=list,
1340 1340 )
1341 1341 coreconfigitem('web', 'allow_read',
1342 1342 default=list,
1343 1343 )
1344 1344 coreconfigitem('web', 'baseurl',
1345 1345 default=None,
1346 1346 )
1347 1347 coreconfigitem('web', 'cacerts',
1348 1348 default=None,
1349 1349 )
1350 1350 coreconfigitem('web', 'certificate',
1351 1351 default=None,
1352 1352 )
1353 1353 coreconfigitem('web', 'collapse',
1354 1354 default=False,
1355 1355 )
1356 1356 coreconfigitem('web', 'csp',
1357 1357 default=None,
1358 1358 )
1359 1359 coreconfigitem('web', 'deny_read',
1360 1360 default=list,
1361 1361 )
1362 1362 coreconfigitem('web', 'descend',
1363 1363 default=True,
1364 1364 )
1365 1365 coreconfigitem('web', 'description',
1366 1366 default="",
1367 1367 )
1368 1368 coreconfigitem('web', 'encoding',
1369 1369 default=lambda: encoding.encoding,
1370 1370 )
1371 1371 coreconfigitem('web', 'errorlog',
1372 1372 default='-',
1373 1373 )
1374 1374 coreconfigitem('web', 'ipv6',
1375 1375 default=False,
1376 1376 )
1377 1377 coreconfigitem('web', 'maxchanges',
1378 1378 default=10,
1379 1379 )
1380 1380 coreconfigitem('web', 'maxfiles',
1381 1381 default=10,
1382 1382 )
1383 1383 coreconfigitem('web', 'maxshortchanges',
1384 1384 default=60,
1385 1385 )
1386 1386 coreconfigitem('web', 'motd',
1387 1387 default='',
1388 1388 )
1389 1389 coreconfigitem('web', 'name',
1390 1390 default=dynamicdefault,
1391 1391 )
1392 1392 coreconfigitem('web', 'port',
1393 1393 default=8000,
1394 1394 )
1395 1395 coreconfigitem('web', 'prefix',
1396 1396 default='',
1397 1397 )
1398 1398 coreconfigitem('web', 'push_ssl',
1399 1399 default=True,
1400 1400 )
1401 1401 coreconfigitem('web', 'refreshinterval',
1402 1402 default=20,
1403 1403 )
1404 1404 coreconfigitem('web', 'server-header',
1405 1405 default=None,
1406 1406 )
1407 1407 coreconfigitem('web', 'static',
1408 1408 default=None,
1409 1409 )
1410 1410 coreconfigitem('web', 'staticurl',
1411 1411 default=None,
1412 1412 )
1413 1413 coreconfigitem('web', 'stripes',
1414 1414 default=1,
1415 1415 )
1416 1416 coreconfigitem('web', 'style',
1417 1417 default='paper',
1418 1418 )
1419 1419 coreconfigitem('web', 'templates',
1420 1420 default=None,
1421 1421 )
1422 1422 coreconfigitem('web', 'view',
1423 1423 default='served',
1424 1424 )
1425 1425 coreconfigitem('worker', 'backgroundclose',
1426 1426 default=dynamicdefault,
1427 1427 )
1428 1428 # Windows defaults to a limit of 512 open files. A buffer of 128
1429 1429 # should give us enough headway.
1430 1430 coreconfigitem('worker', 'backgroundclosemaxqueue',
1431 1431 default=384,
1432 1432 )
1433 1433 coreconfigitem('worker', 'backgroundcloseminfilecount',
1434 1434 default=2048,
1435 1435 )
1436 1436 coreconfigitem('worker', 'backgroundclosethreadcount',
1437 1437 default=4,
1438 1438 )
1439 1439 coreconfigitem('worker', 'enabled',
1440 1440 default=True,
1441 1441 )
1442 1442 coreconfigitem('worker', 'numcpus',
1443 1443 default=None,
1444 1444 )
1445 1445
1446 1446 # Rebase related configuration moved to core because other extension are doing
1447 1447 # strange things. For example, shelve import the extensions to reuse some bit
1448 1448 # without formally loading it.
1449 1449 coreconfigitem('commands', 'rebase.requiredest',
1450 1450 default=False,
1451 1451 )
1452 1452 coreconfigitem('experimental', 'rebaseskipobsolete',
1453 1453 default=True,
1454 1454 )
1455 1455 coreconfigitem('rebase', 'singletransaction',
1456 1456 default=False,
1457 1457 )
1458 1458 coreconfigitem('rebase', 'experimental.inmemory',
1459 1459 default=False,
1460 1460 )
@@ -1,897 +1,897 b''
1 1 # upgrade.py - functions for in place upgrade of Mercurial repository
2 2 #
3 3 # Copyright (c) 2016-present, Gregory Szorc
4 4 #
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2 or any later version.
7 7
8 8 from __future__ import absolute_import
9 9
10 10 import stat
11 11
12 12 from .i18n import _
13 13 from . import (
14 14 changelog,
15 15 error,
16 16 filelog,
17 17 hg,
18 18 localrepo,
19 19 manifest,
20 20 pycompat,
21 21 revlog,
22 22 scmutil,
23 23 util,
24 24 vfs as vfsmod,
25 25 )
26 26
27 27 def requiredsourcerequirements(repo):
28 28 """Obtain requirements required to be present to upgrade a repo.
29 29
30 30 An upgrade will not be allowed if the repository doesn't have the
31 31 requirements returned by this function.
32 32 """
33 33 return {
34 34 # Introduced in Mercurial 0.9.2.
35 35 'revlogv1',
36 36 # Introduced in Mercurial 0.9.2.
37 37 'store',
38 38 }
39 39
40 40 def blocksourcerequirements(repo):
41 41 """Obtain requirements that will prevent an upgrade from occurring.
42 42
43 43 An upgrade cannot be performed if the source repository contains a
44 44 requirements in the returned set.
45 45 """
46 46 return {
47 47 # The upgrade code does not yet support these experimental features.
48 48 # This is an artificial limitation.
49 49 'treemanifest',
50 50 # This was a precursor to generaldelta and was never enabled by default.
51 51 # It should (hopefully) not exist in the wild.
52 52 'parentdelta',
53 53 # Upgrade should operate on the actual store, not the shared link.
54 54 'shared',
55 55 }
56 56
57 57 def supportremovedrequirements(repo):
58 58 """Obtain requirements that can be removed during an upgrade.
59 59
60 60 If an upgrade were to create a repository that dropped a requirement,
61 61 the dropped requirement must appear in the returned set for the upgrade
62 62 to be allowed.
63 63 """
64 64 return {
65 65 localrepo.SPARSEREVLOG_REQUIREMENT,
66 66 }
67 67
68 68 def supporteddestrequirements(repo):
69 69 """Obtain requirements that upgrade supports in the destination.
70 70
71 71 If the result of the upgrade would create requirements not in this set,
72 72 the upgrade is disallowed.
73 73
74 74 Extensions should monkeypatch this to add their custom requirements.
75 75 """
76 76 return {
77 77 'dotencode',
78 78 'fncache',
79 79 'generaldelta',
80 80 'revlogv1',
81 81 'store',
82 82 localrepo.SPARSEREVLOG_REQUIREMENT,
83 83 }
84 84
85 85 def allowednewrequirements(repo):
86 86 """Obtain requirements that can be added to a repository during upgrade.
87 87
88 88 This is used to disallow proposed requirements from being added when
89 89 they weren't present before.
90 90
91 91 We use a list of allowed requirement additions instead of a list of known
92 92 bad additions because the whitelist approach is safer and will prevent
93 93 future, unknown requirements from accidentally being added.
94 94 """
95 95 return {
96 96 'dotencode',
97 97 'fncache',
98 98 'generaldelta',
99 99 localrepo.SPARSEREVLOG_REQUIREMENT,
100 100 }
101 101
102 102 def preservedrequirements(repo):
103 103 return set()
104 104
105 105 deficiency = 'deficiency'
106 106 optimisation = 'optimization'
107 107
108 108 class improvement(object):
109 109 """Represents an improvement that can be made as part of an upgrade.
110 110
111 111 The following attributes are defined on each instance:
112 112
113 113 name
114 114 Machine-readable string uniquely identifying this improvement. It
115 115 will be mapped to an action later in the upgrade process.
116 116
117 117 type
118 118 Either ``deficiency`` or ``optimisation``. A deficiency is an obvious
119 119 problem. An optimization is an action (sometimes optional) that
120 120 can be taken to further improve the state of the repository.
121 121
122 122 description
123 123 Message intended for humans explaining the improvement in more detail,
124 124 including the implications of it. For ``deficiency`` types, should be
125 125 worded in the present tense. For ``optimisation`` types, should be
126 126 worded in the future tense.
127 127
128 128 upgrademessage
129 129 Message intended for humans explaining what an upgrade addressing this
130 130 issue will do. Should be worded in the future tense.
131 131 """
132 132 def __init__(self, name, type, description, upgrademessage):
133 133 self.name = name
134 134 self.type = type
135 135 self.description = description
136 136 self.upgrademessage = upgrademessage
137 137
138 138 def __eq__(self, other):
139 139 if not isinstance(other, improvement):
140 140 # This is what python tell use to do
141 141 return NotImplemented
142 142 return self.name == other.name
143 143
144 144 def __ne__(self, other):
145 145 return not self == other
146 146
147 147 def __hash__(self):
148 148 return hash(self.name)
149 149
150 150 allformatvariant = []
151 151
152 152 def registerformatvariant(cls):
153 153 allformatvariant.append(cls)
154 154 return cls
155 155
156 156 class formatvariant(improvement):
157 157 """an improvement subclass dedicated to repository format"""
158 158 type = deficiency
159 159 ### The following attributes should be defined for each class:
160 160
161 161 # machine-readable string uniquely identifying this improvement. it will be
162 162 # mapped to an action later in the upgrade process.
163 163 name = None
164 164
165 165 # message intended for humans explaining the improvement in more detail,
166 166 # including the implications of it ``deficiency`` types, should be worded
167 167 # in the present tense.
168 168 description = None
169 169
170 170 # message intended for humans explaining what an upgrade addressing this
171 171 # issue will do. should be worded in the future tense.
172 172 upgrademessage = None
173 173
174 174 # value of current Mercurial default for new repository
175 175 default = None
176 176
177 177 def __init__(self):
178 178 raise NotImplementedError()
179 179
180 180 @staticmethod
181 181 def fromrepo(repo):
182 182 """current value of the variant in the repository"""
183 183 raise NotImplementedError()
184 184
185 185 @staticmethod
186 186 def fromconfig(repo):
187 187 """current value of the variant in the configuration"""
188 188 raise NotImplementedError()
189 189
190 190 class requirementformatvariant(formatvariant):
191 191 """formatvariant based on a 'requirement' name.
192 192
193 193 Many format variant are controlled by a 'requirement'. We define a small
194 194 subclass to factor the code.
195 195 """
196 196
197 197 # the requirement that control this format variant
198 198 _requirement = None
199 199
200 200 @staticmethod
201 201 def _newreporequirements(ui):
202 202 return localrepo.newreporequirements(
203 203 ui, localrepo.defaultcreateopts(ui))
204 204
205 205 @classmethod
206 206 def fromrepo(cls, repo):
207 207 assert cls._requirement is not None
208 208 return cls._requirement in repo.requirements
209 209
210 210 @classmethod
211 211 def fromconfig(cls, repo):
212 212 assert cls._requirement is not None
213 213 return cls._requirement in cls._newreporequirements(repo.ui)
214 214
215 215 @registerformatvariant
216 216 class fncache(requirementformatvariant):
217 217 name = 'fncache'
218 218
219 219 _requirement = 'fncache'
220 220
221 221 default = True
222 222
223 223 description = _('long and reserved filenames may not work correctly; '
224 224 'repository performance is sub-optimal')
225 225
226 226 upgrademessage = _('repository will be more resilient to storing '
227 227 'certain paths and performance of certain '
228 228 'operations should be improved')
229 229
230 230 @registerformatvariant
231 231 class dotencode(requirementformatvariant):
232 232 name = 'dotencode'
233 233
234 234 _requirement = 'dotencode'
235 235
236 236 default = True
237 237
238 238 description = _('storage of filenames beginning with a period or '
239 239 'space may not work correctly')
240 240
241 241 upgrademessage = _('repository will be better able to store files '
242 242 'beginning with a space or period')
243 243
244 244 @registerformatvariant
245 245 class generaldelta(requirementformatvariant):
246 246 name = 'generaldelta'
247 247
248 248 _requirement = 'generaldelta'
249 249
250 250 default = True
251 251
252 252 description = _('deltas within internal storage are unable to '
253 253 'choose optimal revisions; repository is larger and '
254 254 'slower than it could be; interaction with other '
255 255 'repositories may require extra network and CPU '
256 256 'resources, making "hg push" and "hg pull" slower')
257 257
258 258 upgrademessage = _('repository storage will be able to create '
259 259 'optimal deltas; new repository data will be '
260 260 'smaller and read times should decrease; '
261 261 'interacting with other repositories using this '
262 262 'storage model should require less network and '
263 263 'CPU resources, making "hg push" and "hg pull" '
264 264 'faster')
265 265
266 266 @registerformatvariant
267 267 class sparserevlog(requirementformatvariant):
268 268 name = 'sparserevlog'
269 269
270 270 _requirement = localrepo.SPARSEREVLOG_REQUIREMENT
271 271
272 default = False
272 default = True
273 273
274 274 description = _('in order to limit disk reading and memory usage on older '
275 275 'version, the span of a delta chain from its root to its '
276 276 'end is limited, whatever the relevant data in this span. '
277 277 'This can severly limit Mercurial ability to build good '
278 278 'chain of delta resulting is much more storage space being '
279 279 'taken and limit reusability of on disk delta during '
280 280 'exchange.'
281 281 )
282 282
283 283 upgrademessage = _('Revlog supports delta chain with more unused data '
284 284 'between payload. These gaps will be skipped at read '
285 285 'time. This allows for better delta chains, making a '
286 286 'better compression and faster exchange with server.')
287 287
288 288 @registerformatvariant
289 289 class removecldeltachain(formatvariant):
290 290 name = 'plain-cl-delta'
291 291
292 292 default = True
293 293
294 294 description = _('changelog storage is using deltas instead of '
295 295 'raw entries; changelog reading and any '
296 296 'operation relying on changelog data are slower '
297 297 'than they could be')
298 298
299 299 upgrademessage = _('changelog storage will be reformated to '
300 300 'store raw entries; changelog reading will be '
301 301 'faster; changelog size may be reduced')
302 302
303 303 @staticmethod
304 304 def fromrepo(repo):
305 305 # Mercurial 4.0 changed changelogs to not use delta chains. Search for
306 306 # changelogs with deltas.
307 307 cl = repo.changelog
308 308 chainbase = cl.chainbase
309 309 return all(rev == chainbase(rev) for rev in cl)
310 310
311 311 @staticmethod
312 312 def fromconfig(repo):
313 313 return True
314 314
315 315 @registerformatvariant
316 316 class compressionengine(formatvariant):
317 317 name = 'compression'
318 318 default = 'zlib'
319 319
320 320 description = _('Compresion algorithm used to compress data. '
321 321 'Some engine are faster than other')
322 322
323 323 upgrademessage = _('revlog content will be recompressed with the new '
324 324 'algorithm.')
325 325
326 326 @classmethod
327 327 def fromrepo(cls, repo):
328 328 for req in repo.requirements:
329 329 if req.startswith('exp-compression-'):
330 330 return req.split('-', 2)[2]
331 331 return 'zlib'
332 332
333 333 @classmethod
334 334 def fromconfig(cls, repo):
335 335 return repo.ui.config('experimental', 'format.compression')
336 336
337 337 def finddeficiencies(repo):
338 338 """returns a list of deficiencies that the repo suffer from"""
339 339 deficiencies = []
340 340
341 341 # We could detect lack of revlogv1 and store here, but they were added
342 342 # in 0.9.2 and we don't support upgrading repos without these
343 343 # requirements, so let's not bother.
344 344
345 345 for fv in allformatvariant:
346 346 if not fv.fromrepo(repo):
347 347 deficiencies.append(fv)
348 348
349 349 return deficiencies
350 350
351 351 def findoptimizations(repo):
352 352 """Determine optimisation that could be used during upgrade"""
353 353 # These are unconditionally added. There is logic later that figures out
354 354 # which ones to apply.
355 355 optimizations = []
356 356
357 357 optimizations.append(improvement(
358 358 name='redeltaparent',
359 359 type=optimisation,
360 360 description=_('deltas within internal storage will be recalculated to '
361 361 'choose an optimal base revision where this was not '
362 362 'already done; the size of the repository may shrink and '
363 363 'various operations may become faster; the first time '
364 364 'this optimization is performed could slow down upgrade '
365 365 'execution considerably; subsequent invocations should '
366 366 'not run noticeably slower'),
367 367 upgrademessage=_('deltas within internal storage will choose a new '
368 368 'base revision if needed')))
369 369
370 370 optimizations.append(improvement(
371 371 name='redeltamultibase',
372 372 type=optimisation,
373 373 description=_('deltas within internal storage will be recalculated '
374 374 'against multiple base revision and the smallest '
375 375 'difference will be used; the size of the repository may '
376 376 'shrink significantly when there are many merges; this '
377 377 'optimization will slow down execution in proportion to '
378 378 'the number of merges in the repository and the amount '
379 379 'of files in the repository; this slow down should not '
380 380 'be significant unless there are tens of thousands of '
381 381 'files and thousands of merges'),
382 382 upgrademessage=_('deltas within internal storage will choose an '
383 383 'optimal delta by computing deltas against multiple '
384 384 'parents; may slow down execution time '
385 385 'significantly')))
386 386
387 387 optimizations.append(improvement(
388 388 name='redeltaall',
389 389 type=optimisation,
390 390 description=_('deltas within internal storage will always be '
391 391 'recalculated without reusing prior deltas; this will '
392 392 'likely make execution run several times slower; this '
393 393 'optimization is typically not needed'),
394 394 upgrademessage=_('deltas within internal storage will be fully '
395 395 'recomputed; this will likely drastically slow down '
396 396 'execution time')))
397 397
398 398 optimizations.append(improvement(
399 399 name='redeltafulladd',
400 400 type=optimisation,
401 401 description=_('every revision will be re-added as if it was new '
402 402 'content. It will go through the full storage '
403 403 'mechanism giving extensions a chance to process it '
404 404 '(eg. lfs). This is similar to "redeltaall" but even '
405 405 'slower since more logic is involved.'),
406 406 upgrademessage=_('each revision will be added as new content to the '
407 407 'internal storage; this will likely drastically slow '
408 408 'down execution time, but some extensions might need '
409 409 'it')))
410 410
411 411 return optimizations
412 412
413 413 def determineactions(repo, deficiencies, sourcereqs, destreqs):
414 414 """Determine upgrade actions that will be performed.
415 415
416 416 Given a list of improvements as returned by ``finddeficiencies`` and
417 417 ``findoptimizations``, determine the list of upgrade actions that
418 418 will be performed.
419 419
420 420 The role of this function is to filter improvements if needed, apply
421 421 recommended optimizations from the improvements list that make sense,
422 422 etc.
423 423
424 424 Returns a list of action names.
425 425 """
426 426 newactions = []
427 427
428 428 knownreqs = supporteddestrequirements(repo)
429 429
430 430 for d in deficiencies:
431 431 name = d.name
432 432
433 433 # If the action is a requirement that doesn't show up in the
434 434 # destination requirements, prune the action.
435 435 if name in knownreqs and name not in destreqs:
436 436 continue
437 437
438 438 newactions.append(d)
439 439
440 440 # FUTURE consider adding some optimizations here for certain transitions.
441 441 # e.g. adding generaldelta could schedule parent redeltas.
442 442
443 443 return newactions
444 444
445 445 def _revlogfrompath(repo, path):
446 446 """Obtain a revlog from a repo path.
447 447
448 448 An instance of the appropriate class is returned.
449 449 """
450 450 if path == '00changelog.i':
451 451 return changelog.changelog(repo.svfs)
452 452 elif path.endswith('00manifest.i'):
453 453 mandir = path[:-len('00manifest.i')]
454 454 return manifest.manifestrevlog(repo.svfs, tree=mandir)
455 455 else:
456 456 #reverse of "/".join(("data", path + ".i"))
457 457 return filelog.filelog(repo.svfs, path[5:-2])
458 458
459 459 def _copyrevlogs(ui, srcrepo, dstrepo, tr, deltareuse, forcedeltabothparents):
460 460 """Copy revlogs between 2 repos."""
461 461 revcount = 0
462 462 srcsize = 0
463 463 srcrawsize = 0
464 464 dstsize = 0
465 465 fcount = 0
466 466 frevcount = 0
467 467 fsrcsize = 0
468 468 frawsize = 0
469 469 fdstsize = 0
470 470 mcount = 0
471 471 mrevcount = 0
472 472 msrcsize = 0
473 473 mrawsize = 0
474 474 mdstsize = 0
475 475 crevcount = 0
476 476 csrcsize = 0
477 477 crawsize = 0
478 478 cdstsize = 0
479 479
480 480 # Perform a pass to collect metadata. This validates we can open all
481 481 # source files and allows a unified progress bar to be displayed.
482 482 for unencoded, encoded, size in srcrepo.store.walk():
483 483 if unencoded.endswith('.d'):
484 484 continue
485 485
486 486 rl = _revlogfrompath(srcrepo, unencoded)
487 487
488 488 info = rl.storageinfo(exclusivefiles=True, revisionscount=True,
489 489 trackedsize=True, storedsize=True)
490 490
491 491 revcount += info['revisionscount'] or 0
492 492 datasize = info['storedsize'] or 0
493 493 rawsize = info['trackedsize'] or 0
494 494
495 495 srcsize += datasize
496 496 srcrawsize += rawsize
497 497
498 498 # This is for the separate progress bars.
499 499 if isinstance(rl, changelog.changelog):
500 500 crevcount += len(rl)
501 501 csrcsize += datasize
502 502 crawsize += rawsize
503 503 elif isinstance(rl, manifest.manifestrevlog):
504 504 mcount += 1
505 505 mrevcount += len(rl)
506 506 msrcsize += datasize
507 507 mrawsize += rawsize
508 508 elif isinstance(rl, filelog.filelog):
509 509 fcount += 1
510 510 frevcount += len(rl)
511 511 fsrcsize += datasize
512 512 frawsize += rawsize
513 513 else:
514 514 error.ProgrammingError('unknown revlog type')
515 515
516 516 if not revcount:
517 517 return
518 518
519 519 ui.write(_('migrating %d total revisions (%d in filelogs, %d in manifests, '
520 520 '%d in changelog)\n') %
521 521 (revcount, frevcount, mrevcount, crevcount))
522 522 ui.write(_('migrating %s in store; %s tracked data\n') % (
523 523 (util.bytecount(srcsize), util.bytecount(srcrawsize))))
524 524
525 525 # Used to keep track of progress.
526 526 progress = None
527 527 def oncopiedrevision(rl, rev, node):
528 528 progress.increment()
529 529
530 530 # Do the actual copying.
531 531 # FUTURE this operation can be farmed off to worker processes.
532 532 seen = set()
533 533 for unencoded, encoded, size in srcrepo.store.walk():
534 534 if unencoded.endswith('.d'):
535 535 continue
536 536
537 537 oldrl = _revlogfrompath(srcrepo, unencoded)
538 538 newrl = _revlogfrompath(dstrepo, unencoded)
539 539
540 540 if isinstance(oldrl, changelog.changelog) and 'c' not in seen:
541 541 ui.write(_('finished migrating %d manifest revisions across %d '
542 542 'manifests; change in size: %s\n') %
543 543 (mrevcount, mcount, util.bytecount(mdstsize - msrcsize)))
544 544
545 545 ui.write(_('migrating changelog containing %d revisions '
546 546 '(%s in store; %s tracked data)\n') %
547 547 (crevcount, util.bytecount(csrcsize),
548 548 util.bytecount(crawsize)))
549 549 seen.add('c')
550 550 progress = srcrepo.ui.makeprogress(_('changelog revisions'),
551 551 total=crevcount)
552 552 elif isinstance(oldrl, manifest.manifestrevlog) and 'm' not in seen:
553 553 ui.write(_('finished migrating %d filelog revisions across %d '
554 554 'filelogs; change in size: %s\n') %
555 555 (frevcount, fcount, util.bytecount(fdstsize - fsrcsize)))
556 556
557 557 ui.write(_('migrating %d manifests containing %d revisions '
558 558 '(%s in store; %s tracked data)\n') %
559 559 (mcount, mrevcount, util.bytecount(msrcsize),
560 560 util.bytecount(mrawsize)))
561 561 seen.add('m')
562 562 if progress:
563 563 progress.complete()
564 564 progress = srcrepo.ui.makeprogress(_('manifest revisions'),
565 565 total=mrevcount)
566 566 elif 'f' not in seen:
567 567 ui.write(_('migrating %d filelogs containing %d revisions '
568 568 '(%s in store; %s tracked data)\n') %
569 569 (fcount, frevcount, util.bytecount(fsrcsize),
570 570 util.bytecount(frawsize)))
571 571 seen.add('f')
572 572 if progress:
573 573 progress.complete()
574 574 progress = srcrepo.ui.makeprogress(_('file revisions'),
575 575 total=frevcount)
576 576
577 577
578 578 ui.note(_('cloning %d revisions from %s\n') % (len(oldrl), unencoded))
579 579 oldrl.clone(tr, newrl, addrevisioncb=oncopiedrevision,
580 580 deltareuse=deltareuse,
581 581 forcedeltabothparents=forcedeltabothparents)
582 582
583 583 info = newrl.storageinfo(storedsize=True)
584 584 datasize = info['storedsize'] or 0
585 585
586 586 dstsize += datasize
587 587
588 588 if isinstance(newrl, changelog.changelog):
589 589 cdstsize += datasize
590 590 elif isinstance(newrl, manifest.manifestrevlog):
591 591 mdstsize += datasize
592 592 else:
593 593 fdstsize += datasize
594 594
595 595 progress.complete()
596 596
597 597 ui.write(_('finished migrating %d changelog revisions; change in size: '
598 598 '%s\n') % (crevcount, util.bytecount(cdstsize - csrcsize)))
599 599
600 600 ui.write(_('finished migrating %d total revisions; total change in store '
601 601 'size: %s\n') % (revcount, util.bytecount(dstsize - srcsize)))
602 602
603 603 def _filterstorefile(srcrepo, dstrepo, requirements, path, mode, st):
604 604 """Determine whether to copy a store file during upgrade.
605 605
606 606 This function is called when migrating store files from ``srcrepo`` to
607 607 ``dstrepo`` as part of upgrading a repository.
608 608
609 609 Args:
610 610 srcrepo: repo we are copying from
611 611 dstrepo: repo we are copying to
612 612 requirements: set of requirements for ``dstrepo``
613 613 path: store file being examined
614 614 mode: the ``ST_MODE`` file type of ``path``
615 615 st: ``stat`` data structure for ``path``
616 616
617 617 Function should return ``True`` if the file is to be copied.
618 618 """
619 619 # Skip revlogs.
620 620 if path.endswith(('.i', '.d')):
621 621 return False
622 622 # Skip transaction related files.
623 623 if path.startswith('undo'):
624 624 return False
625 625 # Only copy regular files.
626 626 if mode != stat.S_IFREG:
627 627 return False
628 628 # Skip other skipped files.
629 629 if path in ('lock', 'fncache'):
630 630 return False
631 631
632 632 return True
633 633
634 634 def _finishdatamigration(ui, srcrepo, dstrepo, requirements):
635 635 """Hook point for extensions to perform additional actions during upgrade.
636 636
637 637 This function is called after revlogs and store files have been copied but
638 638 before the new store is swapped into the original location.
639 639 """
640 640
641 641 def _upgraderepo(ui, srcrepo, dstrepo, requirements, actions):
642 642 """Do the low-level work of upgrading a repository.
643 643
644 644 The upgrade is effectively performed as a copy between a source
645 645 repository and a temporary destination repository.
646 646
647 647 The source repository is unmodified for as long as possible so the
648 648 upgrade can abort at any time without causing loss of service for
649 649 readers and without corrupting the source repository.
650 650 """
651 651 assert srcrepo.currentwlock()
652 652 assert dstrepo.currentwlock()
653 653
654 654 ui.write(_('(it is safe to interrupt this process any time before '
655 655 'data migration completes)\n'))
656 656
657 657 if 'redeltaall' in actions:
658 658 deltareuse = revlog.revlog.DELTAREUSENEVER
659 659 elif 'redeltaparent' in actions:
660 660 deltareuse = revlog.revlog.DELTAREUSESAMEREVS
661 661 elif 'redeltamultibase' in actions:
662 662 deltareuse = revlog.revlog.DELTAREUSESAMEREVS
663 663 elif 'redeltafulladd' in actions:
664 664 deltareuse = revlog.revlog.DELTAREUSEFULLADD
665 665 else:
666 666 deltareuse = revlog.revlog.DELTAREUSEALWAYS
667 667
668 668 with dstrepo.transaction('upgrade') as tr:
669 669 _copyrevlogs(ui, srcrepo, dstrepo, tr, deltareuse,
670 670 'redeltamultibase' in actions)
671 671
672 672 # Now copy other files in the store directory.
673 673 # The sorted() makes execution deterministic.
674 674 for p, kind, st in sorted(srcrepo.store.vfs.readdir('', stat=True)):
675 675 if not _filterstorefile(srcrepo, dstrepo, requirements,
676 676 p, kind, st):
677 677 continue
678 678
679 679 srcrepo.ui.write(_('copying %s\n') % p)
680 680 src = srcrepo.store.rawvfs.join(p)
681 681 dst = dstrepo.store.rawvfs.join(p)
682 682 util.copyfile(src, dst, copystat=True)
683 683
684 684 _finishdatamigration(ui, srcrepo, dstrepo, requirements)
685 685
686 686 ui.write(_('data fully migrated to temporary repository\n'))
687 687
688 688 backuppath = pycompat.mkdtemp(prefix='upgradebackup.', dir=srcrepo.path)
689 689 backupvfs = vfsmod.vfs(backuppath)
690 690
691 691 # Make a backup of requires file first, as it is the first to be modified.
692 692 util.copyfile(srcrepo.vfs.join('requires'), backupvfs.join('requires'))
693 693
694 694 # We install an arbitrary requirement that clients must not support
695 695 # as a mechanism to lock out new clients during the data swap. This is
696 696 # better than allowing a client to continue while the repository is in
697 697 # an inconsistent state.
698 698 ui.write(_('marking source repository as being upgraded; clients will be '
699 699 'unable to read from repository\n'))
700 700 scmutil.writerequires(srcrepo.vfs,
701 701 srcrepo.requirements | {'upgradeinprogress'})
702 702
703 703 ui.write(_('starting in-place swap of repository data\n'))
704 704 ui.write(_('replaced files will be backed up at %s\n') %
705 705 backuppath)
706 706
707 707 # Now swap in the new store directory. Doing it as a rename should make
708 708 # the operation nearly instantaneous and atomic (at least in well-behaved
709 709 # environments).
710 710 ui.write(_('replacing store...\n'))
711 711 tstart = util.timer()
712 712 util.rename(srcrepo.spath, backupvfs.join('store'))
713 713 util.rename(dstrepo.spath, srcrepo.spath)
714 714 elapsed = util.timer() - tstart
715 715 ui.write(_('store replacement complete; repository was inconsistent for '
716 716 '%0.1fs\n') % elapsed)
717 717
718 718 # We first write the requirements file. Any new requirements will lock
719 719 # out legacy clients.
720 720 ui.write(_('finalizing requirements file and making repository readable '
721 721 'again\n'))
722 722 scmutil.writerequires(srcrepo.vfs, requirements)
723 723
724 724 # The lock file from the old store won't be removed because nothing has a
725 725 # reference to its new location. So clean it up manually. Alternatively, we
726 726 # could update srcrepo.svfs and other variables to point to the new
727 727 # location. This is simpler.
728 728 backupvfs.unlink('store/lock')
729 729
730 730 return backuppath
731 731
732 732 def upgraderepo(ui, repo, run=False, optimize=None):
733 733 """Upgrade a repository in place."""
734 734 optimize = set(optimize or [])
735 735 repo = repo.unfiltered()
736 736
737 737 # Ensure the repository can be upgraded.
738 738 missingreqs = requiredsourcerequirements(repo) - repo.requirements
739 739 if missingreqs:
740 740 raise error.Abort(_('cannot upgrade repository; requirement '
741 741 'missing: %s') % _(', ').join(sorted(missingreqs)))
742 742
743 743 blockedreqs = blocksourcerequirements(repo) & repo.requirements
744 744 if blockedreqs:
745 745 raise error.Abort(_('cannot upgrade repository; unsupported source '
746 746 'requirement: %s') %
747 747 _(', ').join(sorted(blockedreqs)))
748 748
749 749 # FUTURE there is potentially a need to control the wanted requirements via
750 750 # command arguments or via an extension hook point.
751 751 newreqs = localrepo.newreporequirements(
752 752 repo.ui, localrepo.defaultcreateopts(repo.ui))
753 753 newreqs.update(preservedrequirements(repo))
754 754
755 755 noremovereqs = (repo.requirements - newreqs -
756 756 supportremovedrequirements(repo))
757 757 if noremovereqs:
758 758 raise error.Abort(_('cannot upgrade repository; requirement would be '
759 759 'removed: %s') % _(', ').join(sorted(noremovereqs)))
760 760
761 761 noaddreqs = (newreqs - repo.requirements -
762 762 allowednewrequirements(repo))
763 763 if noaddreqs:
764 764 raise error.Abort(_('cannot upgrade repository; do not support adding '
765 765 'requirement: %s') %
766 766 _(', ').join(sorted(noaddreqs)))
767 767
768 768 unsupportedreqs = newreqs - supporteddestrequirements(repo)
769 769 if unsupportedreqs:
770 770 raise error.Abort(_('cannot upgrade repository; do not support '
771 771 'destination requirement: %s') %
772 772 _(', ').join(sorted(unsupportedreqs)))
773 773
774 774 # Find and validate all improvements that can be made.
775 775 alloptimizations = findoptimizations(repo)
776 776
777 777 # Apply and Validate arguments.
778 778 optimizations = []
779 779 for o in alloptimizations:
780 780 if o.name in optimize:
781 781 optimizations.append(o)
782 782 optimize.discard(o.name)
783 783
784 784 if optimize: # anything left is unknown
785 785 raise error.Abort(_('unknown optimization action requested: %s') %
786 786 ', '.join(sorted(optimize)),
787 787 hint=_('run without arguments to see valid '
788 788 'optimizations'))
789 789
790 790 deficiencies = finddeficiencies(repo)
791 791 actions = determineactions(repo, deficiencies, repo.requirements, newreqs)
792 792 actions.extend(o for o in sorted(optimizations)
793 793 # determineactions could have added optimisation
794 794 if o not in actions)
795 795
796 796 def printrequirements():
797 797 ui.write(_('requirements\n'))
798 798 ui.write(_(' preserved: %s\n') %
799 799 _(', ').join(sorted(newreqs & repo.requirements)))
800 800
801 801 if repo.requirements - newreqs:
802 802 ui.write(_(' removed: %s\n') %
803 803 _(', ').join(sorted(repo.requirements - newreqs)))
804 804
805 805 if newreqs - repo.requirements:
806 806 ui.write(_(' added: %s\n') %
807 807 _(', ').join(sorted(newreqs - repo.requirements)))
808 808
809 809 ui.write('\n')
810 810
811 811 def printupgradeactions():
812 812 for a in actions:
813 813 ui.write('%s\n %s\n\n' % (a.name, a.upgrademessage))
814 814
815 815 if not run:
816 816 fromconfig = []
817 817 onlydefault = []
818 818
819 819 for d in deficiencies:
820 820 if d.fromconfig(repo):
821 821 fromconfig.append(d)
822 822 elif d.default:
823 823 onlydefault.append(d)
824 824
825 825 if fromconfig or onlydefault:
826 826
827 827 if fromconfig:
828 828 ui.write(_('repository lacks features recommended by '
829 829 'current config options:\n\n'))
830 830 for i in fromconfig:
831 831 ui.write('%s\n %s\n\n' % (i.name, i.description))
832 832
833 833 if onlydefault:
834 834 ui.write(_('repository lacks features used by the default '
835 835 'config options:\n\n'))
836 836 for i in onlydefault:
837 837 ui.write('%s\n %s\n\n' % (i.name, i.description))
838 838
839 839 ui.write('\n')
840 840 else:
841 841 ui.write(_('(no feature deficiencies found in existing '
842 842 'repository)\n'))
843 843
844 844 ui.write(_('performing an upgrade with "--run" will make the following '
845 845 'changes:\n\n'))
846 846
847 847 printrequirements()
848 848 printupgradeactions()
849 849
850 850 unusedoptimize = [i for i in alloptimizations if i not in actions]
851 851
852 852 if unusedoptimize:
853 853 ui.write(_('additional optimizations are available by specifying '
854 854 '"--optimize <name>":\n\n'))
855 855 for i in unusedoptimize:
856 856 ui.write(_('%s\n %s\n\n') % (i.name, i.description))
857 857 return
858 858
859 859 # Else we're in the run=true case.
860 860 ui.write(_('upgrade will perform the following actions:\n\n'))
861 861 printrequirements()
862 862 printupgradeactions()
863 863
864 864 upgradeactions = [a.name for a in actions]
865 865
866 866 ui.write(_('beginning upgrade...\n'))
867 867 with repo.wlock(), repo.lock():
868 868 ui.write(_('repository locked and read-only\n'))
869 869 # Our strategy for upgrading the repository is to create a new,
870 870 # temporary repository, write data to it, then do a swap of the
871 871 # data. There are less heavyweight ways to do this, but it is easier
872 872 # to create a new repo object than to instantiate all the components
873 873 # (like the store) separately.
874 874 tmppath = pycompat.mkdtemp(prefix='upgrade.', dir=repo.path)
875 875 backuppath = None
876 876 try:
877 877 ui.write(_('creating temporary repository to stage migrated '
878 878 'data: %s\n') % tmppath)
879 879
880 880 # clone ui without using ui.copy because repo.ui is protected
881 881 repoui = repo.ui.__class__(repo.ui)
882 882 dstrepo = hg.repository(repoui, path=tmppath, create=True)
883 883
884 884 with dstrepo.wlock(), dstrepo.lock():
885 885 backuppath = _upgraderepo(ui, repo, dstrepo, newreqs,
886 886 upgradeactions)
887 887
888 888 finally:
889 889 ui.write(_('removing temporary repository %s\n') % tmppath)
890 890 repo.vfs.rmtree(tmppath, forcibly=True)
891 891
892 892 if backuppath:
893 893 ui.warn(_('copy of old repository backed up at %s\n') %
894 894 backuppath)
895 895 ui.warn(_('the old repository will not be deleted; remove '
896 896 'it to free up disk space once the upgraded '
897 897 'repository is verified\n'))
@@ -1,757 +1,771 b''
1 1 #require no-reposimplestore
2 2
3 3 $ cat >> $HGRCPATH << EOF
4 4 > [extensions]
5 5 > share =
6 6 > EOF
7 7
8 8 store and revlogv1 are required in source
9 9
10 10 $ hg --config format.usestore=false init no-store
11 11 $ hg -R no-store debugupgraderepo
12 12 abort: cannot upgrade repository; requirement missing: store
13 13 [255]
14 14
15 15 $ hg init no-revlogv1
16 16 $ cat > no-revlogv1/.hg/requires << EOF
17 17 > dotencode
18 18 > fncache
19 19 > generaldelta
20 20 > store
21 21 > EOF
22 22
23 23 $ hg -R no-revlogv1 debugupgraderepo
24 24 abort: cannot upgrade repository; requirement missing: revlogv1
25 25 [255]
26 26
27 27 Cannot upgrade shared repositories
28 28
29 29 $ hg init share-parent
30 30 $ hg -q share share-parent share-child
31 31
32 32 $ hg -R share-child debugupgraderepo
33 33 abort: cannot upgrade repository; unsupported source requirement: shared
34 34 [255]
35 35
36 36 Do not yet support upgrading treemanifest repos
37 37
38 38 $ hg --config experimental.treemanifest=true init treemanifest
39 39 $ hg -R treemanifest debugupgraderepo
40 40 abort: cannot upgrade repository; unsupported source requirement: treemanifest
41 41 [255]
42 42
43 43 Cannot add treemanifest requirement during upgrade
44 44
45 45 $ hg init disallowaddedreq
46 46 $ hg -R disallowaddedreq --config experimental.treemanifest=true debugupgraderepo
47 47 abort: cannot upgrade repository; do not support adding requirement: treemanifest
48 48 [255]
49 49
50 50 An upgrade of a repository created with recommended settings only suggests optimizations
51 51
52 52 $ hg init empty
53 53 $ cd empty
54 54 $ hg debugformat
55 55 format-variant repo
56 56 fncache: yes
57 57 dotencode: yes
58 58 generaldelta: yes
59 sparserevlog: no
59 sparserevlog: yes
60 60 plain-cl-delta: yes
61 61 compression: zlib
62 62 $ hg debugformat --verbose
63 63 format-variant repo config default
64 64 fncache: yes yes yes
65 65 dotencode: yes yes yes
66 66 generaldelta: yes yes yes
67 sparserevlog: no no no
67 sparserevlog: yes yes yes
68 68 plain-cl-delta: yes yes yes
69 69 compression: zlib zlib zlib
70 70 $ hg debugformat --verbose --config format.usefncache=no
71 71 format-variant repo config default
72 72 fncache: yes no yes
73 73 dotencode: yes no yes
74 74 generaldelta: yes yes yes
75 sparserevlog: no no no
75 sparserevlog: yes yes yes
76 76 plain-cl-delta: yes yes yes
77 77 compression: zlib zlib zlib
78 78 $ hg debugformat --verbose --config format.usefncache=no --color=debug
79 79 format-variant repo config default
80 80 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
81 81 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
82 82 [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
83 [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
83 [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
84 84 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
85 85 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
86 86 $ hg debugformat -Tjson
87 87 [
88 88 {
89 89 "config": true,
90 90 "default": true,
91 91 "name": "fncache",
92 92 "repo": true
93 93 },
94 94 {
95 95 "config": true,
96 96 "default": true,
97 97 "name": "dotencode",
98 98 "repo": true
99 99 },
100 100 {
101 101 "config": true,
102 102 "default": true,
103 103 "name": "generaldelta",
104 104 "repo": true
105 105 },
106 106 {
107 "config": false,
108 "default": false,
107 "config": true,
108 "default": true,
109 109 "name": "sparserevlog",
110 "repo": false
110 "repo": true
111 111 },
112 112 {
113 113 "config": true,
114 114 "default": true,
115 115 "name": "plain-cl-delta",
116 116 "repo": true
117 117 },
118 118 {
119 119 "config": "zlib",
120 120 "default": "zlib",
121 121 "name": "compression",
122 122 "repo": "zlib"
123 123 }
124 124 ]
125 125 $ hg debugupgraderepo
126 126 (no feature deficiencies found in existing repository)
127 127 performing an upgrade with "--run" will make the following changes:
128 128
129 129 requirements
130 preserved: dotencode, fncache, generaldelta, revlogv1, store
130 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
131 131
132 132 additional optimizations are available by specifying "--optimize <name>":
133 133
134 134 redeltaparent
135 135 deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower
136 136
137 137 redeltamultibase
138 138 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
139 139
140 140 redeltaall
141 141 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
142 142
143 143 redeltafulladd
144 144 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "redeltaall" but even slower since more logic is involved.
145 145
146 146
147 147 --optimize can be used to add optimizations
148 148
149 149 $ hg debugupgrade --optimize redeltaparent
150 150 (no feature deficiencies found in existing repository)
151 151 performing an upgrade with "--run" will make the following changes:
152 152
153 153 requirements
154 preserved: dotencode, fncache, generaldelta, revlogv1, store
154 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
155 155
156 156 redeltaparent
157 157 deltas within internal storage will choose a new base revision if needed
158 158
159 159 additional optimizations are available by specifying "--optimize <name>":
160 160
161 161 redeltamultibase
162 162 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
163 163
164 164 redeltaall
165 165 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
166 166
167 167 redeltafulladd
168 168 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "redeltaall" but even slower since more logic is involved.
169 169
170 170
171 171 Various sub-optimal detections work
172 172
173 173 $ cat > .hg/requires << EOF
174 174 > revlogv1
175 175 > store
176 176 > EOF
177 177
178 178 $ hg debugformat
179 179 format-variant repo
180 180 fncache: no
181 181 dotencode: no
182 182 generaldelta: no
183 183 sparserevlog: no
184 184 plain-cl-delta: yes
185 185 compression: zlib
186 186 $ hg debugformat --verbose
187 187 format-variant repo config default
188 188 fncache: no yes yes
189 189 dotencode: no yes yes
190 190 generaldelta: no yes yes
191 sparserevlog: no no no
191 sparserevlog: no yes yes
192 192 plain-cl-delta: yes yes yes
193 193 compression: zlib zlib zlib
194 194 $ hg debugformat --verbose --config format.usegeneraldelta=no
195 195 format-variant repo config default
196 196 fncache: no yes yes
197 197 dotencode: no yes yes
198 198 generaldelta: no no yes
199 sparserevlog: no no no
199 sparserevlog: no no yes
200 200 plain-cl-delta: yes yes yes
201 201 compression: zlib zlib zlib
202 202 $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug
203 203 format-variant repo config default
204 204 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
205 205 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
206 206 [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
207 [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
207 [formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
208 208 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
209 209 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
210 210 $ hg debugupgraderepo
211 211 repository lacks features recommended by current config options:
212 212
213 213 fncache
214 214 long and reserved filenames may not work correctly; repository performance is sub-optimal
215 215
216 216 dotencode
217 217 storage of filenames beginning with a period or space may not work correctly
218 218
219 219 generaldelta
220 220 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
221 221
222 sparserevlog
223 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.
224
222 225
223 226 performing an upgrade with "--run" will make the following changes:
224 227
225 228 requirements
226 229 preserved: revlogv1, store
227 added: dotencode, fncache, generaldelta
230 added: dotencode, fncache, generaldelta, sparserevlog
228 231
229 232 fncache
230 233 repository will be more resilient to storing certain paths and performance of certain operations should be improved
231 234
232 235 dotencode
233 236 repository will be better able to store files beginning with a space or period
234 237
235 238 generaldelta
236 239 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
237 240
241 sparserevlog
242 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.
243
238 244 additional optimizations are available by specifying "--optimize <name>":
239 245
240 246 redeltaparent
241 247 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
242 248
243 249 redeltamultibase
244 250 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
245 251
246 252 redeltaall
247 253 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
248 254
249 255 redeltafulladd
250 256 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "redeltaall" but even slower since more logic is involved.
251 257
252 258
253 259 $ hg --config format.dotencode=false debugupgraderepo
254 260 repository lacks features recommended by current config options:
255 261
256 262 fncache
257 263 long and reserved filenames may not work correctly; repository performance is sub-optimal
258 264
259 265 generaldelta
260 266 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
261 267
268 sparserevlog
269 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.
270
262 271 repository lacks features used by the default config options:
263 272
264 273 dotencode
265 274 storage of filenames beginning with a period or space may not work correctly
266 275
267 276
268 277 performing an upgrade with "--run" will make the following changes:
269 278
270 279 requirements
271 280 preserved: revlogv1, store
272 added: fncache, generaldelta
281 added: fncache, generaldelta, sparserevlog
273 282
274 283 fncache
275 284 repository will be more resilient to storing certain paths and performance of certain operations should be improved
276 285
277 286 generaldelta
278 287 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
279 288
289 sparserevlog
290 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.
291
280 292 additional optimizations are available by specifying "--optimize <name>":
281 293
282 294 redeltaparent
283 295 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
284 296
285 297 redeltamultibase
286 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
287 299
288 300 redeltaall
289 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
290 302
291 303 redeltafulladd
292 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 "redeltaall" but even slower since more logic is involved.
293 305
294 306
295 307 $ cd ..
296 308
297 309 Upgrading a repository that is already modern essentially no-ops
298 310
299 311 $ hg init modern
300 312 $ hg -R modern debugupgraderepo --run
301 313 upgrade will perform the following actions:
302 314
303 315 requirements
304 preserved: dotencode, fncache, generaldelta, revlogv1, store
316 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
305 317
306 318 beginning upgrade...
307 319 repository locked and read-only
308 320 creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob)
309 321 (it is safe to interrupt this process any time before data migration completes)
310 322 data fully migrated to temporary repository
311 323 marking source repository as being upgraded; clients will be unable to read from repository
312 324 starting in-place swap of repository data
313 325 replaced files will be backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob)
314 326 replacing store...
315 327 store replacement complete; repository was inconsistent for *s (glob)
316 328 finalizing requirements file and making repository readable again
317 329 removing temporary repository $TESTTMP/modern/.hg/upgrade.* (glob)
318 330 copy of old repository backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob)
319 331 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
320 332
321 333 Upgrading a repository to generaldelta works
322 334
323 335 $ hg --config format.usegeneraldelta=false init upgradegd
324 336 $ cd upgradegd
325 337 $ touch f0
326 338 $ hg -q commit -A -m initial
327 339 $ touch f1
328 340 $ hg -q commit -A -m 'add f1'
329 341 $ hg -q up -r 0
330 342 $ touch f2
331 343 $ hg -q commit -A -m 'add f2'
332 344
333 345 $ hg debugupgraderepo --run --config format.sparse-revlog=false
334 346 upgrade will perform the following actions:
335 347
336 348 requirements
337 349 preserved: dotencode, fncache, revlogv1, store
338 350 added: generaldelta
339 351
340 352 generaldelta
341 353 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
342 354
343 355 beginning upgrade...
344 356 repository locked and read-only
345 357 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
346 358 (it is safe to interrupt this process any time before data migration completes)
347 359 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
348 360 migrating 917 bytes in store; 401 bytes tracked data
349 361 migrating 3 filelogs containing 3 revisions (192 bytes in store; 0 bytes tracked data)
350 362 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
351 363 migrating 1 manifests containing 3 revisions (349 bytes in store; 220 bytes tracked data)
352 364 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
353 365 migrating changelog containing 3 revisions (376 bytes in store; 181 bytes tracked data)
354 366 finished migrating 3 changelog revisions; change in size: 0 bytes
355 367 finished migrating 9 total revisions; total change in store size: 0 bytes
356 368 copying phaseroots
357 369 data fully migrated to temporary repository
358 370 marking source repository as being upgraded; clients will be unable to read from repository
359 371 starting in-place swap of repository data
360 372 replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
361 373 replacing store...
362 374 store replacement complete; repository was inconsistent for *s (glob)
363 375 finalizing requirements file and making repository readable again
364 376 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
365 377 copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
366 378 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
367 379
368 380 Original requirements backed up
369 381
370 382 $ cat .hg/upgradebackup.*/requires
371 383 dotencode
372 384 fncache
373 385 revlogv1
374 386 store
375 387
376 388 generaldelta added to original requirements files
377 389
378 390 $ cat .hg/requires
379 391 dotencode
380 392 fncache
381 393 generaldelta
382 394 revlogv1
383 395 store
384 396
385 397 store directory has files we expect
386 398
387 399 $ ls .hg/store
388 400 00changelog.i
389 401 00manifest.i
390 402 data
391 403 fncache
392 404 phaseroots
393 405 undo
394 406 undo.backupfiles
395 407 undo.phaseroots
396 408
397 409 manifest should be generaldelta
398 410
399 411 $ hg debugrevlog -m | grep flags
400 412 flags : inline, generaldelta
401 413
402 414 verify should be happy
403 415
404 416 $ hg verify
405 417 checking changesets
406 418 checking manifests
407 419 crosschecking files in changesets and manifests
408 420 checking files
409 421 checked 3 changesets with 3 changes to 3 files
410 422
411 423 old store should be backed up
412 424
413 425 $ ls .hg/upgradebackup.*/store
414 426 00changelog.i
415 427 00manifest.i
416 428 data
417 429 fncache
418 430 phaseroots
419 431 undo
420 432 undo.backup.fncache
421 433 undo.backupfiles
422 434 undo.phaseroots
423 435
424 436 $ cd ..
425 437
426 438 store files with special filenames aren't encoded during copy
427 439
428 440 $ hg init store-filenames
429 441 $ cd store-filenames
430 442 $ touch foo
431 443 $ hg -q commit -A -m initial
432 444 $ touch .hg/store/.XX_special_filename
433 445
434 446 $ hg debugupgraderepo --run
435 447 upgrade will perform the following actions:
436 448
437 449 requirements
438 preserved: dotencode, fncache, generaldelta, revlogv1, store
450 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
439 451
440 452 beginning upgrade...
441 453 repository locked and read-only
442 454 creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
443 455 (it is safe to interrupt this process any time before data migration completes)
444 456 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
445 457 migrating 301 bytes in store; 107 bytes tracked data
446 458 migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data)
447 459 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
448 460 migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data)
449 461 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
450 462 migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data)
451 463 finished migrating 1 changelog revisions; change in size: 0 bytes
452 464 finished migrating 3 total revisions; total change in store size: 0 bytes
453 465 copying .XX_special_filename
454 466 copying phaseroots
455 467 data fully migrated to temporary repository
456 468 marking source repository as being upgraded; clients will be unable to read from repository
457 469 starting in-place swap of repository data
458 470 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
459 471 replacing store...
460 472 store replacement complete; repository was inconsistent for *s (glob)
461 473 finalizing requirements file and making repository readable again
462 474 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
463 475 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
464 476 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
465 477 $ hg debugupgraderepo --run --optimize redeltafulladd
466 478 upgrade will perform the following actions:
467 479
468 480 requirements
469 preserved: dotencode, fncache, generaldelta, revlogv1, store
481 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
470 482
471 483 redeltafulladd
472 484 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
473 485
474 486 beginning upgrade...
475 487 repository locked and read-only
476 488 creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
477 489 (it is safe to interrupt this process any time before data migration completes)
478 490 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
479 491 migrating 301 bytes in store; 107 bytes tracked data
480 492 migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data)
481 493 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
482 494 migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data)
483 495 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
484 496 migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data)
485 497 finished migrating 1 changelog revisions; change in size: 0 bytes
486 498 finished migrating 3 total revisions; total change in store size: 0 bytes
487 499 copying .XX_special_filename
488 500 copying phaseroots
489 501 data fully migrated to temporary repository
490 502 marking source repository as being upgraded; clients will be unable to read from repository
491 503 starting in-place swap of repository data
492 504 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
493 505 replacing store...
494 506 store replacement complete; repository was inconsistent for *s (glob)
495 507 finalizing requirements file and making repository readable again
496 508 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
497 509 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
498 510 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
499 511
500 512 fncache is valid after upgrade
501 513
502 514 $ hg debugrebuildfncache
503 515 fncache already up to date
504 516
505 517 $ cd ..
506 518
507 519 Check upgrading a large file repository
508 520 ---------------------------------------
509 521
510 522 $ hg init largefilesrepo
511 523 $ cat << EOF >> largefilesrepo/.hg/hgrc
512 524 > [extensions]
513 525 > largefiles =
514 526 > EOF
515 527
516 528 $ cd largefilesrepo
517 529 $ touch foo
518 530 $ hg add --large foo
519 531 $ hg -q commit -m initial
520 532 $ cat .hg/requires
521 533 dotencode
522 534 fncache
523 535 generaldelta
524 536 largefiles
525 537 revlogv1
538 sparserevlog
526 539 store
527 540
528 541 $ hg debugupgraderepo --run
529 542 upgrade will perform the following actions:
530 543
531 544 requirements
532 preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, store
545 preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, sparserevlog, store
533 546
534 547 beginning upgrade...
535 548 repository locked and read-only
536 549 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
537 550 (it is safe to interrupt this process any time before data migration completes)
538 551 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
539 552 migrating 355 bytes in store; 160 bytes tracked data
540 553 migrating 1 filelogs containing 1 revisions (106 bytes in store; 41 bytes tracked data)
541 554 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
542 555 migrating 1 manifests containing 1 revisions (116 bytes in store; 51 bytes tracked data)
543 556 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
544 557 migrating changelog containing 1 revisions (133 bytes in store; 68 bytes tracked data)
545 558 finished migrating 1 changelog revisions; change in size: 0 bytes
546 559 finished migrating 3 total revisions; total change in store size: 0 bytes
547 560 copying phaseroots
548 561 data fully migrated to temporary repository
549 562 marking source repository as being upgraded; clients will be unable to read from repository
550 563 starting in-place swap of repository data
551 564 replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
552 565 replacing store...
553 566 store replacement complete; repository was inconsistent for *s (glob)
554 567 finalizing requirements file and making repository readable again
555 568 removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
556 569 copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
557 570 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
558 571 $ cat .hg/requires
559 572 dotencode
560 573 fncache
561 574 generaldelta
562 575 largefiles
563 576 revlogv1
577 sparserevlog
564 578 store
565 579
566 580 $ cat << EOF >> .hg/hgrc
567 581 > [extensions]
568 582 > lfs =
569 583 > [lfs]
570 584 > threshold = 10
571 585 > EOF
572 586 $ echo '123456789012345' > lfs.bin
573 587 $ hg ci -Am 'lfs.bin'
574 588 adding lfs.bin
575 589 $ grep lfs .hg/requires
576 590 lfs
577 591 $ find .hg/store/lfs -type f
578 592 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
579 593
580 594 $ hg debugupgraderepo --run
581 595 upgrade will perform the following actions:
582 596
583 597 requirements
584 preserved: dotencode, fncache, generaldelta, largefiles, lfs, revlogv1, store
598 preserved: dotencode, fncache, generaldelta, largefiles, lfs, revlogv1, sparserevlog, store
585 599
586 600 beginning upgrade...
587 601 repository locked and read-only
588 602 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
589 603 (it is safe to interrupt this process any time before data migration completes)
590 604 migrating 6 total revisions (2 in filelogs, 2 in manifests, 2 in changelog)
591 605 migrating 801 bytes in store; 467 bytes tracked data
592 606 migrating 2 filelogs containing 2 revisions (296 bytes in store; 182 bytes tracked data)
593 607 finished migrating 2 filelog revisions across 2 filelogs; change in size: 0 bytes
594 608 migrating 1 manifests containing 2 revisions (241 bytes in store; 151 bytes tracked data)
595 609 finished migrating 2 manifest revisions across 1 manifests; change in size: 0 bytes
596 610 migrating changelog containing 2 revisions (264 bytes in store; 134 bytes tracked data)
597 611 finished migrating 2 changelog revisions; change in size: 0 bytes
598 612 finished migrating 6 total revisions; total change in store size: 0 bytes
599 613 copying phaseroots
600 614 copying lfs blob d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
601 615 data fully migrated to temporary repository
602 616 marking source repository as being upgraded; clients will be unable to read from repository
603 617 starting in-place swap of repository data
604 618 replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
605 619 replacing store...
606 620 store replacement complete; repository was inconsistent for *s (glob)
607 621 finalizing requirements file and making repository readable again
608 622 removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
609 623 copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
610 624 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
611 625
612 626 $ grep lfs .hg/requires
613 627 lfs
614 628 $ find .hg/store/lfs -type f
615 629 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
616 630 $ hg verify
617 631 checking changesets
618 632 checking manifests
619 633 crosschecking files in changesets and manifests
620 634 checking files
621 635 checked 2 changesets with 2 changes to 2 files
622 636 $ hg debugdata lfs.bin 0
623 637 version https://git-lfs.github.com/spec/v1
624 638 oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
625 639 size 16
626 640 x-is-binary 0
627 641
628 642 $ cd ..
629 643
630 644 repository config is taken in account
631 645 -------------------------------------
632 646
633 647 $ cat << EOF >> $HGRCPATH
634 648 > [format]
635 649 > maxchainlen = 1
636 650 > EOF
637 651
638 652 $ hg init localconfig
639 653 $ cd localconfig
640 654 $ cat << EOF > file
641 655 > some content
642 656 > with some length
643 657 > to make sure we get a delta
644 658 > after changes
645 659 > very long
646 660 > very long
647 661 > very long
648 662 > very long
649 663 > very long
650 664 > very long
651 665 > very long
652 666 > very long
653 667 > very long
654 668 > very long
655 669 > very long
656 670 > EOF
657 671 $ hg -q commit -A -m A
658 672 $ echo "new line" >> file
659 673 $ hg -q commit -m B
660 674 $ echo "new line" >> file
661 675 $ hg -q commit -m C
662 676
663 677 $ cat << EOF >> .hg/hgrc
664 678 > [format]
665 679 > maxchainlen = 9001
666 680 > EOF
667 681 $ hg config format
668 682 format.maxchainlen=9001
669 683 $ hg debugdeltachain file
670 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
671 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000
672 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000
673 2 2 1 -1 base 84 200 84 0.42000 84 0 0.00000
684 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
685 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
686 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
687 2 1 2 0 other 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1
674 688
675 689 $ hg debugupgraderepo --run --optimize redeltaall
676 690 upgrade will perform the following actions:
677 691
678 692 requirements
679 preserved: dotencode, fncache, generaldelta, revlogv1, store
693 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
680 694
681 695 redeltaall
682 696 deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time
683 697
684 698 beginning upgrade...
685 699 repository locked and read-only
686 700 creating temporary repository to stage migrated data: $TESTTMP/localconfig/.hg/upgrade.* (glob)
687 701 (it is safe to interrupt this process any time before data migration completes)
688 702 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
689 migrating 1.05 KB in store; 882 bytes tracked data
690 migrating 1 filelogs containing 3 revisions (374 bytes in store; 573 bytes tracked data)
691 finished migrating 3 filelog revisions across 1 filelogs; change in size: -63 bytes
703 migrating 1019 bytes in store; 882 bytes tracked data
704 migrating 1 filelogs containing 3 revisions (320 bytes in store; 573 bytes tracked data)
705 finished migrating 3 filelog revisions across 1 filelogs; change in size: -9 bytes
692 706 migrating 1 manifests containing 3 revisions (333 bytes in store; 138 bytes tracked data)
693 707 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
694 708 migrating changelog containing 3 revisions (366 bytes in store; 171 bytes tracked data)
695 709 finished migrating 3 changelog revisions; change in size: 0 bytes
696 finished migrating 9 total revisions; total change in store size: -63 bytes
710 finished migrating 9 total revisions; total change in store size: -9 bytes
697 711 copying phaseroots
698 712 data fully migrated to temporary repository
699 713 marking source repository as being upgraded; clients will be unable to read from repository
700 714 starting in-place swap of repository data
701 715 replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
702 716 replacing store...
703 717 store replacement complete; repository was inconsistent for *s (glob)
704 718 finalizing requirements file and making repository readable again
705 719 removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob)
706 720 copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
707 721 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
708 722 $ hg debugdeltachain file
709 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
710 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000
711 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000
712 2 1 3 1 p1 21 200 119 0.59500 119 0 0.00000
723 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
724 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
725 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
726 2 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 119 119 1.00000 1
713 727 $ cd ..
714 728
715 729 $ cat << EOF >> $HGRCPATH
716 730 > [format]
717 731 > maxchainlen = 9001
718 732 > EOF
719 733
720 734 Check upgrading a sparse-revlog repository
721 735 ---------------------------------------
722 736
723 737 $ hg init sparserevlogrepo --config format.sparse-revlog=no
724 738 $ cd sparserevlogrepo
725 739 $ touch foo
726 740 $ hg add foo
727 741 $ hg -q commit -m "foo"
728 742 $ cat .hg/requires
729 743 dotencode
730 744 fncache
731 745 generaldelta
732 746 revlogv1
733 747 store
734 748
735 749 Check that we can add the sparse-revlog format requirement
736 750 $ hg --config format.sparse-revlog=yes debugupgraderepo --run >/dev/null
737 751 copy of old repository backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob)
738 752 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
739 753 $ cat .hg/requires
740 754 dotencode
741 755 fncache
742 756 generaldelta
743 757 revlogv1
744 758 sparserevlog
745 759 store
746 760
747 761 Check that we can remove the sparse-revlog format requirement
748 762 $ hg --config format.sparse-revlog=no debugupgraderepo --run >/dev/null
749 763 copy of old repository backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob)
750 764 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
751 765 $ cat .hg/requires
752 766 dotencode
753 767 fncache
754 768 generaldelta
755 769 revlogv1
756 770 store
757 771 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now