##// END OF EJS Templates
config: add option to control creation of empty successors during rewrite...
Manuel Jacob -
r45681:b6269741 default
parent child Browse files
Show More
@@ -1,1582 +1,1585 b''
1 1 # configitems.py - centralized declaration of configuration option
2 2 #
3 3 # Copyright 2017 Pierre-Yves David <pierre-yves.david@octobus.net>
4 4 #
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2 or any later version.
7 7
8 8 from __future__ import absolute_import
9 9
10 10 import functools
11 11 import re
12 12
13 13 from . import (
14 14 encoding,
15 15 error,
16 16 )
17 17
18 18
19 19 def loadconfigtable(ui, extname, configtable):
20 20 """update config item known to the ui with the extension ones"""
21 21 for section, items in sorted(configtable.items()):
22 22 knownitems = ui._knownconfig.setdefault(section, itemregister())
23 23 knownkeys = set(knownitems)
24 24 newkeys = set(items)
25 25 for key in sorted(knownkeys & newkeys):
26 26 msg = b"extension '%s' overwrite config item '%s.%s'"
27 27 msg %= (extname, section, key)
28 28 ui.develwarn(msg, config=b'warn-config')
29 29
30 30 knownitems.update(items)
31 31
32 32
33 33 class configitem(object):
34 34 """represent a known config item
35 35
36 36 :section: the official config section where to find this item,
37 37 :name: the official name within the section,
38 38 :default: default value for this item,
39 39 :alias: optional list of tuples as alternatives,
40 40 :generic: this is a generic definition, match name using regular expression.
41 41 """
42 42
43 43 def __init__(
44 44 self,
45 45 section,
46 46 name,
47 47 default=None,
48 48 alias=(),
49 49 generic=False,
50 50 priority=0,
51 51 experimental=False,
52 52 ):
53 53 self.section = section
54 54 self.name = name
55 55 self.default = default
56 56 self.alias = list(alias)
57 57 self.generic = generic
58 58 self.priority = priority
59 59 self.experimental = experimental
60 60 self._re = None
61 61 if generic:
62 62 self._re = re.compile(self.name)
63 63
64 64
65 65 class itemregister(dict):
66 66 """A specialized dictionary that can handle wild-card selection"""
67 67
68 68 def __init__(self):
69 69 super(itemregister, self).__init__()
70 70 self._generics = set()
71 71
72 72 def update(self, other):
73 73 super(itemregister, self).update(other)
74 74 self._generics.update(other._generics)
75 75
76 76 def __setitem__(self, key, item):
77 77 super(itemregister, self).__setitem__(key, item)
78 78 if item.generic:
79 79 self._generics.add(item)
80 80
81 81 def get(self, key):
82 82 baseitem = super(itemregister, self).get(key)
83 83 if baseitem is not None and not baseitem.generic:
84 84 return baseitem
85 85
86 86 # search for a matching generic item
87 87 generics = sorted(self._generics, key=(lambda x: (x.priority, x.name)))
88 88 for item in generics:
89 89 # we use 'match' instead of 'search' to make the matching simpler
90 90 # for people unfamiliar with regular expression. Having the match
91 91 # rooted to the start of the string will produce less surprising
92 92 # result for user writing simple regex for sub-attribute.
93 93 #
94 94 # For example using "color\..*" match produces an unsurprising
95 95 # result, while using search could suddenly match apparently
96 96 # unrelated configuration that happens to contains "color."
97 97 # anywhere. This is a tradeoff where we favor requiring ".*" on
98 98 # some match to avoid the need to prefix most pattern with "^".
99 99 # The "^" seems more error prone.
100 100 if item._re.match(key):
101 101 return item
102 102
103 103 return None
104 104
105 105
106 106 coreitems = {}
107 107
108 108
109 109 def _register(configtable, *args, **kwargs):
110 110 item = configitem(*args, **kwargs)
111 111 section = configtable.setdefault(item.section, itemregister())
112 112 if item.name in section:
113 113 msg = b"duplicated config item registration for '%s.%s'"
114 114 raise error.ProgrammingError(msg % (item.section, item.name))
115 115 section[item.name] = item
116 116
117 117
118 118 # special value for case where the default is derived from other values
119 119 dynamicdefault = object()
120 120
121 121 # Registering actual config items
122 122
123 123
124 124 def getitemregister(configtable):
125 125 f = functools.partial(_register, configtable)
126 126 # export pseudo enum as configitem.*
127 127 f.dynamicdefault = dynamicdefault
128 128 return f
129 129
130 130
131 131 coreconfigitem = getitemregister(coreitems)
132 132
133 133
134 134 def _registerdiffopts(section, configprefix=b''):
135 135 coreconfigitem(
136 136 section, configprefix + b'nodates', default=False,
137 137 )
138 138 coreconfigitem(
139 139 section, configprefix + b'showfunc', default=False,
140 140 )
141 141 coreconfigitem(
142 142 section, configprefix + b'unified', default=None,
143 143 )
144 144 coreconfigitem(
145 145 section, configprefix + b'git', default=False,
146 146 )
147 147 coreconfigitem(
148 148 section, configprefix + b'ignorews', default=False,
149 149 )
150 150 coreconfigitem(
151 151 section, configprefix + b'ignorewsamount', default=False,
152 152 )
153 153 coreconfigitem(
154 154 section, configprefix + b'ignoreblanklines', default=False,
155 155 )
156 156 coreconfigitem(
157 157 section, configprefix + b'ignorewseol', default=False,
158 158 )
159 159 coreconfigitem(
160 160 section, configprefix + b'nobinary', default=False,
161 161 )
162 162 coreconfigitem(
163 163 section, configprefix + b'noprefix', default=False,
164 164 )
165 165 coreconfigitem(
166 166 section, configprefix + b'word-diff', default=False,
167 167 )
168 168
169 169
170 170 coreconfigitem(
171 171 b'alias', b'.*', default=dynamicdefault, generic=True,
172 172 )
173 173 coreconfigitem(
174 174 b'auth', b'cookiefile', default=None,
175 175 )
176 176 _registerdiffopts(section=b'annotate')
177 177 # bookmarks.pushing: internal hack for discovery
178 178 coreconfigitem(
179 179 b'bookmarks', b'pushing', default=list,
180 180 )
181 181 # bundle.mainreporoot: internal hack for bundlerepo
182 182 coreconfigitem(
183 183 b'bundle', b'mainreporoot', default=b'',
184 184 )
185 185 coreconfigitem(
186 186 b'censor', b'policy', default=b'abort', experimental=True,
187 187 )
188 188 coreconfigitem(
189 189 b'chgserver', b'idletimeout', default=3600,
190 190 )
191 191 coreconfigitem(
192 192 b'chgserver', b'skiphash', default=False,
193 193 )
194 194 coreconfigitem(
195 195 b'cmdserver', b'log', default=None,
196 196 )
197 197 coreconfigitem(
198 198 b'cmdserver', b'max-log-files', default=7,
199 199 )
200 200 coreconfigitem(
201 201 b'cmdserver', b'max-log-size', default=b'1 MB',
202 202 )
203 203 coreconfigitem(
204 204 b'cmdserver', b'max-repo-cache', default=0, experimental=True,
205 205 )
206 206 coreconfigitem(
207 207 b'cmdserver', b'message-encodings', default=list,
208 208 )
209 209 coreconfigitem(
210 210 b'cmdserver',
211 211 b'track-log',
212 212 default=lambda: [b'chgserver', b'cmdserver', b'repocache'],
213 213 )
214 214 coreconfigitem(
215 215 b'cmdserver', b'shutdown-on-interrupt', default=True,
216 216 )
217 217 coreconfigitem(
218 218 b'color', b'.*', default=None, generic=True,
219 219 )
220 220 coreconfigitem(
221 221 b'color', b'mode', default=b'auto',
222 222 )
223 223 coreconfigitem(
224 224 b'color', b'pagermode', default=dynamicdefault,
225 225 )
226 226 _registerdiffopts(section=b'commands', configprefix=b'commit.interactive.')
227 227 coreconfigitem(
228 228 b'commands', b'commit.post-status', default=False,
229 229 )
230 230 coreconfigitem(
231 231 b'commands', b'grep.all-files', default=False, experimental=True,
232 232 )
233 233 coreconfigitem(
234 234 b'commands', b'merge.require-rev', default=False,
235 235 )
236 236 coreconfigitem(
237 237 b'commands', b'push.require-revs', default=False,
238 238 )
239 239 coreconfigitem(
240 240 b'commands', b'resolve.confirm', default=False,
241 241 )
242 242 coreconfigitem(
243 243 b'commands', b'resolve.explicit-re-merge', default=False,
244 244 )
245 245 coreconfigitem(
246 246 b'commands', b'resolve.mark-check', default=b'none',
247 247 )
248 248 _registerdiffopts(section=b'commands', configprefix=b'revert.interactive.')
249 249 coreconfigitem(
250 250 b'commands', b'show.aliasprefix', default=list,
251 251 )
252 252 coreconfigitem(
253 253 b'commands', b'status.relative', default=False,
254 254 )
255 255 coreconfigitem(
256 256 b'commands', b'status.skipstates', default=[], experimental=True,
257 257 )
258 258 coreconfigitem(
259 259 b'commands', b'status.terse', default=b'',
260 260 )
261 261 coreconfigitem(
262 262 b'commands', b'status.verbose', default=False,
263 263 )
264 264 coreconfigitem(
265 265 b'commands', b'update.check', default=None,
266 266 )
267 267 coreconfigitem(
268 268 b'commands', b'update.requiredest', default=False,
269 269 )
270 270 coreconfigitem(
271 271 b'committemplate', b'.*', default=None, generic=True,
272 272 )
273 273 coreconfigitem(
274 274 b'convert', b'bzr.saverev', default=True,
275 275 )
276 276 coreconfigitem(
277 277 b'convert', b'cvsps.cache', default=True,
278 278 )
279 279 coreconfigitem(
280 280 b'convert', b'cvsps.fuzz', default=60,
281 281 )
282 282 coreconfigitem(
283 283 b'convert', b'cvsps.logencoding', default=None,
284 284 )
285 285 coreconfigitem(
286 286 b'convert', b'cvsps.mergefrom', default=None,
287 287 )
288 288 coreconfigitem(
289 289 b'convert', b'cvsps.mergeto', default=None,
290 290 )
291 291 coreconfigitem(
292 292 b'convert', b'git.committeractions', default=lambda: [b'messagedifferent'],
293 293 )
294 294 coreconfigitem(
295 295 b'convert', b'git.extrakeys', default=list,
296 296 )
297 297 coreconfigitem(
298 298 b'convert', b'git.findcopiesharder', default=False,
299 299 )
300 300 coreconfigitem(
301 301 b'convert', b'git.remoteprefix', default=b'remote',
302 302 )
303 303 coreconfigitem(
304 304 b'convert', b'git.renamelimit', default=400,
305 305 )
306 306 coreconfigitem(
307 307 b'convert', b'git.saverev', default=True,
308 308 )
309 309 coreconfigitem(
310 310 b'convert', b'git.similarity', default=50,
311 311 )
312 312 coreconfigitem(
313 313 b'convert', b'git.skipsubmodules', default=False,
314 314 )
315 315 coreconfigitem(
316 316 b'convert', b'hg.clonebranches', default=False,
317 317 )
318 318 coreconfigitem(
319 319 b'convert', b'hg.ignoreerrors', default=False,
320 320 )
321 321 coreconfigitem(
322 322 b'convert', b'hg.preserve-hash', default=False,
323 323 )
324 324 coreconfigitem(
325 325 b'convert', b'hg.revs', default=None,
326 326 )
327 327 coreconfigitem(
328 328 b'convert', b'hg.saverev', default=False,
329 329 )
330 330 coreconfigitem(
331 331 b'convert', b'hg.sourcename', default=None,
332 332 )
333 333 coreconfigitem(
334 334 b'convert', b'hg.startrev', default=None,
335 335 )
336 336 coreconfigitem(
337 337 b'convert', b'hg.tagsbranch', default=b'default',
338 338 )
339 339 coreconfigitem(
340 340 b'convert', b'hg.usebranchnames', default=True,
341 341 )
342 342 coreconfigitem(
343 343 b'convert', b'ignoreancestorcheck', default=False, experimental=True,
344 344 )
345 345 coreconfigitem(
346 346 b'convert', b'localtimezone', default=False,
347 347 )
348 348 coreconfigitem(
349 349 b'convert', b'p4.encoding', default=dynamicdefault,
350 350 )
351 351 coreconfigitem(
352 352 b'convert', b'p4.startrev', default=0,
353 353 )
354 354 coreconfigitem(
355 355 b'convert', b'skiptags', default=False,
356 356 )
357 357 coreconfigitem(
358 358 b'convert', b'svn.debugsvnlog', default=True,
359 359 )
360 360 coreconfigitem(
361 361 b'convert', b'svn.trunk', default=None,
362 362 )
363 363 coreconfigitem(
364 364 b'convert', b'svn.tags', default=None,
365 365 )
366 366 coreconfigitem(
367 367 b'convert', b'svn.branches', default=None,
368 368 )
369 369 coreconfigitem(
370 370 b'convert', b'svn.startrev', default=0,
371 371 )
372 372 coreconfigitem(
373 373 b'debug', b'dirstate.delaywrite', default=0,
374 374 )
375 375 coreconfigitem(
376 376 b'defaults', b'.*', default=None, generic=True,
377 377 )
378 378 coreconfigitem(
379 379 b'devel', b'all-warnings', default=False,
380 380 )
381 381 coreconfigitem(
382 382 b'devel', b'bundle2.debug', default=False,
383 383 )
384 384 coreconfigitem(
385 385 b'devel', b'bundle.delta', default=b'',
386 386 )
387 387 coreconfigitem(
388 388 b'devel', b'cache-vfs', default=None,
389 389 )
390 390 coreconfigitem(
391 391 b'devel', b'check-locks', default=False,
392 392 )
393 393 coreconfigitem(
394 394 b'devel', b'check-relroot', default=False,
395 395 )
396 396 coreconfigitem(
397 397 b'devel', b'default-date', default=None,
398 398 )
399 399 coreconfigitem(
400 400 b'devel', b'deprec-warn', default=False,
401 401 )
402 402 coreconfigitem(
403 403 b'devel', b'disableloaddefaultcerts', default=False,
404 404 )
405 405 coreconfigitem(
406 406 b'devel', b'warn-empty-changegroup', default=False,
407 407 )
408 408 coreconfigitem(
409 409 b'devel', b'legacy.exchange', default=list,
410 410 )
411 411 coreconfigitem(
412 412 b'devel', b'persistent-nodemap', default=False,
413 413 )
414 414 coreconfigitem(
415 415 b'devel', b'servercafile', default=b'',
416 416 )
417 417 coreconfigitem(
418 418 b'devel', b'serverexactprotocol', default=b'',
419 419 )
420 420 coreconfigitem(
421 421 b'devel', b'serverrequirecert', default=False,
422 422 )
423 423 coreconfigitem(
424 424 b'devel', b'strip-obsmarkers', default=True,
425 425 )
426 426 coreconfigitem(
427 427 b'devel', b'warn-config', default=None,
428 428 )
429 429 coreconfigitem(
430 430 b'devel', b'warn-config-default', default=None,
431 431 )
432 432 coreconfigitem(
433 433 b'devel', b'user.obsmarker', default=None,
434 434 )
435 435 coreconfigitem(
436 436 b'devel', b'warn-config-unknown', default=None,
437 437 )
438 438 coreconfigitem(
439 439 b'devel', b'debug.copies', default=False,
440 440 )
441 441 coreconfigitem(
442 442 b'devel', b'debug.extensions', default=False,
443 443 )
444 444 coreconfigitem(
445 445 b'devel', b'debug.repo-filters', default=False,
446 446 )
447 447 coreconfigitem(
448 448 b'devel', b'debug.peer-request', default=False,
449 449 )
450 450 coreconfigitem(
451 451 b'devel', b'discovery.randomize', default=True,
452 452 )
453 453 _registerdiffopts(section=b'diff')
454 454 coreconfigitem(
455 455 b'email', b'bcc', default=None,
456 456 )
457 457 coreconfigitem(
458 458 b'email', b'cc', default=None,
459 459 )
460 460 coreconfigitem(
461 461 b'email', b'charsets', default=list,
462 462 )
463 463 coreconfigitem(
464 464 b'email', b'from', default=None,
465 465 )
466 466 coreconfigitem(
467 467 b'email', b'method', default=b'smtp',
468 468 )
469 469 coreconfigitem(
470 470 b'email', b'reply-to', default=None,
471 471 )
472 472 coreconfigitem(
473 473 b'email', b'to', default=None,
474 474 )
475 475 coreconfigitem(
476 476 b'experimental', b'archivemetatemplate', default=dynamicdefault,
477 477 )
478 478 coreconfigitem(
479 479 b'experimental', b'auto-publish', default=b'publish',
480 480 )
481 481 coreconfigitem(
482 482 b'experimental', b'bundle-phases', default=False,
483 483 )
484 484 coreconfigitem(
485 485 b'experimental', b'bundle2-advertise', default=True,
486 486 )
487 487 coreconfigitem(
488 488 b'experimental', b'bundle2-output-capture', default=False,
489 489 )
490 490 coreconfigitem(
491 491 b'experimental', b'bundle2.pushback', default=False,
492 492 )
493 493 coreconfigitem(
494 494 b'experimental', b'bundle2lazylocking', default=False,
495 495 )
496 496 coreconfigitem(
497 497 b'experimental', b'bundlecomplevel', default=None,
498 498 )
499 499 coreconfigitem(
500 500 b'experimental', b'bundlecomplevel.bzip2', default=None,
501 501 )
502 502 coreconfigitem(
503 503 b'experimental', b'bundlecomplevel.gzip', default=None,
504 504 )
505 505 coreconfigitem(
506 506 b'experimental', b'bundlecomplevel.none', default=None,
507 507 )
508 508 coreconfigitem(
509 509 b'experimental', b'bundlecomplevel.zstd', default=None,
510 510 )
511 511 coreconfigitem(
512 512 b'experimental', b'changegroup3', default=False,
513 513 )
514 514 coreconfigitem(
515 515 b'experimental', b'cleanup-as-archived', default=False,
516 516 )
517 517 coreconfigitem(
518 518 b'experimental', b'clientcompressionengines', default=list,
519 519 )
520 520 coreconfigitem(
521 521 b'experimental', b'copytrace', default=b'on',
522 522 )
523 523 coreconfigitem(
524 524 b'experimental', b'copytrace.movecandidateslimit', default=100,
525 525 )
526 526 coreconfigitem(
527 527 b'experimental', b'copytrace.sourcecommitlimit', default=100,
528 528 )
529 529 coreconfigitem(
530 530 b'experimental', b'copies.read-from', default=b"filelog-only",
531 531 )
532 532 coreconfigitem(
533 533 b'experimental', b'copies.write-to', default=b'filelog-only',
534 534 )
535 535 coreconfigitem(
536 536 b'experimental', b'crecordtest', default=None,
537 537 )
538 538 coreconfigitem(
539 539 b'experimental', b'directaccess', default=False,
540 540 )
541 541 coreconfigitem(
542 542 b'experimental', b'directaccess.revnums', default=False,
543 543 )
544 544 coreconfigitem(
545 545 b'experimental', b'editortmpinhg', default=False,
546 546 )
547 547 coreconfigitem(
548 548 b'experimental', b'evolution', default=list,
549 549 )
550 550 coreconfigitem(
551 551 b'experimental',
552 552 b'evolution.allowdivergence',
553 553 default=False,
554 554 alias=[(b'experimental', b'allowdivergence')],
555 555 )
556 556 coreconfigitem(
557 557 b'experimental', b'evolution.allowunstable', default=None,
558 558 )
559 559 coreconfigitem(
560 560 b'experimental', b'evolution.createmarkers', default=None,
561 561 )
562 562 coreconfigitem(
563 563 b'experimental',
564 564 b'evolution.effect-flags',
565 565 default=True,
566 566 alias=[(b'experimental', b'effect-flags')],
567 567 )
568 568 coreconfigitem(
569 569 b'experimental', b'evolution.exchange', default=None,
570 570 )
571 571 coreconfigitem(
572 572 b'experimental', b'evolution.bundle-obsmarker', default=False,
573 573 )
574 574 coreconfigitem(
575 575 b'experimental', b'log.topo', default=False,
576 576 )
577 577 coreconfigitem(
578 578 b'experimental', b'evolution.report-instabilities', default=True,
579 579 )
580 580 coreconfigitem(
581 581 b'experimental', b'evolution.track-operation', default=True,
582 582 )
583 583 # repo-level config to exclude a revset visibility
584 584 #
585 585 # The target use case is to use `share` to expose different subset of the same
586 586 # repository, especially server side. See also `server.view`.
587 587 coreconfigitem(
588 588 b'experimental', b'extra-filter-revs', default=None,
589 589 )
590 590 coreconfigitem(
591 591 b'experimental', b'maxdeltachainspan', default=-1,
592 592 )
593 593 coreconfigitem(
594 594 b'experimental', b'mergetempdirprefix', default=None,
595 595 )
596 596 coreconfigitem(
597 597 b'experimental', b'mmapindexthreshold', default=None,
598 598 )
599 599 coreconfigitem(
600 600 b'experimental', b'narrow', default=False,
601 601 )
602 602 coreconfigitem(
603 603 b'experimental', b'nonnormalparanoidcheck', default=False,
604 604 )
605 605 coreconfigitem(
606 606 b'experimental', b'exportableenviron', default=list,
607 607 )
608 608 coreconfigitem(
609 609 b'experimental', b'extendedheader.index', default=None,
610 610 )
611 611 coreconfigitem(
612 612 b'experimental', b'extendedheader.similarity', default=False,
613 613 )
614 614 coreconfigitem(
615 615 b'experimental', b'graphshorten', default=False,
616 616 )
617 617 coreconfigitem(
618 618 b'experimental', b'graphstyle.parent', default=dynamicdefault,
619 619 )
620 620 coreconfigitem(
621 621 b'experimental', b'graphstyle.missing', default=dynamicdefault,
622 622 )
623 623 coreconfigitem(
624 624 b'experimental', b'graphstyle.grandparent', default=dynamicdefault,
625 625 )
626 626 coreconfigitem(
627 627 b'experimental', b'hook-track-tags', default=False,
628 628 )
629 629 coreconfigitem(
630 630 b'experimental', b'httppeer.advertise-v2', default=False,
631 631 )
632 632 coreconfigitem(
633 633 b'experimental', b'httppeer.v2-encoder-order', default=None,
634 634 )
635 635 coreconfigitem(
636 636 b'experimental', b'httppostargs', default=False,
637 637 )
638 638 coreconfigitem(
639 639 b'experimental', b'mergedriver', default=None,
640 640 )
641 641 coreconfigitem(b'experimental', b'nointerrupt', default=False)
642 642 coreconfigitem(b'experimental', b'nointerrupt-interactiveonly', default=True)
643 643
644 644 coreconfigitem(
645 645 b'experimental', b'obsmarkers-exchange-debug', default=False,
646 646 )
647 647 coreconfigitem(
648 648 b'experimental', b'remotenames', default=False,
649 649 )
650 650 coreconfigitem(
651 651 b'experimental', b'removeemptydirs', default=True,
652 652 )
653 653 coreconfigitem(
654 654 b'experimental', b'revert.interactive.select-to-keep', default=False,
655 655 )
656 656 coreconfigitem(
657 657 b'experimental', b'revisions.prefixhexnode', default=False,
658 658 )
659 659 coreconfigitem(
660 660 b'experimental', b'revlogv2', default=None,
661 661 )
662 662 coreconfigitem(
663 663 b'experimental', b'revisions.disambiguatewithin', default=None,
664 664 )
665 665 coreconfigitem(
666 666 b'experimental', b'rust.index', default=False,
667 667 )
668 668 coreconfigitem(
669 669 b'experimental', b'server.filesdata.recommended-batch-size', default=50000,
670 670 )
671 671 coreconfigitem(
672 672 b'experimental',
673 673 b'server.manifestdata.recommended-batch-size',
674 674 default=100000,
675 675 )
676 676 coreconfigitem(
677 677 b'experimental', b'server.stream-narrow-clones', default=False,
678 678 )
679 679 coreconfigitem(
680 680 b'experimental', b'single-head-per-branch', default=False,
681 681 )
682 682 coreconfigitem(
683 683 b'experimental',
684 684 b'single-head-per-branch:account-closed-heads',
685 685 default=False,
686 686 )
687 687 coreconfigitem(
688 688 b'experimental', b'sshserver.support-v2', default=False,
689 689 )
690 690 coreconfigitem(
691 691 b'experimental', b'sparse-read', default=False,
692 692 )
693 693 coreconfigitem(
694 694 b'experimental', b'sparse-read.density-threshold', default=0.50,
695 695 )
696 696 coreconfigitem(
697 697 b'experimental', b'sparse-read.min-gap-size', default=b'65K',
698 698 )
699 699 coreconfigitem(
700 700 b'experimental', b'treemanifest', default=False,
701 701 )
702 702 coreconfigitem(
703 703 b'experimental', b'update.atomic-file', default=False,
704 704 )
705 705 coreconfigitem(
706 706 b'experimental', b'sshpeer.advertise-v2', default=False,
707 707 )
708 708 coreconfigitem(
709 709 b'experimental', b'web.apiserver', default=False,
710 710 )
711 711 coreconfigitem(
712 712 b'experimental', b'web.api.http-v2', default=False,
713 713 )
714 714 coreconfigitem(
715 715 b'experimental', b'web.api.debugreflect', default=False,
716 716 )
717 717 coreconfigitem(
718 718 b'experimental', b'worker.wdir-get-thread-safe', default=False,
719 719 )
720 720 coreconfigitem(
721 721 b'experimental', b'worker.repository-upgrade', default=False,
722 722 )
723 723 coreconfigitem(
724 724 b'experimental', b'xdiff', default=False,
725 725 )
726 726 coreconfigitem(
727 727 b'extensions', b'.*', default=None, generic=True,
728 728 )
729 729 coreconfigitem(
730 730 b'extdata', b'.*', default=None, generic=True,
731 731 )
732 732 coreconfigitem(
733 733 b'format', b'bookmarks-in-store', default=False,
734 734 )
735 735 coreconfigitem(
736 736 b'format', b'chunkcachesize', default=None, experimental=True,
737 737 )
738 738 coreconfigitem(
739 739 b'format', b'dotencode', default=True,
740 740 )
741 741 coreconfigitem(
742 742 b'format', b'generaldelta', default=False, experimental=True,
743 743 )
744 744 coreconfigitem(
745 745 b'format', b'manifestcachesize', default=None, experimental=True,
746 746 )
747 747 coreconfigitem(
748 748 b'format', b'maxchainlen', default=dynamicdefault, experimental=True,
749 749 )
750 750 coreconfigitem(
751 751 b'format', b'obsstore-version', default=None,
752 752 )
753 753 coreconfigitem(
754 754 b'format', b'sparse-revlog', default=True,
755 755 )
756 756 coreconfigitem(
757 757 b'format',
758 758 b'revlog-compression',
759 759 default=lambda: [b'zlib'],
760 760 alias=[(b'experimental', b'format.compression')],
761 761 )
762 762 coreconfigitem(
763 763 b'format', b'usefncache', default=True,
764 764 )
765 765 coreconfigitem(
766 766 b'format', b'usegeneraldelta', default=True,
767 767 )
768 768 coreconfigitem(
769 769 b'format', b'usestore', default=True,
770 770 )
771 771 # Right now, the only efficient implement of the nodemap logic is in Rust, so
772 772 # the persistent nodemap feature needs to stay experimental as long as the Rust
773 773 # extensions are an experimental feature.
774 774 coreconfigitem(
775 775 b'format', b'use-persistent-nodemap', default=False, experimental=True
776 776 )
777 777 coreconfigitem(
778 778 b'format',
779 779 b'exp-use-copies-side-data-changeset',
780 780 default=False,
781 781 experimental=True,
782 782 )
783 783 coreconfigitem(
784 784 b'format', b'exp-use-side-data', default=False, experimental=True,
785 785 )
786 786 coreconfigitem(
787 787 b'format', b'internal-phase', default=False, experimental=True,
788 788 )
789 789 coreconfigitem(
790 790 b'fsmonitor', b'warn_when_unused', default=True,
791 791 )
792 792 coreconfigitem(
793 793 b'fsmonitor', b'warn_update_file_count', default=50000,
794 794 )
795 795 coreconfigitem(
796 796 b'help', br'hidden-command\..*', default=False, generic=True,
797 797 )
798 798 coreconfigitem(
799 799 b'help', br'hidden-topic\..*', default=False, generic=True,
800 800 )
801 801 coreconfigitem(
802 802 b'hooks', b'.*', default=dynamicdefault, generic=True,
803 803 )
804 804 coreconfigitem(
805 805 b'hgweb-paths', b'.*', default=list, generic=True,
806 806 )
807 807 coreconfigitem(
808 808 b'hostfingerprints', b'.*', default=list, generic=True,
809 809 )
810 810 coreconfigitem(
811 811 b'hostsecurity', b'ciphers', default=None,
812 812 )
813 813 coreconfigitem(
814 814 b'hostsecurity', b'minimumprotocol', default=dynamicdefault,
815 815 )
816 816 coreconfigitem(
817 817 b'hostsecurity',
818 818 b'.*:minimumprotocol$',
819 819 default=dynamicdefault,
820 820 generic=True,
821 821 )
822 822 coreconfigitem(
823 823 b'hostsecurity', b'.*:ciphers$', default=dynamicdefault, generic=True,
824 824 )
825 825 coreconfigitem(
826 826 b'hostsecurity', b'.*:fingerprints$', default=list, generic=True,
827 827 )
828 828 coreconfigitem(
829 829 b'hostsecurity', b'.*:verifycertsfile$', default=None, generic=True,
830 830 )
831 831
832 832 coreconfigitem(
833 833 b'http_proxy', b'always', default=False,
834 834 )
835 835 coreconfigitem(
836 836 b'http_proxy', b'host', default=None,
837 837 )
838 838 coreconfigitem(
839 839 b'http_proxy', b'no', default=list,
840 840 )
841 841 coreconfigitem(
842 842 b'http_proxy', b'passwd', default=None,
843 843 )
844 844 coreconfigitem(
845 845 b'http_proxy', b'user', default=None,
846 846 )
847 847
848 848 coreconfigitem(
849 849 b'http', b'timeout', default=None,
850 850 )
851 851
852 852 coreconfigitem(
853 853 b'logtoprocess', b'commandexception', default=None,
854 854 )
855 855 coreconfigitem(
856 856 b'logtoprocess', b'commandfinish', default=None,
857 857 )
858 858 coreconfigitem(
859 859 b'logtoprocess', b'command', default=None,
860 860 )
861 861 coreconfigitem(
862 862 b'logtoprocess', b'develwarn', default=None,
863 863 )
864 864 coreconfigitem(
865 865 b'logtoprocess', b'uiblocked', default=None,
866 866 )
867 867 coreconfigitem(
868 868 b'merge', b'checkunknown', default=b'abort',
869 869 )
870 870 coreconfigitem(
871 871 b'merge', b'checkignored', default=b'abort',
872 872 )
873 873 coreconfigitem(
874 874 b'experimental', b'merge.checkpathconflicts', default=False,
875 875 )
876 876 coreconfigitem(
877 877 b'merge', b'followcopies', default=True,
878 878 )
879 879 coreconfigitem(
880 880 b'merge', b'on-failure', default=b'continue',
881 881 )
882 882 coreconfigitem(
883 883 b'merge', b'preferancestor', default=lambda: [b'*'], experimental=True,
884 884 )
885 885 coreconfigitem(
886 886 b'merge', b'strict-capability-check', default=False,
887 887 )
888 888 coreconfigitem(
889 889 b'merge-tools', b'.*', default=None, generic=True,
890 890 )
891 891 coreconfigitem(
892 892 b'merge-tools',
893 893 br'.*\.args$',
894 894 default=b"$local $base $other",
895 895 generic=True,
896 896 priority=-1,
897 897 )
898 898 coreconfigitem(
899 899 b'merge-tools', br'.*\.binary$', default=False, generic=True, priority=-1,
900 900 )
901 901 coreconfigitem(
902 902 b'merge-tools', br'.*\.check$', default=list, generic=True, priority=-1,
903 903 )
904 904 coreconfigitem(
905 905 b'merge-tools',
906 906 br'.*\.checkchanged$',
907 907 default=False,
908 908 generic=True,
909 909 priority=-1,
910 910 )
911 911 coreconfigitem(
912 912 b'merge-tools',
913 913 br'.*\.executable$',
914 914 default=dynamicdefault,
915 915 generic=True,
916 916 priority=-1,
917 917 )
918 918 coreconfigitem(
919 919 b'merge-tools', br'.*\.fixeol$', default=False, generic=True, priority=-1,
920 920 )
921 921 coreconfigitem(
922 922 b'merge-tools', br'.*\.gui$', default=False, generic=True, priority=-1,
923 923 )
924 924 coreconfigitem(
925 925 b'merge-tools',
926 926 br'.*\.mergemarkers$',
927 927 default=b'basic',
928 928 generic=True,
929 929 priority=-1,
930 930 )
931 931 coreconfigitem(
932 932 b'merge-tools',
933 933 br'.*\.mergemarkertemplate$',
934 934 default=dynamicdefault, # take from ui.mergemarkertemplate
935 935 generic=True,
936 936 priority=-1,
937 937 )
938 938 coreconfigitem(
939 939 b'merge-tools', br'.*\.priority$', default=0, generic=True, priority=-1,
940 940 )
941 941 coreconfigitem(
942 942 b'merge-tools',
943 943 br'.*\.premerge$',
944 944 default=dynamicdefault,
945 945 generic=True,
946 946 priority=-1,
947 947 )
948 948 coreconfigitem(
949 949 b'merge-tools', br'.*\.symlink$', default=False, generic=True, priority=-1,
950 950 )
951 951 coreconfigitem(
952 952 b'pager', b'attend-.*', default=dynamicdefault, generic=True,
953 953 )
954 954 coreconfigitem(
955 955 b'pager', b'ignore', default=list,
956 956 )
957 957 coreconfigitem(
958 958 b'pager', b'pager', default=dynamicdefault,
959 959 )
960 960 coreconfigitem(
961 961 b'patch', b'eol', default=b'strict',
962 962 )
963 963 coreconfigitem(
964 964 b'patch', b'fuzz', default=2,
965 965 )
966 966 coreconfigitem(
967 967 b'paths', b'default', default=None,
968 968 )
969 969 coreconfigitem(
970 970 b'paths', b'default-push', default=None,
971 971 )
972 972 coreconfigitem(
973 973 b'paths', b'.*', default=None, generic=True,
974 974 )
975 975 coreconfigitem(
976 976 b'phases', b'checksubrepos', default=b'follow',
977 977 )
978 978 coreconfigitem(
979 979 b'phases', b'new-commit', default=b'draft',
980 980 )
981 981 coreconfigitem(
982 982 b'phases', b'publish', default=True,
983 983 )
984 984 coreconfigitem(
985 985 b'profiling', b'enabled', default=False,
986 986 )
987 987 coreconfigitem(
988 988 b'profiling', b'format', default=b'text',
989 989 )
990 990 coreconfigitem(
991 991 b'profiling', b'freq', default=1000,
992 992 )
993 993 coreconfigitem(
994 994 b'profiling', b'limit', default=30,
995 995 )
996 996 coreconfigitem(
997 997 b'profiling', b'nested', default=0,
998 998 )
999 999 coreconfigitem(
1000 1000 b'profiling', b'output', default=None,
1001 1001 )
1002 1002 coreconfigitem(
1003 1003 b'profiling', b'showmax', default=0.999,
1004 1004 )
1005 1005 coreconfigitem(
1006 1006 b'profiling', b'showmin', default=dynamicdefault,
1007 1007 )
1008 1008 coreconfigitem(
1009 1009 b'profiling', b'showtime', default=True,
1010 1010 )
1011 1011 coreconfigitem(
1012 1012 b'profiling', b'sort', default=b'inlinetime',
1013 1013 )
1014 1014 coreconfigitem(
1015 1015 b'profiling', b'statformat', default=b'hotpath',
1016 1016 )
1017 1017 coreconfigitem(
1018 1018 b'profiling', b'time-track', default=dynamicdefault,
1019 1019 )
1020 1020 coreconfigitem(
1021 1021 b'profiling', b'type', default=b'stat',
1022 1022 )
1023 1023 coreconfigitem(
1024 1024 b'progress', b'assume-tty', default=False,
1025 1025 )
1026 1026 coreconfigitem(
1027 1027 b'progress', b'changedelay', default=1,
1028 1028 )
1029 1029 coreconfigitem(
1030 1030 b'progress', b'clear-complete', default=True,
1031 1031 )
1032 1032 coreconfigitem(
1033 1033 b'progress', b'debug', default=False,
1034 1034 )
1035 1035 coreconfigitem(
1036 1036 b'progress', b'delay', default=3,
1037 1037 )
1038 1038 coreconfigitem(
1039 1039 b'progress', b'disable', default=False,
1040 1040 )
1041 1041 coreconfigitem(
1042 1042 b'progress', b'estimateinterval', default=60.0,
1043 1043 )
1044 1044 coreconfigitem(
1045 1045 b'progress',
1046 1046 b'format',
1047 1047 default=lambda: [b'topic', b'bar', b'number', b'estimate'],
1048 1048 )
1049 1049 coreconfigitem(
1050 1050 b'progress', b'refresh', default=0.1,
1051 1051 )
1052 1052 coreconfigitem(
1053 1053 b'progress', b'width', default=dynamicdefault,
1054 1054 )
1055 1055 coreconfigitem(
1056 1056 b'pull', b'confirm', default=False,
1057 1057 )
1058 1058 coreconfigitem(
1059 1059 b'push', b'pushvars.server', default=False,
1060 1060 )
1061 1061 coreconfigitem(
1062 1062 b'rewrite',
1063 1063 b'backup-bundle',
1064 1064 default=True,
1065 1065 alias=[(b'ui', b'history-editing-backup')],
1066 1066 )
1067 1067 coreconfigitem(
1068 1068 b'rewrite', b'update-timestamp', default=False,
1069 1069 )
1070 1070 coreconfigitem(
1071 b'rewrite', b'empty-successor', default=b'skip', experimental=True,
1072 )
1073 coreconfigitem(
1071 1074 b'storage', b'new-repo-backend', default=b'revlogv1', experimental=True,
1072 1075 )
1073 1076 coreconfigitem(
1074 1077 b'storage',
1075 1078 b'revlog.optimize-delta-parent-choice',
1076 1079 default=True,
1077 1080 alias=[(b'format', b'aggressivemergedeltas')],
1078 1081 )
1079 1082 # experimental as long as rust is experimental (or a C version is implemented)
1080 1083 coreconfigitem(
1081 1084 b'storage', b'revlog.nodemap.mmap', default=True, experimental=True
1082 1085 )
1083 1086 # experimental as long as format.use-persistent-nodemap is.
1084 1087 coreconfigitem(
1085 1088 b'storage', b'revlog.nodemap.mode', default=b'compat', experimental=True
1086 1089 )
1087 1090 coreconfigitem(
1088 1091 b'storage', b'revlog.reuse-external-delta', default=True,
1089 1092 )
1090 1093 coreconfigitem(
1091 1094 b'storage', b'revlog.reuse-external-delta-parent', default=None,
1092 1095 )
1093 1096 coreconfigitem(
1094 1097 b'storage', b'revlog.zlib.level', default=None,
1095 1098 )
1096 1099 coreconfigitem(
1097 1100 b'storage', b'revlog.zstd.level', default=None,
1098 1101 )
1099 1102 coreconfigitem(
1100 1103 b'server', b'bookmarks-pushkey-compat', default=True,
1101 1104 )
1102 1105 coreconfigitem(
1103 1106 b'server', b'bundle1', default=True,
1104 1107 )
1105 1108 coreconfigitem(
1106 1109 b'server', b'bundle1gd', default=None,
1107 1110 )
1108 1111 coreconfigitem(
1109 1112 b'server', b'bundle1.pull', default=None,
1110 1113 )
1111 1114 coreconfigitem(
1112 1115 b'server', b'bundle1gd.pull', default=None,
1113 1116 )
1114 1117 coreconfigitem(
1115 1118 b'server', b'bundle1.push', default=None,
1116 1119 )
1117 1120 coreconfigitem(
1118 1121 b'server', b'bundle1gd.push', default=None,
1119 1122 )
1120 1123 coreconfigitem(
1121 1124 b'server',
1122 1125 b'bundle2.stream',
1123 1126 default=True,
1124 1127 alias=[(b'experimental', b'bundle2.stream')],
1125 1128 )
1126 1129 coreconfigitem(
1127 1130 b'server', b'compressionengines', default=list,
1128 1131 )
1129 1132 coreconfigitem(
1130 1133 b'server', b'concurrent-push-mode', default=b'check-related',
1131 1134 )
1132 1135 coreconfigitem(
1133 1136 b'server', b'disablefullbundle', default=False,
1134 1137 )
1135 1138 coreconfigitem(
1136 1139 b'server', b'maxhttpheaderlen', default=1024,
1137 1140 )
1138 1141 coreconfigitem(
1139 1142 b'server', b'pullbundle', default=False,
1140 1143 )
1141 1144 coreconfigitem(
1142 1145 b'server', b'preferuncompressed', default=False,
1143 1146 )
1144 1147 coreconfigitem(
1145 1148 b'server', b'streamunbundle', default=False,
1146 1149 )
1147 1150 coreconfigitem(
1148 1151 b'server', b'uncompressed', default=True,
1149 1152 )
1150 1153 coreconfigitem(
1151 1154 b'server', b'uncompressedallowsecret', default=False,
1152 1155 )
1153 1156 coreconfigitem(
1154 1157 b'server', b'view', default=b'served',
1155 1158 )
1156 1159 coreconfigitem(
1157 1160 b'server', b'validate', default=False,
1158 1161 )
1159 1162 coreconfigitem(
1160 1163 b'server', b'zliblevel', default=-1,
1161 1164 )
1162 1165 coreconfigitem(
1163 1166 b'server', b'zstdlevel', default=3,
1164 1167 )
1165 1168 coreconfigitem(
1166 1169 b'share', b'pool', default=None,
1167 1170 )
1168 1171 coreconfigitem(
1169 1172 b'share', b'poolnaming', default=b'identity',
1170 1173 )
1171 1174 coreconfigitem(
1172 1175 b'shelve', b'maxbackups', default=10,
1173 1176 )
1174 1177 coreconfigitem(
1175 1178 b'smtp', b'host', default=None,
1176 1179 )
1177 1180 coreconfigitem(
1178 1181 b'smtp', b'local_hostname', default=None,
1179 1182 )
1180 1183 coreconfigitem(
1181 1184 b'smtp', b'password', default=None,
1182 1185 )
1183 1186 coreconfigitem(
1184 1187 b'smtp', b'port', default=dynamicdefault,
1185 1188 )
1186 1189 coreconfigitem(
1187 1190 b'smtp', b'tls', default=b'none',
1188 1191 )
1189 1192 coreconfigitem(
1190 1193 b'smtp', b'username', default=None,
1191 1194 )
1192 1195 coreconfigitem(
1193 1196 b'sparse', b'missingwarning', default=True, experimental=True,
1194 1197 )
1195 1198 coreconfigitem(
1196 1199 b'subrepos',
1197 1200 b'allowed',
1198 1201 default=dynamicdefault, # to make backporting simpler
1199 1202 )
1200 1203 coreconfigitem(
1201 1204 b'subrepos', b'hg:allowed', default=dynamicdefault,
1202 1205 )
1203 1206 coreconfigitem(
1204 1207 b'subrepos', b'git:allowed', default=dynamicdefault,
1205 1208 )
1206 1209 coreconfigitem(
1207 1210 b'subrepos', b'svn:allowed', default=dynamicdefault,
1208 1211 )
1209 1212 coreconfigitem(
1210 1213 b'templates', b'.*', default=None, generic=True,
1211 1214 )
1212 1215 coreconfigitem(
1213 1216 b'templateconfig', b'.*', default=dynamicdefault, generic=True,
1214 1217 )
1215 1218 coreconfigitem(
1216 1219 b'trusted', b'groups', default=list,
1217 1220 )
1218 1221 coreconfigitem(
1219 1222 b'trusted', b'users', default=list,
1220 1223 )
1221 1224 coreconfigitem(
1222 1225 b'ui', b'_usedassubrepo', default=False,
1223 1226 )
1224 1227 coreconfigitem(
1225 1228 b'ui', b'allowemptycommit', default=False,
1226 1229 )
1227 1230 coreconfigitem(
1228 1231 b'ui', b'archivemeta', default=True,
1229 1232 )
1230 1233 coreconfigitem(
1231 1234 b'ui', b'askusername', default=False,
1232 1235 )
1233 1236 coreconfigitem(
1234 1237 b'ui', b'available-memory', default=None,
1235 1238 )
1236 1239
1237 1240 coreconfigitem(
1238 1241 b'ui', b'clonebundlefallback', default=False,
1239 1242 )
1240 1243 coreconfigitem(
1241 1244 b'ui', b'clonebundleprefers', default=list,
1242 1245 )
1243 1246 coreconfigitem(
1244 1247 b'ui', b'clonebundles', default=True,
1245 1248 )
1246 1249 coreconfigitem(
1247 1250 b'ui', b'color', default=b'auto',
1248 1251 )
1249 1252 coreconfigitem(
1250 1253 b'ui', b'commitsubrepos', default=False,
1251 1254 )
1252 1255 coreconfigitem(
1253 1256 b'ui', b'debug', default=False,
1254 1257 )
1255 1258 coreconfigitem(
1256 1259 b'ui', b'debugger', default=None,
1257 1260 )
1258 1261 coreconfigitem(
1259 1262 b'ui', b'editor', default=dynamicdefault,
1260 1263 )
1261 1264 coreconfigitem(
1262 1265 b'ui', b'fallbackencoding', default=None,
1263 1266 )
1264 1267 coreconfigitem(
1265 1268 b'ui', b'forcecwd', default=None,
1266 1269 )
1267 1270 coreconfigitem(
1268 1271 b'ui', b'forcemerge', default=None,
1269 1272 )
1270 1273 coreconfigitem(
1271 1274 b'ui', b'formatdebug', default=False,
1272 1275 )
1273 1276 coreconfigitem(
1274 1277 b'ui', b'formatjson', default=False,
1275 1278 )
1276 1279 coreconfigitem(
1277 1280 b'ui', b'formatted', default=None,
1278 1281 )
1279 1282 coreconfigitem(
1280 1283 b'ui', b'graphnodetemplate', default=None,
1281 1284 )
1282 1285 coreconfigitem(
1283 1286 b'ui', b'interactive', default=None,
1284 1287 )
1285 1288 coreconfigitem(
1286 1289 b'ui', b'interface', default=None,
1287 1290 )
1288 1291 coreconfigitem(
1289 1292 b'ui', b'interface.chunkselector', default=None,
1290 1293 )
1291 1294 coreconfigitem(
1292 1295 b'ui', b'large-file-limit', default=10000000,
1293 1296 )
1294 1297 coreconfigitem(
1295 1298 b'ui', b'logblockedtimes', default=False,
1296 1299 )
1297 1300 coreconfigitem(
1298 1301 b'ui', b'logtemplate', default=None,
1299 1302 )
1300 1303 coreconfigitem(
1301 1304 b'ui', b'merge', default=None,
1302 1305 )
1303 1306 coreconfigitem(
1304 1307 b'ui', b'mergemarkers', default=b'basic',
1305 1308 )
1306 1309 coreconfigitem(
1307 1310 b'ui',
1308 1311 b'mergemarkertemplate',
1309 1312 default=(
1310 1313 b'{node|short} '
1311 1314 b'{ifeq(tags, "tip", "", '
1312 1315 b'ifeq(tags, "", "", "{tags} "))}'
1313 1316 b'{if(bookmarks, "{bookmarks} ")}'
1314 1317 b'{ifeq(branch, "default", "", "{branch} ")}'
1315 1318 b'- {author|user}: {desc|firstline}'
1316 1319 ),
1317 1320 )
1318 1321 coreconfigitem(
1319 1322 b'ui', b'message-output', default=b'stdio',
1320 1323 )
1321 1324 coreconfigitem(
1322 1325 b'ui', b'nontty', default=False,
1323 1326 )
1324 1327 coreconfigitem(
1325 1328 b'ui', b'origbackuppath', default=None,
1326 1329 )
1327 1330 coreconfigitem(
1328 1331 b'ui', b'paginate', default=True,
1329 1332 )
1330 1333 coreconfigitem(
1331 1334 b'ui', b'patch', default=None,
1332 1335 )
1333 1336 coreconfigitem(
1334 1337 b'ui', b'pre-merge-tool-output-template', default=None,
1335 1338 )
1336 1339 coreconfigitem(
1337 1340 b'ui', b'portablefilenames', default=b'warn',
1338 1341 )
1339 1342 coreconfigitem(
1340 1343 b'ui', b'promptecho', default=False,
1341 1344 )
1342 1345 coreconfigitem(
1343 1346 b'ui', b'quiet', default=False,
1344 1347 )
1345 1348 coreconfigitem(
1346 1349 b'ui', b'quietbookmarkmove', default=False,
1347 1350 )
1348 1351 coreconfigitem(
1349 1352 b'ui', b'relative-paths', default=b'legacy',
1350 1353 )
1351 1354 coreconfigitem(
1352 1355 b'ui', b'remotecmd', default=b'hg',
1353 1356 )
1354 1357 coreconfigitem(
1355 1358 b'ui', b'report_untrusted', default=True,
1356 1359 )
1357 1360 coreconfigitem(
1358 1361 b'ui', b'rollback', default=True,
1359 1362 )
1360 1363 coreconfigitem(
1361 1364 b'ui', b'signal-safe-lock', default=True,
1362 1365 )
1363 1366 coreconfigitem(
1364 1367 b'ui', b'slash', default=False,
1365 1368 )
1366 1369 coreconfigitem(
1367 1370 b'ui', b'ssh', default=b'ssh',
1368 1371 )
1369 1372 coreconfigitem(
1370 1373 b'ui', b'ssherrorhint', default=None,
1371 1374 )
1372 1375 coreconfigitem(
1373 1376 b'ui', b'statuscopies', default=False,
1374 1377 )
1375 1378 coreconfigitem(
1376 1379 b'ui', b'strict', default=False,
1377 1380 )
1378 1381 coreconfigitem(
1379 1382 b'ui', b'style', default=b'',
1380 1383 )
1381 1384 coreconfigitem(
1382 1385 b'ui', b'supportcontact', default=None,
1383 1386 )
1384 1387 coreconfigitem(
1385 1388 b'ui', b'textwidth', default=78,
1386 1389 )
1387 1390 coreconfigitem(
1388 1391 b'ui', b'timeout', default=b'600',
1389 1392 )
1390 1393 coreconfigitem(
1391 1394 b'ui', b'timeout.warn', default=0,
1392 1395 )
1393 1396 coreconfigitem(
1394 1397 b'ui', b'timestamp-output', default=False,
1395 1398 )
1396 1399 coreconfigitem(
1397 1400 b'ui', b'traceback', default=False,
1398 1401 )
1399 1402 coreconfigitem(
1400 1403 b'ui', b'tweakdefaults', default=False,
1401 1404 )
1402 1405 coreconfigitem(b'ui', b'username', alias=[(b'ui', b'user')])
1403 1406 coreconfigitem(
1404 1407 b'ui', b'verbose', default=False,
1405 1408 )
1406 1409 coreconfigitem(
1407 1410 b'verify', b'skipflags', default=None,
1408 1411 )
1409 1412 coreconfigitem(
1410 1413 b'web', b'allowbz2', default=False,
1411 1414 )
1412 1415 coreconfigitem(
1413 1416 b'web', b'allowgz', default=False,
1414 1417 )
1415 1418 coreconfigitem(
1416 1419 b'web', b'allow-pull', alias=[(b'web', b'allowpull')], default=True,
1417 1420 )
1418 1421 coreconfigitem(
1419 1422 b'web', b'allow-push', alias=[(b'web', b'allow_push')], default=list,
1420 1423 )
1421 1424 coreconfigitem(
1422 1425 b'web', b'allowzip', default=False,
1423 1426 )
1424 1427 coreconfigitem(
1425 1428 b'web', b'archivesubrepos', default=False,
1426 1429 )
1427 1430 coreconfigitem(
1428 1431 b'web', b'cache', default=True,
1429 1432 )
1430 1433 coreconfigitem(
1431 1434 b'web', b'comparisoncontext', default=5,
1432 1435 )
1433 1436 coreconfigitem(
1434 1437 b'web', b'contact', default=None,
1435 1438 )
1436 1439 coreconfigitem(
1437 1440 b'web', b'deny_push', default=list,
1438 1441 )
1439 1442 coreconfigitem(
1440 1443 b'web', b'guessmime', default=False,
1441 1444 )
1442 1445 coreconfigitem(
1443 1446 b'web', b'hidden', default=False,
1444 1447 )
1445 1448 coreconfigitem(
1446 1449 b'web', b'labels', default=list,
1447 1450 )
1448 1451 coreconfigitem(
1449 1452 b'web', b'logoimg', default=b'hglogo.png',
1450 1453 )
1451 1454 coreconfigitem(
1452 1455 b'web', b'logourl', default=b'https://mercurial-scm.org/',
1453 1456 )
1454 1457 coreconfigitem(
1455 1458 b'web', b'accesslog', default=b'-',
1456 1459 )
1457 1460 coreconfigitem(
1458 1461 b'web', b'address', default=b'',
1459 1462 )
1460 1463 coreconfigitem(
1461 1464 b'web', b'allow-archive', alias=[(b'web', b'allow_archive')], default=list,
1462 1465 )
1463 1466 coreconfigitem(
1464 1467 b'web', b'allow_read', default=list,
1465 1468 )
1466 1469 coreconfigitem(
1467 1470 b'web', b'baseurl', default=None,
1468 1471 )
1469 1472 coreconfigitem(
1470 1473 b'web', b'cacerts', default=None,
1471 1474 )
1472 1475 coreconfigitem(
1473 1476 b'web', b'certificate', default=None,
1474 1477 )
1475 1478 coreconfigitem(
1476 1479 b'web', b'collapse', default=False,
1477 1480 )
1478 1481 coreconfigitem(
1479 1482 b'web', b'csp', default=None,
1480 1483 )
1481 1484 coreconfigitem(
1482 1485 b'web', b'deny_read', default=list,
1483 1486 )
1484 1487 coreconfigitem(
1485 1488 b'web', b'descend', default=True,
1486 1489 )
1487 1490 coreconfigitem(
1488 1491 b'web', b'description', default=b"",
1489 1492 )
1490 1493 coreconfigitem(
1491 1494 b'web', b'encoding', default=lambda: encoding.encoding,
1492 1495 )
1493 1496 coreconfigitem(
1494 1497 b'web', b'errorlog', default=b'-',
1495 1498 )
1496 1499 coreconfigitem(
1497 1500 b'web', b'ipv6', default=False,
1498 1501 )
1499 1502 coreconfigitem(
1500 1503 b'web', b'maxchanges', default=10,
1501 1504 )
1502 1505 coreconfigitem(
1503 1506 b'web', b'maxfiles', default=10,
1504 1507 )
1505 1508 coreconfigitem(
1506 1509 b'web', b'maxshortchanges', default=60,
1507 1510 )
1508 1511 coreconfigitem(
1509 1512 b'web', b'motd', default=b'',
1510 1513 )
1511 1514 coreconfigitem(
1512 1515 b'web', b'name', default=dynamicdefault,
1513 1516 )
1514 1517 coreconfigitem(
1515 1518 b'web', b'port', default=8000,
1516 1519 )
1517 1520 coreconfigitem(
1518 1521 b'web', b'prefix', default=b'',
1519 1522 )
1520 1523 coreconfigitem(
1521 1524 b'web', b'push_ssl', default=True,
1522 1525 )
1523 1526 coreconfigitem(
1524 1527 b'web', b'refreshinterval', default=20,
1525 1528 )
1526 1529 coreconfigitem(
1527 1530 b'web', b'server-header', default=None,
1528 1531 )
1529 1532 coreconfigitem(
1530 1533 b'web', b'static', default=None,
1531 1534 )
1532 1535 coreconfigitem(
1533 1536 b'web', b'staticurl', default=None,
1534 1537 )
1535 1538 coreconfigitem(
1536 1539 b'web', b'stripes', default=1,
1537 1540 )
1538 1541 coreconfigitem(
1539 1542 b'web', b'style', default=b'paper',
1540 1543 )
1541 1544 coreconfigitem(
1542 1545 b'web', b'templates', default=None,
1543 1546 )
1544 1547 coreconfigitem(
1545 1548 b'web', b'view', default=b'served', experimental=True,
1546 1549 )
1547 1550 coreconfigitem(
1548 1551 b'worker', b'backgroundclose', default=dynamicdefault,
1549 1552 )
1550 1553 # Windows defaults to a limit of 512 open files. A buffer of 128
1551 1554 # should give us enough headway.
1552 1555 coreconfigitem(
1553 1556 b'worker', b'backgroundclosemaxqueue', default=384,
1554 1557 )
1555 1558 coreconfigitem(
1556 1559 b'worker', b'backgroundcloseminfilecount', default=2048,
1557 1560 )
1558 1561 coreconfigitem(
1559 1562 b'worker', b'backgroundclosethreadcount', default=4,
1560 1563 )
1561 1564 coreconfigitem(
1562 1565 b'worker', b'enabled', default=True,
1563 1566 )
1564 1567 coreconfigitem(
1565 1568 b'worker', b'numcpus', default=None,
1566 1569 )
1567 1570
1568 1571 # Rebase related configuration moved to core because other extension are doing
1569 1572 # strange things. For example, shelve import the extensions to reuse some bit
1570 1573 # without formally loading it.
1571 1574 coreconfigitem(
1572 1575 b'commands', b'rebase.requiredest', default=False,
1573 1576 )
1574 1577 coreconfigitem(
1575 1578 b'experimental', b'rebaseskipobsolete', default=True,
1576 1579 )
1577 1580 coreconfigitem(
1578 1581 b'rebase', b'singletransaction', default=False,
1579 1582 )
1580 1583 coreconfigitem(
1581 1584 b'rebase', b'experimental.inmemory', default=False,
1582 1585 )
@@ -1,2898 +1,2906 b''
1 1 The Mercurial system uses a set of configuration files to control
2 2 aspects of its behavior.
3 3
4 4 Troubleshooting
5 5 ===============
6 6
7 7 If you're having problems with your configuration,
8 8 :hg:`config --debug` can help you understand what is introducing
9 9 a setting into your environment.
10 10
11 11 See :hg:`help config.syntax` and :hg:`help config.files`
12 12 for information about how and where to override things.
13 13
14 14 Structure
15 15 =========
16 16
17 17 The configuration files use a simple ini-file format. A configuration
18 18 file consists of sections, led by a ``[section]`` header and followed
19 19 by ``name = value`` entries::
20 20
21 21 [ui]
22 22 username = Firstname Lastname <firstname.lastname@example.net>
23 23 verbose = True
24 24
25 25 The above entries will be referred to as ``ui.username`` and
26 26 ``ui.verbose``, respectively. See :hg:`help config.syntax`.
27 27
28 28 Files
29 29 =====
30 30
31 31 Mercurial reads configuration data from several files, if they exist.
32 32 These files do not exist by default and you will have to create the
33 33 appropriate configuration files yourself:
34 34
35 35 Local configuration is put into the per-repository ``<repo>/.hg/hgrc`` file.
36 36
37 37 Global configuration like the username setting is typically put into:
38 38
39 39 .. container:: windows
40 40
41 41 - ``%USERPROFILE%\mercurial.ini`` (on Windows)
42 42
43 43 .. container:: unix.plan9
44 44
45 45 - ``$HOME/.hgrc`` (on Unix, Plan9)
46 46
47 47 The names of these files depend on the system on which Mercurial is
48 48 installed. ``*.rc`` files from a single directory are read in
49 49 alphabetical order, later ones overriding earlier ones. Where multiple
50 50 paths are given below, settings from earlier paths override later
51 51 ones.
52 52
53 53 .. container:: verbose.unix
54 54
55 55 On Unix, the following files are consulted:
56 56
57 57 - ``<repo>/.hg/hgrc`` (per-repository)
58 58 - ``$HOME/.hgrc`` (per-user)
59 59 - ``${XDG_CONFIG_HOME:-$HOME/.config}/hg/hgrc`` (per-user)
60 60 - ``<install-root>/etc/mercurial/hgrc`` (per-installation)
61 61 - ``<install-root>/etc/mercurial/hgrc.d/*.rc`` (per-installation)
62 62 - ``/etc/mercurial/hgrc`` (per-system)
63 63 - ``/etc/mercurial/hgrc.d/*.rc`` (per-system)
64 64 - ``<internal>/*.rc`` (defaults)
65 65
66 66 .. container:: verbose.windows
67 67
68 68 On Windows, the following files are consulted:
69 69
70 70 - ``<repo>/.hg/hgrc`` (per-repository)
71 71 - ``%USERPROFILE%\.hgrc`` (per-user)
72 72 - ``%USERPROFILE%\Mercurial.ini`` (per-user)
73 73 - ``%HOME%\.hgrc`` (per-user)
74 74 - ``%HOME%\Mercurial.ini`` (per-user)
75 75 - ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` (per-system)
76 76 - ``<install-dir>\hgrc.d\*.rc`` (per-installation)
77 77 - ``<install-dir>\Mercurial.ini`` (per-installation)
78 78 - ``%PROGRAMDATA%\Mercurial\hgrc`` (per-system)
79 79 - ``%PROGRAMDATA%\Mercurial\Mercurial.ini`` (per-system)
80 80 - ``%PROGRAMDATA%\Mercurial\hgrc.d\*.rc`` (per-system)
81 81 - ``<internal>/*.rc`` (defaults)
82 82
83 83 .. note::
84 84
85 85 The registry key ``HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercurial``
86 86 is used when running 32-bit Python on 64-bit Windows.
87 87
88 88 .. container:: verbose.plan9
89 89
90 90 On Plan9, the following files are consulted:
91 91
92 92 - ``<repo>/.hg/hgrc`` (per-repository)
93 93 - ``$home/lib/hgrc`` (per-user)
94 94 - ``<install-root>/lib/mercurial/hgrc`` (per-installation)
95 95 - ``<install-root>/lib/mercurial/hgrc.d/*.rc`` (per-installation)
96 96 - ``/lib/mercurial/hgrc`` (per-system)
97 97 - ``/lib/mercurial/hgrc.d/*.rc`` (per-system)
98 98 - ``<internal>/*.rc`` (defaults)
99 99
100 100 Per-repository configuration options only apply in a
101 101 particular repository. This file is not version-controlled, and
102 102 will not get transferred during a "clone" operation. Options in
103 103 this file override options in all other configuration files.
104 104
105 105 .. container:: unix.plan9
106 106
107 107 On Plan 9 and Unix, most of this file will be ignored if it doesn't
108 108 belong to a trusted user or to a trusted group. See
109 109 :hg:`help config.trusted` for more details.
110 110
111 111 Per-user configuration file(s) are for the user running Mercurial. Options
112 112 in these files apply to all Mercurial commands executed by this user in any
113 113 directory. Options in these files override per-system and per-installation
114 114 options.
115 115
116 116 Per-installation configuration files are searched for in the
117 117 directory where Mercurial is installed. ``<install-root>`` is the
118 118 parent directory of the **hg** executable (or symlink) being run.
119 119
120 120 .. container:: unix.plan9
121 121
122 122 For example, if installed in ``/shared/tools/bin/hg``, Mercurial
123 123 will look in ``/shared/tools/etc/mercurial/hgrc``. Options in these
124 124 files apply to all Mercurial commands executed by any user in any
125 125 directory.
126 126
127 127 Per-installation configuration files are for the system on
128 128 which Mercurial is running. Options in these files apply to all
129 129 Mercurial commands executed by any user in any directory. Registry
130 130 keys contain PATH-like strings, every part of which must reference
131 131 a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will
132 132 be read. Mercurial checks each of these locations in the specified
133 133 order until one or more configuration files are detected.
134 134
135 135 Per-system configuration files are for the system on which Mercurial
136 136 is running. Options in these files apply to all Mercurial commands
137 137 executed by any user in any directory. Options in these files
138 138 override per-installation options.
139 139
140 140 Mercurial comes with some default configuration. The default configuration
141 141 files are installed with Mercurial and will be overwritten on upgrades. Default
142 142 configuration files should never be edited by users or administrators but can
143 143 be overridden in other configuration files. So far the directory only contains
144 144 merge tool configuration but packagers can also put other default configuration
145 145 there.
146 146
147 147 Syntax
148 148 ======
149 149
150 150 A configuration file consists of sections, led by a ``[section]`` header
151 151 and followed by ``name = value`` entries (sometimes called
152 152 ``configuration keys``)::
153 153
154 154 [spam]
155 155 eggs=ham
156 156 green=
157 157 eggs
158 158
159 159 Each line contains one entry. If the lines that follow are indented,
160 160 they are treated as continuations of that entry. Leading whitespace is
161 161 removed from values. Empty lines are skipped. Lines beginning with
162 162 ``#`` or ``;`` are ignored and may be used to provide comments.
163 163
164 164 Configuration keys can be set multiple times, in which case Mercurial
165 165 will use the value that was configured last. As an example::
166 166
167 167 [spam]
168 168 eggs=large
169 169 ham=serrano
170 170 eggs=small
171 171
172 172 This would set the configuration key named ``eggs`` to ``small``.
173 173
174 174 It is also possible to define a section multiple times. A section can
175 175 be redefined on the same and/or on different configuration files. For
176 176 example::
177 177
178 178 [foo]
179 179 eggs=large
180 180 ham=serrano
181 181 eggs=small
182 182
183 183 [bar]
184 184 eggs=ham
185 185 green=
186 186 eggs
187 187
188 188 [foo]
189 189 ham=prosciutto
190 190 eggs=medium
191 191 bread=toasted
192 192
193 193 This would set the ``eggs``, ``ham``, and ``bread`` configuration keys
194 194 of the ``foo`` section to ``medium``, ``prosciutto``, and ``toasted``,
195 195 respectively. As you can see there only thing that matters is the last
196 196 value that was set for each of the configuration keys.
197 197
198 198 If a configuration key is set multiple times in different
199 199 configuration files the final value will depend on the order in which
200 200 the different configuration files are read, with settings from earlier
201 201 paths overriding later ones as described on the ``Files`` section
202 202 above.
203 203
204 204 A line of the form ``%include file`` will include ``file`` into the
205 205 current configuration file. The inclusion is recursive, which means
206 206 that included files can include other files. Filenames are relative to
207 207 the configuration file in which the ``%include`` directive is found.
208 208 Environment variables and ``~user`` constructs are expanded in
209 209 ``file``. This lets you do something like::
210 210
211 211 %include ~/.hgrc.d/$HOST.rc
212 212
213 213 to include a different configuration file on each computer you use.
214 214
215 215 A line with ``%unset name`` will remove ``name`` from the current
216 216 section, if it has been set previously.
217 217
218 218 The values are either free-form text strings, lists of text strings,
219 219 or Boolean values. Boolean values can be set to true using any of "1",
220 220 "yes", "true", or "on" and to false using "0", "no", "false", or "off"
221 221 (all case insensitive).
222 222
223 223 List values are separated by whitespace or comma, except when values are
224 224 placed in double quotation marks::
225 225
226 226 allow_read = "John Doe, PhD", brian, betty
227 227
228 228 Quotation marks can be escaped by prefixing them with a backslash. Only
229 229 quotation marks at the beginning of a word is counted as a quotation
230 230 (e.g., ``foo"bar baz`` is the list of ``foo"bar`` and ``baz``).
231 231
232 232 Sections
233 233 ========
234 234
235 235 This section describes the different sections that may appear in a
236 236 Mercurial configuration file, the purpose of each section, its possible
237 237 keys, and their possible values.
238 238
239 239 ``alias``
240 240 ---------
241 241
242 242 Defines command aliases.
243 243
244 244 Aliases allow you to define your own commands in terms of other
245 245 commands (or aliases), optionally including arguments. Positional
246 246 arguments in the form of ``$1``, ``$2``, etc. in the alias definition
247 247 are expanded by Mercurial before execution. Positional arguments not
248 248 already used by ``$N`` in the definition are put at the end of the
249 249 command to be executed.
250 250
251 251 Alias definitions consist of lines of the form::
252 252
253 253 <alias> = <command> [<argument>]...
254 254
255 255 For example, this definition::
256 256
257 257 latest = log --limit 5
258 258
259 259 creates a new command ``latest`` that shows only the five most recent
260 260 changesets. You can define subsequent aliases using earlier ones::
261 261
262 262 stable5 = latest -b stable
263 263
264 264 .. note::
265 265
266 266 It is possible to create aliases with the same names as
267 267 existing commands, which will then override the original
268 268 definitions. This is almost always a bad idea!
269 269
270 270 An alias can start with an exclamation point (``!``) to make it a
271 271 shell alias. A shell alias is executed with the shell and will let you
272 272 run arbitrary commands. As an example, ::
273 273
274 274 echo = !echo $@
275 275
276 276 will let you do ``hg echo foo`` to have ``foo`` printed in your
277 277 terminal. A better example might be::
278 278
279 279 purge = !$HG status --no-status --unknown -0 re: | xargs -0 rm -f
280 280
281 281 which will make ``hg purge`` delete all unknown files in the
282 282 repository in the same manner as the purge extension.
283 283
284 284 Positional arguments like ``$1``, ``$2``, etc. in the alias definition
285 285 expand to the command arguments. Unmatched arguments are
286 286 removed. ``$0`` expands to the alias name and ``$@`` expands to all
287 287 arguments separated by a space. ``"$@"`` (with quotes) expands to all
288 288 arguments quoted individually and separated by a space. These expansions
289 289 happen before the command is passed to the shell.
290 290
291 291 Shell aliases are executed in an environment where ``$HG`` expands to
292 292 the path of the Mercurial that was used to execute the alias. This is
293 293 useful when you want to call further Mercurial commands in a shell
294 294 alias, as was done above for the purge alias. In addition,
295 295 ``$HG_ARGS`` expands to the arguments given to Mercurial. In the ``hg
296 296 echo foo`` call above, ``$HG_ARGS`` would expand to ``echo foo``.
297 297
298 298 .. note::
299 299
300 300 Some global configuration options such as ``-R`` are
301 301 processed before shell aliases and will thus not be passed to
302 302 aliases.
303 303
304 304
305 305 ``annotate``
306 306 ------------
307 307
308 308 Settings used when displaying file annotations. All values are
309 309 Booleans and default to False. See :hg:`help config.diff` for
310 310 related options for the diff command.
311 311
312 312 ``ignorews``
313 313 Ignore white space when comparing lines.
314 314
315 315 ``ignorewseol``
316 316 Ignore white space at the end of a line when comparing lines.
317 317
318 318 ``ignorewsamount``
319 319 Ignore changes in the amount of white space.
320 320
321 321 ``ignoreblanklines``
322 322 Ignore changes whose lines are all blank.
323 323
324 324
325 325 ``auth``
326 326 --------
327 327
328 328 Authentication credentials and other authentication-like configuration
329 329 for HTTP connections. This section allows you to store usernames and
330 330 passwords for use when logging *into* HTTP servers. See
331 331 :hg:`help config.web` if you want to configure *who* can login to
332 332 your HTTP server.
333 333
334 334 The following options apply to all hosts.
335 335
336 336 ``cookiefile``
337 337 Path to a file containing HTTP cookie lines. Cookies matching a
338 338 host will be sent automatically.
339 339
340 340 The file format uses the Mozilla cookies.txt format, which defines cookies
341 341 on their own lines. Each line contains 7 fields delimited by the tab
342 342 character (domain, is_domain_cookie, path, is_secure, expires, name,
343 343 value). For more info, do an Internet search for "Netscape cookies.txt
344 344 format."
345 345
346 346 Note: the cookies parser does not handle port numbers on domains. You
347 347 will need to remove ports from the domain for the cookie to be recognized.
348 348 This could result in a cookie being disclosed to an unwanted server.
349 349
350 350 The cookies file is read-only.
351 351
352 352 Other options in this section are grouped by name and have the following
353 353 format::
354 354
355 355 <name>.<argument> = <value>
356 356
357 357 where ``<name>`` is used to group arguments into authentication
358 358 entries. Example::
359 359
360 360 foo.prefix = hg.intevation.de/mercurial
361 361 foo.username = foo
362 362 foo.password = bar
363 363 foo.schemes = http https
364 364
365 365 bar.prefix = secure.example.org
366 366 bar.key = path/to/file.key
367 367 bar.cert = path/to/file.cert
368 368 bar.schemes = https
369 369
370 370 Supported arguments:
371 371
372 372 ``prefix``
373 373 Either ``*`` or a URI prefix with or without the scheme part.
374 374 The authentication entry with the longest matching prefix is used
375 375 (where ``*`` matches everything and counts as a match of length
376 376 1). If the prefix doesn't include a scheme, the match is performed
377 377 against the URI with its scheme stripped as well, and the schemes
378 378 argument, q.v., is then subsequently consulted.
379 379
380 380 ``username``
381 381 Optional. Username to authenticate with. If not given, and the
382 382 remote site requires basic or digest authentication, the user will
383 383 be prompted for it. Environment variables are expanded in the
384 384 username letting you do ``foo.username = $USER``. If the URI
385 385 includes a username, only ``[auth]`` entries with a matching
386 386 username or without a username will be considered.
387 387
388 388 ``password``
389 389 Optional. Password to authenticate with. If not given, and the
390 390 remote site requires basic or digest authentication, the user
391 391 will be prompted for it.
392 392
393 393 ``key``
394 394 Optional. PEM encoded client certificate key file. Environment
395 395 variables are expanded in the filename.
396 396
397 397 ``cert``
398 398 Optional. PEM encoded client certificate chain file. Environment
399 399 variables are expanded in the filename.
400 400
401 401 ``schemes``
402 402 Optional. Space separated list of URI schemes to use this
403 403 authentication entry with. Only used if the prefix doesn't include
404 404 a scheme. Supported schemes are http and https. They will match
405 405 static-http and static-https respectively, as well.
406 406 (default: https)
407 407
408 408 If no suitable authentication entry is found, the user is prompted
409 409 for credentials as usual if required by the remote.
410 410
411 411 ``cmdserver``
412 412 -------------
413 413
414 414 Controls command server settings. (ADVANCED)
415 415
416 416 ``message-encodings``
417 417 List of encodings for the ``m`` (message) channel. The first encoding
418 418 supported by the server will be selected and advertised in the hello
419 419 message. This is useful only when ``ui.message-output`` is set to
420 420 ``channel``. Supported encodings are ``cbor``.
421 421
422 422 ``shutdown-on-interrupt``
423 423 If set to false, the server's main loop will continue running after
424 424 SIGINT received. ``runcommand`` requests can still be interrupted by
425 425 SIGINT. Close the write end of the pipe to shut down the server
426 426 process gracefully.
427 427 (default: True)
428 428
429 429 ``color``
430 430 ---------
431 431
432 432 Configure the Mercurial color mode. For details about how to define your custom
433 433 effect and style see :hg:`help color`.
434 434
435 435 ``mode``
436 436 String: control the method used to output color. One of ``auto``, ``ansi``,
437 437 ``win32``, ``terminfo`` or ``debug``. In auto mode, Mercurial will
438 438 use ANSI mode by default (or win32 mode prior to Windows 10) if it detects a
439 439 terminal. Any invalid value will disable color.
440 440
441 441 ``pagermode``
442 442 String: optional override of ``color.mode`` used with pager.
443 443
444 444 On some systems, terminfo mode may cause problems when using
445 445 color with ``less -R`` as a pager program. less with the -R option
446 446 will only display ECMA-48 color codes, and terminfo mode may sometimes
447 447 emit codes that less doesn't understand. You can work around this by
448 448 either using ansi mode (or auto mode), or by using less -r (which will
449 449 pass through all terminal control codes, not just color control
450 450 codes).
451 451
452 452 On some systems (such as MSYS in Windows), the terminal may support
453 453 a different color mode than the pager program.
454 454
455 455 ``commands``
456 456 ------------
457 457
458 458 ``commit.post-status``
459 459 Show status of files in the working directory after successful commit.
460 460 (default: False)
461 461
462 462 ``merge.require-rev``
463 463 Require that the revision to merge the current commit with be specified on
464 464 the command line. If this is enabled and a revision is not specified, the
465 465 command aborts.
466 466 (default: False)
467 467
468 468 ``push.require-revs``
469 469 Require revisions to push be specified using one or more mechanisms such as
470 470 specifying them positionally on the command line, using ``-r``, ``-b``,
471 471 and/or ``-B`` on the command line, or using ``paths.<path>:pushrev`` in the
472 472 configuration. If this is enabled and revisions are not specified, the
473 473 command aborts.
474 474 (default: False)
475 475
476 476 ``resolve.confirm``
477 477 Confirm before performing action if no filename is passed.
478 478 (default: False)
479 479
480 480 ``resolve.explicit-re-merge``
481 481 Require uses of ``hg resolve`` to specify which action it should perform,
482 482 instead of re-merging files by default.
483 483 (default: False)
484 484
485 485 ``resolve.mark-check``
486 486 Determines what level of checking :hg:`resolve --mark` will perform before
487 487 marking files as resolved. Valid values are ``none`, ``warn``, and
488 488 ``abort``. ``warn`` will output a warning listing the file(s) that still
489 489 have conflict markers in them, but will still mark everything resolved.
490 490 ``abort`` will output the same warning but will not mark things as resolved.
491 491 If --all is passed and this is set to ``abort``, only a warning will be
492 492 shown (an error will not be raised).
493 493 (default: ``none``)
494 494
495 495 ``status.relative``
496 496 Make paths in :hg:`status` output relative to the current directory.
497 497 (default: False)
498 498
499 499 ``status.terse``
500 500 Default value for the --terse flag, which condenses status output.
501 501 (default: empty)
502 502
503 503 ``update.check``
504 504 Determines what level of checking :hg:`update` will perform before moving
505 505 to a destination revision. Valid values are ``abort``, ``none``,
506 506 ``linear``, and ``noconflict``. ``abort`` always fails if the working
507 507 directory has uncommitted changes. ``none`` performs no checking, and may
508 508 result in a merge with uncommitted changes. ``linear`` allows any update
509 509 as long as it follows a straight line in the revision history, and may
510 510 trigger a merge with uncommitted changes. ``noconflict`` will allow any
511 511 update which would not trigger a merge with uncommitted changes, if any
512 512 are present.
513 513 (default: ``linear``)
514 514
515 515 ``update.requiredest``
516 516 Require that the user pass a destination when running :hg:`update`.
517 517 For example, :hg:`update .::` will be allowed, but a plain :hg:`update`
518 518 will be disallowed.
519 519 (default: False)
520 520
521 521 ``committemplate``
522 522 ------------------
523 523
524 524 ``changeset``
525 525 String: configuration in this section is used as the template to
526 526 customize the text shown in the editor when committing.
527 527
528 528 In addition to pre-defined template keywords, commit log specific one
529 529 below can be used for customization:
530 530
531 531 ``extramsg``
532 532 String: Extra message (typically 'Leave message empty to abort
533 533 commit.'). This may be changed by some commands or extensions.
534 534
535 535 For example, the template configuration below shows as same text as
536 536 one shown by default::
537 537
538 538 [committemplate]
539 539 changeset = {desc}\n\n
540 540 HG: Enter commit message. Lines beginning with 'HG:' are removed.
541 541 HG: {extramsg}
542 542 HG: --
543 543 HG: user: {author}\n{ifeq(p2rev, "-1", "",
544 544 "HG: branch merge\n")
545 545 }HG: branch '{branch}'\n{if(activebookmark,
546 546 "HG: bookmark '{activebookmark}'\n") }{subrepos %
547 547 "HG: subrepo {subrepo}\n" }{file_adds %
548 548 "HG: added {file}\n" }{file_mods %
549 549 "HG: changed {file}\n" }{file_dels %
550 550 "HG: removed {file}\n" }{if(files, "",
551 551 "HG: no files changed\n")}
552 552
553 553 ``diff()``
554 554 String: show the diff (see :hg:`help templates` for detail)
555 555
556 556 Sometimes it is helpful to show the diff of the changeset in the editor without
557 557 having to prefix 'HG: ' to each line so that highlighting works correctly. For
558 558 this, Mercurial provides a special string which will ignore everything below
559 559 it::
560 560
561 561 HG: ------------------------ >8 ------------------------
562 562
563 563 For example, the template configuration below will show the diff below the
564 564 extra message::
565 565
566 566 [committemplate]
567 567 changeset = {desc}\n\n
568 568 HG: Enter commit message. Lines beginning with 'HG:' are removed.
569 569 HG: {extramsg}
570 570 HG: ------------------------ >8 ------------------------
571 571 HG: Do not touch the line above.
572 572 HG: Everything below will be removed.
573 573 {diff()}
574 574
575 575 .. note::
576 576
577 577 For some problematic encodings (see :hg:`help win32mbcs` for
578 578 detail), this customization should be configured carefully, to
579 579 avoid showing broken characters.
580 580
581 581 For example, if a multibyte character ending with backslash (0x5c) is
582 582 followed by the ASCII character 'n' in the customized template,
583 583 the sequence of backslash and 'n' is treated as line-feed unexpectedly
584 584 (and the multibyte character is broken, too).
585 585
586 586 Customized template is used for commands below (``--edit`` may be
587 587 required):
588 588
589 589 - :hg:`backout`
590 590 - :hg:`commit`
591 591 - :hg:`fetch` (for merge commit only)
592 592 - :hg:`graft`
593 593 - :hg:`histedit`
594 594 - :hg:`import`
595 595 - :hg:`qfold`, :hg:`qnew` and :hg:`qrefresh`
596 596 - :hg:`rebase`
597 597 - :hg:`shelve`
598 598 - :hg:`sign`
599 599 - :hg:`tag`
600 600 - :hg:`transplant`
601 601
602 602 Configuring items below instead of ``changeset`` allows showing
603 603 customized message only for specific actions, or showing different
604 604 messages for each action.
605 605
606 606 - ``changeset.backout`` for :hg:`backout`
607 607 - ``changeset.commit.amend.merge`` for :hg:`commit --amend` on merges
608 608 - ``changeset.commit.amend.normal`` for :hg:`commit --amend` on other
609 609 - ``changeset.commit.normal.merge`` for :hg:`commit` on merges
610 610 - ``changeset.commit.normal.normal`` for :hg:`commit` on other
611 611 - ``changeset.fetch`` for :hg:`fetch` (impling merge commit)
612 612 - ``changeset.gpg.sign`` for :hg:`sign`
613 613 - ``changeset.graft`` for :hg:`graft`
614 614 - ``changeset.histedit.edit`` for ``edit`` of :hg:`histedit`
615 615 - ``changeset.histedit.fold`` for ``fold`` of :hg:`histedit`
616 616 - ``changeset.histedit.mess`` for ``mess`` of :hg:`histedit`
617 617 - ``changeset.histedit.pick`` for ``pick`` of :hg:`histedit`
618 618 - ``changeset.import.bypass`` for :hg:`import --bypass`
619 619 - ``changeset.import.normal.merge`` for :hg:`import` on merges
620 620 - ``changeset.import.normal.normal`` for :hg:`import` on other
621 621 - ``changeset.mq.qnew`` for :hg:`qnew`
622 622 - ``changeset.mq.qfold`` for :hg:`qfold`
623 623 - ``changeset.mq.qrefresh`` for :hg:`qrefresh`
624 624 - ``changeset.rebase.collapse`` for :hg:`rebase --collapse`
625 625 - ``changeset.rebase.merge`` for :hg:`rebase` on merges
626 626 - ``changeset.rebase.normal`` for :hg:`rebase` on other
627 627 - ``changeset.shelve.shelve`` for :hg:`shelve`
628 628 - ``changeset.tag.add`` for :hg:`tag` without ``--remove``
629 629 - ``changeset.tag.remove`` for :hg:`tag --remove`
630 630 - ``changeset.transplant.merge`` for :hg:`transplant` on merges
631 631 - ``changeset.transplant.normal`` for :hg:`transplant` on other
632 632
633 633 These dot-separated lists of names are treated as hierarchical ones.
634 634 For example, ``changeset.tag.remove`` customizes the commit message
635 635 only for :hg:`tag --remove`, but ``changeset.tag`` customizes the
636 636 commit message for :hg:`tag` regardless of ``--remove`` option.
637 637
638 638 When the external editor is invoked for a commit, the corresponding
639 639 dot-separated list of names without the ``changeset.`` prefix
640 640 (e.g. ``commit.normal.normal``) is in the ``HGEDITFORM`` environment
641 641 variable.
642 642
643 643 In this section, items other than ``changeset`` can be referred from
644 644 others. For example, the configuration to list committed files up
645 645 below can be referred as ``{listupfiles}``::
646 646
647 647 [committemplate]
648 648 listupfiles = {file_adds %
649 649 "HG: added {file}\n" }{file_mods %
650 650 "HG: changed {file}\n" }{file_dels %
651 651 "HG: removed {file}\n" }{if(files, "",
652 652 "HG: no files changed\n")}
653 653
654 654 ``decode/encode``
655 655 -----------------
656 656
657 657 Filters for transforming files on checkout/checkin. This would
658 658 typically be used for newline processing or other
659 659 localization/canonicalization of files.
660 660
661 661 Filters consist of a filter pattern followed by a filter command.
662 662 Filter patterns are globs by default, rooted at the repository root.
663 663 For example, to match any file ending in ``.txt`` in the root
664 664 directory only, use the pattern ``*.txt``. To match any file ending
665 665 in ``.c`` anywhere in the repository, use the pattern ``**.c``.
666 666 For each file only the first matching filter applies.
667 667
668 668 The filter command can start with a specifier, either ``pipe:`` or
669 669 ``tempfile:``. If no specifier is given, ``pipe:`` is used by default.
670 670
671 671 A ``pipe:`` command must accept data on stdin and return the transformed
672 672 data on stdout.
673 673
674 674 Pipe example::
675 675
676 676 [encode]
677 677 # uncompress gzip files on checkin to improve delta compression
678 678 # note: not necessarily a good idea, just an example
679 679 *.gz = pipe: gunzip
680 680
681 681 [decode]
682 682 # recompress gzip files when writing them to the working dir (we
683 683 # can safely omit "pipe:", because it's the default)
684 684 *.gz = gzip
685 685
686 686 A ``tempfile:`` command is a template. The string ``INFILE`` is replaced
687 687 with the name of a temporary file that contains the data to be
688 688 filtered by the command. The string ``OUTFILE`` is replaced with the name
689 689 of an empty temporary file, where the filtered data must be written by
690 690 the command.
691 691
692 692 .. container:: windows
693 693
694 694 .. note::
695 695
696 696 The tempfile mechanism is recommended for Windows systems,
697 697 where the standard shell I/O redirection operators often have
698 698 strange effects and may corrupt the contents of your files.
699 699
700 700 This filter mechanism is used internally by the ``eol`` extension to
701 701 translate line ending characters between Windows (CRLF) and Unix (LF)
702 702 format. We suggest you use the ``eol`` extension for convenience.
703 703
704 704
705 705 ``defaults``
706 706 ------------
707 707
708 708 (defaults are deprecated. Don't use them. Use aliases instead.)
709 709
710 710 Use the ``[defaults]`` section to define command defaults, i.e. the
711 711 default options/arguments to pass to the specified commands.
712 712
713 713 The following example makes :hg:`log` run in verbose mode, and
714 714 :hg:`status` show only the modified files, by default::
715 715
716 716 [defaults]
717 717 log = -v
718 718 status = -m
719 719
720 720 The actual commands, instead of their aliases, must be used when
721 721 defining command defaults. The command defaults will also be applied
722 722 to the aliases of the commands defined.
723 723
724 724
725 725 ``diff``
726 726 --------
727 727
728 728 Settings used when displaying diffs. Everything except for ``unified``
729 729 is a Boolean and defaults to False. See :hg:`help config.annotate`
730 730 for related options for the annotate command.
731 731
732 732 ``git``
733 733 Use git extended diff format.
734 734
735 735 ``nobinary``
736 736 Omit git binary patches.
737 737
738 738 ``nodates``
739 739 Don't include dates in diff headers.
740 740
741 741 ``noprefix``
742 742 Omit 'a/' and 'b/' prefixes from filenames. Ignored in plain mode.
743 743
744 744 ``showfunc``
745 745 Show which function each change is in.
746 746
747 747 ``ignorews``
748 748 Ignore white space when comparing lines.
749 749
750 750 ``ignorewsamount``
751 751 Ignore changes in the amount of white space.
752 752
753 753 ``ignoreblanklines``
754 754 Ignore changes whose lines are all blank.
755 755
756 756 ``unified``
757 757 Number of lines of context to show.
758 758
759 759 ``word-diff``
760 760 Highlight changed words.
761 761
762 762 ``email``
763 763 ---------
764 764
765 765 Settings for extensions that send email messages.
766 766
767 767 ``from``
768 768 Optional. Email address to use in "From" header and SMTP envelope
769 769 of outgoing messages.
770 770
771 771 ``to``
772 772 Optional. Comma-separated list of recipients' email addresses.
773 773
774 774 ``cc``
775 775 Optional. Comma-separated list of carbon copy recipients'
776 776 email addresses.
777 777
778 778 ``bcc``
779 779 Optional. Comma-separated list of blind carbon copy recipients'
780 780 email addresses.
781 781
782 782 ``method``
783 783 Optional. Method to use to send email messages. If value is ``smtp``
784 784 (default), use SMTP (see the ``[smtp]`` section for configuration).
785 785 Otherwise, use as name of program to run that acts like sendmail
786 786 (takes ``-f`` option for sender, list of recipients on command line,
787 787 message on stdin). Normally, setting this to ``sendmail`` or
788 788 ``/usr/sbin/sendmail`` is enough to use sendmail to send messages.
789 789
790 790 ``charsets``
791 791 Optional. Comma-separated list of character sets considered
792 792 convenient for recipients. Addresses, headers, and parts not
793 793 containing patches of outgoing messages will be encoded in the
794 794 first character set to which conversion from local encoding
795 795 (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct
796 796 conversion fails, the text in question is sent as is.
797 797 (default: '')
798 798
799 799 Order of outgoing email character sets:
800 800
801 801 1. ``us-ascii``: always first, regardless of settings
802 802 2. ``email.charsets``: in order given by user
803 803 3. ``ui.fallbackencoding``: if not in email.charsets
804 804 4. ``$HGENCODING``: if not in email.charsets
805 805 5. ``utf-8``: always last, regardless of settings
806 806
807 807 Email example::
808 808
809 809 [email]
810 810 from = Joseph User <joe.user@example.com>
811 811 method = /usr/sbin/sendmail
812 812 # charsets for western Europeans
813 813 # us-ascii, utf-8 omitted, as they are tried first and last
814 814 charsets = iso-8859-1, iso-8859-15, windows-1252
815 815
816 816
817 817 ``extensions``
818 818 --------------
819 819
820 820 Mercurial has an extension mechanism for adding new features. To
821 821 enable an extension, create an entry for it in this section.
822 822
823 823 If you know that the extension is already in Python's search path,
824 824 you can give the name of the module, followed by ``=``, with nothing
825 825 after the ``=``.
826 826
827 827 Otherwise, give a name that you choose, followed by ``=``, followed by
828 828 the path to the ``.py`` file (including the file name extension) that
829 829 defines the extension.
830 830
831 831 To explicitly disable an extension that is enabled in an hgrc of
832 832 broader scope, prepend its path with ``!``, as in ``foo = !/ext/path``
833 833 or ``foo = !`` when path is not supplied.
834 834
835 835 Example for ``~/.hgrc``::
836 836
837 837 [extensions]
838 838 # (the churn extension will get loaded from Mercurial's path)
839 839 churn =
840 840 # (this extension will get loaded from the file specified)
841 841 myfeature = ~/.hgext/myfeature.py
842 842
843 843
844 844 ``format``
845 845 ----------
846 846
847 847 Configuration that controls the repository format. Newer format options are more
848 848 powerful, but incompatible with some older versions of Mercurial. Format options
849 849 are considered at repository initialization only. You need to make a new clone
850 850 for config changes to be taken into account.
851 851
852 852 For more details about repository format and version compatibility, see
853 853 https://www.mercurial-scm.org/wiki/MissingRequirement
854 854
855 855 ``usegeneraldelta``
856 856 Enable or disable the "generaldelta" repository format which improves
857 857 repository compression by allowing "revlog" to store deltas against
858 858 arbitrary revisions instead of the previously stored one. This provides
859 859 significant improvement for repositories with branches.
860 860
861 861 Repositories with this on-disk format require Mercurial version 1.9.
862 862
863 863 Enabled by default.
864 864
865 865 ``dotencode``
866 866 Enable or disable the "dotencode" repository format which enhances
867 867 the "fncache" repository format (which has to be enabled to use
868 868 dotencode) to avoid issues with filenames starting with "._" on
869 869 Mac OS X and spaces on Windows.
870 870
871 871 Repositories with this on-disk format require Mercurial version 1.7.
872 872
873 873 Enabled by default.
874 874
875 875 ``usefncache``
876 876 Enable or disable the "fncache" repository format which enhances
877 877 the "store" repository format (which has to be enabled to use
878 878 fncache) to allow longer filenames and avoids using Windows
879 879 reserved names, e.g. "nul".
880 880
881 881 Repositories with this on-disk format require Mercurial version 1.1.
882 882
883 883 Enabled by default.
884 884
885 885 ``usestore``
886 886 Enable or disable the "store" repository format which improves
887 887 compatibility with systems that fold case or otherwise mangle
888 888 filenames. Disabling this option will allow you to store longer filenames
889 889 in some situations at the expense of compatibility.
890 890
891 891 Repositories with this on-disk format require Mercurial version 0.9.4.
892 892
893 893 Enabled by default.
894 894
895 895 ``sparse-revlog``
896 896 Enable or disable the ``sparse-revlog`` delta strategy. This format improves
897 897 delta re-use inside revlog. For very branchy repositories, it results in a
898 898 smaller store. For repositories with many revisions, it also helps
899 899 performance (by using shortened delta chains.)
900 900
901 901 Repositories with this on-disk format require Mercurial version 4.7
902 902
903 903 Enabled by default.
904 904
905 905 ``revlog-compression``
906 906 Compression algorithm used by revlog. Supported values are `zlib` and
907 907 `zstd`. The `zlib` engine is the historical default of Mercurial. `zstd` is
908 908 a newer format that is usually a net win over `zlib`, operating faster at
909 909 better compression rates. Use `zstd` to reduce CPU usage. Multiple values
910 910 can be specified, the first available one will be used.
911 911
912 912 On some systems, the Mercurial installation may lack `zstd` support.
913 913
914 914 Default is `zlib`.
915 915
916 916 ``bookmarks-in-store``
917 917 Store bookmarks in .hg/store/. This means that bookmarks are shared when
918 918 using `hg share` regardless of the `-B` option.
919 919
920 920 Repositories with this on-disk format require Mercurial version 5.1.
921 921
922 922 Disabled by default.
923 923
924 924
925 925 ``graph``
926 926 ---------
927 927
928 928 Web graph view configuration. This section let you change graph
929 929 elements display properties by branches, for instance to make the
930 930 ``default`` branch stand out.
931 931
932 932 Each line has the following format::
933 933
934 934 <branch>.<argument> = <value>
935 935
936 936 where ``<branch>`` is the name of the branch being
937 937 customized. Example::
938 938
939 939 [graph]
940 940 # 2px width
941 941 default.width = 2
942 942 # red color
943 943 default.color = FF0000
944 944
945 945 Supported arguments:
946 946
947 947 ``width``
948 948 Set branch edges width in pixels.
949 949
950 950 ``color``
951 951 Set branch edges color in hexadecimal RGB notation.
952 952
953 953 ``hooks``
954 954 ---------
955 955
956 956 Commands or Python functions that get automatically executed by
957 957 various actions such as starting or finishing a commit. Multiple
958 958 hooks can be run for the same action by appending a suffix to the
959 959 action. Overriding a site-wide hook can be done by changing its
960 960 value or setting it to an empty string. Hooks can be prioritized
961 961 by adding a prefix of ``priority.`` to the hook name on a new line
962 962 and setting the priority. The default priority is 0.
963 963
964 964 Example ``.hg/hgrc``::
965 965
966 966 [hooks]
967 967 # update working directory after adding changesets
968 968 changegroup.update = hg update
969 969 # do not use the site-wide hook
970 970 incoming =
971 971 incoming.email = /my/email/hook
972 972 incoming.autobuild = /my/build/hook
973 973 # force autobuild hook to run before other incoming hooks
974 974 priority.incoming.autobuild = 1
975 975
976 976 Most hooks are run with environment variables set that give useful
977 977 additional information. For each hook below, the environment variables
978 978 it is passed are listed with names in the form ``$HG_foo``. The
979 979 ``$HG_HOOKTYPE`` and ``$HG_HOOKNAME`` variables are set for all hooks.
980 980 They contain the type of hook which triggered the run and the full name
981 981 of the hook in the config, respectively. In the example above, this will
982 982 be ``$HG_HOOKTYPE=incoming`` and ``$HG_HOOKNAME=incoming.email``.
983 983
984 984 .. container:: windows
985 985
986 986 Some basic Unix syntax can be enabled for portability, including ``$VAR``
987 987 and ``${VAR}`` style variables. A ``~`` followed by ``\`` or ``/`` will
988 988 be expanded to ``%USERPROFILE%`` to simulate a subset of tilde expansion
989 989 on Unix. To use a literal ``$`` or ``~``, it must be escaped with a back
990 990 slash or inside of a strong quote. Strong quotes will be replaced by
991 991 double quotes after processing.
992 992
993 993 This feature is enabled by adding a prefix of ``tonative.`` to the hook
994 994 name on a new line, and setting it to ``True``. For example::
995 995
996 996 [hooks]
997 997 incoming.autobuild = /my/build/hook
998 998 # enable translation to cmd.exe syntax for autobuild hook
999 999 tonative.incoming.autobuild = True
1000 1000
1001 1001 ``changegroup``
1002 1002 Run after a changegroup has been added via push, pull or unbundle. The ID of
1003 1003 the first new changeset is in ``$HG_NODE`` and last is in ``$HG_NODE_LAST``.
1004 1004 The URL from which changes came is in ``$HG_URL``.
1005 1005
1006 1006 ``commit``
1007 1007 Run after a changeset has been created in the local repository. The ID
1008 1008 of the newly created changeset is in ``$HG_NODE``. Parent changeset
1009 1009 IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
1010 1010
1011 1011 ``incoming``
1012 1012 Run after a changeset has been pulled, pushed, or unbundled into
1013 1013 the local repository. The ID of the newly arrived changeset is in
1014 1014 ``$HG_NODE``. The URL that was source of the changes is in ``$HG_URL``.
1015 1015
1016 1016 ``outgoing``
1017 1017 Run after sending changes from the local repository to another. The ID of
1018 1018 first changeset sent is in ``$HG_NODE``. The source of operation is in
1019 1019 ``$HG_SOURCE``. Also see :hg:`help config.hooks.preoutgoing`.
1020 1020
1021 1021 ``post-<command>``
1022 1022 Run after successful invocations of the associated command. The
1023 1023 contents of the command line are passed as ``$HG_ARGS`` and the result
1024 1024 code in ``$HG_RESULT``. Parsed command line arguments are passed as
1025 1025 ``$HG_PATS`` and ``$HG_OPTS``. These contain string representations of
1026 1026 the python data internally passed to <command>. ``$HG_OPTS`` is a
1027 1027 dictionary of options (with unspecified options set to their defaults).
1028 1028 ``$HG_PATS`` is a list of arguments. Hook failure is ignored.
1029 1029
1030 1030 ``fail-<command>``
1031 1031 Run after a failed invocation of an associated command. The contents
1032 1032 of the command line are passed as ``$HG_ARGS``. Parsed command line
1033 1033 arguments are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain
1034 1034 string representations of the python data internally passed to
1035 1035 <command>. ``$HG_OPTS`` is a dictionary of options (with unspecified
1036 1036 options set to their defaults). ``$HG_PATS`` is a list of arguments.
1037 1037 Hook failure is ignored.
1038 1038
1039 1039 ``pre-<command>``
1040 1040 Run before executing the associated command. The contents of the
1041 1041 command line are passed as ``$HG_ARGS``. Parsed command line arguments
1042 1042 are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain string
1043 1043 representations of the data internally passed to <command>. ``$HG_OPTS``
1044 1044 is a dictionary of options (with unspecified options set to their
1045 1045 defaults). ``$HG_PATS`` is a list of arguments. If the hook returns
1046 1046 failure, the command doesn't execute and Mercurial returns the failure
1047 1047 code.
1048 1048
1049 1049 ``prechangegroup``
1050 1050 Run before a changegroup is added via push, pull or unbundle. Exit
1051 1051 status 0 allows the changegroup to proceed. A non-zero status will
1052 1052 cause the push, pull or unbundle to fail. The URL from which changes
1053 1053 will come is in ``$HG_URL``.
1054 1054
1055 1055 ``precommit``
1056 1056 Run before starting a local commit. Exit status 0 allows the
1057 1057 commit to proceed. A non-zero status will cause the commit to fail.
1058 1058 Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
1059 1059
1060 1060 ``prelistkeys``
1061 1061 Run before listing pushkeys (like bookmarks) in the
1062 1062 repository. A non-zero status will cause failure. The key namespace is
1063 1063 in ``$HG_NAMESPACE``.
1064 1064
1065 1065 ``preoutgoing``
1066 1066 Run before collecting changes to send from the local repository to
1067 1067 another. A non-zero status will cause failure. This lets you prevent
1068 1068 pull over HTTP or SSH. It can also prevent propagating commits (via
1069 1069 local pull, push (outbound) or bundle commands), but not completely,
1070 1070 since you can just copy files instead. The source of operation is in
1071 1071 ``$HG_SOURCE``. If "serve", the operation is happening on behalf of a remote
1072 1072 SSH or HTTP repository. If "push", "pull" or "bundle", the operation
1073 1073 is happening on behalf of a repository on same system.
1074 1074
1075 1075 ``prepushkey``
1076 1076 Run before a pushkey (like a bookmark) is added to the
1077 1077 repository. A non-zero status will cause the key to be rejected. The
1078 1078 key namespace is in ``$HG_NAMESPACE``, the key is in ``$HG_KEY``,
1079 1079 the old value (if any) is in ``$HG_OLD``, and the new value is in
1080 1080 ``$HG_NEW``.
1081 1081
1082 1082 ``pretag``
1083 1083 Run before creating a tag. Exit status 0 allows the tag to be
1084 1084 created. A non-zero status will cause the tag to fail. The ID of the
1085 1085 changeset to tag is in ``$HG_NODE``. The name of tag is in ``$HG_TAG``. The
1086 1086 tag is local if ``$HG_LOCAL=1``, or in the repository if ``$HG_LOCAL=0``.
1087 1087
1088 1088 ``pretxnopen``
1089 1089 Run before any new repository transaction is open. The reason for the
1090 1090 transaction will be in ``$HG_TXNNAME``, and a unique identifier for the
1091 1091 transaction will be in ``HG_TXNID``. A non-zero status will prevent the
1092 1092 transaction from being opened.
1093 1093
1094 1094 ``pretxnclose``
1095 1095 Run right before the transaction is actually finalized. Any repository change
1096 1096 will be visible to the hook program. This lets you validate the transaction
1097 1097 content or change it. Exit status 0 allows the commit to proceed. A non-zero
1098 1098 status will cause the transaction to be rolled back. The reason for the
1099 1099 transaction opening will be in ``$HG_TXNNAME``, and a unique identifier for
1100 1100 the transaction will be in ``HG_TXNID``. The rest of the available data will
1101 1101 vary according the transaction type. New changesets will add ``$HG_NODE``
1102 1102 (the ID of the first added changeset), ``$HG_NODE_LAST`` (the ID of the last
1103 1103 added changeset), ``$HG_URL`` and ``$HG_SOURCE`` variables. Bookmark and
1104 1104 phase changes will set ``HG_BOOKMARK_MOVED`` and ``HG_PHASES_MOVED`` to ``1``
1105 1105 respectively, etc.
1106 1106
1107 1107 ``pretxnclose-bookmark``
1108 1108 Run right before a bookmark change is actually finalized. Any repository
1109 1109 change will be visible to the hook program. This lets you validate the
1110 1110 transaction content or change it. Exit status 0 allows the commit to
1111 1111 proceed. A non-zero status will cause the transaction to be rolled back.
1112 1112 The name of the bookmark will be available in ``$HG_BOOKMARK``, the new
1113 1113 bookmark location will be available in ``$HG_NODE`` while the previous
1114 1114 location will be available in ``$HG_OLDNODE``. In case of a bookmark
1115 1115 creation ``$HG_OLDNODE`` will be empty. In case of deletion ``$HG_NODE``
1116 1116 will be empty.
1117 1117 In addition, the reason for the transaction opening will be in
1118 1118 ``$HG_TXNNAME``, and a unique identifier for the transaction will be in
1119 1119 ``HG_TXNID``.
1120 1120
1121 1121 ``pretxnclose-phase``
1122 1122 Run right before a phase change is actually finalized. Any repository change
1123 1123 will be visible to the hook program. This lets you validate the transaction
1124 1124 content or change it. Exit status 0 allows the commit to proceed. A non-zero
1125 1125 status will cause the transaction to be rolled back. The hook is called
1126 1126 multiple times, once for each revision affected by a phase change.
1127 1127 The affected node is available in ``$HG_NODE``, the phase in ``$HG_PHASE``
1128 1128 while the previous ``$HG_OLDPHASE``. In case of new node, ``$HG_OLDPHASE``
1129 1129 will be empty. In addition, the reason for the transaction opening will be in
1130 1130 ``$HG_TXNNAME``, and a unique identifier for the transaction will be in
1131 1131 ``HG_TXNID``. The hook is also run for newly added revisions. In this case
1132 1132 the ``$HG_OLDPHASE`` entry will be empty.
1133 1133
1134 1134 ``txnclose``
1135 1135 Run after any repository transaction has been committed. At this
1136 1136 point, the transaction can no longer be rolled back. The hook will run
1137 1137 after the lock is released. See :hg:`help config.hooks.pretxnclose` for
1138 1138 details about available variables.
1139 1139
1140 1140 ``txnclose-bookmark``
1141 1141 Run after any bookmark change has been committed. At this point, the
1142 1142 transaction can no longer be rolled back. The hook will run after the lock
1143 1143 is released. See :hg:`help config.hooks.pretxnclose-bookmark` for details
1144 1144 about available variables.
1145 1145
1146 1146 ``txnclose-phase``
1147 1147 Run after any phase change has been committed. At this point, the
1148 1148 transaction can no longer be rolled back. The hook will run after the lock
1149 1149 is released. See :hg:`help config.hooks.pretxnclose-phase` for details about
1150 1150 available variables.
1151 1151
1152 1152 ``txnabort``
1153 1153 Run when a transaction is aborted. See :hg:`help config.hooks.pretxnclose`
1154 1154 for details about available variables.
1155 1155
1156 1156 ``pretxnchangegroup``
1157 1157 Run after a changegroup has been added via push, pull or unbundle, but before
1158 1158 the transaction has been committed. The changegroup is visible to the hook
1159 1159 program. This allows validation of incoming changes before accepting them.
1160 1160 The ID of the first new changeset is in ``$HG_NODE`` and last is in
1161 1161 ``$HG_NODE_LAST``. Exit status 0 allows the transaction to commit. A non-zero
1162 1162 status will cause the transaction to be rolled back, and the push, pull or
1163 1163 unbundle will fail. The URL that was the source of changes is in ``$HG_URL``.
1164 1164
1165 1165 ``pretxncommit``
1166 1166 Run after a changeset has been created, but before the transaction is
1167 1167 committed. The changeset is visible to the hook program. This allows
1168 1168 validation of the commit message and changes. Exit status 0 allows the
1169 1169 commit to proceed. A non-zero status will cause the transaction to
1170 1170 be rolled back. The ID of the new changeset is in ``$HG_NODE``. The parent
1171 1171 changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
1172 1172
1173 1173 ``preupdate``
1174 1174 Run before updating the working directory. Exit status 0 allows
1175 1175 the update to proceed. A non-zero status will prevent the update.
1176 1176 The changeset ID of first new parent is in ``$HG_PARENT1``. If updating to a
1177 1177 merge, the ID of second new parent is in ``$HG_PARENT2``.
1178 1178
1179 1179 ``listkeys``
1180 1180 Run after listing pushkeys (like bookmarks) in the repository. The
1181 1181 key namespace is in ``$HG_NAMESPACE``. ``$HG_VALUES`` is a
1182 1182 dictionary containing the keys and values.
1183 1183
1184 1184 ``pushkey``
1185 1185 Run after a pushkey (like a bookmark) is added to the
1186 1186 repository. The key namespace is in ``$HG_NAMESPACE``, the key is in
1187 1187 ``$HG_KEY``, the old value (if any) is in ``$HG_OLD``, and the new
1188 1188 value is in ``$HG_NEW``.
1189 1189
1190 1190 ``tag``
1191 1191 Run after a tag is created. The ID of the tagged changeset is in ``$HG_NODE``.
1192 1192 The name of tag is in ``$HG_TAG``. The tag is local if ``$HG_LOCAL=1``, or in
1193 1193 the repository if ``$HG_LOCAL=0``.
1194 1194
1195 1195 ``update``
1196 1196 Run after updating the working directory. The changeset ID of first
1197 1197 new parent is in ``$HG_PARENT1``. If updating to a merge, the ID of second new
1198 1198 parent is in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the
1199 1199 update failed (e.g. because conflicts were not resolved), ``$HG_ERROR=1``.
1200 1200
1201 1201 .. note::
1202 1202
1203 1203 It is generally better to use standard hooks rather than the
1204 1204 generic pre- and post- command hooks, as they are guaranteed to be
1205 1205 called in the appropriate contexts for influencing transactions.
1206 1206 Also, hooks like "commit" will be called in all contexts that
1207 1207 generate a commit (e.g. tag) and not just the commit command.
1208 1208
1209 1209 .. note::
1210 1210
1211 1211 Environment variables with empty values may not be passed to
1212 1212 hooks on platforms such as Windows. As an example, ``$HG_PARENT2``
1213 1213 will have an empty value under Unix-like platforms for non-merge
1214 1214 changesets, while it will not be available at all under Windows.
1215 1215
1216 1216 The syntax for Python hooks is as follows::
1217 1217
1218 1218 hookname = python:modulename.submodule.callable
1219 1219 hookname = python:/path/to/python/module.py:callable
1220 1220
1221 1221 Python hooks are run within the Mercurial process. Each hook is
1222 1222 called with at least three keyword arguments: a ui object (keyword
1223 1223 ``ui``), a repository object (keyword ``repo``), and a ``hooktype``
1224 1224 keyword that tells what kind of hook is used. Arguments listed as
1225 1225 environment variables above are passed as keyword arguments, with no
1226 1226 ``HG_`` prefix, and names in lower case.
1227 1227
1228 1228 If a Python hook returns a "true" value or raises an exception, this
1229 1229 is treated as a failure.
1230 1230
1231 1231
1232 1232 ``hostfingerprints``
1233 1233 --------------------
1234 1234
1235 1235 (Deprecated. Use ``[hostsecurity]``'s ``fingerprints`` options instead.)
1236 1236
1237 1237 Fingerprints of the certificates of known HTTPS servers.
1238 1238
1239 1239 A HTTPS connection to a server with a fingerprint configured here will
1240 1240 only succeed if the servers certificate matches the fingerprint.
1241 1241 This is very similar to how ssh known hosts works.
1242 1242
1243 1243 The fingerprint is the SHA-1 hash value of the DER encoded certificate.
1244 1244 Multiple values can be specified (separated by spaces or commas). This can
1245 1245 be used to define both old and new fingerprints while a host transitions
1246 1246 to a new certificate.
1247 1247
1248 1248 The CA chain and web.cacerts is not used for servers with a fingerprint.
1249 1249
1250 1250 For example::
1251 1251
1252 1252 [hostfingerprints]
1253 1253 hg.intevation.de = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33
1254 1254 hg.intevation.org = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33
1255 1255
1256 1256 ``hostsecurity``
1257 1257 ----------------
1258 1258
1259 1259 Used to specify global and per-host security settings for connecting to
1260 1260 other machines.
1261 1261
1262 1262 The following options control default behavior for all hosts.
1263 1263
1264 1264 ``ciphers``
1265 1265 Defines the cryptographic ciphers to use for connections.
1266 1266
1267 1267 Value must be a valid OpenSSL Cipher List Format as documented at
1268 1268 https://www.openssl.org/docs/manmaster/apps/ciphers.html#CIPHER-LIST-FORMAT.
1269 1269
1270 1270 This setting is for advanced users only. Setting to incorrect values
1271 1271 can significantly lower connection security or decrease performance.
1272 1272 You have been warned.
1273 1273
1274 1274 This option requires Python 2.7.
1275 1275
1276 1276 ``minimumprotocol``
1277 1277 Defines the minimum channel encryption protocol to use.
1278 1278
1279 1279 By default, the highest version of TLS supported by both client and server
1280 1280 is used.
1281 1281
1282 1282 Allowed values are: ``tls1.0``, ``tls1.1``, ``tls1.2``.
1283 1283
1284 1284 When running on an old Python version, only ``tls1.0`` is allowed since
1285 1285 old versions of Python only support up to TLS 1.0.
1286 1286
1287 1287 When running a Python that supports modern TLS versions, the default is
1288 1288 ``tls1.1``. ``tls1.0`` can still be used to allow TLS 1.0. However, this
1289 1289 weakens security and should only be used as a feature of last resort if
1290 1290 a server does not support TLS 1.1+.
1291 1291
1292 1292 Options in the ``[hostsecurity]`` section can have the form
1293 1293 ``hostname``:``setting``. This allows multiple settings to be defined on a
1294 1294 per-host basis.
1295 1295
1296 1296 The following per-host settings can be defined.
1297 1297
1298 1298 ``ciphers``
1299 1299 This behaves like ``ciphers`` as described above except it only applies
1300 1300 to the host on which it is defined.
1301 1301
1302 1302 ``fingerprints``
1303 1303 A list of hashes of the DER encoded peer/remote certificate. Values have
1304 1304 the form ``algorithm``:``fingerprint``. e.g.
1305 1305 ``sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2``.
1306 1306 In addition, colons (``:``) can appear in the fingerprint part.
1307 1307
1308 1308 The following algorithms/prefixes are supported: ``sha1``, ``sha256``,
1309 1309 ``sha512``.
1310 1310
1311 1311 Use of ``sha256`` or ``sha512`` is preferred.
1312 1312
1313 1313 If a fingerprint is specified, the CA chain is not validated for this
1314 1314 host and Mercurial will require the remote certificate to match one
1315 1315 of the fingerprints specified. This means if the server updates its
1316 1316 certificate, Mercurial will abort until a new fingerprint is defined.
1317 1317 This can provide stronger security than traditional CA-based validation
1318 1318 at the expense of convenience.
1319 1319
1320 1320 This option takes precedence over ``verifycertsfile``.
1321 1321
1322 1322 ``minimumprotocol``
1323 1323 This behaves like ``minimumprotocol`` as described above except it
1324 1324 only applies to the host on which it is defined.
1325 1325
1326 1326 ``verifycertsfile``
1327 1327 Path to file a containing a list of PEM encoded certificates used to
1328 1328 verify the server certificate. Environment variables and ``~user``
1329 1329 constructs are expanded in the filename.
1330 1330
1331 1331 The server certificate or the certificate's certificate authority (CA)
1332 1332 must match a certificate from this file or certificate verification
1333 1333 will fail and connections to the server will be refused.
1334 1334
1335 1335 If defined, only certificates provided by this file will be used:
1336 1336 ``web.cacerts`` and any system/default certificates will not be
1337 1337 used.
1338 1338
1339 1339 This option has no effect if the per-host ``fingerprints`` option
1340 1340 is set.
1341 1341
1342 1342 The format of the file is as follows::
1343 1343
1344 1344 -----BEGIN CERTIFICATE-----
1345 1345 ... (certificate in base64 PEM encoding) ...
1346 1346 -----END CERTIFICATE-----
1347 1347 -----BEGIN CERTIFICATE-----
1348 1348 ... (certificate in base64 PEM encoding) ...
1349 1349 -----END CERTIFICATE-----
1350 1350
1351 1351 For example::
1352 1352
1353 1353 [hostsecurity]
1354 1354 hg.example.com:fingerprints = sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2
1355 1355 hg2.example.com:fingerprints = sha1:914f1aff87249c09b6859b88b1906d30756491ca, sha1:fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33
1356 1356 hg3.example.com:fingerprints = sha256:9a:b0:dc:e2:75:ad:8a:b7:84:58:e5:1f:07:32:f1:87:e6:bd:24:22:af:b7:ce:8e:9c:b4:10:cf:b9:f4:0e:d2
1357 1357 foo.example.com:verifycertsfile = /etc/ssl/trusted-ca-certs.pem
1358 1358
1359 1359 To change the default minimum protocol version to TLS 1.2 but to allow TLS 1.1
1360 1360 when connecting to ``hg.example.com``::
1361 1361
1362 1362 [hostsecurity]
1363 1363 minimumprotocol = tls1.2
1364 1364 hg.example.com:minimumprotocol = tls1.1
1365 1365
1366 1366 ``http_proxy``
1367 1367 --------------
1368 1368
1369 1369 Used to access web-based Mercurial repositories through a HTTP
1370 1370 proxy.
1371 1371
1372 1372 ``host``
1373 1373 Host name and (optional) port of the proxy server, for example
1374 1374 "myproxy:8000".
1375 1375
1376 1376 ``no``
1377 1377 Optional. Comma-separated list of host names that should bypass
1378 1378 the proxy.
1379 1379
1380 1380 ``passwd``
1381 1381 Optional. Password to authenticate with at the proxy server.
1382 1382
1383 1383 ``user``
1384 1384 Optional. User name to authenticate with at the proxy server.
1385 1385
1386 1386 ``always``
1387 1387 Optional. Always use the proxy, even for localhost and any entries
1388 1388 in ``http_proxy.no``. (default: False)
1389 1389
1390 1390 ``http``
1391 1391 ----------
1392 1392
1393 1393 Used to configure access to Mercurial repositories via HTTP.
1394 1394
1395 1395 ``timeout``
1396 1396 If set, blocking operations will timeout after that many seconds.
1397 1397 (default: None)
1398 1398
1399 1399 ``merge``
1400 1400 ---------
1401 1401
1402 1402 This section specifies behavior during merges and updates.
1403 1403
1404 1404 ``checkignored``
1405 1405 Controls behavior when an ignored file on disk has the same name as a tracked
1406 1406 file in the changeset being merged or updated to, and has different
1407 1407 contents. Options are ``abort``, ``warn`` and ``ignore``. With ``abort``,
1408 1408 abort on such files. With ``warn``, warn on such files and back them up as
1409 1409 ``.orig``. With ``ignore``, don't print a warning and back them up as
1410 1410 ``.orig``. (default: ``abort``)
1411 1411
1412 1412 ``checkunknown``
1413 1413 Controls behavior when an unknown file that isn't ignored has the same name
1414 1414 as a tracked file in the changeset being merged or updated to, and has
1415 1415 different contents. Similar to ``merge.checkignored``, except for files that
1416 1416 are not ignored. (default: ``abort``)
1417 1417
1418 1418 ``on-failure``
1419 1419 When set to ``continue`` (the default), the merge process attempts to
1420 1420 merge all unresolved files using the merge chosen tool, regardless of
1421 1421 whether previous file merge attempts during the process succeeded or not.
1422 1422 Setting this to ``prompt`` will prompt after any merge failure continue
1423 1423 or halt the merge process. Setting this to ``halt`` will automatically
1424 1424 halt the merge process on any merge tool failure. The merge process
1425 1425 can be restarted by using the ``resolve`` command. When a merge is
1426 1426 halted, the repository is left in a normal ``unresolved`` merge state.
1427 1427 (default: ``continue``)
1428 1428
1429 1429 ``strict-capability-check``
1430 1430 Whether capabilities of internal merge tools are checked strictly
1431 1431 or not, while examining rules to decide merge tool to be used.
1432 1432 (default: False)
1433 1433
1434 1434 ``merge-patterns``
1435 1435 ------------------
1436 1436
1437 1437 This section specifies merge tools to associate with particular file
1438 1438 patterns. Tools matched here will take precedence over the default
1439 1439 merge tool. Patterns are globs by default, rooted at the repository
1440 1440 root.
1441 1441
1442 1442 Example::
1443 1443
1444 1444 [merge-patterns]
1445 1445 **.c = kdiff3
1446 1446 **.jpg = myimgmerge
1447 1447
1448 1448 ``merge-tools``
1449 1449 ---------------
1450 1450
1451 1451 This section configures external merge tools to use for file-level
1452 1452 merges. This section has likely been preconfigured at install time.
1453 1453 Use :hg:`config merge-tools` to check the existing configuration.
1454 1454 Also see :hg:`help merge-tools` for more details.
1455 1455
1456 1456 Example ``~/.hgrc``::
1457 1457
1458 1458 [merge-tools]
1459 1459 # Override stock tool location
1460 1460 kdiff3.executable = ~/bin/kdiff3
1461 1461 # Specify command line
1462 1462 kdiff3.args = $base $local $other -o $output
1463 1463 # Give higher priority
1464 1464 kdiff3.priority = 1
1465 1465
1466 1466 # Changing the priority of preconfigured tool
1467 1467 meld.priority = 0
1468 1468
1469 1469 # Disable a preconfigured tool
1470 1470 vimdiff.disabled = yes
1471 1471
1472 1472 # Define new tool
1473 1473 myHtmlTool.args = -m $local $other $base $output
1474 1474 myHtmlTool.regkey = Software\FooSoftware\HtmlMerge
1475 1475 myHtmlTool.priority = 1
1476 1476
1477 1477 Supported arguments:
1478 1478
1479 1479 ``priority``
1480 1480 The priority in which to evaluate this tool.
1481 1481 (default: 0)
1482 1482
1483 1483 ``executable``
1484 1484 Either just the name of the executable or its pathname.
1485 1485
1486 1486 .. container:: windows
1487 1487
1488 1488 On Windows, the path can use environment variables with ${ProgramFiles}
1489 1489 syntax.
1490 1490
1491 1491 (default: the tool name)
1492 1492
1493 1493 ``args``
1494 1494 The arguments to pass to the tool executable. You can refer to the
1495 1495 files being merged as well as the output file through these
1496 1496 variables: ``$base``, ``$local``, ``$other``, ``$output``.
1497 1497
1498 1498 The meaning of ``$local`` and ``$other`` can vary depending on which action is
1499 1499 being performed. During an update or merge, ``$local`` represents the original
1500 1500 state of the file, while ``$other`` represents the commit you are updating to or
1501 1501 the commit you are merging with. During a rebase, ``$local`` represents the
1502 1502 destination of the rebase, and ``$other`` represents the commit being rebased.
1503 1503
1504 1504 Some operations define custom labels to assist with identifying the revisions,
1505 1505 accessible via ``$labellocal``, ``$labelother``, and ``$labelbase``. If custom
1506 1506 labels are not available, these will be ``local``, ``other``, and ``base``,
1507 1507 respectively.
1508 1508 (default: ``$local $base $other``)
1509 1509
1510 1510 ``premerge``
1511 1511 Attempt to run internal non-interactive 3-way merge tool before
1512 1512 launching external tool. Options are ``true``, ``false``, ``keep`` or
1513 1513 ``keep-merge3``. The ``keep`` option will leave markers in the file if the
1514 1514 premerge fails. The ``keep-merge3`` will do the same but include information
1515 1515 about the base of the merge in the marker (see internal :merge3 in
1516 1516 :hg:`help merge-tools`).
1517 1517 (default: True)
1518 1518
1519 1519 ``binary``
1520 1520 This tool can merge binary files. (default: False, unless tool
1521 1521 was selected by file pattern match)
1522 1522
1523 1523 ``symlink``
1524 1524 This tool can merge symlinks. (default: False)
1525 1525
1526 1526 ``check``
1527 1527 A list of merge success-checking options:
1528 1528
1529 1529 ``changed``
1530 1530 Ask whether merge was successful when the merged file shows no changes.
1531 1531 ``conflicts``
1532 1532 Check whether there are conflicts even though the tool reported success.
1533 1533 ``prompt``
1534 1534 Always prompt for merge success, regardless of success reported by tool.
1535 1535
1536 1536 ``fixeol``
1537 1537 Attempt to fix up EOL changes caused by the merge tool.
1538 1538 (default: False)
1539 1539
1540 1540 ``gui``
1541 1541 This tool requires a graphical interface to run. (default: False)
1542 1542
1543 1543 ``mergemarkers``
1544 1544 Controls whether the labels passed via ``$labellocal``, ``$labelother``, and
1545 1545 ``$labelbase`` are ``detailed`` (respecting ``mergemarkertemplate``) or
1546 1546 ``basic``. If ``premerge`` is ``keep`` or ``keep-merge3``, the conflict
1547 1547 markers generated during premerge will be ``detailed`` if either this option or
1548 1548 the corresponding option in the ``[ui]`` section is ``detailed``.
1549 1549 (default: ``basic``)
1550 1550
1551 1551 ``mergemarkertemplate``
1552 1552 This setting can be used to override ``mergemarkertemplate`` from the ``[ui]``
1553 1553 section on a per-tool basis; this applies to the ``$label``-prefixed variables
1554 1554 and to the conflict markers that are generated if ``premerge`` is ``keep` or
1555 1555 ``keep-merge3``. See the corresponding variable in ``[ui]`` for more
1556 1556 information.
1557 1557
1558 1558 .. container:: windows
1559 1559
1560 1560 ``regkey``
1561 1561 Windows registry key which describes install location of this
1562 1562 tool. Mercurial will search for this key first under
1563 1563 ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``.
1564 1564 (default: None)
1565 1565
1566 1566 ``regkeyalt``
1567 1567 An alternate Windows registry key to try if the first key is not
1568 1568 found. The alternate key uses the same ``regname`` and ``regappend``
1569 1569 semantics of the primary key. The most common use for this key
1570 1570 is to search for 32bit applications on 64bit operating systems.
1571 1571 (default: None)
1572 1572
1573 1573 ``regname``
1574 1574 Name of value to read from specified registry key.
1575 1575 (default: the unnamed (default) value)
1576 1576
1577 1577 ``regappend``
1578 1578 String to append to the value read from the registry, typically
1579 1579 the executable name of the tool.
1580 1580 (default: None)
1581 1581
1582 1582 ``pager``
1583 1583 ---------
1584 1584
1585 1585 Setting used to control when to paginate and with what external tool. See
1586 1586 :hg:`help pager` for details.
1587 1587
1588 1588 ``pager``
1589 1589 Define the external tool used as pager.
1590 1590
1591 1591 If no pager is set, Mercurial uses the environment variable $PAGER.
1592 1592 If neither pager.pager, nor $PAGER is set, a default pager will be
1593 1593 used, typically `less` on Unix and `more` on Windows. Example::
1594 1594
1595 1595 [pager]
1596 1596 pager = less -FRX
1597 1597
1598 1598 ``ignore``
1599 1599 List of commands to disable the pager for. Example::
1600 1600
1601 1601 [pager]
1602 1602 ignore = version, help, update
1603 1603
1604 1604 ``patch``
1605 1605 ---------
1606 1606
1607 1607 Settings used when applying patches, for instance through the 'import'
1608 1608 command or with Mercurial Queues extension.
1609 1609
1610 1610 ``eol``
1611 1611 When set to 'strict' patch content and patched files end of lines
1612 1612 are preserved. When set to ``lf`` or ``crlf``, both files end of
1613 1613 lines are ignored when patching and the result line endings are
1614 1614 normalized to either LF (Unix) or CRLF (Windows). When set to
1615 1615 ``auto``, end of lines are again ignored while patching but line
1616 1616 endings in patched files are normalized to their original setting
1617 1617 on a per-file basis. If target file does not exist or has no end
1618 1618 of line, patch line endings are preserved.
1619 1619 (default: strict)
1620 1620
1621 1621 ``fuzz``
1622 1622 The number of lines of 'fuzz' to allow when applying patches. This
1623 1623 controls how much context the patcher is allowed to ignore when
1624 1624 trying to apply a patch.
1625 1625 (default: 2)
1626 1626
1627 1627 ``paths``
1628 1628 ---------
1629 1629
1630 1630 Assigns symbolic names and behavior to repositories.
1631 1631
1632 1632 Options are symbolic names defining the URL or directory that is the
1633 1633 location of the repository. Example::
1634 1634
1635 1635 [paths]
1636 1636 my_server = https://example.com/my_repo
1637 1637 local_path = /home/me/repo
1638 1638
1639 1639 These symbolic names can be used from the command line. To pull
1640 1640 from ``my_server``: :hg:`pull my_server`. To push to ``local_path``:
1641 1641 :hg:`push local_path`.
1642 1642
1643 1643 Options containing colons (``:``) denote sub-options that can influence
1644 1644 behavior for that specific path. Example::
1645 1645
1646 1646 [paths]
1647 1647 my_server = https://example.com/my_path
1648 1648 my_server:pushurl = ssh://example.com/my_path
1649 1649
1650 1650 The following sub-options can be defined:
1651 1651
1652 1652 ``pushurl``
1653 1653 The URL to use for push operations. If not defined, the location
1654 1654 defined by the path's main entry is used.
1655 1655
1656 1656 ``pushrev``
1657 1657 A revset defining which revisions to push by default.
1658 1658
1659 1659 When :hg:`push` is executed without a ``-r`` argument, the revset
1660 1660 defined by this sub-option is evaluated to determine what to push.
1661 1661
1662 1662 For example, a value of ``.`` will push the working directory's
1663 1663 revision by default.
1664 1664
1665 1665 Revsets specifying bookmarks will not result in the bookmark being
1666 1666 pushed.
1667 1667
1668 1668 The following special named paths exist:
1669 1669
1670 1670 ``default``
1671 1671 The URL or directory to use when no source or remote is specified.
1672 1672
1673 1673 :hg:`clone` will automatically define this path to the location the
1674 1674 repository was cloned from.
1675 1675
1676 1676 ``default-push``
1677 1677 (deprecated) The URL or directory for the default :hg:`push` location.
1678 1678 ``default:pushurl`` should be used instead.
1679 1679
1680 1680 ``phases``
1681 1681 ----------
1682 1682
1683 1683 Specifies default handling of phases. See :hg:`help phases` for more
1684 1684 information about working with phases.
1685 1685
1686 1686 ``publish``
1687 1687 Controls draft phase behavior when working as a server. When true,
1688 1688 pushed changesets are set to public in both client and server and
1689 1689 pulled or cloned changesets are set to public in the client.
1690 1690 (default: True)
1691 1691
1692 1692 ``new-commit``
1693 1693 Phase of newly-created commits.
1694 1694 (default: draft)
1695 1695
1696 1696 ``checksubrepos``
1697 1697 Check the phase of the current revision of each subrepository. Allowed
1698 1698 values are "ignore", "follow" and "abort". For settings other than
1699 1699 "ignore", the phase of the current revision of each subrepository is
1700 1700 checked before committing the parent repository. If any of those phases is
1701 1701 greater than the phase of the parent repository (e.g. if a subrepo is in a
1702 1702 "secret" phase while the parent repo is in "draft" phase), the commit is
1703 1703 either aborted (if checksubrepos is set to "abort") or the higher phase is
1704 1704 used for the parent repository commit (if set to "follow").
1705 1705 (default: follow)
1706 1706
1707 1707
1708 1708 ``profiling``
1709 1709 -------------
1710 1710
1711 1711 Specifies profiling type, format, and file output. Two profilers are
1712 1712 supported: an instrumenting profiler (named ``ls``), and a sampling
1713 1713 profiler (named ``stat``).
1714 1714
1715 1715 In this section description, 'profiling data' stands for the raw data
1716 1716 collected during profiling, while 'profiling report' stands for a
1717 1717 statistical text report generated from the profiling data.
1718 1718
1719 1719 ``enabled``
1720 1720 Enable the profiler.
1721 1721 (default: false)
1722 1722
1723 1723 This is equivalent to passing ``--profile`` on the command line.
1724 1724
1725 1725 ``type``
1726 1726 The type of profiler to use.
1727 1727 (default: stat)
1728 1728
1729 1729 ``ls``
1730 1730 Use Python's built-in instrumenting profiler. This profiler
1731 1731 works on all platforms, but each line number it reports is the
1732 1732 first line of a function. This restriction makes it difficult to
1733 1733 identify the expensive parts of a non-trivial function.
1734 1734 ``stat``
1735 1735 Use a statistical profiler, statprof. This profiler is most
1736 1736 useful for profiling commands that run for longer than about 0.1
1737 1737 seconds.
1738 1738
1739 1739 ``format``
1740 1740 Profiling format. Specific to the ``ls`` instrumenting profiler.
1741 1741 (default: text)
1742 1742
1743 1743 ``text``
1744 1744 Generate a profiling report. When saving to a file, it should be
1745 1745 noted that only the report is saved, and the profiling data is
1746 1746 not kept.
1747 1747 ``kcachegrind``
1748 1748 Format profiling data for kcachegrind use: when saving to a
1749 1749 file, the generated file can directly be loaded into
1750 1750 kcachegrind.
1751 1751
1752 1752 ``statformat``
1753 1753 Profiling format for the ``stat`` profiler.
1754 1754 (default: hotpath)
1755 1755
1756 1756 ``hotpath``
1757 1757 Show a tree-based display containing the hot path of execution (where
1758 1758 most time was spent).
1759 1759 ``bymethod``
1760 1760 Show a table of methods ordered by how frequently they are active.
1761 1761 ``byline``
1762 1762 Show a table of lines in files ordered by how frequently they are active.
1763 1763 ``json``
1764 1764 Render profiling data as JSON.
1765 1765
1766 1766 ``frequency``
1767 1767 Sampling frequency. Specific to the ``stat`` sampling profiler.
1768 1768 (default: 1000)
1769 1769
1770 1770 ``output``
1771 1771 File path where profiling data or report should be saved. If the
1772 1772 file exists, it is replaced. (default: None, data is printed on
1773 1773 stderr)
1774 1774
1775 1775 ``sort``
1776 1776 Sort field. Specific to the ``ls`` instrumenting profiler.
1777 1777 One of ``callcount``, ``reccallcount``, ``totaltime`` and
1778 1778 ``inlinetime``.
1779 1779 (default: inlinetime)
1780 1780
1781 1781 ``time-track``
1782 1782 Control if the stat profiler track ``cpu`` or ``real`` time.
1783 1783 (default: ``cpu`` on Windows, otherwise ``real``)
1784 1784
1785 1785 ``limit``
1786 1786 Number of lines to show. Specific to the ``ls`` instrumenting profiler.
1787 1787 (default: 30)
1788 1788
1789 1789 ``nested``
1790 1790 Show at most this number of lines of drill-down info after each main entry.
1791 1791 This can help explain the difference between Total and Inline.
1792 1792 Specific to the ``ls`` instrumenting profiler.
1793 1793 (default: 0)
1794 1794
1795 1795 ``showmin``
1796 1796 Minimum fraction of samples an entry must have for it to be displayed.
1797 1797 Can be specified as a float between ``0.0`` and ``1.0`` or can have a
1798 1798 ``%`` afterwards to allow values up to ``100``. e.g. ``5%``.
1799 1799
1800 1800 Only used by the ``stat`` profiler.
1801 1801
1802 1802 For the ``hotpath`` format, default is ``0.05``.
1803 1803 For the ``chrome`` format, default is ``0.005``.
1804 1804
1805 1805 The option is unused on other formats.
1806 1806
1807 1807 ``showmax``
1808 1808 Maximum fraction of samples an entry can have before it is ignored in
1809 1809 display. Values format is the same as ``showmin``.
1810 1810
1811 1811 Only used by the ``stat`` profiler.
1812 1812
1813 1813 For the ``chrome`` format, default is ``0.999``.
1814 1814
1815 1815 The option is unused on other formats.
1816 1816
1817 1817 ``showtime``
1818 1818 Show time taken as absolute durations, in addition to percentages.
1819 1819 Only used by the ``hotpath`` format.
1820 1820 (default: true)
1821 1821
1822 1822 ``progress``
1823 1823 ------------
1824 1824
1825 1825 Mercurial commands can draw progress bars that are as informative as
1826 1826 possible. Some progress bars only offer indeterminate information, while others
1827 1827 have a definite end point.
1828 1828
1829 1829 ``debug``
1830 1830 Whether to print debug info when updating the progress bar. (default: False)
1831 1831
1832 1832 ``delay``
1833 1833 Number of seconds (float) before showing the progress bar. (default: 3)
1834 1834
1835 1835 ``changedelay``
1836 1836 Minimum delay before showing a new topic. When set to less than 3 * refresh,
1837 1837 that value will be used instead. (default: 1)
1838 1838
1839 1839 ``estimateinterval``
1840 1840 Maximum sampling interval in seconds for speed and estimated time
1841 1841 calculation. (default: 60)
1842 1842
1843 1843 ``refresh``
1844 1844 Time in seconds between refreshes of the progress bar. (default: 0.1)
1845 1845
1846 1846 ``format``
1847 1847 Format of the progress bar.
1848 1848
1849 1849 Valid entries for the format field are ``topic``, ``bar``, ``number``,
1850 1850 ``unit``, ``estimate``, ``speed``, and ``item``. ``item`` defaults to the
1851 1851 last 20 characters of the item, but this can be changed by adding either
1852 1852 ``-<num>`` which would take the last num characters, or ``+<num>`` for the
1853 1853 first num characters.
1854 1854
1855 1855 (default: topic bar number estimate)
1856 1856
1857 1857 ``width``
1858 1858 If set, the maximum width of the progress information (that is, min(width,
1859 1859 term width) will be used).
1860 1860
1861 1861 ``clear-complete``
1862 1862 Clear the progress bar after it's done. (default: True)
1863 1863
1864 1864 ``disable``
1865 1865 If true, don't show a progress bar.
1866 1866
1867 1867 ``assume-tty``
1868 1868 If true, ALWAYS show a progress bar, unless disable is given.
1869 1869
1870 1870 ``rebase``
1871 1871 ----------
1872 1872
1873 1873 ``evolution.allowdivergence``
1874 1874 Default to False, when True allow creating divergence when performing
1875 1875 rebase of obsolete changesets.
1876 1876
1877 1877 ``revsetalias``
1878 1878 ---------------
1879 1879
1880 1880 Alias definitions for revsets. See :hg:`help revsets` for details.
1881 1881
1882 1882 ``rewrite``
1883 1883 -----------
1884 1884
1885 1885 ``backup-bundle``
1886 1886 Whether to save stripped changesets to a bundle file. (default: True)
1887 1887
1888 1888 ``update-timestamp``
1889 1889 If true, updates the date and time of the changeset to current. It is only
1890 1890 applicable for `hg amend`, `hg commit --amend` and `hg uncommit` in the
1891 1891 current version.
1892 1892
1893 ``empty-successor``
1894
1895 Control what happens with empty successors that are the result of rewrite
1896 operations. If set to ``skip``, the successor is not created. If set to
1897 ``keep``, the empty successor is created and kept.
1898
1899 Currently, no command considers this configuration. (EXPERIMENTAL)
1900
1893 1901 ``storage``
1894 1902 -----------
1895 1903
1896 1904 Control the strategy Mercurial uses internally to store history. Options in this
1897 1905 category impact performance and repository size.
1898 1906
1899 1907 ``revlog.optimize-delta-parent-choice``
1900 1908 When storing a merge revision, both parents will be equally considered as
1901 1909 a possible delta base. This results in better delta selection and improved
1902 1910 revlog compression. This option is enabled by default.
1903 1911
1904 1912 Turning this option off can result in large increase of repository size for
1905 1913 repository with many merges.
1906 1914
1907 1915 ``revlog.reuse-external-delta-parent``
1908 1916 Control the order in which delta parents are considered when adding new
1909 1917 revisions from an external source.
1910 1918 (typically: apply bundle from `hg pull` or `hg push`).
1911 1919
1912 1920 New revisions are usually provided as a delta against other revisions. By
1913 1921 default, Mercurial will try to reuse this delta first, therefore using the
1914 1922 same "delta parent" as the source. Directly using delta's from the source
1915 1923 reduces CPU usage and usually speeds up operation. However, in some case,
1916 1924 the source might have sub-optimal delta bases and forcing their reevaluation
1917 1925 is useful. For example, pushes from an old client could have sub-optimal
1918 1926 delta's parent that the server want to optimize. (lack of general delta, bad
1919 1927 parents, choice, lack of sparse-revlog, etc).
1920 1928
1921 1929 This option is enabled by default. Turning it off will ensure bad delta
1922 1930 parent choices from older client do not propagate to this repository, at
1923 1931 the cost of a small increase in CPU consumption.
1924 1932
1925 1933 Note: this option only control the order in which delta parents are
1926 1934 considered. Even when disabled, the existing delta from the source will be
1927 1935 reused if the same delta parent is selected.
1928 1936
1929 1937 ``revlog.reuse-external-delta``
1930 1938 Control the reuse of delta from external source.
1931 1939 (typically: apply bundle from `hg pull` or `hg push`).
1932 1940
1933 1941 New revisions are usually provided as a delta against another revision. By
1934 1942 default, Mercurial will not recompute the same delta again, trusting
1935 1943 externally provided deltas. There have been rare cases of small adjustment
1936 1944 to the diffing algorithm in the past. So in some rare case, recomputing
1937 1945 delta provided by ancient clients can provides better results. Disabling
1938 1946 this option means going through a full delta recomputation for all incoming
1939 1947 revisions. It means a large increase in CPU usage and will slow operations
1940 1948 down.
1941 1949
1942 1950 This option is enabled by default. When disabled, it also disables the
1943 1951 related ``storage.revlog.reuse-external-delta-parent`` option.
1944 1952
1945 1953 ``revlog.zlib.level``
1946 1954 Zlib compression level used when storing data into the repository. Accepted
1947 1955 Value range from 1 (lowest compression) to 9 (highest compression). Zlib
1948 1956 default value is 6.
1949 1957
1950 1958
1951 1959 ``revlog.zstd.level``
1952 1960 zstd compression level used when storing data into the repository. Accepted
1953 1961 Value range from 1 (lowest compression) to 22 (highest compression).
1954 1962 (default 3)
1955 1963
1956 1964 ``server``
1957 1965 ----------
1958 1966
1959 1967 Controls generic server settings.
1960 1968
1961 1969 ``bookmarks-pushkey-compat``
1962 1970 Trigger pushkey hook when being pushed bookmark updates. This config exist
1963 1971 for compatibility purpose (default to True)
1964 1972
1965 1973 If you use ``pushkey`` and ``pre-pushkey`` hooks to control bookmark
1966 1974 movement we recommend you migrate them to ``txnclose-bookmark`` and
1967 1975 ``pretxnclose-bookmark``.
1968 1976
1969 1977 ``compressionengines``
1970 1978 List of compression engines and their relative priority to advertise
1971 1979 to clients.
1972 1980
1973 1981 The order of compression engines determines their priority, the first
1974 1982 having the highest priority. If a compression engine is not listed
1975 1983 here, it won't be advertised to clients.
1976 1984
1977 1985 If not set (the default), built-in defaults are used. Run
1978 1986 :hg:`debuginstall` to list available compression engines and their
1979 1987 default wire protocol priority.
1980 1988
1981 1989 Older Mercurial clients only support zlib compression and this setting
1982 1990 has no effect for legacy clients.
1983 1991
1984 1992 ``uncompressed``
1985 1993 Whether to allow clients to clone a repository using the
1986 1994 uncompressed streaming protocol. This transfers about 40% more
1987 1995 data than a regular clone, but uses less memory and CPU on both
1988 1996 server and client. Over a LAN (100 Mbps or better) or a very fast
1989 1997 WAN, an uncompressed streaming clone is a lot faster (~10x) than a
1990 1998 regular clone. Over most WAN connections (anything slower than
1991 1999 about 6 Mbps), uncompressed streaming is slower, because of the
1992 2000 extra data transfer overhead. This mode will also temporarily hold
1993 2001 the write lock while determining what data to transfer.
1994 2002 (default: True)
1995 2003
1996 2004 ``uncompressedallowsecret``
1997 2005 Whether to allow stream clones when the repository contains secret
1998 2006 changesets. (default: False)
1999 2007
2000 2008 ``preferuncompressed``
2001 2009 When set, clients will try to use the uncompressed streaming
2002 2010 protocol. (default: False)
2003 2011
2004 2012 ``disablefullbundle``
2005 2013 When set, servers will refuse attempts to do pull-based clones.
2006 2014 If this option is set, ``preferuncompressed`` and/or clone bundles
2007 2015 are highly recommended. Partial clones will still be allowed.
2008 2016 (default: False)
2009 2017
2010 2018 ``streamunbundle``
2011 2019 When set, servers will apply data sent from the client directly,
2012 2020 otherwise it will be written to a temporary file first. This option
2013 2021 effectively prevents concurrent pushes.
2014 2022
2015 2023 ``pullbundle``
2016 2024 When set, the server will check pullbundle.manifest for bundles
2017 2025 covering the requested heads and common nodes. The first matching
2018 2026 entry will be streamed to the client.
2019 2027
2020 2028 For HTTP transport, the stream will still use zlib compression
2021 2029 for older clients.
2022 2030
2023 2031 ``concurrent-push-mode``
2024 2032 Level of allowed race condition between two pushing clients.
2025 2033
2026 2034 - 'strict': push is abort if another client touched the repository
2027 2035 while the push was preparing.
2028 2036 - 'check-related': push is only aborted if it affects head that got also
2029 2037 affected while the push was preparing. (default since 5.4)
2030 2038
2031 2039 'check-related' only takes effect for compatible clients (version
2032 2040 4.3 and later). Older clients will use 'strict'.
2033 2041
2034 2042 ``validate``
2035 2043 Whether to validate the completeness of pushed changesets by
2036 2044 checking that all new file revisions specified in manifests are
2037 2045 present. (default: False)
2038 2046
2039 2047 ``maxhttpheaderlen``
2040 2048 Instruct HTTP clients not to send request headers longer than this
2041 2049 many bytes. (default: 1024)
2042 2050
2043 2051 ``bundle1``
2044 2052 Whether to allow clients to push and pull using the legacy bundle1
2045 2053 exchange format. (default: True)
2046 2054
2047 2055 ``bundle1gd``
2048 2056 Like ``bundle1`` but only used if the repository is using the
2049 2057 *generaldelta* storage format. (default: True)
2050 2058
2051 2059 ``bundle1.push``
2052 2060 Whether to allow clients to push using the legacy bundle1 exchange
2053 2061 format. (default: True)
2054 2062
2055 2063 ``bundle1gd.push``
2056 2064 Like ``bundle1.push`` but only used if the repository is using the
2057 2065 *generaldelta* storage format. (default: True)
2058 2066
2059 2067 ``bundle1.pull``
2060 2068 Whether to allow clients to pull using the legacy bundle1 exchange
2061 2069 format. (default: True)
2062 2070
2063 2071 ``bundle1gd.pull``
2064 2072 Like ``bundle1.pull`` but only used if the repository is using the
2065 2073 *generaldelta* storage format. (default: True)
2066 2074
2067 2075 Large repositories using the *generaldelta* storage format should
2068 2076 consider setting this option because converting *generaldelta*
2069 2077 repositories to the exchange format required by the bundle1 data
2070 2078 format can consume a lot of CPU.
2071 2079
2072 2080 ``bundle2.stream``
2073 2081 Whether to allow clients to pull using the bundle2 streaming protocol.
2074 2082 (default: True)
2075 2083
2076 2084 ``zliblevel``
2077 2085 Integer between ``-1`` and ``9`` that controls the zlib compression level
2078 2086 for wire protocol commands that send zlib compressed output (notably the
2079 2087 commands that send repository history data).
2080 2088
2081 2089 The default (``-1``) uses the default zlib compression level, which is
2082 2090 likely equivalent to ``6``. ``0`` means no compression. ``9`` means
2083 2091 maximum compression.
2084 2092
2085 2093 Setting this option allows server operators to make trade-offs between
2086 2094 bandwidth and CPU used. Lowering the compression lowers CPU utilization
2087 2095 but sends more bytes to clients.
2088 2096
2089 2097 This option only impacts the HTTP server.
2090 2098
2091 2099 ``zstdlevel``
2092 2100 Integer between ``1`` and ``22`` that controls the zstd compression level
2093 2101 for wire protocol commands. ``1`` is the minimal amount of compression and
2094 2102 ``22`` is the highest amount of compression.
2095 2103
2096 2104 The default (``3``) should be significantly faster than zlib while likely
2097 2105 delivering better compression ratios.
2098 2106
2099 2107 This option only impacts the HTTP server.
2100 2108
2101 2109 See also ``server.zliblevel``.
2102 2110
2103 2111 ``view``
2104 2112 Repository filter used when exchanging revisions with the peer.
2105 2113
2106 2114 The default view (``served``) excludes secret and hidden changesets.
2107 2115 Another useful value is ``immutable`` (no draft, secret or hidden
2108 2116 changesets). (EXPERIMENTAL)
2109 2117
2110 2118 ``smtp``
2111 2119 --------
2112 2120
2113 2121 Configuration for extensions that need to send email messages.
2114 2122
2115 2123 ``host``
2116 2124 Host name of mail server, e.g. "mail.example.com".
2117 2125
2118 2126 ``port``
2119 2127 Optional. Port to connect to on mail server. (default: 465 if
2120 2128 ``tls`` is smtps; 25 otherwise)
2121 2129
2122 2130 ``tls``
2123 2131 Optional. Method to enable TLS when connecting to mail server: starttls,
2124 2132 smtps or none. (default: none)
2125 2133
2126 2134 ``username``
2127 2135 Optional. User name for authenticating with the SMTP server.
2128 2136 (default: None)
2129 2137
2130 2138 ``password``
2131 2139 Optional. Password for authenticating with the SMTP server. If not
2132 2140 specified, interactive sessions will prompt the user for a
2133 2141 password; non-interactive sessions will fail. (default: None)
2134 2142
2135 2143 ``local_hostname``
2136 2144 Optional. The hostname that the sender can use to identify
2137 2145 itself to the MTA.
2138 2146
2139 2147
2140 2148 ``subpaths``
2141 2149 ------------
2142 2150
2143 2151 Subrepository source URLs can go stale if a remote server changes name
2144 2152 or becomes temporarily unavailable. This section lets you define
2145 2153 rewrite rules of the form::
2146 2154
2147 2155 <pattern> = <replacement>
2148 2156
2149 2157 where ``pattern`` is a regular expression matching a subrepository
2150 2158 source URL and ``replacement`` is the replacement string used to
2151 2159 rewrite it. Groups can be matched in ``pattern`` and referenced in
2152 2160 ``replacements``. For instance::
2153 2161
2154 2162 http://server/(.*)-hg/ = http://hg.server/\1/
2155 2163
2156 2164 rewrites ``http://server/foo-hg/`` into ``http://hg.server/foo/``.
2157 2165
2158 2166 Relative subrepository paths are first made absolute, and the
2159 2167 rewrite rules are then applied on the full (absolute) path. If ``pattern``
2160 2168 doesn't match the full path, an attempt is made to apply it on the
2161 2169 relative path alone. The rules are applied in definition order.
2162 2170
2163 2171 ``subrepos``
2164 2172 ------------
2165 2173
2166 2174 This section contains options that control the behavior of the
2167 2175 subrepositories feature. See also :hg:`help subrepos`.
2168 2176
2169 2177 Security note: auditing in Mercurial is known to be insufficient to
2170 2178 prevent clone-time code execution with carefully constructed Git
2171 2179 subrepos. It is unknown if a similar detect is present in Subversion
2172 2180 subrepos. Both Git and Subversion subrepos are disabled by default
2173 2181 out of security concerns. These subrepo types can be enabled using
2174 2182 the respective options below.
2175 2183
2176 2184 ``allowed``
2177 2185 Whether subrepositories are allowed in the working directory.
2178 2186
2179 2187 When false, commands involving subrepositories (like :hg:`update`)
2180 2188 will fail for all subrepository types.
2181 2189 (default: true)
2182 2190
2183 2191 ``hg:allowed``
2184 2192 Whether Mercurial subrepositories are allowed in the working
2185 2193 directory. This option only has an effect if ``subrepos.allowed``
2186 2194 is true.
2187 2195 (default: true)
2188 2196
2189 2197 ``git:allowed``
2190 2198 Whether Git subrepositories are allowed in the working directory.
2191 2199 This option only has an effect if ``subrepos.allowed`` is true.
2192 2200
2193 2201 See the security note above before enabling Git subrepos.
2194 2202 (default: false)
2195 2203
2196 2204 ``svn:allowed``
2197 2205 Whether Subversion subrepositories are allowed in the working
2198 2206 directory. This option only has an effect if ``subrepos.allowed``
2199 2207 is true.
2200 2208
2201 2209 See the security note above before enabling Subversion subrepos.
2202 2210 (default: false)
2203 2211
2204 2212 ``templatealias``
2205 2213 -----------------
2206 2214
2207 2215 Alias definitions for templates. See :hg:`help templates` for details.
2208 2216
2209 2217 ``templates``
2210 2218 -------------
2211 2219
2212 2220 Use the ``[templates]`` section to define template strings.
2213 2221 See :hg:`help templates` for details.
2214 2222
2215 2223 ``trusted``
2216 2224 -----------
2217 2225
2218 2226 Mercurial will not use the settings in the
2219 2227 ``.hg/hgrc`` file from a repository if it doesn't belong to a trusted
2220 2228 user or to a trusted group, as various hgrc features allow arbitrary
2221 2229 commands to be run. This issue is often encountered when configuring
2222 2230 hooks or extensions for shared repositories or servers. However,
2223 2231 the web interface will use some safe settings from the ``[web]``
2224 2232 section.
2225 2233
2226 2234 This section specifies what users and groups are trusted. The
2227 2235 current user is always trusted. To trust everybody, list a user or a
2228 2236 group with name ``*``. These settings must be placed in an
2229 2237 *already-trusted file* to take effect, such as ``$HOME/.hgrc`` of the
2230 2238 user or service running Mercurial.
2231 2239
2232 2240 ``users``
2233 2241 Comma-separated list of trusted users.
2234 2242
2235 2243 ``groups``
2236 2244 Comma-separated list of trusted groups.
2237 2245
2238 2246
2239 2247 ``ui``
2240 2248 ------
2241 2249
2242 2250 User interface controls.
2243 2251
2244 2252 ``archivemeta``
2245 2253 Whether to include the .hg_archival.txt file containing meta data
2246 2254 (hashes for the repository base and for tip) in archives created
2247 2255 by the :hg:`archive` command or downloaded via hgweb.
2248 2256 (default: True)
2249 2257
2250 2258 ``askusername``
2251 2259 Whether to prompt for a username when committing. If True, and
2252 2260 neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will
2253 2261 be prompted to enter a username. If no username is entered, the
2254 2262 default ``USER@HOST`` is used instead.
2255 2263 (default: False)
2256 2264
2257 2265 ``clonebundles``
2258 2266 Whether the "clone bundles" feature is enabled.
2259 2267
2260 2268 When enabled, :hg:`clone` may download and apply a server-advertised
2261 2269 bundle file from a URL instead of using the normal exchange mechanism.
2262 2270
2263 2271 This can likely result in faster and more reliable clones.
2264 2272
2265 2273 (default: True)
2266 2274
2267 2275 ``clonebundlefallback``
2268 2276 Whether failure to apply an advertised "clone bundle" from a server
2269 2277 should result in fallback to a regular clone.
2270 2278
2271 2279 This is disabled by default because servers advertising "clone
2272 2280 bundles" often do so to reduce server load. If advertised bundles
2273 2281 start mass failing and clients automatically fall back to a regular
2274 2282 clone, this would add significant and unexpected load to the server
2275 2283 since the server is expecting clone operations to be offloaded to
2276 2284 pre-generated bundles. Failing fast (the default behavior) ensures
2277 2285 clients don't overwhelm the server when "clone bundle" application
2278 2286 fails.
2279 2287
2280 2288 (default: False)
2281 2289
2282 2290 ``clonebundleprefers``
2283 2291 Defines preferences for which "clone bundles" to use.
2284 2292
2285 2293 Servers advertising "clone bundles" may advertise multiple available
2286 2294 bundles. Each bundle may have different attributes, such as the bundle
2287 2295 type and compression format. This option is used to prefer a particular
2288 2296 bundle over another.
2289 2297
2290 2298 The following keys are defined by Mercurial:
2291 2299
2292 2300 BUNDLESPEC
2293 2301 A bundle type specifier. These are strings passed to :hg:`bundle -t`.
2294 2302 e.g. ``gzip-v2`` or ``bzip2-v1``.
2295 2303
2296 2304 COMPRESSION
2297 2305 The compression format of the bundle. e.g. ``gzip`` and ``bzip2``.
2298 2306
2299 2307 Server operators may define custom keys.
2300 2308
2301 2309 Example values: ``COMPRESSION=bzip2``,
2302 2310 ``BUNDLESPEC=gzip-v2, COMPRESSION=gzip``.
2303 2311
2304 2312 By default, the first bundle advertised by the server is used.
2305 2313
2306 2314 ``color``
2307 2315 When to colorize output. Possible value are Boolean ("yes" or "no"), or
2308 2316 "debug", or "always". (default: "yes"). "yes" will use color whenever it
2309 2317 seems possible. See :hg:`help color` for details.
2310 2318
2311 2319 ``commitsubrepos``
2312 2320 Whether to commit modified subrepositories when committing the
2313 2321 parent repository. If False and one subrepository has uncommitted
2314 2322 changes, abort the commit.
2315 2323 (default: False)
2316 2324
2317 2325 ``debug``
2318 2326 Print debugging information. (default: False)
2319 2327
2320 2328 ``editor``
2321 2329 The editor to use during a commit. (default: ``$EDITOR`` or ``vi``)
2322 2330
2323 2331 ``fallbackencoding``
2324 2332 Encoding to try if it's not possible to decode the changelog using
2325 2333 UTF-8. (default: ISO-8859-1)
2326 2334
2327 2335 ``graphnodetemplate``
2328 2336 The template used to print changeset nodes in an ASCII revision graph.
2329 2337 (default: ``{graphnode}``)
2330 2338
2331 2339 ``ignore``
2332 2340 A file to read per-user ignore patterns from. This file should be
2333 2341 in the same format as a repository-wide .hgignore file. Filenames
2334 2342 are relative to the repository root. This option supports hook syntax,
2335 2343 so if you want to specify multiple ignore files, you can do so by
2336 2344 setting something like ``ignore.other = ~/.hgignore2``. For details
2337 2345 of the ignore file format, see the ``hgignore(5)`` man page.
2338 2346
2339 2347 ``interactive``
2340 2348 Allow to prompt the user. (default: True)
2341 2349
2342 2350 ``interface``
2343 2351 Select the default interface for interactive features (default: text).
2344 2352 Possible values are 'text' and 'curses'.
2345 2353
2346 2354 ``interface.chunkselector``
2347 2355 Select the interface for change recording (e.g. :hg:`commit -i`).
2348 2356 Possible values are 'text' and 'curses'.
2349 2357 This config overrides the interface specified by ui.interface.
2350 2358
2351 2359 ``large-file-limit``
2352 2360 Largest file size that gives no memory use warning.
2353 2361 Possible values are integers or 0 to disable the check.
2354 2362 (default: 10000000)
2355 2363
2356 2364 ``logtemplate``
2357 2365 Template string for commands that print changesets.
2358 2366
2359 2367 ``merge``
2360 2368 The conflict resolution program to use during a manual merge.
2361 2369 For more information on merge tools see :hg:`help merge-tools`.
2362 2370 For configuring merge tools see the ``[merge-tools]`` section.
2363 2371
2364 2372 ``mergemarkers``
2365 2373 Sets the merge conflict marker label styling. The ``detailed``
2366 2374 style uses the ``mergemarkertemplate`` setting to style the labels.
2367 2375 The ``basic`` style just uses 'local' and 'other' as the marker label.
2368 2376 One of ``basic`` or ``detailed``.
2369 2377 (default: ``basic``)
2370 2378
2371 2379 ``mergemarkertemplate``
2372 2380 The template used to print the commit description next to each conflict
2373 2381 marker during merge conflicts. See :hg:`help templates` for the template
2374 2382 format.
2375 2383
2376 2384 Defaults to showing the hash, tags, branches, bookmarks, author, and
2377 2385 the first line of the commit description.
2378 2386
2379 2387 If you use non-ASCII characters in names for tags, branches, bookmarks,
2380 2388 authors, and/or commit descriptions, you must pay attention to encodings of
2381 2389 managed files. At template expansion, non-ASCII characters use the encoding
2382 2390 specified by the ``--encoding`` global option, ``HGENCODING`` or other
2383 2391 environment variables that govern your locale. If the encoding of the merge
2384 2392 markers is different from the encoding of the merged files,
2385 2393 serious problems may occur.
2386 2394
2387 2395 Can be overridden per-merge-tool, see the ``[merge-tools]`` section.
2388 2396
2389 2397 ``message-output``
2390 2398 Where to write status and error messages. (default: ``stdio``)
2391 2399
2392 2400 ``channel``
2393 2401 Use separate channel for structured output. (Command-server only)
2394 2402 ``stderr``
2395 2403 Everything to stderr.
2396 2404 ``stdio``
2397 2405 Status to stdout, and error to stderr.
2398 2406
2399 2407 ``origbackuppath``
2400 2408 The path to a directory used to store generated .orig files. If the path is
2401 2409 not a directory, one will be created. If set, files stored in this
2402 2410 directory have the same name as the original file and do not have a .orig
2403 2411 suffix.
2404 2412
2405 2413 ``paginate``
2406 2414 Control the pagination of command output (default: True). See :hg:`help pager`
2407 2415 for details.
2408 2416
2409 2417 ``patch``
2410 2418 An optional external tool that ``hg import`` and some extensions
2411 2419 will use for applying patches. By default Mercurial uses an
2412 2420 internal patch utility. The external tool must work as the common
2413 2421 Unix ``patch`` program. In particular, it must accept a ``-p``
2414 2422 argument to strip patch headers, a ``-d`` argument to specify the
2415 2423 current directory, a file name to patch, and a patch file to take
2416 2424 from stdin.
2417 2425
2418 2426 It is possible to specify a patch tool together with extra
2419 2427 arguments. For example, setting this option to ``patch --merge``
2420 2428 will use the ``patch`` program with its 2-way merge option.
2421 2429
2422 2430 ``portablefilenames``
2423 2431 Check for portable filenames. Can be ``warn``, ``ignore`` or ``abort``.
2424 2432 (default: ``warn``)
2425 2433
2426 2434 ``warn``
2427 2435 Print a warning message on POSIX platforms, if a file with a non-portable
2428 2436 filename is added (e.g. a file with a name that can't be created on
2429 2437 Windows because it contains reserved parts like ``AUX``, reserved
2430 2438 characters like ``:``, or would cause a case collision with an existing
2431 2439 file).
2432 2440
2433 2441 ``ignore``
2434 2442 Don't print a warning.
2435 2443
2436 2444 ``abort``
2437 2445 The command is aborted.
2438 2446
2439 2447 ``true``
2440 2448 Alias for ``warn``.
2441 2449
2442 2450 ``false``
2443 2451 Alias for ``ignore``.
2444 2452
2445 2453 .. container:: windows
2446 2454
2447 2455 On Windows, this configuration option is ignored and the command aborted.
2448 2456
2449 2457 ``pre-merge-tool-output-template``
2450 2458 A template that is printed before executing an external merge tool. This can
2451 2459 be used to print out additional context that might be useful to have during
2452 2460 the conflict resolution, such as the description of the various commits
2453 2461 involved or bookmarks/tags.
2454 2462
2455 2463 Additional information is available in the ``local`, ``base``, and ``other``
2456 2464 dicts. For example: ``{local.label}``, ``{base.name}``, or
2457 2465 ``{other.islink}``.
2458 2466
2459 2467 ``quiet``
2460 2468 Reduce the amount of output printed.
2461 2469 (default: False)
2462 2470
2463 2471 ``relative-paths``
2464 2472 Prefer relative paths in the UI.
2465 2473
2466 2474 ``remotecmd``
2467 2475 Remote command to use for clone/push/pull operations.
2468 2476 (default: ``hg``)
2469 2477
2470 2478 ``report_untrusted``
2471 2479 Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a
2472 2480 trusted user or group.
2473 2481 (default: True)
2474 2482
2475 2483 ``slash``
2476 2484 (Deprecated. Use ``slashpath`` template filter instead.)
2477 2485
2478 2486 Display paths using a slash (``/``) as the path separator. This
2479 2487 only makes a difference on systems where the default path
2480 2488 separator is not the slash character (e.g. Windows uses the
2481 2489 backslash character (``\``)).
2482 2490 (default: False)
2483 2491
2484 2492 ``statuscopies``
2485 2493 Display copies in the status command.
2486 2494
2487 2495 ``ssh``
2488 2496 Command to use for SSH connections. (default: ``ssh``)
2489 2497
2490 2498 ``ssherrorhint``
2491 2499 A hint shown to the user in the case of SSH error (e.g.
2492 2500 ``Please see http://company/internalwiki/ssh.html``)
2493 2501
2494 2502 ``strict``
2495 2503 Require exact command names, instead of allowing unambiguous
2496 2504 abbreviations. (default: False)
2497 2505
2498 2506 ``style``
2499 2507 Name of style to use for command output.
2500 2508
2501 2509 ``supportcontact``
2502 2510 A URL where users should report a Mercurial traceback. Use this if you are a
2503 2511 large organisation with its own Mercurial deployment process and crash
2504 2512 reports should be addressed to your internal support.
2505 2513
2506 2514 ``textwidth``
2507 2515 Maximum width of help text. A longer line generated by ``hg help`` or
2508 2516 ``hg subcommand --help`` will be broken after white space to get this
2509 2517 width or the terminal width, whichever comes first.
2510 2518 A non-positive value will disable this and the terminal width will be
2511 2519 used. (default: 78)
2512 2520
2513 2521 ``timeout``
2514 2522 The timeout used when a lock is held (in seconds), a negative value
2515 2523 means no timeout. (default: 600)
2516 2524
2517 2525 ``timeout.warn``
2518 2526 Time (in seconds) before a warning is printed about held lock. A negative
2519 2527 value means no warning. (default: 0)
2520 2528
2521 2529 ``traceback``
2522 2530 Mercurial always prints a traceback when an unknown exception
2523 2531 occurs. Setting this to True will make Mercurial print a traceback
2524 2532 on all exceptions, even those recognized by Mercurial (such as
2525 2533 IOError or MemoryError). (default: False)
2526 2534
2527 2535 ``tweakdefaults``
2528 2536
2529 2537 By default Mercurial's behavior changes very little from release
2530 2538 to release, but over time the recommended config settings
2531 2539 shift. Enable this config to opt in to get automatic tweaks to
2532 2540 Mercurial's behavior over time. This config setting will have no
2533 2541 effect if ``HGPLAIN`` is set or ``HGPLAINEXCEPT`` is set and does
2534 2542 not include ``tweakdefaults``. (default: False)
2535 2543
2536 2544 It currently means::
2537 2545
2538 2546 .. tweakdefaultsmarker
2539 2547
2540 2548 ``username``
2541 2549 The committer of a changeset created when running "commit".
2542 2550 Typically a person's name and email address, e.g. ``Fred Widget
2543 2551 <fred@example.com>``. Environment variables in the
2544 2552 username are expanded.
2545 2553
2546 2554 (default: ``$EMAIL`` or ``username@hostname``. If the username in
2547 2555 hgrc is empty, e.g. if the system admin set ``username =`` in the
2548 2556 system hgrc, it has to be specified manually or in a different
2549 2557 hgrc file)
2550 2558
2551 2559 ``verbose``
2552 2560 Increase the amount of output printed. (default: False)
2553 2561
2554 2562
2555 2563 ``web``
2556 2564 -------
2557 2565
2558 2566 Web interface configuration. The settings in this section apply to
2559 2567 both the builtin webserver (started by :hg:`serve`) and the script you
2560 2568 run through a webserver (``hgweb.cgi`` and the derivatives for FastCGI
2561 2569 and WSGI).
2562 2570
2563 2571 The Mercurial webserver does no authentication (it does not prompt for
2564 2572 usernames and passwords to validate *who* users are), but it does do
2565 2573 authorization (it grants or denies access for *authenticated users*
2566 2574 based on settings in this section). You must either configure your
2567 2575 webserver to do authentication for you, or disable the authorization
2568 2576 checks.
2569 2577
2570 2578 For a quick setup in a trusted environment, e.g., a private LAN, where
2571 2579 you want it to accept pushes from anybody, you can use the following
2572 2580 command line::
2573 2581
2574 2582 $ hg --config web.allow-push=* --config web.push_ssl=False serve
2575 2583
2576 2584 Note that this will allow anybody to push anything to the server and
2577 2585 that this should not be used for public servers.
2578 2586
2579 2587 The full set of options is:
2580 2588
2581 2589 ``accesslog``
2582 2590 Where to output the access log. (default: stdout)
2583 2591
2584 2592 ``address``
2585 2593 Interface address to bind to. (default: all)
2586 2594
2587 2595 ``allow-archive``
2588 2596 List of archive format (bz2, gz, zip) allowed for downloading.
2589 2597 (default: empty)
2590 2598
2591 2599 ``allowbz2``
2592 2600 (DEPRECATED) Whether to allow .tar.bz2 downloading of repository
2593 2601 revisions.
2594 2602 (default: False)
2595 2603
2596 2604 ``allowgz``
2597 2605 (DEPRECATED) Whether to allow .tar.gz downloading of repository
2598 2606 revisions.
2599 2607 (default: False)
2600 2608
2601 2609 ``allow-pull``
2602 2610 Whether to allow pulling from the repository. (default: True)
2603 2611
2604 2612 ``allow-push``
2605 2613 Whether to allow pushing to the repository. If empty or not set,
2606 2614 pushing is not allowed. If the special value ``*``, any remote
2607 2615 user can push, including unauthenticated users. Otherwise, the
2608 2616 remote user must have been authenticated, and the authenticated
2609 2617 user name must be present in this list. The contents of the
2610 2618 allow-push list are examined after the deny_push list.
2611 2619
2612 2620 ``allow_read``
2613 2621 If the user has not already been denied repository access due to
2614 2622 the contents of deny_read, this list determines whether to grant
2615 2623 repository access to the user. If this list is not empty, and the
2616 2624 user is unauthenticated or not present in the list, then access is
2617 2625 denied for the user. If the list is empty or not set, then access
2618 2626 is permitted to all users by default. Setting allow_read to the
2619 2627 special value ``*`` is equivalent to it not being set (i.e. access
2620 2628 is permitted to all users). The contents of the allow_read list are
2621 2629 examined after the deny_read list.
2622 2630
2623 2631 ``allowzip``
2624 2632 (DEPRECATED) Whether to allow .zip downloading of repository
2625 2633 revisions. This feature creates temporary files.
2626 2634 (default: False)
2627 2635
2628 2636 ``archivesubrepos``
2629 2637 Whether to recurse into subrepositories when archiving.
2630 2638 (default: False)
2631 2639
2632 2640 ``baseurl``
2633 2641 Base URL to use when publishing URLs in other locations, so
2634 2642 third-party tools like email notification hooks can construct
2635 2643 URLs. Example: ``http://hgserver/repos/``.
2636 2644
2637 2645 ``cacerts``
2638 2646 Path to file containing a list of PEM encoded certificate
2639 2647 authority certificates. Environment variables and ``~user``
2640 2648 constructs are expanded in the filename. If specified on the
2641 2649 client, then it will verify the identity of remote HTTPS servers
2642 2650 with these certificates.
2643 2651
2644 2652 To disable SSL verification temporarily, specify ``--insecure`` from
2645 2653 command line.
2646 2654
2647 2655 You can use OpenSSL's CA certificate file if your platform has
2648 2656 one. On most Linux systems this will be
2649 2657 ``/etc/ssl/certs/ca-certificates.crt``. Otherwise you will have to
2650 2658 generate this file manually. The form must be as follows::
2651 2659
2652 2660 -----BEGIN CERTIFICATE-----
2653 2661 ... (certificate in base64 PEM encoding) ...
2654 2662 -----END CERTIFICATE-----
2655 2663 -----BEGIN CERTIFICATE-----
2656 2664 ... (certificate in base64 PEM encoding) ...
2657 2665 -----END CERTIFICATE-----
2658 2666
2659 2667 ``cache``
2660 2668 Whether to support caching in hgweb. (default: True)
2661 2669
2662 2670 ``certificate``
2663 2671 Certificate to use when running :hg:`serve`.
2664 2672
2665 2673 ``collapse``
2666 2674 With ``descend`` enabled, repositories in subdirectories are shown at
2667 2675 a single level alongside repositories in the current path. With
2668 2676 ``collapse`` also enabled, repositories residing at a deeper level than
2669 2677 the current path are grouped behind navigable directory entries that
2670 2678 lead to the locations of these repositories. In effect, this setting
2671 2679 collapses each collection of repositories found within a subdirectory
2672 2680 into a single entry for that subdirectory. (default: False)
2673 2681
2674 2682 ``comparisoncontext``
2675 2683 Number of lines of context to show in side-by-side file comparison. If
2676 2684 negative or the value ``full``, whole files are shown. (default: 5)
2677 2685
2678 2686 This setting can be overridden by a ``context`` request parameter to the
2679 2687 ``comparison`` command, taking the same values.
2680 2688
2681 2689 ``contact``
2682 2690 Name or email address of the person in charge of the repository.
2683 2691 (default: ui.username or ``$EMAIL`` or "unknown" if unset or empty)
2684 2692
2685 2693 ``csp``
2686 2694 Send a ``Content-Security-Policy`` HTTP header with this value.
2687 2695
2688 2696 The value may contain a special string ``%nonce%``, which will be replaced
2689 2697 by a randomly-generated one-time use value. If the value contains
2690 2698 ``%nonce%``, ``web.cache`` will be disabled, as caching undermines the
2691 2699 one-time property of the nonce. This nonce will also be inserted into
2692 2700 ``<script>`` elements containing inline JavaScript.
2693 2701
2694 2702 Note: lots of HTML content sent by the server is derived from repository
2695 2703 data. Please consider the potential for malicious repository data to
2696 2704 "inject" itself into generated HTML content as part of your security
2697 2705 threat model.
2698 2706
2699 2707 ``deny_push``
2700 2708 Whether to deny pushing to the repository. If empty or not set,
2701 2709 push is not denied. If the special value ``*``, all remote users are
2702 2710 denied push. Otherwise, unauthenticated users are all denied, and
2703 2711 any authenticated user name present in this list is also denied. The
2704 2712 contents of the deny_push list are examined before the allow-push list.
2705 2713
2706 2714 ``deny_read``
2707 2715 Whether to deny reading/viewing of the repository. If this list is
2708 2716 not empty, unauthenticated users are all denied, and any
2709 2717 authenticated user name present in this list is also denied access to
2710 2718 the repository. If set to the special value ``*``, all remote users
2711 2719 are denied access (rarely needed ;). If deny_read is empty or not set,
2712 2720 the determination of repository access depends on the presence and
2713 2721 content of the allow_read list (see description). If both
2714 2722 deny_read and allow_read are empty or not set, then access is
2715 2723 permitted to all users by default. If the repository is being
2716 2724 served via hgwebdir, denied users will not be able to see it in
2717 2725 the list of repositories. The contents of the deny_read list have
2718 2726 priority over (are examined before) the contents of the allow_read
2719 2727 list.
2720 2728
2721 2729 ``descend``
2722 2730 hgwebdir indexes will not descend into subdirectories. Only repositories
2723 2731 directly in the current path will be shown (other repositories are still
2724 2732 available from the index corresponding to their containing path).
2725 2733
2726 2734 ``description``
2727 2735 Textual description of the repository's purpose or contents.
2728 2736 (default: "unknown")
2729 2737
2730 2738 ``encoding``
2731 2739 Character encoding name. (default: the current locale charset)
2732 2740 Example: "UTF-8".
2733 2741
2734 2742 ``errorlog``
2735 2743 Where to output the error log. (default: stderr)
2736 2744
2737 2745 ``guessmime``
2738 2746 Control MIME types for raw download of file content.
2739 2747 Set to True to let hgweb guess the content type from the file
2740 2748 extension. This will serve HTML files as ``text/html`` and might
2741 2749 allow cross-site scripting attacks when serving untrusted
2742 2750 repositories. (default: False)
2743 2751
2744 2752 ``hidden``
2745 2753 Whether to hide the repository in the hgwebdir index.
2746 2754 (default: False)
2747 2755
2748 2756 ``ipv6``
2749 2757 Whether to use IPv6. (default: False)
2750 2758
2751 2759 ``labels``
2752 2760 List of string *labels* associated with the repository.
2753 2761
2754 2762 Labels are exposed as a template keyword and can be used to customize
2755 2763 output. e.g. the ``index`` template can group or filter repositories
2756 2764 by labels and the ``summary`` template can display additional content
2757 2765 if a specific label is present.
2758 2766
2759 2767 ``logoimg``
2760 2768 File name of the logo image that some templates display on each page.
2761 2769 The file name is relative to ``staticurl``. That is, the full path to
2762 2770 the logo image is "staticurl/logoimg".
2763 2771 If unset, ``hglogo.png`` will be used.
2764 2772
2765 2773 ``logourl``
2766 2774 Base URL to use for logos. If unset, ``https://mercurial-scm.org/``
2767 2775 will be used.
2768 2776
2769 2777 ``maxchanges``
2770 2778 Maximum number of changes to list on the changelog. (default: 10)
2771 2779
2772 2780 ``maxfiles``
2773 2781 Maximum number of files to list per changeset. (default: 10)
2774 2782
2775 2783 ``maxshortchanges``
2776 2784 Maximum number of changes to list on the shortlog, graph or filelog
2777 2785 pages. (default: 60)
2778 2786
2779 2787 ``name``
2780 2788 Repository name to use in the web interface.
2781 2789 (default: current working directory)
2782 2790
2783 2791 ``port``
2784 2792 Port to listen on. (default: 8000)
2785 2793
2786 2794 ``prefix``
2787 2795 Prefix path to serve from. (default: '' (server root))
2788 2796
2789 2797 ``push_ssl``
2790 2798 Whether to require that inbound pushes be transported over SSL to
2791 2799 prevent password sniffing. (default: True)
2792 2800
2793 2801 ``refreshinterval``
2794 2802 How frequently directory listings re-scan the filesystem for new
2795 2803 repositories, in seconds. This is relevant when wildcards are used
2796 2804 to define paths. Depending on how much filesystem traversal is
2797 2805 required, refreshing may negatively impact performance.
2798 2806
2799 2807 Values less than or equal to 0 always refresh.
2800 2808 (default: 20)
2801 2809
2802 2810 ``server-header``
2803 2811 Value for HTTP ``Server`` response header.
2804 2812
2805 2813 ``static``
2806 2814 Directory where static files are served from.
2807 2815
2808 2816 ``staticurl``
2809 2817 Base URL to use for static files. If unset, static files (e.g. the
2810 2818 hgicon.png favicon) will be served by the CGI script itself. Use
2811 2819 this setting to serve them directly with the HTTP server.
2812 2820 Example: ``http://hgserver/static/``.
2813 2821
2814 2822 ``stripes``
2815 2823 How many lines a "zebra stripe" should span in multi-line output.
2816 2824 Set to 0 to disable. (default: 1)
2817 2825
2818 2826 ``style``
2819 2827 Which template map style to use. The available options are the names of
2820 2828 subdirectories in the HTML templates path. (default: ``paper``)
2821 2829 Example: ``monoblue``.
2822 2830
2823 2831 ``templates``
2824 2832 Where to find the HTML templates. The default path to the HTML templates
2825 2833 can be obtained from ``hg debuginstall``.
2826 2834
2827 2835 ``websub``
2828 2836 ----------
2829 2837
2830 2838 Web substitution filter definition. You can use this section to
2831 2839 define a set of regular expression substitution patterns which
2832 2840 let you automatically modify the hgweb server output.
2833 2841
2834 2842 The default hgweb templates only apply these substitution patterns
2835 2843 on the revision description fields. You can apply them anywhere
2836 2844 you want when you create your own templates by adding calls to the
2837 2845 "websub" filter (usually after calling the "escape" filter).
2838 2846
2839 2847 This can be used, for example, to convert issue references to links
2840 2848 to your issue tracker, or to convert "markdown-like" syntax into
2841 2849 HTML (see the examples below).
2842 2850
2843 2851 Each entry in this section names a substitution filter.
2844 2852 The value of each entry defines the substitution expression itself.
2845 2853 The websub expressions follow the old interhg extension syntax,
2846 2854 which in turn imitates the Unix sed replacement syntax::
2847 2855
2848 2856 patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i]
2849 2857
2850 2858 You can use any separator other than "/". The final "i" is optional
2851 2859 and indicates that the search must be case insensitive.
2852 2860
2853 2861 Examples::
2854 2862
2855 2863 [websub]
2856 2864 issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i
2857 2865 italic = s/\b_(\S+)_\b/<i>\1<\/i>/
2858 2866 bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/
2859 2867
2860 2868 ``worker``
2861 2869 ----------
2862 2870
2863 2871 Parallel master/worker configuration. We currently perform working
2864 2872 directory updates in parallel on Unix-like systems, which greatly
2865 2873 helps performance.
2866 2874
2867 2875 ``enabled``
2868 2876 Whether to enable workers code to be used.
2869 2877 (default: true)
2870 2878
2871 2879 ``numcpus``
2872 2880 Number of CPUs to use for parallel operations. A zero or
2873 2881 negative value is treated as ``use the default``.
2874 2882 (default: 4 or the number of CPUs on the system, whichever is larger)
2875 2883
2876 2884 ``backgroundclose``
2877 2885 Whether to enable closing file handles on background threads during certain
2878 2886 operations. Some platforms aren't very efficient at closing file
2879 2887 handles that have been written or appended to. By performing file closing
2880 2888 on background threads, file write rate can increase substantially.
2881 2889 (default: true on Windows, false elsewhere)
2882 2890
2883 2891 ``backgroundcloseminfilecount``
2884 2892 Minimum number of files required to trigger background file closing.
2885 2893 Operations not writing this many files won't start background close
2886 2894 threads.
2887 2895 (default: 2048)
2888 2896
2889 2897 ``backgroundclosemaxqueue``
2890 2898 The maximum number of opened file handles waiting to be closed in the
2891 2899 background. This option only has an effect if ``backgroundclose`` is
2892 2900 enabled.
2893 2901 (default: 384)
2894 2902
2895 2903 ``backgroundclosethreadcount``
2896 2904 Number of threads to process background file closes. Only relevant if
2897 2905 ``backgroundclose`` is enabled.
2898 2906 (default: 4)
General Comments 0
You need to be logged in to leave comments. Login now