Show More
@@ -1,947 +1,951 | |||
|
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 configtable.items(): |
|
21 | 21 | knownitems = ui._knownconfig.setdefault(section, {}) |
|
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 | if key in self: |
|
71 | 71 | return self[key] |
|
72 | 72 | |
|
73 | 73 | # search for a matching generic item |
|
74 | 74 | generics = sorted(self._generics, key=(lambda x: (x.priority, x.name))) |
|
75 | 75 | for item in generics: |
|
76 | 76 | if item._re.match(key): |
|
77 | 77 | return item |
|
78 | 78 | |
|
79 | 79 | # fallback to dict get |
|
80 | 80 | return super(itemregister, self).get(key) |
|
81 | 81 | |
|
82 | 82 | coreitems = {} |
|
83 | 83 | |
|
84 | 84 | def _register(configtable, *args, **kwargs): |
|
85 | 85 | item = configitem(*args, **kwargs) |
|
86 | 86 | section = configtable.setdefault(item.section, itemregister()) |
|
87 | 87 | if item.name in section: |
|
88 | 88 | msg = "duplicated config item registration for '%s.%s'" |
|
89 | 89 | raise error.ProgrammingError(msg % (item.section, item.name)) |
|
90 | 90 | section[item.name] = item |
|
91 | 91 | |
|
92 | 92 | # special value for case where the default is derived from other values |
|
93 | 93 | dynamicdefault = object() |
|
94 | 94 | |
|
95 | 95 | # Registering actual config items |
|
96 | 96 | |
|
97 | 97 | def getitemregister(configtable): |
|
98 | 98 | return functools.partial(_register, configtable) |
|
99 | 99 | |
|
100 | 100 | coreconfigitem = getitemregister(coreitems) |
|
101 | 101 | |
|
102 | 102 | coreconfigitem('alias', '.*', |
|
103 | 103 | default=None, |
|
104 | 104 | generic=True, |
|
105 | 105 | ) |
|
106 | 106 | coreconfigitem('annotate', 'nodates', |
|
107 | 107 | default=None, |
|
108 | 108 | ) |
|
109 | 109 | coreconfigitem('annotate', 'showfunc', |
|
110 | 110 | default=None, |
|
111 | 111 | ) |
|
112 | 112 | coreconfigitem('annotate', 'unified', |
|
113 | 113 | default=None, |
|
114 | 114 | ) |
|
115 | 115 | coreconfigitem('annotate', 'git', |
|
116 | 116 | default=None, |
|
117 | 117 | ) |
|
118 | 118 | coreconfigitem('annotate', 'ignorews', |
|
119 | 119 | default=None, |
|
120 | 120 | ) |
|
121 | 121 | coreconfigitem('annotate', 'ignorewsamount', |
|
122 | 122 | default=None, |
|
123 | 123 | ) |
|
124 | 124 | coreconfigitem('annotate', 'ignoreblanklines', |
|
125 | 125 | default=None, |
|
126 | 126 | ) |
|
127 | 127 | coreconfigitem('annotate', 'ignorewseol', |
|
128 | 128 | default=None, |
|
129 | 129 | ) |
|
130 | 130 | coreconfigitem('annotate', 'nobinary', |
|
131 | 131 | default=None, |
|
132 | 132 | ) |
|
133 | 133 | coreconfigitem('annotate', 'noprefix', |
|
134 | 134 | default=None, |
|
135 | 135 | ) |
|
136 | 136 | coreconfigitem('auth', 'cookiefile', |
|
137 | 137 | default=None, |
|
138 | 138 | ) |
|
139 | 139 | # bookmarks.pushing: internal hack for discovery |
|
140 | 140 | coreconfigitem('bookmarks', 'pushing', |
|
141 | 141 | default=list, |
|
142 | 142 | ) |
|
143 | 143 | # bundle.mainreporoot: internal hack for bundlerepo |
|
144 | 144 | coreconfigitem('bundle', 'mainreporoot', |
|
145 | 145 | default='', |
|
146 | 146 | ) |
|
147 | 147 | # bundle.reorder: experimental config |
|
148 | 148 | coreconfigitem('bundle', 'reorder', |
|
149 | 149 | default='auto', |
|
150 | 150 | ) |
|
151 | 151 | coreconfigitem('censor', 'policy', |
|
152 | 152 | default='abort', |
|
153 | 153 | ) |
|
154 | 154 | coreconfigitem('chgserver', 'idletimeout', |
|
155 | 155 | default=3600, |
|
156 | 156 | ) |
|
157 | 157 | coreconfigitem('chgserver', 'skiphash', |
|
158 | 158 | default=False, |
|
159 | 159 | ) |
|
160 | 160 | coreconfigitem('cmdserver', 'log', |
|
161 | 161 | default=None, |
|
162 | 162 | ) |
|
163 | 163 | coreconfigitem('color', '.*', |
|
164 | 164 | default=None, |
|
165 | 165 | generic=True, |
|
166 | 166 | ) |
|
167 | 167 | coreconfigitem('color', 'mode', |
|
168 | 168 | default='auto', |
|
169 | 169 | ) |
|
170 | 170 | coreconfigitem('color', 'pagermode', |
|
171 | 171 | default=dynamicdefault, |
|
172 | 172 | ) |
|
173 | 173 | coreconfigitem('commands', 'status.relative', |
|
174 | 174 | default=False, |
|
175 | 175 | ) |
|
176 | 176 | coreconfigitem('commands', 'status.skipstates', |
|
177 | 177 | default=[], |
|
178 | 178 | ) |
|
179 | 179 | coreconfigitem('commands', 'status.verbose', |
|
180 | 180 | default=False, |
|
181 | 181 | ) |
|
182 | 182 | coreconfigitem('commands', 'update.requiredest', |
|
183 | 183 | default=False, |
|
184 | 184 | ) |
|
185 | coreconfigitem('committemplate', '.*', | |
|
186 | default=None, | |
|
187 | generic=True, | |
|
188 | ) | |
|
185 | 189 | coreconfigitem('debug', 'dirstate.delaywrite', |
|
186 | 190 | default=0, |
|
187 | 191 | ) |
|
188 | 192 | coreconfigitem('devel', 'all-warnings', |
|
189 | 193 | default=False, |
|
190 | 194 | ) |
|
191 | 195 | coreconfigitem('devel', 'bundle2.debug', |
|
192 | 196 | default=False, |
|
193 | 197 | ) |
|
194 | 198 | coreconfigitem('devel', 'cache-vfs', |
|
195 | 199 | default=None, |
|
196 | 200 | ) |
|
197 | 201 | coreconfigitem('devel', 'check-locks', |
|
198 | 202 | default=False, |
|
199 | 203 | ) |
|
200 | 204 | coreconfigitem('devel', 'check-relroot', |
|
201 | 205 | default=False, |
|
202 | 206 | ) |
|
203 | 207 | coreconfigitem('devel', 'default-date', |
|
204 | 208 | default=None, |
|
205 | 209 | ) |
|
206 | 210 | coreconfigitem('devel', 'deprec-warn', |
|
207 | 211 | default=False, |
|
208 | 212 | ) |
|
209 | 213 | coreconfigitem('devel', 'disableloaddefaultcerts', |
|
210 | 214 | default=False, |
|
211 | 215 | ) |
|
212 | 216 | coreconfigitem('devel', 'empty-changegroup', |
|
213 | 217 | default=False, |
|
214 | 218 | ) |
|
215 | 219 | coreconfigitem('devel', 'legacy.exchange', |
|
216 | 220 | default=list, |
|
217 | 221 | ) |
|
218 | 222 | coreconfigitem('devel', 'servercafile', |
|
219 | 223 | default='', |
|
220 | 224 | ) |
|
221 | 225 | coreconfigitem('devel', 'serverexactprotocol', |
|
222 | 226 | default='', |
|
223 | 227 | ) |
|
224 | 228 | coreconfigitem('devel', 'serverrequirecert', |
|
225 | 229 | default=False, |
|
226 | 230 | ) |
|
227 | 231 | coreconfigitem('devel', 'strip-obsmarkers', |
|
228 | 232 | default=True, |
|
229 | 233 | ) |
|
230 | 234 | coreconfigitem('devel', 'warn-config', |
|
231 | 235 | default=None, |
|
232 | 236 | ) |
|
233 | 237 | coreconfigitem('devel', 'warn-config-default', |
|
234 | 238 | default=None, |
|
235 | 239 | ) |
|
236 | 240 | coreconfigitem('devel', 'user.obsmarker', |
|
237 | 241 | default=None, |
|
238 | 242 | ) |
|
239 | 243 | coreconfigitem('diff', 'nodates', |
|
240 | 244 | default=None, |
|
241 | 245 | ) |
|
242 | 246 | coreconfigitem('diff', 'showfunc', |
|
243 | 247 | default=None, |
|
244 | 248 | ) |
|
245 | 249 | coreconfigitem('diff', 'unified', |
|
246 | 250 | default=None, |
|
247 | 251 | ) |
|
248 | 252 | coreconfigitem('diff', 'git', |
|
249 | 253 | default=None, |
|
250 | 254 | ) |
|
251 | 255 | coreconfigitem('diff', 'ignorews', |
|
252 | 256 | default=None, |
|
253 | 257 | ) |
|
254 | 258 | coreconfigitem('diff', 'ignorewsamount', |
|
255 | 259 | default=None, |
|
256 | 260 | ) |
|
257 | 261 | coreconfigitem('diff', 'ignoreblanklines', |
|
258 | 262 | default=None, |
|
259 | 263 | ) |
|
260 | 264 | coreconfigitem('diff', 'ignorewseol', |
|
261 | 265 | default=None, |
|
262 | 266 | ) |
|
263 | 267 | coreconfigitem('diff', 'nobinary', |
|
264 | 268 | default=None, |
|
265 | 269 | ) |
|
266 | 270 | coreconfigitem('diff', 'noprefix', |
|
267 | 271 | default=None, |
|
268 | 272 | ) |
|
269 | 273 | coreconfigitem('email', 'bcc', |
|
270 | 274 | default=None, |
|
271 | 275 | ) |
|
272 | 276 | coreconfigitem('email', 'cc', |
|
273 | 277 | default=None, |
|
274 | 278 | ) |
|
275 | 279 | coreconfigitem('email', 'charsets', |
|
276 | 280 | default=list, |
|
277 | 281 | ) |
|
278 | 282 | coreconfigitem('email', 'from', |
|
279 | 283 | default=None, |
|
280 | 284 | ) |
|
281 | 285 | coreconfigitem('email', 'method', |
|
282 | 286 | default='smtp', |
|
283 | 287 | ) |
|
284 | 288 | coreconfigitem('email', 'reply-to', |
|
285 | 289 | default=None, |
|
286 | 290 | ) |
|
287 | 291 | coreconfigitem('experimental', 'allowdivergence', |
|
288 | 292 | default=False, |
|
289 | 293 | ) |
|
290 | 294 | coreconfigitem('experimental', 'archivemetatemplate', |
|
291 | 295 | default=dynamicdefault, |
|
292 | 296 | ) |
|
293 | 297 | coreconfigitem('experimental', 'bundle-phases', |
|
294 | 298 | default=False, |
|
295 | 299 | ) |
|
296 | 300 | coreconfigitem('experimental', 'bundle2-advertise', |
|
297 | 301 | default=True, |
|
298 | 302 | ) |
|
299 | 303 | coreconfigitem('experimental', 'bundle2-output-capture', |
|
300 | 304 | default=False, |
|
301 | 305 | ) |
|
302 | 306 | coreconfigitem('experimental', 'bundle2.pushback', |
|
303 | 307 | default=False, |
|
304 | 308 | ) |
|
305 | 309 | coreconfigitem('experimental', 'bundle2lazylocking', |
|
306 | 310 | default=False, |
|
307 | 311 | ) |
|
308 | 312 | coreconfigitem('experimental', 'bundlecomplevel', |
|
309 | 313 | default=None, |
|
310 | 314 | ) |
|
311 | 315 | coreconfigitem('experimental', 'changegroup3', |
|
312 | 316 | default=False, |
|
313 | 317 | ) |
|
314 | 318 | coreconfigitem('experimental', 'clientcompressionengines', |
|
315 | 319 | default=list, |
|
316 | 320 | ) |
|
317 | 321 | coreconfigitem('experimental', 'copytrace', |
|
318 | 322 | default='on', |
|
319 | 323 | ) |
|
320 | 324 | coreconfigitem('experimental', 'copytrace.sourcecommitlimit', |
|
321 | 325 | default=100, |
|
322 | 326 | ) |
|
323 | 327 | coreconfigitem('experimental', 'crecordtest', |
|
324 | 328 | default=None, |
|
325 | 329 | ) |
|
326 | 330 | coreconfigitem('experimental', 'editortmpinhg', |
|
327 | 331 | default=False, |
|
328 | 332 | ) |
|
329 | 333 | coreconfigitem('experimental', 'maxdeltachainspan', |
|
330 | 334 | default=-1, |
|
331 | 335 | ) |
|
332 | 336 | coreconfigitem('experimental', 'mmapindexthreshold', |
|
333 | 337 | default=None, |
|
334 | 338 | ) |
|
335 | 339 | coreconfigitem('experimental', 'nonnormalparanoidcheck', |
|
336 | 340 | default=False, |
|
337 | 341 | ) |
|
338 | 342 | coreconfigitem('experimental', 'stabilization', |
|
339 | 343 | default=list, |
|
340 | 344 | alias=[('experimental', 'evolution')], |
|
341 | 345 | ) |
|
342 | 346 | coreconfigitem('experimental', 'stabilization.bundle-obsmarker', |
|
343 | 347 | default=False, |
|
344 | 348 | alias=[('experimental', 'evolution.bundle-obsmarker')], |
|
345 | 349 | ) |
|
346 | 350 | coreconfigitem('experimental', 'stabilization.track-operation', |
|
347 | 351 | default=True, |
|
348 | 352 | alias=[('experimental', 'evolution.track-operation')] |
|
349 | 353 | ) |
|
350 | 354 | coreconfigitem('experimental', 'exportableenviron', |
|
351 | 355 | default=list, |
|
352 | 356 | ) |
|
353 | 357 | coreconfigitem('experimental', 'extendedheader.index', |
|
354 | 358 | default=None, |
|
355 | 359 | ) |
|
356 | 360 | coreconfigitem('experimental', 'extendedheader.similarity', |
|
357 | 361 | default=False, |
|
358 | 362 | ) |
|
359 | 363 | coreconfigitem('experimental', 'format.compression', |
|
360 | 364 | default='zlib', |
|
361 | 365 | ) |
|
362 | 366 | coreconfigitem('experimental', 'graphshorten', |
|
363 | 367 | default=False, |
|
364 | 368 | ) |
|
365 | 369 | coreconfigitem('experimental', 'graphstyle.parent', |
|
366 | 370 | default=dynamicdefault, |
|
367 | 371 | ) |
|
368 | 372 | coreconfigitem('experimental', 'graphstyle.missing', |
|
369 | 373 | default=dynamicdefault, |
|
370 | 374 | ) |
|
371 | 375 | coreconfigitem('experimental', 'graphstyle.grandparent', |
|
372 | 376 | default=dynamicdefault, |
|
373 | 377 | ) |
|
374 | 378 | coreconfigitem('experimental', 'hook-track-tags', |
|
375 | 379 | default=False, |
|
376 | 380 | ) |
|
377 | 381 | coreconfigitem('experimental', 'httppostargs', |
|
378 | 382 | default=False, |
|
379 | 383 | ) |
|
380 | 384 | coreconfigitem('experimental', 'manifestv2', |
|
381 | 385 | default=False, |
|
382 | 386 | ) |
|
383 | 387 | coreconfigitem('experimental', 'mergedriver', |
|
384 | 388 | default=None, |
|
385 | 389 | ) |
|
386 | 390 | coreconfigitem('experimental', 'obsmarkers-exchange-debug', |
|
387 | 391 | default=False, |
|
388 | 392 | ) |
|
389 | 393 | coreconfigitem('experimental', 'rebase.multidest', |
|
390 | 394 | default=False, |
|
391 | 395 | ) |
|
392 | 396 | coreconfigitem('experimental', 'revertalternateinteractivemode', |
|
393 | 397 | default=True, |
|
394 | 398 | ) |
|
395 | 399 | coreconfigitem('experimental', 'revlogv2', |
|
396 | 400 | default=None, |
|
397 | 401 | ) |
|
398 | 402 | coreconfigitem('experimental', 'spacemovesdown', |
|
399 | 403 | default=False, |
|
400 | 404 | ) |
|
401 | 405 | coreconfigitem('experimental', 'treemanifest', |
|
402 | 406 | default=False, |
|
403 | 407 | ) |
|
404 | 408 | coreconfigitem('experimental', 'updatecheck', |
|
405 | 409 | default=None, |
|
406 | 410 | ) |
|
407 | 411 | coreconfigitem('format', 'aggressivemergedeltas', |
|
408 | 412 | default=False, |
|
409 | 413 | ) |
|
410 | 414 | coreconfigitem('format', 'chunkcachesize', |
|
411 | 415 | default=None, |
|
412 | 416 | ) |
|
413 | 417 | coreconfigitem('format', 'dotencode', |
|
414 | 418 | default=True, |
|
415 | 419 | ) |
|
416 | 420 | coreconfigitem('format', 'generaldelta', |
|
417 | 421 | default=False, |
|
418 | 422 | ) |
|
419 | 423 | coreconfigitem('format', 'manifestcachesize', |
|
420 | 424 | default=None, |
|
421 | 425 | ) |
|
422 | 426 | coreconfigitem('format', 'maxchainlen', |
|
423 | 427 | default=None, |
|
424 | 428 | ) |
|
425 | 429 | coreconfigitem('format', 'obsstore-version', |
|
426 | 430 | default=None, |
|
427 | 431 | ) |
|
428 | 432 | coreconfigitem('format', 'usefncache', |
|
429 | 433 | default=True, |
|
430 | 434 | ) |
|
431 | 435 | coreconfigitem('format', 'usegeneraldelta', |
|
432 | 436 | default=True, |
|
433 | 437 | ) |
|
434 | 438 | coreconfigitem('format', 'usestore', |
|
435 | 439 | default=True, |
|
436 | 440 | ) |
|
437 | 441 | coreconfigitem('hostsecurity', 'ciphers', |
|
438 | 442 | default=None, |
|
439 | 443 | ) |
|
440 | 444 | coreconfigitem('hostsecurity', 'disabletls10warning', |
|
441 | 445 | default=False, |
|
442 | 446 | ) |
|
443 | 447 | coreconfigitem('http_proxy', 'always', |
|
444 | 448 | default=False, |
|
445 | 449 | ) |
|
446 | 450 | coreconfigitem('http_proxy', 'host', |
|
447 | 451 | default=None, |
|
448 | 452 | ) |
|
449 | 453 | coreconfigitem('http_proxy', 'no', |
|
450 | 454 | default=list, |
|
451 | 455 | ) |
|
452 | 456 | coreconfigitem('http_proxy', 'passwd', |
|
453 | 457 | default=None, |
|
454 | 458 | ) |
|
455 | 459 | coreconfigitem('http_proxy', 'user', |
|
456 | 460 | default=None, |
|
457 | 461 | ) |
|
458 | 462 | coreconfigitem('logtoprocess', 'commandexception', |
|
459 | 463 | default=None, |
|
460 | 464 | ) |
|
461 | 465 | coreconfigitem('logtoprocess', 'commandfinish', |
|
462 | 466 | default=None, |
|
463 | 467 | ) |
|
464 | 468 | coreconfigitem('logtoprocess', 'command', |
|
465 | 469 | default=None, |
|
466 | 470 | ) |
|
467 | 471 | coreconfigitem('logtoprocess', 'develwarn', |
|
468 | 472 | default=None, |
|
469 | 473 | ) |
|
470 | 474 | coreconfigitem('logtoprocess', 'uiblocked', |
|
471 | 475 | default=None, |
|
472 | 476 | ) |
|
473 | 477 | coreconfigitem('merge', 'checkunknown', |
|
474 | 478 | default='abort', |
|
475 | 479 | ) |
|
476 | 480 | coreconfigitem('merge', 'checkignored', |
|
477 | 481 | default='abort', |
|
478 | 482 | ) |
|
479 | 483 | coreconfigitem('merge', 'followcopies', |
|
480 | 484 | default=True, |
|
481 | 485 | ) |
|
482 | 486 | coreconfigitem('merge', 'preferancestor', |
|
483 | 487 | default=lambda: ['*'], |
|
484 | 488 | ) |
|
485 | 489 | coreconfigitem('pager', 'ignore', |
|
486 | 490 | default=list, |
|
487 | 491 | ) |
|
488 | 492 | coreconfigitem('pager', 'pager', |
|
489 | 493 | default=dynamicdefault, |
|
490 | 494 | ) |
|
491 | 495 | coreconfigitem('patch', 'eol', |
|
492 | 496 | default='strict', |
|
493 | 497 | ) |
|
494 | 498 | coreconfigitem('patch', 'fuzz', |
|
495 | 499 | default=2, |
|
496 | 500 | ) |
|
497 | 501 | coreconfigitem('paths', 'default', |
|
498 | 502 | default=None, |
|
499 | 503 | ) |
|
500 | 504 | coreconfigitem('paths', 'default-push', |
|
501 | 505 | default=None, |
|
502 | 506 | ) |
|
503 | 507 | coreconfigitem('phases', 'checksubrepos', |
|
504 | 508 | default='follow', |
|
505 | 509 | ) |
|
506 | 510 | coreconfigitem('phases', 'new-commit', |
|
507 | 511 | default='draft', |
|
508 | 512 | ) |
|
509 | 513 | coreconfigitem('phases', 'publish', |
|
510 | 514 | default=True, |
|
511 | 515 | ) |
|
512 | 516 | coreconfigitem('profiling', 'enabled', |
|
513 | 517 | default=False, |
|
514 | 518 | ) |
|
515 | 519 | coreconfigitem('profiling', 'format', |
|
516 | 520 | default='text', |
|
517 | 521 | ) |
|
518 | 522 | coreconfigitem('profiling', 'freq', |
|
519 | 523 | default=1000, |
|
520 | 524 | ) |
|
521 | 525 | coreconfigitem('profiling', 'limit', |
|
522 | 526 | default=30, |
|
523 | 527 | ) |
|
524 | 528 | coreconfigitem('profiling', 'nested', |
|
525 | 529 | default=0, |
|
526 | 530 | ) |
|
527 | 531 | coreconfigitem('profiling', 'output', |
|
528 | 532 | default=None, |
|
529 | 533 | ) |
|
530 | 534 | coreconfigitem('profiling', 'showmax', |
|
531 | 535 | default=0.999, |
|
532 | 536 | ) |
|
533 | 537 | coreconfigitem('profiling', 'showmin', |
|
534 | 538 | default=dynamicdefault, |
|
535 | 539 | ) |
|
536 | 540 | coreconfigitem('profiling', 'sort', |
|
537 | 541 | default='inlinetime', |
|
538 | 542 | ) |
|
539 | 543 | coreconfigitem('profiling', 'statformat', |
|
540 | 544 | default='hotpath', |
|
541 | 545 | ) |
|
542 | 546 | coreconfigitem('profiling', 'type', |
|
543 | 547 | default='stat', |
|
544 | 548 | ) |
|
545 | 549 | coreconfigitem('progress', 'assume-tty', |
|
546 | 550 | default=False, |
|
547 | 551 | ) |
|
548 | 552 | coreconfigitem('progress', 'changedelay', |
|
549 | 553 | default=1, |
|
550 | 554 | ) |
|
551 | 555 | coreconfigitem('progress', 'clear-complete', |
|
552 | 556 | default=True, |
|
553 | 557 | ) |
|
554 | 558 | coreconfigitem('progress', 'debug', |
|
555 | 559 | default=False, |
|
556 | 560 | ) |
|
557 | 561 | coreconfigitem('progress', 'delay', |
|
558 | 562 | default=3, |
|
559 | 563 | ) |
|
560 | 564 | coreconfigitem('progress', 'disable', |
|
561 | 565 | default=False, |
|
562 | 566 | ) |
|
563 | 567 | coreconfigitem('progress', 'estimateinterval', |
|
564 | 568 | default=60.0, |
|
565 | 569 | ) |
|
566 | 570 | coreconfigitem('progress', 'refresh', |
|
567 | 571 | default=0.1, |
|
568 | 572 | ) |
|
569 | 573 | coreconfigitem('progress', 'width', |
|
570 | 574 | default=dynamicdefault, |
|
571 | 575 | ) |
|
572 | 576 | coreconfigitem('push', 'pushvars.server', |
|
573 | 577 | default=False, |
|
574 | 578 | ) |
|
575 | 579 | coreconfigitem('server', 'bundle1', |
|
576 | 580 | default=True, |
|
577 | 581 | ) |
|
578 | 582 | coreconfigitem('server', 'bundle1gd', |
|
579 | 583 | default=None, |
|
580 | 584 | ) |
|
581 | 585 | coreconfigitem('server', 'bundle1.pull', |
|
582 | 586 | default=None, |
|
583 | 587 | ) |
|
584 | 588 | coreconfigitem('server', 'bundle1gd.pull', |
|
585 | 589 | default=None, |
|
586 | 590 | ) |
|
587 | 591 | coreconfigitem('server', 'bundle1.push', |
|
588 | 592 | default=None, |
|
589 | 593 | ) |
|
590 | 594 | coreconfigitem('server', 'bundle1gd.push', |
|
591 | 595 | default=None, |
|
592 | 596 | ) |
|
593 | 597 | coreconfigitem('server', 'compressionengines', |
|
594 | 598 | default=list, |
|
595 | 599 | ) |
|
596 | 600 | coreconfigitem('server', 'concurrent-push-mode', |
|
597 | 601 | default='strict', |
|
598 | 602 | ) |
|
599 | 603 | coreconfigitem('server', 'disablefullbundle', |
|
600 | 604 | default=False, |
|
601 | 605 | ) |
|
602 | 606 | coreconfigitem('server', 'maxhttpheaderlen', |
|
603 | 607 | default=1024, |
|
604 | 608 | ) |
|
605 | 609 | coreconfigitem('server', 'preferuncompressed', |
|
606 | 610 | default=False, |
|
607 | 611 | ) |
|
608 | 612 | coreconfigitem('server', 'uncompressed', |
|
609 | 613 | default=True, |
|
610 | 614 | ) |
|
611 | 615 | coreconfigitem('server', 'uncompressedallowsecret', |
|
612 | 616 | default=False, |
|
613 | 617 | ) |
|
614 | 618 | coreconfigitem('server', 'validate', |
|
615 | 619 | default=False, |
|
616 | 620 | ) |
|
617 | 621 | coreconfigitem('server', 'zliblevel', |
|
618 | 622 | default=-1, |
|
619 | 623 | ) |
|
620 | 624 | coreconfigitem('smtp', 'host', |
|
621 | 625 | default=None, |
|
622 | 626 | ) |
|
623 | 627 | coreconfigitem('smtp', 'local_hostname', |
|
624 | 628 | default=None, |
|
625 | 629 | ) |
|
626 | 630 | coreconfigitem('smtp', 'password', |
|
627 | 631 | default=None, |
|
628 | 632 | ) |
|
629 | 633 | coreconfigitem('smtp', 'port', |
|
630 | 634 | default=dynamicdefault, |
|
631 | 635 | ) |
|
632 | 636 | coreconfigitem('smtp', 'tls', |
|
633 | 637 | default='none', |
|
634 | 638 | ) |
|
635 | 639 | coreconfigitem('smtp', 'username', |
|
636 | 640 | default=None, |
|
637 | 641 | ) |
|
638 | 642 | coreconfigitem('sparse', 'missingwarning', |
|
639 | 643 | default=True, |
|
640 | 644 | ) |
|
641 | 645 | coreconfigitem('trusted', 'groups', |
|
642 | 646 | default=list, |
|
643 | 647 | ) |
|
644 | 648 | coreconfigitem('trusted', 'users', |
|
645 | 649 | default=list, |
|
646 | 650 | ) |
|
647 | 651 | coreconfigitem('ui', '_usedassubrepo', |
|
648 | 652 | default=False, |
|
649 | 653 | ) |
|
650 | 654 | coreconfigitem('ui', 'allowemptycommit', |
|
651 | 655 | default=False, |
|
652 | 656 | ) |
|
653 | 657 | coreconfigitem('ui', 'archivemeta', |
|
654 | 658 | default=True, |
|
655 | 659 | ) |
|
656 | 660 | coreconfigitem('ui', 'askusername', |
|
657 | 661 | default=False, |
|
658 | 662 | ) |
|
659 | 663 | coreconfigitem('ui', 'clonebundlefallback', |
|
660 | 664 | default=False, |
|
661 | 665 | ) |
|
662 | 666 | coreconfigitem('ui', 'clonebundleprefers', |
|
663 | 667 | default=list, |
|
664 | 668 | ) |
|
665 | 669 | coreconfigitem('ui', 'clonebundles', |
|
666 | 670 | default=True, |
|
667 | 671 | ) |
|
668 | 672 | coreconfigitem('ui', 'color', |
|
669 | 673 | default='auto', |
|
670 | 674 | ) |
|
671 | 675 | coreconfigitem('ui', 'commitsubrepos', |
|
672 | 676 | default=False, |
|
673 | 677 | ) |
|
674 | 678 | coreconfigitem('ui', 'debug', |
|
675 | 679 | default=False, |
|
676 | 680 | ) |
|
677 | 681 | coreconfigitem('ui', 'debugger', |
|
678 | 682 | default=None, |
|
679 | 683 | ) |
|
680 | 684 | coreconfigitem('ui', 'fallbackencoding', |
|
681 | 685 | default=None, |
|
682 | 686 | ) |
|
683 | 687 | coreconfigitem('ui', 'forcecwd', |
|
684 | 688 | default=None, |
|
685 | 689 | ) |
|
686 | 690 | coreconfigitem('ui', 'forcemerge', |
|
687 | 691 | default=None, |
|
688 | 692 | ) |
|
689 | 693 | coreconfigitem('ui', 'formatdebug', |
|
690 | 694 | default=False, |
|
691 | 695 | ) |
|
692 | 696 | coreconfigitem('ui', 'formatjson', |
|
693 | 697 | default=False, |
|
694 | 698 | ) |
|
695 | 699 | coreconfigitem('ui', 'formatted', |
|
696 | 700 | default=None, |
|
697 | 701 | ) |
|
698 | 702 | coreconfigitem('ui', 'graphnodetemplate', |
|
699 | 703 | default=None, |
|
700 | 704 | ) |
|
701 | 705 | coreconfigitem('ui', 'http2debuglevel', |
|
702 | 706 | default=None, |
|
703 | 707 | ) |
|
704 | 708 | coreconfigitem('ui', 'interactive', |
|
705 | 709 | default=None, |
|
706 | 710 | ) |
|
707 | 711 | coreconfigitem('ui', 'interface', |
|
708 | 712 | default=None, |
|
709 | 713 | ) |
|
710 | 714 | coreconfigitem('ui', 'interface.chunkselector', |
|
711 | 715 | default=None, |
|
712 | 716 | ) |
|
713 | 717 | coreconfigitem('ui', 'logblockedtimes', |
|
714 | 718 | default=False, |
|
715 | 719 | ) |
|
716 | 720 | coreconfigitem('ui', 'logtemplate', |
|
717 | 721 | default=None, |
|
718 | 722 | ) |
|
719 | 723 | coreconfigitem('ui', 'merge', |
|
720 | 724 | default=None, |
|
721 | 725 | ) |
|
722 | 726 | coreconfigitem('ui', 'mergemarkers', |
|
723 | 727 | default='basic', |
|
724 | 728 | ) |
|
725 | 729 | coreconfigitem('ui', 'mergemarkertemplate', |
|
726 | 730 | default=('{node|short} ' |
|
727 | 731 | '{ifeq(tags, "tip", "", ' |
|
728 | 732 | 'ifeq(tags, "", "", "{tags} "))}' |
|
729 | 733 | '{if(bookmarks, "{bookmarks} ")}' |
|
730 | 734 | '{ifeq(branch, "default", "", "{branch} ")}' |
|
731 | 735 | '- {author|user}: {desc|firstline}') |
|
732 | 736 | ) |
|
733 | 737 | coreconfigitem('ui', 'nontty', |
|
734 | 738 | default=False, |
|
735 | 739 | ) |
|
736 | 740 | coreconfigitem('ui', 'origbackuppath', |
|
737 | 741 | default=None, |
|
738 | 742 | ) |
|
739 | 743 | coreconfigitem('ui', 'paginate', |
|
740 | 744 | default=True, |
|
741 | 745 | ) |
|
742 | 746 | coreconfigitem('ui', 'patch', |
|
743 | 747 | default=None, |
|
744 | 748 | ) |
|
745 | 749 | coreconfigitem('ui', 'portablefilenames', |
|
746 | 750 | default='warn', |
|
747 | 751 | ) |
|
748 | 752 | coreconfigitem('ui', 'promptecho', |
|
749 | 753 | default=False, |
|
750 | 754 | ) |
|
751 | 755 | coreconfigitem('ui', 'quiet', |
|
752 | 756 | default=False, |
|
753 | 757 | ) |
|
754 | 758 | coreconfigitem('ui', 'quietbookmarkmove', |
|
755 | 759 | default=False, |
|
756 | 760 | ) |
|
757 | 761 | coreconfigitem('ui', 'remotecmd', |
|
758 | 762 | default='hg', |
|
759 | 763 | ) |
|
760 | 764 | coreconfigitem('ui', 'report_untrusted', |
|
761 | 765 | default=True, |
|
762 | 766 | ) |
|
763 | 767 | coreconfigitem('ui', 'rollback', |
|
764 | 768 | default=True, |
|
765 | 769 | ) |
|
766 | 770 | coreconfigitem('ui', 'slash', |
|
767 | 771 | default=False, |
|
768 | 772 | ) |
|
769 | 773 | coreconfigitem('ui', 'ssh', |
|
770 | 774 | default='ssh', |
|
771 | 775 | ) |
|
772 | 776 | coreconfigitem('ui', 'statuscopies', |
|
773 | 777 | default=False, |
|
774 | 778 | ) |
|
775 | 779 | coreconfigitem('ui', 'strict', |
|
776 | 780 | default=False, |
|
777 | 781 | ) |
|
778 | 782 | coreconfigitem('ui', 'style', |
|
779 | 783 | default='', |
|
780 | 784 | ) |
|
781 | 785 | coreconfigitem('ui', 'supportcontact', |
|
782 | 786 | default=None, |
|
783 | 787 | ) |
|
784 | 788 | coreconfigitem('ui', 'textwidth', |
|
785 | 789 | default=78, |
|
786 | 790 | ) |
|
787 | 791 | coreconfigitem('ui', 'timeout', |
|
788 | 792 | default='600', |
|
789 | 793 | ) |
|
790 | 794 | coreconfigitem('ui', 'traceback', |
|
791 | 795 | default=False, |
|
792 | 796 | ) |
|
793 | 797 | coreconfigitem('ui', 'tweakdefaults', |
|
794 | 798 | default=False, |
|
795 | 799 | ) |
|
796 | 800 | coreconfigitem('ui', 'usehttp2', |
|
797 | 801 | default=False, |
|
798 | 802 | ) |
|
799 | 803 | coreconfigitem('ui', 'username', |
|
800 | 804 | alias=[('ui', 'user')] |
|
801 | 805 | ) |
|
802 | 806 | coreconfigitem('ui', 'verbose', |
|
803 | 807 | default=False, |
|
804 | 808 | ) |
|
805 | 809 | coreconfigitem('verify', 'skipflags', |
|
806 | 810 | default=None, |
|
807 | 811 | ) |
|
808 | 812 | coreconfigitem('web', 'allowbz2', |
|
809 | 813 | default=False, |
|
810 | 814 | ) |
|
811 | 815 | coreconfigitem('web', 'allowgz', |
|
812 | 816 | default=False, |
|
813 | 817 | ) |
|
814 | 818 | coreconfigitem('web', 'allowpull', |
|
815 | 819 | default=True, |
|
816 | 820 | ) |
|
817 | 821 | coreconfigitem('web', 'allow_push', |
|
818 | 822 | default=list, |
|
819 | 823 | ) |
|
820 | 824 | coreconfigitem('web', 'allowzip', |
|
821 | 825 | default=False, |
|
822 | 826 | ) |
|
823 | 827 | coreconfigitem('web', 'cache', |
|
824 | 828 | default=True, |
|
825 | 829 | ) |
|
826 | 830 | coreconfigitem('web', 'contact', |
|
827 | 831 | default=None, |
|
828 | 832 | ) |
|
829 | 833 | coreconfigitem('web', 'deny_push', |
|
830 | 834 | default=list, |
|
831 | 835 | ) |
|
832 | 836 | coreconfigitem('web', 'guessmime', |
|
833 | 837 | default=False, |
|
834 | 838 | ) |
|
835 | 839 | coreconfigitem('web', 'hidden', |
|
836 | 840 | default=False, |
|
837 | 841 | ) |
|
838 | 842 | coreconfigitem('web', 'labels', |
|
839 | 843 | default=list, |
|
840 | 844 | ) |
|
841 | 845 | coreconfigitem('web', 'logoimg', |
|
842 | 846 | default='hglogo.png', |
|
843 | 847 | ) |
|
844 | 848 | coreconfigitem('web', 'logourl', |
|
845 | 849 | default='https://mercurial-scm.org/', |
|
846 | 850 | ) |
|
847 | 851 | coreconfigitem('web', 'accesslog', |
|
848 | 852 | default='-', |
|
849 | 853 | ) |
|
850 | 854 | coreconfigitem('web', 'address', |
|
851 | 855 | default='', |
|
852 | 856 | ) |
|
853 | 857 | coreconfigitem('web', 'allow_archive', |
|
854 | 858 | default=list, |
|
855 | 859 | ) |
|
856 | 860 | coreconfigitem('web', 'allow_read', |
|
857 | 861 | default=list, |
|
858 | 862 | ) |
|
859 | 863 | coreconfigitem('web', 'baseurl', |
|
860 | 864 | default=None, |
|
861 | 865 | ) |
|
862 | 866 | coreconfigitem('web', 'cacerts', |
|
863 | 867 | default=None, |
|
864 | 868 | ) |
|
865 | 869 | coreconfigitem('web', 'certificate', |
|
866 | 870 | default=None, |
|
867 | 871 | ) |
|
868 | 872 | coreconfigitem('web', 'collapse', |
|
869 | 873 | default=False, |
|
870 | 874 | ) |
|
871 | 875 | coreconfigitem('web', 'csp', |
|
872 | 876 | default=None, |
|
873 | 877 | ) |
|
874 | 878 | coreconfigitem('web', 'deny_read', |
|
875 | 879 | default=list, |
|
876 | 880 | ) |
|
877 | 881 | coreconfigitem('web', 'descend', |
|
878 | 882 | default=True, |
|
879 | 883 | ) |
|
880 | 884 | coreconfigitem('web', 'description', |
|
881 | 885 | default="", |
|
882 | 886 | ) |
|
883 | 887 | coreconfigitem('web', 'encoding', |
|
884 | 888 | default=lambda: encoding.encoding, |
|
885 | 889 | ) |
|
886 | 890 | coreconfigitem('web', 'errorlog', |
|
887 | 891 | default='-', |
|
888 | 892 | ) |
|
889 | 893 | coreconfigitem('web', 'ipv6', |
|
890 | 894 | default=False, |
|
891 | 895 | ) |
|
892 | 896 | coreconfigitem('web', 'maxchanges', |
|
893 | 897 | default=10, |
|
894 | 898 | ) |
|
895 | 899 | coreconfigitem('web', 'maxfiles', |
|
896 | 900 | default=10, |
|
897 | 901 | ) |
|
898 | 902 | coreconfigitem('web', 'maxshortchanges', |
|
899 | 903 | default=60, |
|
900 | 904 | ) |
|
901 | 905 | coreconfigitem('web', 'motd', |
|
902 | 906 | default='', |
|
903 | 907 | ) |
|
904 | 908 | coreconfigitem('web', 'name', |
|
905 | 909 | default=dynamicdefault, |
|
906 | 910 | ) |
|
907 | 911 | coreconfigitem('web', 'port', |
|
908 | 912 | default=8000, |
|
909 | 913 | ) |
|
910 | 914 | coreconfigitem('web', 'prefix', |
|
911 | 915 | default='', |
|
912 | 916 | ) |
|
913 | 917 | coreconfigitem('web', 'push_ssl', |
|
914 | 918 | default=True, |
|
915 | 919 | ) |
|
916 | 920 | coreconfigitem('web', 'refreshinterval', |
|
917 | 921 | default=20, |
|
918 | 922 | ) |
|
919 | 923 | coreconfigitem('web', 'stripes', |
|
920 | 924 | default=1, |
|
921 | 925 | ) |
|
922 | 926 | coreconfigitem('web', 'style', |
|
923 | 927 | default='paper', |
|
924 | 928 | ) |
|
925 | 929 | coreconfigitem('web', 'templates', |
|
926 | 930 | default=None, |
|
927 | 931 | ) |
|
928 | 932 | coreconfigitem('web', 'view', |
|
929 | 933 | default='served', |
|
930 | 934 | ) |
|
931 | 935 | coreconfigitem('worker', 'backgroundclose', |
|
932 | 936 | default=dynamicdefault, |
|
933 | 937 | ) |
|
934 | 938 | # Windows defaults to a limit of 512 open files. A buffer of 128 |
|
935 | 939 | # should give us enough headway. |
|
936 | 940 | coreconfigitem('worker', 'backgroundclosemaxqueue', |
|
937 | 941 | default=384, |
|
938 | 942 | ) |
|
939 | 943 | coreconfigitem('worker', 'backgroundcloseminfilecount', |
|
940 | 944 | default=2048, |
|
941 | 945 | ) |
|
942 | 946 | coreconfigitem('worker', 'backgroundclosethreadcount', |
|
943 | 947 | default=4, |
|
944 | 948 | ) |
|
945 | 949 | coreconfigitem('worker', 'numcpus', |
|
946 | 950 | default=None, |
|
947 | 951 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now