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