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