##// END OF EJS Templates
configitems: traverse sections deterministically...
Gregory Szorc -
r35826:178aacdc stable
parent child Browse files
Show More
@@ -1,1295 +1,1295 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 for section, items in configtable.items():
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=None,
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('auth', 'cookiefile',
151 151 default=None,
152 152 )
153 153 # bookmarks.pushing: internal hack for discovery
154 154 coreconfigitem('bookmarks', 'pushing',
155 155 default=list,
156 156 )
157 157 # bundle.mainreporoot: internal hack for bundlerepo
158 158 coreconfigitem('bundle', 'mainreporoot',
159 159 default='',
160 160 )
161 161 # bundle.reorder: experimental config
162 162 coreconfigitem('bundle', 'reorder',
163 163 default='auto',
164 164 )
165 165 coreconfigitem('censor', 'policy',
166 166 default='abort',
167 167 )
168 168 coreconfigitem('chgserver', 'idletimeout',
169 169 default=3600,
170 170 )
171 171 coreconfigitem('chgserver', 'skiphash',
172 172 default=False,
173 173 )
174 174 coreconfigitem('cmdserver', 'log',
175 175 default=None,
176 176 )
177 177 coreconfigitem('color', '.*',
178 178 default=None,
179 179 generic=True,
180 180 )
181 181 coreconfigitem('color', 'mode',
182 182 default='auto',
183 183 )
184 184 coreconfigitem('color', 'pagermode',
185 185 default=dynamicdefault,
186 186 )
187 187 coreconfigitem('commands', 'show.aliasprefix',
188 188 default=list,
189 189 )
190 190 coreconfigitem('commands', 'status.relative',
191 191 default=False,
192 192 )
193 193 coreconfigitem('commands', 'status.skipstates',
194 194 default=[],
195 195 )
196 196 coreconfigitem('commands', 'status.verbose',
197 197 default=False,
198 198 )
199 199 coreconfigitem('commands', 'update.check',
200 200 default=None,
201 201 # Deprecated, remove after 4.4 release
202 202 alias=[('experimental', 'updatecheck')]
203 203 )
204 204 coreconfigitem('commands', 'update.requiredest',
205 205 default=False,
206 206 )
207 207 coreconfigitem('committemplate', '.*',
208 208 default=None,
209 209 generic=True,
210 210 )
211 211 coreconfigitem('convert', 'cvsps.cache',
212 212 default=True,
213 213 )
214 214 coreconfigitem('convert', 'cvsps.fuzz',
215 215 default=60,
216 216 )
217 217 coreconfigitem('convert', 'cvsps.logencoding',
218 218 default=None,
219 219 )
220 220 coreconfigitem('convert', 'cvsps.mergefrom',
221 221 default=None,
222 222 )
223 223 coreconfigitem('convert', 'cvsps.mergeto',
224 224 default=None,
225 225 )
226 226 coreconfigitem('convert', 'git.committeractions',
227 227 default=lambda: ['messagedifferent'],
228 228 )
229 229 coreconfigitem('convert', 'git.extrakeys',
230 230 default=list,
231 231 )
232 232 coreconfigitem('convert', 'git.findcopiesharder',
233 233 default=False,
234 234 )
235 235 coreconfigitem('convert', 'git.remoteprefix',
236 236 default='remote',
237 237 )
238 238 coreconfigitem('convert', 'git.renamelimit',
239 239 default=400,
240 240 )
241 241 coreconfigitem('convert', 'git.saverev',
242 242 default=True,
243 243 )
244 244 coreconfigitem('convert', 'git.similarity',
245 245 default=50,
246 246 )
247 247 coreconfigitem('convert', 'git.skipsubmodules',
248 248 default=False,
249 249 )
250 250 coreconfigitem('convert', 'hg.clonebranches',
251 251 default=False,
252 252 )
253 253 coreconfigitem('convert', 'hg.ignoreerrors',
254 254 default=False,
255 255 )
256 256 coreconfigitem('convert', 'hg.revs',
257 257 default=None,
258 258 )
259 259 coreconfigitem('convert', 'hg.saverev',
260 260 default=False,
261 261 )
262 262 coreconfigitem('convert', 'hg.sourcename',
263 263 default=None,
264 264 )
265 265 coreconfigitem('convert', 'hg.startrev',
266 266 default=None,
267 267 )
268 268 coreconfigitem('convert', 'hg.tagsbranch',
269 269 default='default',
270 270 )
271 271 coreconfigitem('convert', 'hg.usebranchnames',
272 272 default=True,
273 273 )
274 274 coreconfigitem('convert', 'ignoreancestorcheck',
275 275 default=False,
276 276 )
277 277 coreconfigitem('convert', 'localtimezone',
278 278 default=False,
279 279 )
280 280 coreconfigitem('convert', 'p4.encoding',
281 281 default=dynamicdefault,
282 282 )
283 283 coreconfigitem('convert', 'p4.startrev',
284 284 default=0,
285 285 )
286 286 coreconfigitem('convert', 'skiptags',
287 287 default=False,
288 288 )
289 289 coreconfigitem('convert', 'svn.debugsvnlog',
290 290 default=True,
291 291 )
292 292 coreconfigitem('convert', 'svn.trunk',
293 293 default=None,
294 294 )
295 295 coreconfigitem('convert', 'svn.tags',
296 296 default=None,
297 297 )
298 298 coreconfigitem('convert', 'svn.branches',
299 299 default=None,
300 300 )
301 301 coreconfigitem('convert', 'svn.startrev',
302 302 default=0,
303 303 )
304 304 coreconfigitem('debug', 'dirstate.delaywrite',
305 305 default=0,
306 306 )
307 307 coreconfigitem('defaults', '.*',
308 308 default=None,
309 309 generic=True,
310 310 )
311 311 coreconfigitem('devel', 'all-warnings',
312 312 default=False,
313 313 )
314 314 coreconfigitem('devel', 'bundle2.debug',
315 315 default=False,
316 316 )
317 317 coreconfigitem('devel', 'cache-vfs',
318 318 default=None,
319 319 )
320 320 coreconfigitem('devel', 'check-locks',
321 321 default=False,
322 322 )
323 323 coreconfigitem('devel', 'check-relroot',
324 324 default=False,
325 325 )
326 326 coreconfigitem('devel', 'default-date',
327 327 default=None,
328 328 )
329 329 coreconfigitem('devel', 'deprec-warn',
330 330 default=False,
331 331 )
332 332 coreconfigitem('devel', 'disableloaddefaultcerts',
333 333 default=False,
334 334 )
335 335 coreconfigitem('devel', 'warn-empty-changegroup',
336 336 default=False,
337 337 )
338 338 coreconfigitem('devel', 'legacy.exchange',
339 339 default=list,
340 340 )
341 341 coreconfigitem('devel', 'servercafile',
342 342 default='',
343 343 )
344 344 coreconfigitem('devel', 'serverexactprotocol',
345 345 default='',
346 346 )
347 347 coreconfigitem('devel', 'serverrequirecert',
348 348 default=False,
349 349 )
350 350 coreconfigitem('devel', 'strip-obsmarkers',
351 351 default=True,
352 352 )
353 353 coreconfigitem('devel', 'warn-config',
354 354 default=None,
355 355 )
356 356 coreconfigitem('devel', 'warn-config-default',
357 357 default=None,
358 358 )
359 359 coreconfigitem('devel', 'user.obsmarker',
360 360 default=None,
361 361 )
362 362 coreconfigitem('devel', 'warn-config-unknown',
363 363 default=None,
364 364 )
365 365 coreconfigitem('devel', 'debug.peer-request',
366 366 default=False,
367 367 )
368 368 coreconfigitem('diff', 'nodates',
369 369 default=False,
370 370 )
371 371 coreconfigitem('diff', 'showfunc',
372 372 default=False,
373 373 )
374 374 coreconfigitem('diff', 'unified',
375 375 default=None,
376 376 )
377 377 coreconfigitem('diff', 'git',
378 378 default=False,
379 379 )
380 380 coreconfigitem('diff', 'ignorews',
381 381 default=False,
382 382 )
383 383 coreconfigitem('diff', 'ignorewsamount',
384 384 default=False,
385 385 )
386 386 coreconfigitem('diff', 'ignoreblanklines',
387 387 default=False,
388 388 )
389 389 coreconfigitem('diff', 'ignorewseol',
390 390 default=False,
391 391 )
392 392 coreconfigitem('diff', 'nobinary',
393 393 default=False,
394 394 )
395 395 coreconfigitem('diff', 'noprefix',
396 396 default=False,
397 397 )
398 398 coreconfigitem('email', 'bcc',
399 399 default=None,
400 400 )
401 401 coreconfigitem('email', 'cc',
402 402 default=None,
403 403 )
404 404 coreconfigitem('email', 'charsets',
405 405 default=list,
406 406 )
407 407 coreconfigitem('email', 'from',
408 408 default=None,
409 409 )
410 410 coreconfigitem('email', 'method',
411 411 default='smtp',
412 412 )
413 413 coreconfigitem('email', 'reply-to',
414 414 default=None,
415 415 )
416 416 coreconfigitem('email', 'to',
417 417 default=None,
418 418 )
419 419 coreconfigitem('experimental', 'archivemetatemplate',
420 420 default=dynamicdefault,
421 421 )
422 422 coreconfigitem('experimental', 'bundle-phases',
423 423 default=False,
424 424 )
425 425 coreconfigitem('experimental', 'bundle2-advertise',
426 426 default=True,
427 427 )
428 428 coreconfigitem('experimental', 'bundle2-output-capture',
429 429 default=False,
430 430 )
431 431 coreconfigitem('experimental', 'bundle2.pushback',
432 432 default=False,
433 433 )
434 434 coreconfigitem('experimental', 'bundle2.stream',
435 435 default=False,
436 436 )
437 437 coreconfigitem('experimental', 'bundle2lazylocking',
438 438 default=False,
439 439 )
440 440 coreconfigitem('experimental', 'bundlecomplevel',
441 441 default=None,
442 442 )
443 443 coreconfigitem('experimental', 'changegroup3',
444 444 default=False,
445 445 )
446 446 coreconfigitem('experimental', 'clientcompressionengines',
447 447 default=list,
448 448 )
449 449 coreconfigitem('experimental', 'copytrace',
450 450 default='on',
451 451 )
452 452 coreconfigitem('experimental', 'copytrace.movecandidateslimit',
453 453 default=100,
454 454 )
455 455 coreconfigitem('experimental', 'copytrace.sourcecommitlimit',
456 456 default=100,
457 457 )
458 458 coreconfigitem('experimental', 'crecordtest',
459 459 default=None,
460 460 )
461 461 coreconfigitem('experimental', 'directaccess',
462 462 default=False,
463 463 )
464 464 coreconfigitem('experimental', 'directaccess.revnums',
465 465 default=False,
466 466 )
467 467 coreconfigitem('experimental', 'editortmpinhg',
468 468 default=False,
469 469 )
470 470 coreconfigitem('experimental', 'evolution',
471 471 default=list,
472 472 )
473 473 coreconfigitem('experimental', 'evolution.allowdivergence',
474 474 default=False,
475 475 alias=[('experimental', 'allowdivergence')]
476 476 )
477 477 coreconfigitem('experimental', 'evolution.allowunstable',
478 478 default=None,
479 479 )
480 480 coreconfigitem('experimental', 'evolution.createmarkers',
481 481 default=None,
482 482 )
483 483 coreconfigitem('experimental', 'evolution.effect-flags',
484 484 default=True,
485 485 alias=[('experimental', 'effect-flags')]
486 486 )
487 487 coreconfigitem('experimental', 'evolution.exchange',
488 488 default=None,
489 489 )
490 490 coreconfigitem('experimental', 'evolution.bundle-obsmarker',
491 491 default=False,
492 492 )
493 493 coreconfigitem('experimental', 'evolution.report-instabilities',
494 494 default=True,
495 495 )
496 496 coreconfigitem('experimental', 'evolution.track-operation',
497 497 default=True,
498 498 )
499 499 coreconfigitem('experimental', 'worddiff',
500 500 default=False,
501 501 )
502 502 coreconfigitem('experimental', 'maxdeltachainspan',
503 503 default=-1,
504 504 )
505 505 coreconfigitem('experimental', 'mmapindexthreshold',
506 506 default=None,
507 507 )
508 508 coreconfigitem('experimental', 'nonnormalparanoidcheck',
509 509 default=False,
510 510 )
511 511 coreconfigitem('experimental', 'exportableenviron',
512 512 default=list,
513 513 )
514 514 coreconfigitem('experimental', 'extendedheader.index',
515 515 default=None,
516 516 )
517 517 coreconfigitem('experimental', 'extendedheader.similarity',
518 518 default=False,
519 519 )
520 520 coreconfigitem('experimental', 'format.compression',
521 521 default='zlib',
522 522 )
523 523 coreconfigitem('experimental', 'graphshorten',
524 524 default=False,
525 525 )
526 526 coreconfigitem('experimental', 'graphstyle.parent',
527 527 default=dynamicdefault,
528 528 )
529 529 coreconfigitem('experimental', 'graphstyle.missing',
530 530 default=dynamicdefault,
531 531 )
532 532 coreconfigitem('experimental', 'graphstyle.grandparent',
533 533 default=dynamicdefault,
534 534 )
535 535 coreconfigitem('experimental', 'hook-track-tags',
536 536 default=False,
537 537 )
538 538 coreconfigitem('experimental', 'httppostargs',
539 539 default=False,
540 540 )
541 541 coreconfigitem('experimental', 'manifestv2',
542 542 default=False,
543 543 )
544 544 coreconfigitem('experimental', 'mergedriver',
545 545 default=None,
546 546 )
547 547 coreconfigitem('experimental', 'obsmarkers-exchange-debug',
548 548 default=False,
549 549 )
550 550 coreconfigitem('experimental', 'remotenames',
551 551 default=False,
552 552 )
553 553 coreconfigitem('experimental', 'revlogv2',
554 554 default=None,
555 555 )
556 556 coreconfigitem('experimental', 'single-head-per-branch',
557 557 default=False,
558 558 )
559 559 coreconfigitem('experimental', 'spacemovesdown',
560 560 default=False,
561 561 )
562 562 coreconfigitem('experimental', 'sparse-read',
563 563 default=False,
564 564 )
565 565 coreconfigitem('experimental', 'sparse-read.density-threshold',
566 566 default=0.25,
567 567 )
568 568 coreconfigitem('experimental', 'sparse-read.min-gap-size',
569 569 default='256K',
570 570 )
571 571 coreconfigitem('experimental', 'treemanifest',
572 572 default=False,
573 573 )
574 574 coreconfigitem('experimental', 'update.atomic-file',
575 575 default=False,
576 576 )
577 577 coreconfigitem('extensions', '.*',
578 578 default=None,
579 579 generic=True,
580 580 )
581 581 coreconfigitem('extdata', '.*',
582 582 default=None,
583 583 generic=True,
584 584 )
585 585 coreconfigitem('format', 'aggressivemergedeltas',
586 586 default=False,
587 587 )
588 588 coreconfigitem('format', 'chunkcachesize',
589 589 default=None,
590 590 )
591 591 coreconfigitem('format', 'dotencode',
592 592 default=True,
593 593 )
594 594 coreconfigitem('format', 'generaldelta',
595 595 default=False,
596 596 )
597 597 coreconfigitem('format', 'manifestcachesize',
598 598 default=None,
599 599 )
600 600 coreconfigitem('format', 'maxchainlen',
601 601 default=None,
602 602 )
603 603 coreconfigitem('format', 'obsstore-version',
604 604 default=None,
605 605 )
606 606 coreconfigitem('format', 'usefncache',
607 607 default=True,
608 608 )
609 609 coreconfigitem('format', 'usegeneraldelta',
610 610 default=True,
611 611 )
612 612 coreconfigitem('format', 'usestore',
613 613 default=True,
614 614 )
615 615 coreconfigitem('fsmonitor', 'warn_when_unused',
616 616 default=True,
617 617 )
618 618 coreconfigitem('fsmonitor', 'warn_update_file_count',
619 619 default=50000,
620 620 )
621 621 coreconfigitem('hooks', '.*',
622 622 default=dynamicdefault,
623 623 generic=True,
624 624 )
625 625 coreconfigitem('hgweb-paths', '.*',
626 626 default=list,
627 627 generic=True,
628 628 )
629 629 coreconfigitem('hostfingerprints', '.*',
630 630 default=list,
631 631 generic=True,
632 632 )
633 633 coreconfigitem('hostsecurity', 'ciphers',
634 634 default=None,
635 635 )
636 636 coreconfigitem('hostsecurity', 'disabletls10warning',
637 637 default=False,
638 638 )
639 639 coreconfigitem('hostsecurity', 'minimumprotocol',
640 640 default=dynamicdefault,
641 641 )
642 642 coreconfigitem('hostsecurity', '.*:minimumprotocol$',
643 643 default=dynamicdefault,
644 644 generic=True,
645 645 )
646 646 coreconfigitem('hostsecurity', '.*:ciphers$',
647 647 default=dynamicdefault,
648 648 generic=True,
649 649 )
650 650 coreconfigitem('hostsecurity', '.*:fingerprints$',
651 651 default=list,
652 652 generic=True,
653 653 )
654 654 coreconfigitem('hostsecurity', '.*:verifycertsfile$',
655 655 default=None,
656 656 generic=True,
657 657 )
658 658
659 659 coreconfigitem('http_proxy', 'always',
660 660 default=False,
661 661 )
662 662 coreconfigitem('http_proxy', 'host',
663 663 default=None,
664 664 )
665 665 coreconfigitem('http_proxy', 'no',
666 666 default=list,
667 667 )
668 668 coreconfigitem('http_proxy', 'passwd',
669 669 default=None,
670 670 )
671 671 coreconfigitem('http_proxy', 'user',
672 672 default=None,
673 673 )
674 674 coreconfigitem('logtoprocess', 'commandexception',
675 675 default=None,
676 676 )
677 677 coreconfigitem('logtoprocess', 'commandfinish',
678 678 default=None,
679 679 )
680 680 coreconfigitem('logtoprocess', 'command',
681 681 default=None,
682 682 )
683 683 coreconfigitem('logtoprocess', 'develwarn',
684 684 default=None,
685 685 )
686 686 coreconfigitem('logtoprocess', 'uiblocked',
687 687 default=None,
688 688 )
689 689 coreconfigitem('merge', 'checkunknown',
690 690 default='abort',
691 691 )
692 692 coreconfigitem('merge', 'checkignored',
693 693 default='abort',
694 694 )
695 695 coreconfigitem('experimental', 'merge.checkpathconflicts',
696 696 default=False,
697 697 )
698 698 coreconfigitem('merge', 'followcopies',
699 699 default=True,
700 700 )
701 701 coreconfigitem('merge', 'on-failure',
702 702 default='continue',
703 703 )
704 704 coreconfigitem('merge', 'preferancestor',
705 705 default=lambda: ['*'],
706 706 )
707 707 coreconfigitem('merge-tools', '.*',
708 708 default=None,
709 709 generic=True,
710 710 )
711 711 coreconfigitem('merge-tools', br'.*\.args$',
712 712 default="$local $base $other",
713 713 generic=True,
714 714 priority=-1,
715 715 )
716 716 coreconfigitem('merge-tools', br'.*\.binary$',
717 717 default=False,
718 718 generic=True,
719 719 priority=-1,
720 720 )
721 721 coreconfigitem('merge-tools', br'.*\.check$',
722 722 default=list,
723 723 generic=True,
724 724 priority=-1,
725 725 )
726 726 coreconfigitem('merge-tools', br'.*\.checkchanged$',
727 727 default=False,
728 728 generic=True,
729 729 priority=-1,
730 730 )
731 731 coreconfigitem('merge-tools', br'.*\.executable$',
732 732 default=dynamicdefault,
733 733 generic=True,
734 734 priority=-1,
735 735 )
736 736 coreconfigitem('merge-tools', br'.*\.fixeol$',
737 737 default=False,
738 738 generic=True,
739 739 priority=-1,
740 740 )
741 741 coreconfigitem('merge-tools', br'.*\.gui$',
742 742 default=False,
743 743 generic=True,
744 744 priority=-1,
745 745 )
746 746 coreconfigitem('merge-tools', br'.*\.priority$',
747 747 default=0,
748 748 generic=True,
749 749 priority=-1,
750 750 )
751 751 coreconfigitem('merge-tools', br'.*\.premerge$',
752 752 default=dynamicdefault,
753 753 generic=True,
754 754 priority=-1,
755 755 )
756 756 coreconfigitem('merge-tools', br'.*\.symlink$',
757 757 default=False,
758 758 generic=True,
759 759 priority=-1,
760 760 )
761 761 coreconfigitem('pager', 'attend-.*',
762 762 default=dynamicdefault,
763 763 generic=True,
764 764 )
765 765 coreconfigitem('pager', 'ignore',
766 766 default=list,
767 767 )
768 768 coreconfigitem('pager', 'pager',
769 769 default=dynamicdefault,
770 770 )
771 771 coreconfigitem('patch', 'eol',
772 772 default='strict',
773 773 )
774 774 coreconfigitem('patch', 'fuzz',
775 775 default=2,
776 776 )
777 777 coreconfigitem('paths', 'default',
778 778 default=None,
779 779 )
780 780 coreconfigitem('paths', 'default-push',
781 781 default=None,
782 782 )
783 783 coreconfigitem('paths', '.*',
784 784 default=None,
785 785 generic=True,
786 786 )
787 787 coreconfigitem('phases', 'checksubrepos',
788 788 default='follow',
789 789 )
790 790 coreconfigitem('phases', 'new-commit',
791 791 default='draft',
792 792 )
793 793 coreconfigitem('phases', 'publish',
794 794 default=True,
795 795 )
796 796 coreconfigitem('profiling', 'enabled',
797 797 default=False,
798 798 )
799 799 coreconfigitem('profiling', 'format',
800 800 default='text',
801 801 )
802 802 coreconfigitem('profiling', 'freq',
803 803 default=1000,
804 804 )
805 805 coreconfigitem('profiling', 'limit',
806 806 default=30,
807 807 )
808 808 coreconfigitem('profiling', 'nested',
809 809 default=0,
810 810 )
811 811 coreconfigitem('profiling', 'output',
812 812 default=None,
813 813 )
814 814 coreconfigitem('profiling', 'showmax',
815 815 default=0.999,
816 816 )
817 817 coreconfigitem('profiling', 'showmin',
818 818 default=dynamicdefault,
819 819 )
820 820 coreconfigitem('profiling', 'sort',
821 821 default='inlinetime',
822 822 )
823 823 coreconfigitem('profiling', 'statformat',
824 824 default='hotpath',
825 825 )
826 826 coreconfigitem('profiling', 'type',
827 827 default='stat',
828 828 )
829 829 coreconfigitem('progress', 'assume-tty',
830 830 default=False,
831 831 )
832 832 coreconfigitem('progress', 'changedelay',
833 833 default=1,
834 834 )
835 835 coreconfigitem('progress', 'clear-complete',
836 836 default=True,
837 837 )
838 838 coreconfigitem('progress', 'debug',
839 839 default=False,
840 840 )
841 841 coreconfigitem('progress', 'delay',
842 842 default=3,
843 843 )
844 844 coreconfigitem('progress', 'disable',
845 845 default=False,
846 846 )
847 847 coreconfigitem('progress', 'estimateinterval',
848 848 default=60.0,
849 849 )
850 850 coreconfigitem('progress', 'format',
851 851 default=lambda: ['topic', 'bar', 'number', 'estimate'],
852 852 )
853 853 coreconfigitem('progress', 'refresh',
854 854 default=0.1,
855 855 )
856 856 coreconfigitem('progress', 'width',
857 857 default=dynamicdefault,
858 858 )
859 859 coreconfigitem('push', 'pushvars.server',
860 860 default=False,
861 861 )
862 862 coreconfigitem('server', 'bookmarks-pushkey-compat',
863 863 default=True,
864 864 )
865 865 coreconfigitem('server', 'bundle1',
866 866 default=True,
867 867 )
868 868 coreconfigitem('server', 'bundle1gd',
869 869 default=None,
870 870 )
871 871 coreconfigitem('server', 'bundle1.pull',
872 872 default=None,
873 873 )
874 874 coreconfigitem('server', 'bundle1gd.pull',
875 875 default=None,
876 876 )
877 877 coreconfigitem('server', 'bundle1.push',
878 878 default=None,
879 879 )
880 880 coreconfigitem('server', 'bundle1gd.push',
881 881 default=None,
882 882 )
883 883 coreconfigitem('server', 'compressionengines',
884 884 default=list,
885 885 )
886 886 coreconfigitem('server', 'concurrent-push-mode',
887 887 default='strict',
888 888 )
889 889 coreconfigitem('server', 'disablefullbundle',
890 890 default=False,
891 891 )
892 892 coreconfigitem('server', 'maxhttpheaderlen',
893 893 default=1024,
894 894 )
895 895 coreconfigitem('server', 'preferuncompressed',
896 896 default=False,
897 897 )
898 898 coreconfigitem('server', 'uncompressed',
899 899 default=True,
900 900 )
901 901 coreconfigitem('server', 'uncompressedallowsecret',
902 902 default=False,
903 903 )
904 904 coreconfigitem('server', 'validate',
905 905 default=False,
906 906 )
907 907 coreconfigitem('server', 'zliblevel',
908 908 default=-1,
909 909 )
910 910 coreconfigitem('share', 'pool',
911 911 default=None,
912 912 )
913 913 coreconfigitem('share', 'poolnaming',
914 914 default='identity',
915 915 )
916 916 coreconfigitem('smtp', 'host',
917 917 default=None,
918 918 )
919 919 coreconfigitem('smtp', 'local_hostname',
920 920 default=None,
921 921 )
922 922 coreconfigitem('smtp', 'password',
923 923 default=None,
924 924 )
925 925 coreconfigitem('smtp', 'port',
926 926 default=dynamicdefault,
927 927 )
928 928 coreconfigitem('smtp', 'tls',
929 929 default='none',
930 930 )
931 931 coreconfigitem('smtp', 'username',
932 932 default=None,
933 933 )
934 934 coreconfigitem('sparse', 'missingwarning',
935 935 default=True,
936 936 )
937 937 coreconfigitem('subrepos', 'allowed',
938 938 default=dynamicdefault, # to make backporting simpler
939 939 )
940 940 coreconfigitem('subrepos', 'hg:allowed',
941 941 default=dynamicdefault,
942 942 )
943 943 coreconfigitem('subrepos', 'git:allowed',
944 944 default=dynamicdefault,
945 945 )
946 946 coreconfigitem('subrepos', 'svn:allowed',
947 947 default=dynamicdefault,
948 948 )
949 949 coreconfigitem('templates', '.*',
950 950 default=None,
951 951 generic=True,
952 952 )
953 953 coreconfigitem('trusted', 'groups',
954 954 default=list,
955 955 )
956 956 coreconfigitem('trusted', 'users',
957 957 default=list,
958 958 )
959 959 coreconfigitem('ui', '_usedassubrepo',
960 960 default=False,
961 961 )
962 962 coreconfigitem('ui', 'allowemptycommit',
963 963 default=False,
964 964 )
965 965 coreconfigitem('ui', 'archivemeta',
966 966 default=True,
967 967 )
968 968 coreconfigitem('ui', 'askusername',
969 969 default=False,
970 970 )
971 971 coreconfigitem('ui', 'clonebundlefallback',
972 972 default=False,
973 973 )
974 974 coreconfigitem('ui', 'clonebundleprefers',
975 975 default=list,
976 976 )
977 977 coreconfigitem('ui', 'clonebundles',
978 978 default=True,
979 979 )
980 980 coreconfigitem('ui', 'color',
981 981 default='auto',
982 982 )
983 983 coreconfigitem('ui', 'commitsubrepos',
984 984 default=False,
985 985 )
986 986 coreconfigitem('ui', 'debug',
987 987 default=False,
988 988 )
989 989 coreconfigitem('ui', 'debugger',
990 990 default=None,
991 991 )
992 992 coreconfigitem('ui', 'editor',
993 993 default=dynamicdefault,
994 994 )
995 995 coreconfigitem('ui', 'fallbackencoding',
996 996 default=None,
997 997 )
998 998 coreconfigitem('ui', 'forcecwd',
999 999 default=None,
1000 1000 )
1001 1001 coreconfigitem('ui', 'forcemerge',
1002 1002 default=None,
1003 1003 )
1004 1004 coreconfigitem('ui', 'formatdebug',
1005 1005 default=False,
1006 1006 )
1007 1007 coreconfigitem('ui', 'formatjson',
1008 1008 default=False,
1009 1009 )
1010 1010 coreconfigitem('ui', 'formatted',
1011 1011 default=None,
1012 1012 )
1013 1013 coreconfigitem('ui', 'graphnodetemplate',
1014 1014 default=None,
1015 1015 )
1016 1016 coreconfigitem('ui', 'http2debuglevel',
1017 1017 default=None,
1018 1018 )
1019 1019 coreconfigitem('ui', 'interactive',
1020 1020 default=None,
1021 1021 )
1022 1022 coreconfigitem('ui', 'interface',
1023 1023 default=None,
1024 1024 )
1025 1025 coreconfigitem('ui', 'interface.chunkselector',
1026 1026 default=None,
1027 1027 )
1028 1028 coreconfigitem('ui', 'logblockedtimes',
1029 1029 default=False,
1030 1030 )
1031 1031 coreconfigitem('ui', 'logtemplate',
1032 1032 default=None,
1033 1033 )
1034 1034 coreconfigitem('ui', 'merge',
1035 1035 default=None,
1036 1036 )
1037 1037 coreconfigitem('ui', 'mergemarkers',
1038 1038 default='basic',
1039 1039 )
1040 1040 coreconfigitem('ui', 'mergemarkertemplate',
1041 1041 default=('{node|short} '
1042 1042 '{ifeq(tags, "tip", "", '
1043 1043 'ifeq(tags, "", "", "{tags} "))}'
1044 1044 '{if(bookmarks, "{bookmarks} ")}'
1045 1045 '{ifeq(branch, "default", "", "{branch} ")}'
1046 1046 '- {author|user}: {desc|firstline}')
1047 1047 )
1048 1048 coreconfigitem('ui', 'nontty',
1049 1049 default=False,
1050 1050 )
1051 1051 coreconfigitem('ui', 'origbackuppath',
1052 1052 default=None,
1053 1053 )
1054 1054 coreconfigitem('ui', 'paginate',
1055 1055 default=True,
1056 1056 )
1057 1057 coreconfigitem('ui', 'patch',
1058 1058 default=None,
1059 1059 )
1060 1060 coreconfigitem('ui', 'portablefilenames',
1061 1061 default='warn',
1062 1062 )
1063 1063 coreconfigitem('ui', 'promptecho',
1064 1064 default=False,
1065 1065 )
1066 1066 coreconfigitem('ui', 'quiet',
1067 1067 default=False,
1068 1068 )
1069 1069 coreconfigitem('ui', 'quietbookmarkmove',
1070 1070 default=False,
1071 1071 )
1072 1072 coreconfigitem('ui', 'remotecmd',
1073 1073 default='hg',
1074 1074 )
1075 1075 coreconfigitem('ui', 'report_untrusted',
1076 1076 default=True,
1077 1077 )
1078 1078 coreconfigitem('ui', 'rollback',
1079 1079 default=True,
1080 1080 )
1081 1081 coreconfigitem('ui', 'slash',
1082 1082 default=False,
1083 1083 )
1084 1084 coreconfigitem('ui', 'ssh',
1085 1085 default='ssh',
1086 1086 )
1087 1087 coreconfigitem('ui', 'ssherrorhint',
1088 1088 default=None,
1089 1089 )
1090 1090 coreconfigitem('ui', 'statuscopies',
1091 1091 default=False,
1092 1092 )
1093 1093 coreconfigitem('ui', 'strict',
1094 1094 default=False,
1095 1095 )
1096 1096 coreconfigitem('ui', 'style',
1097 1097 default='',
1098 1098 )
1099 1099 coreconfigitem('ui', 'supportcontact',
1100 1100 default=None,
1101 1101 )
1102 1102 coreconfigitem('ui', 'textwidth',
1103 1103 default=78,
1104 1104 )
1105 1105 coreconfigitem('ui', 'timeout',
1106 1106 default='600',
1107 1107 )
1108 1108 coreconfigitem('ui', 'timeout.warn',
1109 1109 default=0,
1110 1110 )
1111 1111 coreconfigitem('ui', 'traceback',
1112 1112 default=False,
1113 1113 )
1114 1114 coreconfigitem('ui', 'tweakdefaults',
1115 1115 default=False,
1116 1116 )
1117 1117 coreconfigitem('ui', 'usehttp2',
1118 1118 default=False,
1119 1119 )
1120 1120 coreconfigitem('ui', 'username',
1121 1121 alias=[('ui', 'user')]
1122 1122 )
1123 1123 coreconfigitem('ui', 'verbose',
1124 1124 default=False,
1125 1125 )
1126 1126 coreconfigitem('verify', 'skipflags',
1127 1127 default=None,
1128 1128 )
1129 1129 coreconfigitem('web', 'allowbz2',
1130 1130 default=False,
1131 1131 )
1132 1132 coreconfigitem('web', 'allowgz',
1133 1133 default=False,
1134 1134 )
1135 1135 coreconfigitem('web', 'allow-pull',
1136 1136 alias=[('web', 'allowpull')],
1137 1137 default=True,
1138 1138 )
1139 1139 coreconfigitem('web', 'allow-push',
1140 1140 alias=[('web', 'allow_push')],
1141 1141 default=list,
1142 1142 )
1143 1143 coreconfigitem('web', 'allowzip',
1144 1144 default=False,
1145 1145 )
1146 1146 coreconfigitem('web', 'archivesubrepos',
1147 1147 default=False,
1148 1148 )
1149 1149 coreconfigitem('web', 'cache',
1150 1150 default=True,
1151 1151 )
1152 1152 coreconfigitem('web', 'contact',
1153 1153 default=None,
1154 1154 )
1155 1155 coreconfigitem('web', 'deny_push',
1156 1156 default=list,
1157 1157 )
1158 1158 coreconfigitem('web', 'guessmime',
1159 1159 default=False,
1160 1160 )
1161 1161 coreconfigitem('web', 'hidden',
1162 1162 default=False,
1163 1163 )
1164 1164 coreconfigitem('web', 'labels',
1165 1165 default=list,
1166 1166 )
1167 1167 coreconfigitem('web', 'logoimg',
1168 1168 default='hglogo.png',
1169 1169 )
1170 1170 coreconfigitem('web', 'logourl',
1171 1171 default='https://mercurial-scm.org/',
1172 1172 )
1173 1173 coreconfigitem('web', 'accesslog',
1174 1174 default='-',
1175 1175 )
1176 1176 coreconfigitem('web', 'address',
1177 1177 default='',
1178 1178 )
1179 1179 coreconfigitem('web', 'allow_archive',
1180 1180 default=list,
1181 1181 )
1182 1182 coreconfigitem('web', 'allow_read',
1183 1183 default=list,
1184 1184 )
1185 1185 coreconfigitem('web', 'baseurl',
1186 1186 default=None,
1187 1187 )
1188 1188 coreconfigitem('web', 'cacerts',
1189 1189 default=None,
1190 1190 )
1191 1191 coreconfigitem('web', 'certificate',
1192 1192 default=None,
1193 1193 )
1194 1194 coreconfigitem('web', 'collapse',
1195 1195 default=False,
1196 1196 )
1197 1197 coreconfigitem('web', 'csp',
1198 1198 default=None,
1199 1199 )
1200 1200 coreconfigitem('web', 'deny_read',
1201 1201 default=list,
1202 1202 )
1203 1203 coreconfigitem('web', 'descend',
1204 1204 default=True,
1205 1205 )
1206 1206 coreconfigitem('web', 'description',
1207 1207 default="",
1208 1208 )
1209 1209 coreconfigitem('web', 'encoding',
1210 1210 default=lambda: encoding.encoding,
1211 1211 )
1212 1212 coreconfigitem('web', 'errorlog',
1213 1213 default='-',
1214 1214 )
1215 1215 coreconfigitem('web', 'ipv6',
1216 1216 default=False,
1217 1217 )
1218 1218 coreconfigitem('web', 'maxchanges',
1219 1219 default=10,
1220 1220 )
1221 1221 coreconfigitem('web', 'maxfiles',
1222 1222 default=10,
1223 1223 )
1224 1224 coreconfigitem('web', 'maxshortchanges',
1225 1225 default=60,
1226 1226 )
1227 1227 coreconfigitem('web', 'motd',
1228 1228 default='',
1229 1229 )
1230 1230 coreconfigitem('web', 'name',
1231 1231 default=dynamicdefault,
1232 1232 )
1233 1233 coreconfigitem('web', 'port',
1234 1234 default=8000,
1235 1235 )
1236 1236 coreconfigitem('web', 'prefix',
1237 1237 default='',
1238 1238 )
1239 1239 coreconfigitem('web', 'push_ssl',
1240 1240 default=True,
1241 1241 )
1242 1242 coreconfigitem('web', 'refreshinterval',
1243 1243 default=20,
1244 1244 )
1245 1245 coreconfigitem('web', 'staticurl',
1246 1246 default=None,
1247 1247 )
1248 1248 coreconfigitem('web', 'stripes',
1249 1249 default=1,
1250 1250 )
1251 1251 coreconfigitem('web', 'style',
1252 1252 default='paper',
1253 1253 )
1254 1254 coreconfigitem('web', 'templates',
1255 1255 default=None,
1256 1256 )
1257 1257 coreconfigitem('web', 'view',
1258 1258 default='served',
1259 1259 )
1260 1260 coreconfigitem('worker', 'backgroundclose',
1261 1261 default=dynamicdefault,
1262 1262 )
1263 1263 # Windows defaults to a limit of 512 open files. A buffer of 128
1264 1264 # should give us enough headway.
1265 1265 coreconfigitem('worker', 'backgroundclosemaxqueue',
1266 1266 default=384,
1267 1267 )
1268 1268 coreconfigitem('worker', 'backgroundcloseminfilecount',
1269 1269 default=2048,
1270 1270 )
1271 1271 coreconfigitem('worker', 'backgroundclosethreadcount',
1272 1272 default=4,
1273 1273 )
1274 1274 coreconfigitem('worker', 'enabled',
1275 1275 default=True,
1276 1276 )
1277 1277 coreconfigitem('worker', 'numcpus',
1278 1278 default=None,
1279 1279 )
1280 1280
1281 1281 # Rebase related configuration moved to core because other extension are doing
1282 1282 # strange things. For example, shelve import the extensions to reuse some bit
1283 1283 # without formally loading it.
1284 1284 coreconfigitem('commands', 'rebase.requiredest',
1285 1285 default=False,
1286 1286 )
1287 1287 coreconfigitem('experimental', 'rebaseskipobsolete',
1288 1288 default=True,
1289 1289 )
1290 1290 coreconfigitem('rebase', 'singletransaction',
1291 1291 default=False,
1292 1292 )
1293 1293 coreconfigitem('rebase', 'experimental.inmemory',
1294 1294 default=False,
1295 1295 )
General Comments 0
You need to be logged in to leave comments. Login now