##// END OF EJS Templates
configitems: document the choice of using 'match' instead of 'search'
Boris Feld -
r34876:4f0d4bc6 default
parent child Browse files
Show More
@@ -1,1113 +1,1124 b''
1 # configitems.py - centralized declaration of configuration option
1 # configitems.py - centralized declaration of configuration option
2 #
2 #
3 # Copyright 2017 Pierre-Yves David <pierre-yves.david@octobus.net>
3 # Copyright 2017 Pierre-Yves David <pierre-yves.david@octobus.net>
4 #
4 #
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
7
8 from __future__ import absolute_import
8 from __future__ import absolute_import
9
9
10 import functools
10 import functools
11 import re
11 import re
12
12
13 from . import (
13 from . import (
14 encoding,
14 encoding,
15 error,
15 error,
16 )
16 )
17
17
18 def loadconfigtable(ui, extname, configtable):
18 def loadconfigtable(ui, extname, configtable):
19 """update config item known to the ui with the extension ones"""
19 """update config item known to the ui with the extension ones"""
20 for section, items in configtable.items():
20 for section, items in configtable.items():
21 knownitems = ui._knownconfig.setdefault(section, itemregister())
21 knownitems = ui._knownconfig.setdefault(section, itemregister())
22 knownkeys = set(knownitems)
22 knownkeys = set(knownitems)
23 newkeys = set(items)
23 newkeys = set(items)
24 for key in sorted(knownkeys & newkeys):
24 for key in sorted(knownkeys & newkeys):
25 msg = "extension '%s' overwrite config item '%s.%s'"
25 msg = "extension '%s' overwrite config item '%s.%s'"
26 msg %= (extname, section, key)
26 msg %= (extname, section, key)
27 ui.develwarn(msg, config='warn-config')
27 ui.develwarn(msg, config='warn-config')
28
28
29 knownitems.update(items)
29 knownitems.update(items)
30
30
31 class configitem(object):
31 class configitem(object):
32 """represent a known config item
32 """represent a known config item
33
33
34 :section: the official config section where to find this item,
34 :section: the official config section where to find this item,
35 :name: the official name within the section,
35 :name: the official name within the section,
36 :default: default value for this item,
36 :default: default value for this item,
37 :alias: optional list of tuples as alternatives,
37 :alias: optional list of tuples as alternatives,
38 :generic: this is a generic definition, match name using regular expression.
38 :generic: this is a generic definition, match name using regular expression.
39 """
39 """
40
40
41 def __init__(self, section, name, default=None, alias=(),
41 def __init__(self, section, name, default=None, alias=(),
42 generic=False, priority=0):
42 generic=False, priority=0):
43 self.section = section
43 self.section = section
44 self.name = name
44 self.name = name
45 self.default = default
45 self.default = default
46 self.alias = list(alias)
46 self.alias = list(alias)
47 self.generic = generic
47 self.generic = generic
48 self.priority = priority
48 self.priority = priority
49 self._re = None
49 self._re = None
50 if generic:
50 if generic:
51 self._re = re.compile(self.name)
51 self._re = re.compile(self.name)
52
52
53 class itemregister(dict):
53 class itemregister(dict):
54 """A specialized dictionary that can handle wild-card selection"""
54 """A specialized dictionary that can handle wild-card selection"""
55
55
56 def __init__(self):
56 def __init__(self):
57 super(itemregister, self).__init__()
57 super(itemregister, self).__init__()
58 self._generics = set()
58 self._generics = set()
59
59
60 def update(self, other):
60 def update(self, other):
61 super(itemregister, self).update(other)
61 super(itemregister, self).update(other)
62 self._generics.update(other._generics)
62 self._generics.update(other._generics)
63
63
64 def __setitem__(self, key, item):
64 def __setitem__(self, key, item):
65 super(itemregister, self).__setitem__(key, item)
65 super(itemregister, self).__setitem__(key, item)
66 if item.generic:
66 if item.generic:
67 self._generics.add(item)
67 self._generics.add(item)
68
68
69 def get(self, key):
69 def get(self, key):
70 baseitem = super(itemregister, self).get(key)
70 baseitem = super(itemregister, self).get(key)
71 if baseitem is not None and not baseitem.generic:
71 if baseitem is not None and not baseitem.generic:
72 return baseitem
72 return baseitem
73
73
74 # search for a matching generic item
74 # search for a matching generic item
75 generics = sorted(self._generics, key=(lambda x: (x.priority, x.name)))
75 generics = sorted(self._generics, key=(lambda x: (x.priority, x.name)))
76 for item in generics:
76 for item in generics:
77 # we use 'match' instead of 'search' to make the matching simpler
78 # for people unfamiliar with regular expression. Having the match
79 # rooted to the start of the string will produce less surprising
80 # result for user writing simple regex for sub-attribute.
81 #
82 # For example using "color\..*" match produces an unsurprising
83 # result, while using search could suddenly match apparently
84 # unrelated configuration that happens to contains "color."
85 # anywhere. This is a tradeoff where we favor requiring ".*" on
86 # some match to avoid the need to prefix most pattern with "^".
87 # The "^" seems more error prone.
77 if item._re.match(key):
88 if item._re.match(key):
78 return item
89 return item
79
90
80 return None
91 return None
81
92
82 coreitems = {}
93 coreitems = {}
83
94
84 def _register(configtable, *args, **kwargs):
95 def _register(configtable, *args, **kwargs):
85 item = configitem(*args, **kwargs)
96 item = configitem(*args, **kwargs)
86 section = configtable.setdefault(item.section, itemregister())
97 section = configtable.setdefault(item.section, itemregister())
87 if item.name in section:
98 if item.name in section:
88 msg = "duplicated config item registration for '%s.%s'"
99 msg = "duplicated config item registration for '%s.%s'"
89 raise error.ProgrammingError(msg % (item.section, item.name))
100 raise error.ProgrammingError(msg % (item.section, item.name))
90 section[item.name] = item
101 section[item.name] = item
91
102
92 # special value for case where the default is derived from other values
103 # special value for case where the default is derived from other values
93 dynamicdefault = object()
104 dynamicdefault = object()
94
105
95 # Registering actual config items
106 # Registering actual config items
96
107
97 def getitemregister(configtable):
108 def getitemregister(configtable):
98 return functools.partial(_register, configtable)
109 return functools.partial(_register, configtable)
99
110
100 coreconfigitem = getitemregister(coreitems)
111 coreconfigitem = getitemregister(coreitems)
101
112
102 coreconfigitem('alias', '.*',
113 coreconfigitem('alias', '.*',
103 default=None,
114 default=None,
104 generic=True,
115 generic=True,
105 )
116 )
106 coreconfigitem('annotate', 'nodates',
117 coreconfigitem('annotate', 'nodates',
107 default=False,
118 default=False,
108 )
119 )
109 coreconfigitem('annotate', 'showfunc',
120 coreconfigitem('annotate', 'showfunc',
110 default=False,
121 default=False,
111 )
122 )
112 coreconfigitem('annotate', 'unified',
123 coreconfigitem('annotate', 'unified',
113 default=None,
124 default=None,
114 )
125 )
115 coreconfigitem('annotate', 'git',
126 coreconfigitem('annotate', 'git',
116 default=False,
127 default=False,
117 )
128 )
118 coreconfigitem('annotate', 'ignorews',
129 coreconfigitem('annotate', 'ignorews',
119 default=False,
130 default=False,
120 )
131 )
121 coreconfigitem('annotate', 'ignorewsamount',
132 coreconfigitem('annotate', 'ignorewsamount',
122 default=False,
133 default=False,
123 )
134 )
124 coreconfigitem('annotate', 'ignoreblanklines',
135 coreconfigitem('annotate', 'ignoreblanklines',
125 default=False,
136 default=False,
126 )
137 )
127 coreconfigitem('annotate', 'ignorewseol',
138 coreconfigitem('annotate', 'ignorewseol',
128 default=False,
139 default=False,
129 )
140 )
130 coreconfigitem('annotate', 'nobinary',
141 coreconfigitem('annotate', 'nobinary',
131 default=False,
142 default=False,
132 )
143 )
133 coreconfigitem('annotate', 'noprefix',
144 coreconfigitem('annotate', 'noprefix',
134 default=False,
145 default=False,
135 )
146 )
136 coreconfigitem('auth', 'cookiefile',
147 coreconfigitem('auth', 'cookiefile',
137 default=None,
148 default=None,
138 )
149 )
139 # bookmarks.pushing: internal hack for discovery
150 # bookmarks.pushing: internal hack for discovery
140 coreconfigitem('bookmarks', 'pushing',
151 coreconfigitem('bookmarks', 'pushing',
141 default=list,
152 default=list,
142 )
153 )
143 # bundle.mainreporoot: internal hack for bundlerepo
154 # bundle.mainreporoot: internal hack for bundlerepo
144 coreconfigitem('bundle', 'mainreporoot',
155 coreconfigitem('bundle', 'mainreporoot',
145 default='',
156 default='',
146 )
157 )
147 # bundle.reorder: experimental config
158 # bundle.reorder: experimental config
148 coreconfigitem('bundle', 'reorder',
159 coreconfigitem('bundle', 'reorder',
149 default='auto',
160 default='auto',
150 )
161 )
151 coreconfigitem('censor', 'policy',
162 coreconfigitem('censor', 'policy',
152 default='abort',
163 default='abort',
153 )
164 )
154 coreconfigitem('chgserver', 'idletimeout',
165 coreconfigitem('chgserver', 'idletimeout',
155 default=3600,
166 default=3600,
156 )
167 )
157 coreconfigitem('chgserver', 'skiphash',
168 coreconfigitem('chgserver', 'skiphash',
158 default=False,
169 default=False,
159 )
170 )
160 coreconfigitem('cmdserver', 'log',
171 coreconfigitem('cmdserver', 'log',
161 default=None,
172 default=None,
162 )
173 )
163 coreconfigitem('color', '.*',
174 coreconfigitem('color', '.*',
164 default=None,
175 default=None,
165 generic=True,
176 generic=True,
166 )
177 )
167 coreconfigitem('color', 'mode',
178 coreconfigitem('color', 'mode',
168 default='auto',
179 default='auto',
169 )
180 )
170 coreconfigitem('color', 'pagermode',
181 coreconfigitem('color', 'pagermode',
171 default=dynamicdefault,
182 default=dynamicdefault,
172 )
183 )
173 coreconfigitem('commands', 'status.relative',
184 coreconfigitem('commands', 'status.relative',
174 default=False,
185 default=False,
175 )
186 )
176 coreconfigitem('commands', 'status.skipstates',
187 coreconfigitem('commands', 'status.skipstates',
177 default=[],
188 default=[],
178 )
189 )
179 coreconfigitem('commands', 'status.verbose',
190 coreconfigitem('commands', 'status.verbose',
180 default=False,
191 default=False,
181 )
192 )
182 coreconfigitem('commands', 'update.check',
193 coreconfigitem('commands', 'update.check',
183 default=None,
194 default=None,
184 # Deprecated, remove after 4.4 release
195 # Deprecated, remove after 4.4 release
185 alias=[('experimental', 'updatecheck')]
196 alias=[('experimental', 'updatecheck')]
186 )
197 )
187 coreconfigitem('commands', 'update.requiredest',
198 coreconfigitem('commands', 'update.requiredest',
188 default=False,
199 default=False,
189 )
200 )
190 coreconfigitem('committemplate', '.*',
201 coreconfigitem('committemplate', '.*',
191 default=None,
202 default=None,
192 generic=True,
203 generic=True,
193 )
204 )
194 coreconfigitem('debug', 'dirstate.delaywrite',
205 coreconfigitem('debug', 'dirstate.delaywrite',
195 default=0,
206 default=0,
196 )
207 )
197 coreconfigitem('defaults', '.*',
208 coreconfigitem('defaults', '.*',
198 default=None,
209 default=None,
199 generic=True,
210 generic=True,
200 )
211 )
201 coreconfigitem('devel', 'all-warnings',
212 coreconfigitem('devel', 'all-warnings',
202 default=False,
213 default=False,
203 )
214 )
204 coreconfigitem('devel', 'bundle2.debug',
215 coreconfigitem('devel', 'bundle2.debug',
205 default=False,
216 default=False,
206 )
217 )
207 coreconfigitem('devel', 'cache-vfs',
218 coreconfigitem('devel', 'cache-vfs',
208 default=None,
219 default=None,
209 )
220 )
210 coreconfigitem('devel', 'check-locks',
221 coreconfigitem('devel', 'check-locks',
211 default=False,
222 default=False,
212 )
223 )
213 coreconfigitem('devel', 'check-relroot',
224 coreconfigitem('devel', 'check-relroot',
214 default=False,
225 default=False,
215 )
226 )
216 coreconfigitem('devel', 'default-date',
227 coreconfigitem('devel', 'default-date',
217 default=None,
228 default=None,
218 )
229 )
219 coreconfigitem('devel', 'deprec-warn',
230 coreconfigitem('devel', 'deprec-warn',
220 default=False,
231 default=False,
221 )
232 )
222 coreconfigitem('devel', 'disableloaddefaultcerts',
233 coreconfigitem('devel', 'disableloaddefaultcerts',
223 default=False,
234 default=False,
224 )
235 )
225 coreconfigitem('devel', 'warn-empty-changegroup',
236 coreconfigitem('devel', 'warn-empty-changegroup',
226 default=False,
237 default=False,
227 )
238 )
228 coreconfigitem('devel', 'legacy.exchange',
239 coreconfigitem('devel', 'legacy.exchange',
229 default=list,
240 default=list,
230 )
241 )
231 coreconfigitem('devel', 'servercafile',
242 coreconfigitem('devel', 'servercafile',
232 default='',
243 default='',
233 )
244 )
234 coreconfigitem('devel', 'serverexactprotocol',
245 coreconfigitem('devel', 'serverexactprotocol',
235 default='',
246 default='',
236 )
247 )
237 coreconfigitem('devel', 'serverrequirecert',
248 coreconfigitem('devel', 'serverrequirecert',
238 default=False,
249 default=False,
239 )
250 )
240 coreconfigitem('devel', 'strip-obsmarkers',
251 coreconfigitem('devel', 'strip-obsmarkers',
241 default=True,
252 default=True,
242 )
253 )
243 coreconfigitem('devel', 'warn-config',
254 coreconfigitem('devel', 'warn-config',
244 default=None,
255 default=None,
245 )
256 )
246 coreconfigitem('devel', 'warn-config-default',
257 coreconfigitem('devel', 'warn-config-default',
247 default=None,
258 default=None,
248 )
259 )
249 coreconfigitem('devel', 'user.obsmarker',
260 coreconfigitem('devel', 'user.obsmarker',
250 default=None,
261 default=None,
251 )
262 )
252 coreconfigitem('devel', 'warn-config-unknown',
263 coreconfigitem('devel', 'warn-config-unknown',
253 default=None,
264 default=None,
254 )
265 )
255 coreconfigitem('diff', 'nodates',
266 coreconfigitem('diff', 'nodates',
256 default=False,
267 default=False,
257 )
268 )
258 coreconfigitem('diff', 'showfunc',
269 coreconfigitem('diff', 'showfunc',
259 default=False,
270 default=False,
260 )
271 )
261 coreconfigitem('diff', 'unified',
272 coreconfigitem('diff', 'unified',
262 default=None,
273 default=None,
263 )
274 )
264 coreconfigitem('diff', 'git',
275 coreconfigitem('diff', 'git',
265 default=False,
276 default=False,
266 )
277 )
267 coreconfigitem('diff', 'ignorews',
278 coreconfigitem('diff', 'ignorews',
268 default=False,
279 default=False,
269 )
280 )
270 coreconfigitem('diff', 'ignorewsamount',
281 coreconfigitem('diff', 'ignorewsamount',
271 default=False,
282 default=False,
272 )
283 )
273 coreconfigitem('diff', 'ignoreblanklines',
284 coreconfigitem('diff', 'ignoreblanklines',
274 default=False,
285 default=False,
275 )
286 )
276 coreconfigitem('diff', 'ignorewseol',
287 coreconfigitem('diff', 'ignorewseol',
277 default=False,
288 default=False,
278 )
289 )
279 coreconfigitem('diff', 'nobinary',
290 coreconfigitem('diff', 'nobinary',
280 default=False,
291 default=False,
281 )
292 )
282 coreconfigitem('diff', 'noprefix',
293 coreconfigitem('diff', 'noprefix',
283 default=False,
294 default=False,
284 )
295 )
285 coreconfigitem('email', 'bcc',
296 coreconfigitem('email', 'bcc',
286 default=None,
297 default=None,
287 )
298 )
288 coreconfigitem('email', 'cc',
299 coreconfigitem('email', 'cc',
289 default=None,
300 default=None,
290 )
301 )
291 coreconfigitem('email', 'charsets',
302 coreconfigitem('email', 'charsets',
292 default=list,
303 default=list,
293 )
304 )
294 coreconfigitem('email', 'from',
305 coreconfigitem('email', 'from',
295 default=None,
306 default=None,
296 )
307 )
297 coreconfigitem('email', 'method',
308 coreconfigitem('email', 'method',
298 default='smtp',
309 default='smtp',
299 )
310 )
300 coreconfigitem('email', 'reply-to',
311 coreconfigitem('email', 'reply-to',
301 default=None,
312 default=None,
302 )
313 )
303 coreconfigitem('experimental', 'archivemetatemplate',
314 coreconfigitem('experimental', 'archivemetatemplate',
304 default=dynamicdefault,
315 default=dynamicdefault,
305 )
316 )
306 coreconfigitem('experimental', 'bundle-phases',
317 coreconfigitem('experimental', 'bundle-phases',
307 default=False,
318 default=False,
308 )
319 )
309 coreconfigitem('experimental', 'bundle2-advertise',
320 coreconfigitem('experimental', 'bundle2-advertise',
310 default=True,
321 default=True,
311 )
322 )
312 coreconfigitem('experimental', 'bundle2-output-capture',
323 coreconfigitem('experimental', 'bundle2-output-capture',
313 default=False,
324 default=False,
314 )
325 )
315 coreconfigitem('experimental', 'bundle2.pushback',
326 coreconfigitem('experimental', 'bundle2.pushback',
316 default=False,
327 default=False,
317 )
328 )
318 coreconfigitem('experimental', 'bundle2lazylocking',
329 coreconfigitem('experimental', 'bundle2lazylocking',
319 default=False,
330 default=False,
320 )
331 )
321 coreconfigitem('experimental', 'bundlecomplevel',
332 coreconfigitem('experimental', 'bundlecomplevel',
322 default=None,
333 default=None,
323 )
334 )
324 coreconfigitem('experimental', 'changegroup3',
335 coreconfigitem('experimental', 'changegroup3',
325 default=False,
336 default=False,
326 )
337 )
327 coreconfigitem('experimental', 'clientcompressionengines',
338 coreconfigitem('experimental', 'clientcompressionengines',
328 default=list,
339 default=list,
329 )
340 )
330 coreconfigitem('experimental', 'copytrace',
341 coreconfigitem('experimental', 'copytrace',
331 default='on',
342 default='on',
332 )
343 )
333 coreconfigitem('experimental', 'copytrace.movecandidateslimit',
344 coreconfigitem('experimental', 'copytrace.movecandidateslimit',
334 default=100,
345 default=100,
335 )
346 )
336 coreconfigitem('experimental', 'copytrace.sourcecommitlimit',
347 coreconfigitem('experimental', 'copytrace.sourcecommitlimit',
337 default=100,
348 default=100,
338 )
349 )
339 coreconfigitem('experimental', 'crecordtest',
350 coreconfigitem('experimental', 'crecordtest',
340 default=None,
351 default=None,
341 )
352 )
342 coreconfigitem('experimental', 'editortmpinhg',
353 coreconfigitem('experimental', 'editortmpinhg',
343 default=False,
354 default=False,
344 )
355 )
345 coreconfigitem('experimental', 'evolution',
356 coreconfigitem('experimental', 'evolution',
346 default=list,
357 default=list,
347 )
358 )
348 coreconfigitem('experimental', 'evolution.allowdivergence',
359 coreconfigitem('experimental', 'evolution.allowdivergence',
349 default=False,
360 default=False,
350 alias=[('experimental', 'allowdivergence')]
361 alias=[('experimental', 'allowdivergence')]
351 )
362 )
352 coreconfigitem('experimental', 'evolution.allowunstable',
363 coreconfigitem('experimental', 'evolution.allowunstable',
353 default=None,
364 default=None,
354 )
365 )
355 coreconfigitem('experimental', 'evolution.createmarkers',
366 coreconfigitem('experimental', 'evolution.createmarkers',
356 default=None,
367 default=None,
357 )
368 )
358 coreconfigitem('experimental', 'evolution.exchange',
369 coreconfigitem('experimental', 'evolution.exchange',
359 default=None,
370 default=None,
360 )
371 )
361 coreconfigitem('experimental', 'evolution.bundle-obsmarker',
372 coreconfigitem('experimental', 'evolution.bundle-obsmarker',
362 default=False,
373 default=False,
363 )
374 )
364 coreconfigitem('experimental', 'evolution.track-operation',
375 coreconfigitem('experimental', 'evolution.track-operation',
365 default=True,
376 default=True,
366 )
377 )
367 coreconfigitem('experimental', 'maxdeltachainspan',
378 coreconfigitem('experimental', 'maxdeltachainspan',
368 default=-1,
379 default=-1,
369 )
380 )
370 coreconfigitem('experimental', 'mmapindexthreshold',
381 coreconfigitem('experimental', 'mmapindexthreshold',
371 default=None,
382 default=None,
372 )
383 )
373 coreconfigitem('experimental', 'nonnormalparanoidcheck',
384 coreconfigitem('experimental', 'nonnormalparanoidcheck',
374 default=False,
385 default=False,
375 )
386 )
376 coreconfigitem('experimental', 'effect-flags',
387 coreconfigitem('experimental', 'effect-flags',
377 default=False,
388 default=False,
378 )
389 )
379 coreconfigitem('experimental', 'exportableenviron',
390 coreconfigitem('experimental', 'exportableenviron',
380 default=list,
391 default=list,
381 )
392 )
382 coreconfigitem('experimental', 'extendedheader.index',
393 coreconfigitem('experimental', 'extendedheader.index',
383 default=None,
394 default=None,
384 )
395 )
385 coreconfigitem('experimental', 'extendedheader.similarity',
396 coreconfigitem('experimental', 'extendedheader.similarity',
386 default=False,
397 default=False,
387 )
398 )
388 coreconfigitem('experimental', 'format.compression',
399 coreconfigitem('experimental', 'format.compression',
389 default='zlib',
400 default='zlib',
390 )
401 )
391 coreconfigitem('experimental', 'graphshorten',
402 coreconfigitem('experimental', 'graphshorten',
392 default=False,
403 default=False,
393 )
404 )
394 coreconfigitem('experimental', 'graphstyle.parent',
405 coreconfigitem('experimental', 'graphstyle.parent',
395 default=dynamicdefault,
406 default=dynamicdefault,
396 )
407 )
397 coreconfigitem('experimental', 'graphstyle.missing',
408 coreconfigitem('experimental', 'graphstyle.missing',
398 default=dynamicdefault,
409 default=dynamicdefault,
399 )
410 )
400 coreconfigitem('experimental', 'graphstyle.grandparent',
411 coreconfigitem('experimental', 'graphstyle.grandparent',
401 default=dynamicdefault,
412 default=dynamicdefault,
402 )
413 )
403 coreconfigitem('experimental', 'hook-track-tags',
414 coreconfigitem('experimental', 'hook-track-tags',
404 default=False,
415 default=False,
405 )
416 )
406 coreconfigitem('experimental', 'httppostargs',
417 coreconfigitem('experimental', 'httppostargs',
407 default=False,
418 default=False,
408 )
419 )
409 coreconfigitem('experimental', 'manifestv2',
420 coreconfigitem('experimental', 'manifestv2',
410 default=False,
421 default=False,
411 )
422 )
412 coreconfigitem('experimental', 'mergedriver',
423 coreconfigitem('experimental', 'mergedriver',
413 default=None,
424 default=None,
414 )
425 )
415 coreconfigitem('experimental', 'obsmarkers-exchange-debug',
426 coreconfigitem('experimental', 'obsmarkers-exchange-debug',
416 default=False,
427 default=False,
417 )
428 )
418 coreconfigitem('experimental', 'rebase.multidest',
429 coreconfigitem('experimental', 'rebase.multidest',
419 default=False,
430 default=False,
420 )
431 )
421 coreconfigitem('experimental', 'revertalternateinteractivemode',
432 coreconfigitem('experimental', 'revertalternateinteractivemode',
422 default=True,
433 default=True,
423 )
434 )
424 coreconfigitem('experimental', 'revlogv2',
435 coreconfigitem('experimental', 'revlogv2',
425 default=None,
436 default=None,
426 )
437 )
427 coreconfigitem('experimental', 'spacemovesdown',
438 coreconfigitem('experimental', 'spacemovesdown',
428 default=False,
439 default=False,
429 )
440 )
430 coreconfigitem('experimental', 'sparse-read',
441 coreconfigitem('experimental', 'sparse-read',
431 default=False,
442 default=False,
432 )
443 )
433 coreconfigitem('experimental', 'sparse-read.density-threshold',
444 coreconfigitem('experimental', 'sparse-read.density-threshold',
434 default=0.25,
445 default=0.25,
435 )
446 )
436 coreconfigitem('experimental', 'sparse-read.min-block-size',
447 coreconfigitem('experimental', 'sparse-read.min-block-size',
437 default='256K',
448 default='256K',
438 )
449 )
439 coreconfigitem('experimental', 'treemanifest',
450 coreconfigitem('experimental', 'treemanifest',
440 default=False,
451 default=False,
441 )
452 )
442 coreconfigitem('extensions', '.*',
453 coreconfigitem('extensions', '.*',
443 default=None,
454 default=None,
444 generic=True,
455 generic=True,
445 )
456 )
446 coreconfigitem('extdata', '.*',
457 coreconfigitem('extdata', '.*',
447 default=None,
458 default=None,
448 generic=True,
459 generic=True,
449 )
460 )
450 coreconfigitem('format', 'aggressivemergedeltas',
461 coreconfigitem('format', 'aggressivemergedeltas',
451 default=False,
462 default=False,
452 )
463 )
453 coreconfigitem('format', 'chunkcachesize',
464 coreconfigitem('format', 'chunkcachesize',
454 default=None,
465 default=None,
455 )
466 )
456 coreconfigitem('format', 'dotencode',
467 coreconfigitem('format', 'dotencode',
457 default=True,
468 default=True,
458 )
469 )
459 coreconfigitem('format', 'generaldelta',
470 coreconfigitem('format', 'generaldelta',
460 default=False,
471 default=False,
461 )
472 )
462 coreconfigitem('format', 'manifestcachesize',
473 coreconfigitem('format', 'manifestcachesize',
463 default=None,
474 default=None,
464 )
475 )
465 coreconfigitem('format', 'maxchainlen',
476 coreconfigitem('format', 'maxchainlen',
466 default=None,
477 default=None,
467 )
478 )
468 coreconfigitem('format', 'obsstore-version',
479 coreconfigitem('format', 'obsstore-version',
469 default=None,
480 default=None,
470 )
481 )
471 coreconfigitem('format', 'usefncache',
482 coreconfigitem('format', 'usefncache',
472 default=True,
483 default=True,
473 )
484 )
474 coreconfigitem('format', 'usegeneraldelta',
485 coreconfigitem('format', 'usegeneraldelta',
475 default=True,
486 default=True,
476 )
487 )
477 coreconfigitem('format', 'usestore',
488 coreconfigitem('format', 'usestore',
478 default=True,
489 default=True,
479 )
490 )
480 coreconfigitem('hooks', '.*',
491 coreconfigitem('hooks', '.*',
481 default=dynamicdefault,
492 default=dynamicdefault,
482 generic=True,
493 generic=True,
483 )
494 )
484 coreconfigitem('hgweb-paths', '.*',
495 coreconfigitem('hgweb-paths', '.*',
485 default=list,
496 default=list,
486 generic=True,
497 generic=True,
487 )
498 )
488 coreconfigitem('hostfingerprints', '.*',
499 coreconfigitem('hostfingerprints', '.*',
489 default=list,
500 default=list,
490 generic=True,
501 generic=True,
491 )
502 )
492 coreconfigitem('hostsecurity', 'ciphers',
503 coreconfigitem('hostsecurity', 'ciphers',
493 default=None,
504 default=None,
494 )
505 )
495 coreconfigitem('hostsecurity', 'disabletls10warning',
506 coreconfigitem('hostsecurity', 'disabletls10warning',
496 default=False,
507 default=False,
497 )
508 )
498 coreconfigitem('hostsecurity', 'minimumprotocol',
509 coreconfigitem('hostsecurity', 'minimumprotocol',
499 default=dynamicdefault,
510 default=dynamicdefault,
500 )
511 )
501 coreconfigitem('hostsecurity', '.*:minimumprotocol$',
512 coreconfigitem('hostsecurity', '.*:minimumprotocol$',
502 default=dynamicdefault,
513 default=dynamicdefault,
503 generic=True,
514 generic=True,
504 )
515 )
505 coreconfigitem('hostsecurity', '.*:ciphers$',
516 coreconfigitem('hostsecurity', '.*:ciphers$',
506 default=dynamicdefault,
517 default=dynamicdefault,
507 generic=True,
518 generic=True,
508 )
519 )
509 coreconfigitem('hostsecurity', '.*:fingerprints$',
520 coreconfigitem('hostsecurity', '.*:fingerprints$',
510 default=list,
521 default=list,
511 generic=True,
522 generic=True,
512 )
523 )
513 coreconfigitem('hostsecurity', '.*:verifycertsfile$',
524 coreconfigitem('hostsecurity', '.*:verifycertsfile$',
514 default=None,
525 default=None,
515 generic=True,
526 generic=True,
516 )
527 )
517
528
518 coreconfigitem('http_proxy', 'always',
529 coreconfigitem('http_proxy', 'always',
519 default=False,
530 default=False,
520 )
531 )
521 coreconfigitem('http_proxy', 'host',
532 coreconfigitem('http_proxy', 'host',
522 default=None,
533 default=None,
523 )
534 )
524 coreconfigitem('http_proxy', 'no',
535 coreconfigitem('http_proxy', 'no',
525 default=list,
536 default=list,
526 )
537 )
527 coreconfigitem('http_proxy', 'passwd',
538 coreconfigitem('http_proxy', 'passwd',
528 default=None,
539 default=None,
529 )
540 )
530 coreconfigitem('http_proxy', 'user',
541 coreconfigitem('http_proxy', 'user',
531 default=None,
542 default=None,
532 )
543 )
533 coreconfigitem('logtoprocess', 'commandexception',
544 coreconfigitem('logtoprocess', 'commandexception',
534 default=None,
545 default=None,
535 )
546 )
536 coreconfigitem('logtoprocess', 'commandfinish',
547 coreconfigitem('logtoprocess', 'commandfinish',
537 default=None,
548 default=None,
538 )
549 )
539 coreconfigitem('logtoprocess', 'command',
550 coreconfigitem('logtoprocess', 'command',
540 default=None,
551 default=None,
541 )
552 )
542 coreconfigitem('logtoprocess', 'develwarn',
553 coreconfigitem('logtoprocess', 'develwarn',
543 default=None,
554 default=None,
544 )
555 )
545 coreconfigitem('logtoprocess', 'uiblocked',
556 coreconfigitem('logtoprocess', 'uiblocked',
546 default=None,
557 default=None,
547 )
558 )
548 coreconfigitem('merge', 'checkunknown',
559 coreconfigitem('merge', 'checkunknown',
549 default='abort',
560 default='abort',
550 )
561 )
551 coreconfigitem('merge', 'checkignored',
562 coreconfigitem('merge', 'checkignored',
552 default='abort',
563 default='abort',
553 )
564 )
554 coreconfigitem('merge', 'followcopies',
565 coreconfigitem('merge', 'followcopies',
555 default=True,
566 default=True,
556 )
567 )
557 coreconfigitem('merge', 'on-failure',
568 coreconfigitem('merge', 'on-failure',
558 default='continue',
569 default='continue',
559 )
570 )
560 coreconfigitem('merge', 'preferancestor',
571 coreconfigitem('merge', 'preferancestor',
561 default=lambda: ['*'],
572 default=lambda: ['*'],
562 )
573 )
563 coreconfigitem('merge-tools', '.*',
574 coreconfigitem('merge-tools', '.*',
564 default=None,
575 default=None,
565 generic=True,
576 generic=True,
566 )
577 )
567 coreconfigitem('merge-tools', r'.*\.args$',
578 coreconfigitem('merge-tools', r'.*\.args$',
568 default="$local $base $other",
579 default="$local $base $other",
569 generic=True,
580 generic=True,
570 priority=-1,
581 priority=-1,
571 )
582 )
572 coreconfigitem('merge-tools', r'.*\.binary$',
583 coreconfigitem('merge-tools', r'.*\.binary$',
573 default=False,
584 default=False,
574 generic=True,
585 generic=True,
575 priority=-1,
586 priority=-1,
576 )
587 )
577 coreconfigitem('merge-tools', r'.*\.check$',
588 coreconfigitem('merge-tools', r'.*\.check$',
578 default=list,
589 default=list,
579 generic=True,
590 generic=True,
580 priority=-1,
591 priority=-1,
581 )
592 )
582 coreconfigitem('merge-tools', r'.*\.checkchanged$',
593 coreconfigitem('merge-tools', r'.*\.checkchanged$',
583 default=False,
594 default=False,
584 generic=True,
595 generic=True,
585 priority=-1,
596 priority=-1,
586 )
597 )
587 coreconfigitem('merge-tools', r'.*\.executable$',
598 coreconfigitem('merge-tools', r'.*\.executable$',
588 default=dynamicdefault,
599 default=dynamicdefault,
589 generic=True,
600 generic=True,
590 priority=-1,
601 priority=-1,
591 )
602 )
592 coreconfigitem('merge-tools', r'.*\.fixeol$',
603 coreconfigitem('merge-tools', r'.*\.fixeol$',
593 default=False,
604 default=False,
594 generic=True,
605 generic=True,
595 priority=-1,
606 priority=-1,
596 )
607 )
597 coreconfigitem('merge-tools', r'.*\.gui$',
608 coreconfigitem('merge-tools', r'.*\.gui$',
598 default=False,
609 default=False,
599 generic=True,
610 generic=True,
600 priority=-1,
611 priority=-1,
601 )
612 )
602 coreconfigitem('merge-tools', r'.*\.priority$',
613 coreconfigitem('merge-tools', r'.*\.priority$',
603 default=0,
614 default=0,
604 generic=True,
615 generic=True,
605 priority=-1,
616 priority=-1,
606 )
617 )
607 coreconfigitem('merge-tools', r'.*\.premerge$',
618 coreconfigitem('merge-tools', r'.*\.premerge$',
608 default=dynamicdefault,
619 default=dynamicdefault,
609 generic=True,
620 generic=True,
610 priority=-1,
621 priority=-1,
611 )
622 )
612 coreconfigitem('merge-tools', r'.*\.symlink$',
623 coreconfigitem('merge-tools', r'.*\.symlink$',
613 default=False,
624 default=False,
614 generic=True,
625 generic=True,
615 priority=-1,
626 priority=-1,
616 )
627 )
617 coreconfigitem('pager', 'attend-.*',
628 coreconfigitem('pager', 'attend-.*',
618 default=dynamicdefault,
629 default=dynamicdefault,
619 generic=True,
630 generic=True,
620 )
631 )
621 coreconfigitem('pager', 'ignore',
632 coreconfigitem('pager', 'ignore',
622 default=list,
633 default=list,
623 )
634 )
624 coreconfigitem('pager', 'pager',
635 coreconfigitem('pager', 'pager',
625 default=dynamicdefault,
636 default=dynamicdefault,
626 )
637 )
627 coreconfigitem('patch', 'eol',
638 coreconfigitem('patch', 'eol',
628 default='strict',
639 default='strict',
629 )
640 )
630 coreconfigitem('patch', 'fuzz',
641 coreconfigitem('patch', 'fuzz',
631 default=2,
642 default=2,
632 )
643 )
633 coreconfigitem('paths', 'default',
644 coreconfigitem('paths', 'default',
634 default=None,
645 default=None,
635 )
646 )
636 coreconfigitem('paths', 'default-push',
647 coreconfigitem('paths', 'default-push',
637 default=None,
648 default=None,
638 )
649 )
639 coreconfigitem('paths', '.*',
650 coreconfigitem('paths', '.*',
640 default=None,
651 default=None,
641 generic=True,
652 generic=True,
642 )
653 )
643 coreconfigitem('phases', 'checksubrepos',
654 coreconfigitem('phases', 'checksubrepos',
644 default='follow',
655 default='follow',
645 )
656 )
646 coreconfigitem('phases', 'new-commit',
657 coreconfigitem('phases', 'new-commit',
647 default='draft',
658 default='draft',
648 )
659 )
649 coreconfigitem('phases', 'publish',
660 coreconfigitem('phases', 'publish',
650 default=True,
661 default=True,
651 )
662 )
652 coreconfigitem('profiling', 'enabled',
663 coreconfigitem('profiling', 'enabled',
653 default=False,
664 default=False,
654 )
665 )
655 coreconfigitem('profiling', 'format',
666 coreconfigitem('profiling', 'format',
656 default='text',
667 default='text',
657 )
668 )
658 coreconfigitem('profiling', 'freq',
669 coreconfigitem('profiling', 'freq',
659 default=1000,
670 default=1000,
660 )
671 )
661 coreconfigitem('profiling', 'limit',
672 coreconfigitem('profiling', 'limit',
662 default=30,
673 default=30,
663 )
674 )
664 coreconfigitem('profiling', 'nested',
675 coreconfigitem('profiling', 'nested',
665 default=0,
676 default=0,
666 )
677 )
667 coreconfigitem('profiling', 'output',
678 coreconfigitem('profiling', 'output',
668 default=None,
679 default=None,
669 )
680 )
670 coreconfigitem('profiling', 'showmax',
681 coreconfigitem('profiling', 'showmax',
671 default=0.999,
682 default=0.999,
672 )
683 )
673 coreconfigitem('profiling', 'showmin',
684 coreconfigitem('profiling', 'showmin',
674 default=dynamicdefault,
685 default=dynamicdefault,
675 )
686 )
676 coreconfigitem('profiling', 'sort',
687 coreconfigitem('profiling', 'sort',
677 default='inlinetime',
688 default='inlinetime',
678 )
689 )
679 coreconfigitem('profiling', 'statformat',
690 coreconfigitem('profiling', 'statformat',
680 default='hotpath',
691 default='hotpath',
681 )
692 )
682 coreconfigitem('profiling', 'type',
693 coreconfigitem('profiling', 'type',
683 default='stat',
694 default='stat',
684 )
695 )
685 coreconfigitem('progress', 'assume-tty',
696 coreconfigitem('progress', 'assume-tty',
686 default=False,
697 default=False,
687 )
698 )
688 coreconfigitem('progress', 'changedelay',
699 coreconfigitem('progress', 'changedelay',
689 default=1,
700 default=1,
690 )
701 )
691 coreconfigitem('progress', 'clear-complete',
702 coreconfigitem('progress', 'clear-complete',
692 default=True,
703 default=True,
693 )
704 )
694 coreconfigitem('progress', 'debug',
705 coreconfigitem('progress', 'debug',
695 default=False,
706 default=False,
696 )
707 )
697 coreconfigitem('progress', 'delay',
708 coreconfigitem('progress', 'delay',
698 default=3,
709 default=3,
699 )
710 )
700 coreconfigitem('progress', 'disable',
711 coreconfigitem('progress', 'disable',
701 default=False,
712 default=False,
702 )
713 )
703 coreconfigitem('progress', 'estimateinterval',
714 coreconfigitem('progress', 'estimateinterval',
704 default=60.0,
715 default=60.0,
705 )
716 )
706 coreconfigitem('progress', 'format',
717 coreconfigitem('progress', 'format',
707 default=lambda: ['topic', 'bar', 'number', 'estimate'],
718 default=lambda: ['topic', 'bar', 'number', 'estimate'],
708 )
719 )
709 coreconfigitem('progress', 'refresh',
720 coreconfigitem('progress', 'refresh',
710 default=0.1,
721 default=0.1,
711 )
722 )
712 coreconfigitem('progress', 'width',
723 coreconfigitem('progress', 'width',
713 default=dynamicdefault,
724 default=dynamicdefault,
714 )
725 )
715 coreconfigitem('push', 'pushvars.server',
726 coreconfigitem('push', 'pushvars.server',
716 default=False,
727 default=False,
717 )
728 )
718 coreconfigitem('server', 'bundle1',
729 coreconfigitem('server', 'bundle1',
719 default=True,
730 default=True,
720 )
731 )
721 coreconfigitem('server', 'bundle1gd',
732 coreconfigitem('server', 'bundle1gd',
722 default=None,
733 default=None,
723 )
734 )
724 coreconfigitem('server', 'bundle1.pull',
735 coreconfigitem('server', 'bundle1.pull',
725 default=None,
736 default=None,
726 )
737 )
727 coreconfigitem('server', 'bundle1gd.pull',
738 coreconfigitem('server', 'bundle1gd.pull',
728 default=None,
739 default=None,
729 )
740 )
730 coreconfigitem('server', 'bundle1.push',
741 coreconfigitem('server', 'bundle1.push',
731 default=None,
742 default=None,
732 )
743 )
733 coreconfigitem('server', 'bundle1gd.push',
744 coreconfigitem('server', 'bundle1gd.push',
734 default=None,
745 default=None,
735 )
746 )
736 coreconfigitem('server', 'compressionengines',
747 coreconfigitem('server', 'compressionengines',
737 default=list,
748 default=list,
738 )
749 )
739 coreconfigitem('server', 'concurrent-push-mode',
750 coreconfigitem('server', 'concurrent-push-mode',
740 default='strict',
751 default='strict',
741 )
752 )
742 coreconfigitem('server', 'disablefullbundle',
753 coreconfigitem('server', 'disablefullbundle',
743 default=False,
754 default=False,
744 )
755 )
745 coreconfigitem('server', 'maxhttpheaderlen',
756 coreconfigitem('server', 'maxhttpheaderlen',
746 default=1024,
757 default=1024,
747 )
758 )
748 coreconfigitem('server', 'preferuncompressed',
759 coreconfigitem('server', 'preferuncompressed',
749 default=False,
760 default=False,
750 )
761 )
751 coreconfigitem('server', 'uncompressed',
762 coreconfigitem('server', 'uncompressed',
752 default=True,
763 default=True,
753 )
764 )
754 coreconfigitem('server', 'uncompressedallowsecret',
765 coreconfigitem('server', 'uncompressedallowsecret',
755 default=False,
766 default=False,
756 )
767 )
757 coreconfigitem('server', 'validate',
768 coreconfigitem('server', 'validate',
758 default=False,
769 default=False,
759 )
770 )
760 coreconfigitem('server', 'zliblevel',
771 coreconfigitem('server', 'zliblevel',
761 default=-1,
772 default=-1,
762 )
773 )
763 coreconfigitem('smtp', 'host',
774 coreconfigitem('smtp', 'host',
764 default=None,
775 default=None,
765 )
776 )
766 coreconfigitem('smtp', 'local_hostname',
777 coreconfigitem('smtp', 'local_hostname',
767 default=None,
778 default=None,
768 )
779 )
769 coreconfigitem('smtp', 'password',
780 coreconfigitem('smtp', 'password',
770 default=None,
781 default=None,
771 )
782 )
772 coreconfigitem('smtp', 'port',
783 coreconfigitem('smtp', 'port',
773 default=dynamicdefault,
784 default=dynamicdefault,
774 )
785 )
775 coreconfigitem('smtp', 'tls',
786 coreconfigitem('smtp', 'tls',
776 default='none',
787 default='none',
777 )
788 )
778 coreconfigitem('smtp', 'username',
789 coreconfigitem('smtp', 'username',
779 default=None,
790 default=None,
780 )
791 )
781 coreconfigitem('sparse', 'missingwarning',
792 coreconfigitem('sparse', 'missingwarning',
782 default=True,
793 default=True,
783 )
794 )
784 coreconfigitem('templates', '.*',
795 coreconfigitem('templates', '.*',
785 default=None,
796 default=None,
786 generic=True,
797 generic=True,
787 )
798 )
788 coreconfigitem('trusted', 'groups',
799 coreconfigitem('trusted', 'groups',
789 default=list,
800 default=list,
790 )
801 )
791 coreconfigitem('trusted', 'users',
802 coreconfigitem('trusted', 'users',
792 default=list,
803 default=list,
793 )
804 )
794 coreconfigitem('ui', '_usedassubrepo',
805 coreconfigitem('ui', '_usedassubrepo',
795 default=False,
806 default=False,
796 )
807 )
797 coreconfigitem('ui', 'allowemptycommit',
808 coreconfigitem('ui', 'allowemptycommit',
798 default=False,
809 default=False,
799 )
810 )
800 coreconfigitem('ui', 'archivemeta',
811 coreconfigitem('ui', 'archivemeta',
801 default=True,
812 default=True,
802 )
813 )
803 coreconfigitem('ui', 'askusername',
814 coreconfigitem('ui', 'askusername',
804 default=False,
815 default=False,
805 )
816 )
806 coreconfigitem('ui', 'clonebundlefallback',
817 coreconfigitem('ui', 'clonebundlefallback',
807 default=False,
818 default=False,
808 )
819 )
809 coreconfigitem('ui', 'clonebundleprefers',
820 coreconfigitem('ui', 'clonebundleprefers',
810 default=list,
821 default=list,
811 )
822 )
812 coreconfigitem('ui', 'clonebundles',
823 coreconfigitem('ui', 'clonebundles',
813 default=True,
824 default=True,
814 )
825 )
815 coreconfigitem('ui', 'color',
826 coreconfigitem('ui', 'color',
816 default='auto',
827 default='auto',
817 )
828 )
818 coreconfigitem('ui', 'commitsubrepos',
829 coreconfigitem('ui', 'commitsubrepos',
819 default=False,
830 default=False,
820 )
831 )
821 coreconfigitem('ui', 'debug',
832 coreconfigitem('ui', 'debug',
822 default=False,
833 default=False,
823 )
834 )
824 coreconfigitem('ui', 'debugger',
835 coreconfigitem('ui', 'debugger',
825 default=None,
836 default=None,
826 )
837 )
827 coreconfigitem('ui', 'fallbackencoding',
838 coreconfigitem('ui', 'fallbackencoding',
828 default=None,
839 default=None,
829 )
840 )
830 coreconfigitem('ui', 'forcecwd',
841 coreconfigitem('ui', 'forcecwd',
831 default=None,
842 default=None,
832 )
843 )
833 coreconfigitem('ui', 'forcemerge',
844 coreconfigitem('ui', 'forcemerge',
834 default=None,
845 default=None,
835 )
846 )
836 coreconfigitem('ui', 'formatdebug',
847 coreconfigitem('ui', 'formatdebug',
837 default=False,
848 default=False,
838 )
849 )
839 coreconfigitem('ui', 'formatjson',
850 coreconfigitem('ui', 'formatjson',
840 default=False,
851 default=False,
841 )
852 )
842 coreconfigitem('ui', 'formatted',
853 coreconfigitem('ui', 'formatted',
843 default=None,
854 default=None,
844 )
855 )
845 coreconfigitem('ui', 'graphnodetemplate',
856 coreconfigitem('ui', 'graphnodetemplate',
846 default=None,
857 default=None,
847 )
858 )
848 coreconfigitem('ui', 'http2debuglevel',
859 coreconfigitem('ui', 'http2debuglevel',
849 default=None,
860 default=None,
850 )
861 )
851 coreconfigitem('ui', 'interactive',
862 coreconfigitem('ui', 'interactive',
852 default=None,
863 default=None,
853 )
864 )
854 coreconfigitem('ui', 'interface',
865 coreconfigitem('ui', 'interface',
855 default=None,
866 default=None,
856 )
867 )
857 coreconfigitem('ui', 'interface.chunkselector',
868 coreconfigitem('ui', 'interface.chunkselector',
858 default=None,
869 default=None,
859 )
870 )
860 coreconfigitem('ui', 'logblockedtimes',
871 coreconfigitem('ui', 'logblockedtimes',
861 default=False,
872 default=False,
862 )
873 )
863 coreconfigitem('ui', 'logtemplate',
874 coreconfigitem('ui', 'logtemplate',
864 default=None,
875 default=None,
865 )
876 )
866 coreconfigitem('ui', 'merge',
877 coreconfigitem('ui', 'merge',
867 default=None,
878 default=None,
868 )
879 )
869 coreconfigitem('ui', 'mergemarkers',
880 coreconfigitem('ui', 'mergemarkers',
870 default='basic',
881 default='basic',
871 )
882 )
872 coreconfigitem('ui', 'mergemarkertemplate',
883 coreconfigitem('ui', 'mergemarkertemplate',
873 default=('{node|short} '
884 default=('{node|short} '
874 '{ifeq(tags, "tip", "", '
885 '{ifeq(tags, "tip", "", '
875 'ifeq(tags, "", "", "{tags} "))}'
886 'ifeq(tags, "", "", "{tags} "))}'
876 '{if(bookmarks, "{bookmarks} ")}'
887 '{if(bookmarks, "{bookmarks} ")}'
877 '{ifeq(branch, "default", "", "{branch} ")}'
888 '{ifeq(branch, "default", "", "{branch} ")}'
878 '- {author|user}: {desc|firstline}')
889 '- {author|user}: {desc|firstline}')
879 )
890 )
880 coreconfigitem('ui', 'nontty',
891 coreconfigitem('ui', 'nontty',
881 default=False,
892 default=False,
882 )
893 )
883 coreconfigitem('ui', 'origbackuppath',
894 coreconfigitem('ui', 'origbackuppath',
884 default=None,
895 default=None,
885 )
896 )
886 coreconfigitem('ui', 'paginate',
897 coreconfigitem('ui', 'paginate',
887 default=True,
898 default=True,
888 )
899 )
889 coreconfigitem('ui', 'patch',
900 coreconfigitem('ui', 'patch',
890 default=None,
901 default=None,
891 )
902 )
892 coreconfigitem('ui', 'portablefilenames',
903 coreconfigitem('ui', 'portablefilenames',
893 default='warn',
904 default='warn',
894 )
905 )
895 coreconfigitem('ui', 'promptecho',
906 coreconfigitem('ui', 'promptecho',
896 default=False,
907 default=False,
897 )
908 )
898 coreconfigitem('ui', 'quiet',
909 coreconfigitem('ui', 'quiet',
899 default=False,
910 default=False,
900 )
911 )
901 coreconfigitem('ui', 'quietbookmarkmove',
912 coreconfigitem('ui', 'quietbookmarkmove',
902 default=False,
913 default=False,
903 )
914 )
904 coreconfigitem('ui', 'remotecmd',
915 coreconfigitem('ui', 'remotecmd',
905 default='hg',
916 default='hg',
906 )
917 )
907 coreconfigitem('ui', 'report_untrusted',
918 coreconfigitem('ui', 'report_untrusted',
908 default=True,
919 default=True,
909 )
920 )
910 coreconfigitem('ui', 'rollback',
921 coreconfigitem('ui', 'rollback',
911 default=True,
922 default=True,
912 )
923 )
913 coreconfigitem('ui', 'slash',
924 coreconfigitem('ui', 'slash',
914 default=False,
925 default=False,
915 )
926 )
916 coreconfigitem('ui', 'ssh',
927 coreconfigitem('ui', 'ssh',
917 default='ssh',
928 default='ssh',
918 )
929 )
919 coreconfigitem('ui', 'statuscopies',
930 coreconfigitem('ui', 'statuscopies',
920 default=False,
931 default=False,
921 )
932 )
922 coreconfigitem('ui', 'strict',
933 coreconfigitem('ui', 'strict',
923 default=False,
934 default=False,
924 )
935 )
925 coreconfigitem('ui', 'style',
936 coreconfigitem('ui', 'style',
926 default='',
937 default='',
927 )
938 )
928 coreconfigitem('ui', 'supportcontact',
939 coreconfigitem('ui', 'supportcontact',
929 default=None,
940 default=None,
930 )
941 )
931 coreconfigitem('ui', 'textwidth',
942 coreconfigitem('ui', 'textwidth',
932 default=78,
943 default=78,
933 )
944 )
934 coreconfigitem('ui', 'timeout',
945 coreconfigitem('ui', 'timeout',
935 default='600',
946 default='600',
936 )
947 )
937 coreconfigitem('ui', 'traceback',
948 coreconfigitem('ui', 'traceback',
938 default=False,
949 default=False,
939 )
950 )
940 coreconfigitem('ui', 'tweakdefaults',
951 coreconfigitem('ui', 'tweakdefaults',
941 default=False,
952 default=False,
942 )
953 )
943 coreconfigitem('ui', 'usehttp2',
954 coreconfigitem('ui', 'usehttp2',
944 default=False,
955 default=False,
945 )
956 )
946 coreconfigitem('ui', 'username',
957 coreconfigitem('ui', 'username',
947 alias=[('ui', 'user')]
958 alias=[('ui', 'user')]
948 )
959 )
949 coreconfigitem('ui', 'verbose',
960 coreconfigitem('ui', 'verbose',
950 default=False,
961 default=False,
951 )
962 )
952 coreconfigitem('verify', 'skipflags',
963 coreconfigitem('verify', 'skipflags',
953 default=None,
964 default=None,
954 )
965 )
955 coreconfigitem('web', 'allowbz2',
966 coreconfigitem('web', 'allowbz2',
956 default=False,
967 default=False,
957 )
968 )
958 coreconfigitem('web', 'allowgz',
969 coreconfigitem('web', 'allowgz',
959 default=False,
970 default=False,
960 )
971 )
961 coreconfigitem('web', 'allowpull',
972 coreconfigitem('web', 'allowpull',
962 default=True,
973 default=True,
963 )
974 )
964 coreconfigitem('web', 'allow_push',
975 coreconfigitem('web', 'allow_push',
965 default=list,
976 default=list,
966 )
977 )
967 coreconfigitem('web', 'allowzip',
978 coreconfigitem('web', 'allowzip',
968 default=False,
979 default=False,
969 )
980 )
970 coreconfigitem('web', 'archivesubrepos',
981 coreconfigitem('web', 'archivesubrepos',
971 default=False,
982 default=False,
972 )
983 )
973 coreconfigitem('web', 'cache',
984 coreconfigitem('web', 'cache',
974 default=True,
985 default=True,
975 )
986 )
976 coreconfigitem('web', 'contact',
987 coreconfigitem('web', 'contact',
977 default=None,
988 default=None,
978 )
989 )
979 coreconfigitem('web', 'deny_push',
990 coreconfigitem('web', 'deny_push',
980 default=list,
991 default=list,
981 )
992 )
982 coreconfigitem('web', 'guessmime',
993 coreconfigitem('web', 'guessmime',
983 default=False,
994 default=False,
984 )
995 )
985 coreconfigitem('web', 'hidden',
996 coreconfigitem('web', 'hidden',
986 default=False,
997 default=False,
987 )
998 )
988 coreconfigitem('web', 'labels',
999 coreconfigitem('web', 'labels',
989 default=list,
1000 default=list,
990 )
1001 )
991 coreconfigitem('web', 'logoimg',
1002 coreconfigitem('web', 'logoimg',
992 default='hglogo.png',
1003 default='hglogo.png',
993 )
1004 )
994 coreconfigitem('web', 'logourl',
1005 coreconfigitem('web', 'logourl',
995 default='https://mercurial-scm.org/',
1006 default='https://mercurial-scm.org/',
996 )
1007 )
997 coreconfigitem('web', 'accesslog',
1008 coreconfigitem('web', 'accesslog',
998 default='-',
1009 default='-',
999 )
1010 )
1000 coreconfigitem('web', 'address',
1011 coreconfigitem('web', 'address',
1001 default='',
1012 default='',
1002 )
1013 )
1003 coreconfigitem('web', 'allow_archive',
1014 coreconfigitem('web', 'allow_archive',
1004 default=list,
1015 default=list,
1005 )
1016 )
1006 coreconfigitem('web', 'allow_read',
1017 coreconfigitem('web', 'allow_read',
1007 default=list,
1018 default=list,
1008 )
1019 )
1009 coreconfigitem('web', 'baseurl',
1020 coreconfigitem('web', 'baseurl',
1010 default=None,
1021 default=None,
1011 )
1022 )
1012 coreconfigitem('web', 'cacerts',
1023 coreconfigitem('web', 'cacerts',
1013 default=None,
1024 default=None,
1014 )
1025 )
1015 coreconfigitem('web', 'certificate',
1026 coreconfigitem('web', 'certificate',
1016 default=None,
1027 default=None,
1017 )
1028 )
1018 coreconfigitem('web', 'collapse',
1029 coreconfigitem('web', 'collapse',
1019 default=False,
1030 default=False,
1020 )
1031 )
1021 coreconfigitem('web', 'csp',
1032 coreconfigitem('web', 'csp',
1022 default=None,
1033 default=None,
1023 )
1034 )
1024 coreconfigitem('web', 'deny_read',
1035 coreconfigitem('web', 'deny_read',
1025 default=list,
1036 default=list,
1026 )
1037 )
1027 coreconfigitem('web', 'descend',
1038 coreconfigitem('web', 'descend',
1028 default=True,
1039 default=True,
1029 )
1040 )
1030 coreconfigitem('web', 'description',
1041 coreconfigitem('web', 'description',
1031 default="",
1042 default="",
1032 )
1043 )
1033 coreconfigitem('web', 'encoding',
1044 coreconfigitem('web', 'encoding',
1034 default=lambda: encoding.encoding,
1045 default=lambda: encoding.encoding,
1035 )
1046 )
1036 coreconfigitem('web', 'errorlog',
1047 coreconfigitem('web', 'errorlog',
1037 default='-',
1048 default='-',
1038 )
1049 )
1039 coreconfigitem('web', 'ipv6',
1050 coreconfigitem('web', 'ipv6',
1040 default=False,
1051 default=False,
1041 )
1052 )
1042 coreconfigitem('web', 'maxchanges',
1053 coreconfigitem('web', 'maxchanges',
1043 default=10,
1054 default=10,
1044 )
1055 )
1045 coreconfigitem('web', 'maxfiles',
1056 coreconfigitem('web', 'maxfiles',
1046 default=10,
1057 default=10,
1047 )
1058 )
1048 coreconfigitem('web', 'maxshortchanges',
1059 coreconfigitem('web', 'maxshortchanges',
1049 default=60,
1060 default=60,
1050 )
1061 )
1051 coreconfigitem('web', 'motd',
1062 coreconfigitem('web', 'motd',
1052 default='',
1063 default='',
1053 )
1064 )
1054 coreconfigitem('web', 'name',
1065 coreconfigitem('web', 'name',
1055 default=dynamicdefault,
1066 default=dynamicdefault,
1056 )
1067 )
1057 coreconfigitem('web', 'port',
1068 coreconfigitem('web', 'port',
1058 default=8000,
1069 default=8000,
1059 )
1070 )
1060 coreconfigitem('web', 'prefix',
1071 coreconfigitem('web', 'prefix',
1061 default='',
1072 default='',
1062 )
1073 )
1063 coreconfigitem('web', 'push_ssl',
1074 coreconfigitem('web', 'push_ssl',
1064 default=True,
1075 default=True,
1065 )
1076 )
1066 coreconfigitem('web', 'refreshinterval',
1077 coreconfigitem('web', 'refreshinterval',
1067 default=20,
1078 default=20,
1068 )
1079 )
1069 coreconfigitem('web', 'staticurl',
1080 coreconfigitem('web', 'staticurl',
1070 default=None,
1081 default=None,
1071 )
1082 )
1072 coreconfigitem('web', 'stripes',
1083 coreconfigitem('web', 'stripes',
1073 default=1,
1084 default=1,
1074 )
1085 )
1075 coreconfigitem('web', 'style',
1086 coreconfigitem('web', 'style',
1076 default='paper',
1087 default='paper',
1077 )
1088 )
1078 coreconfigitem('web', 'templates',
1089 coreconfigitem('web', 'templates',
1079 default=None,
1090 default=None,
1080 )
1091 )
1081 coreconfigitem('web', 'view',
1092 coreconfigitem('web', 'view',
1082 default='served',
1093 default='served',
1083 )
1094 )
1084 coreconfigitem('worker', 'backgroundclose',
1095 coreconfigitem('worker', 'backgroundclose',
1085 default=dynamicdefault,
1096 default=dynamicdefault,
1086 )
1097 )
1087 # Windows defaults to a limit of 512 open files. A buffer of 128
1098 # Windows defaults to a limit of 512 open files. A buffer of 128
1088 # should give us enough headway.
1099 # should give us enough headway.
1089 coreconfigitem('worker', 'backgroundclosemaxqueue',
1100 coreconfigitem('worker', 'backgroundclosemaxqueue',
1090 default=384,
1101 default=384,
1091 )
1102 )
1092 coreconfigitem('worker', 'backgroundcloseminfilecount',
1103 coreconfigitem('worker', 'backgroundcloseminfilecount',
1093 default=2048,
1104 default=2048,
1094 )
1105 )
1095 coreconfigitem('worker', 'backgroundclosethreadcount',
1106 coreconfigitem('worker', 'backgroundclosethreadcount',
1096 default=4,
1107 default=4,
1097 )
1108 )
1098 coreconfigitem('worker', 'numcpus',
1109 coreconfigitem('worker', 'numcpus',
1099 default=None,
1110 default=None,
1100 )
1111 )
1101
1112
1102 # Rebase related configuration moved to core because other extension are doing
1113 # Rebase related configuration moved to core because other extension are doing
1103 # strange things. For example, shelve import the extensions to reuse some bit
1114 # strange things. For example, shelve import the extensions to reuse some bit
1104 # without formally loading it.
1115 # without formally loading it.
1105 coreconfigitem('commands', 'rebase.requiredest',
1116 coreconfigitem('commands', 'rebase.requiredest',
1106 default=False,
1117 default=False,
1107 )
1118 )
1108 coreconfigitem('experimental', 'rebaseskipobsolete',
1119 coreconfigitem('experimental', 'rebaseskipobsolete',
1109 default=True,
1120 default=True,
1110 )
1121 )
1111 coreconfigitem('rebase', 'singletransaction',
1122 coreconfigitem('rebase', 'singletransaction',
1112 default=False,
1123 default=False,
1113 )
1124 )
General Comments 0
You need to be logged in to leave comments. Login now